ivt 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,9 +36,7 @@ interface DataTablePaginationProps<TData> {
|
|
36
36
|
}
|
37
37
|
declare function DataTablePagination<TData>({ table, pageSizeOptions, dataLabel, }: DataTablePaginationProps<TData>): react_jsx_runtime.JSX.Element;
|
38
38
|
|
39
|
-
declare
|
40
|
-
className?: string;
|
41
|
-
}): react_jsx_runtime.JSX.Element;
|
39
|
+
declare const DataTablePaginationSkeleton: React__default.FC;
|
42
40
|
|
43
41
|
interface DataTableRowSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
44
42
|
columnCount: number;
|
@@ -121,6 +119,7 @@ interface DataTableViewOptionsProps<TData, TValue> {
|
|
121
119
|
messageEmpty?: React__default.ReactNode;
|
122
120
|
rowKey: keyof TData | ((row: TData) => string | number);
|
123
121
|
dividingColumnKey?: string[];
|
122
|
+
loadingContent?: React__default.ReactNode;
|
124
123
|
}
|
125
124
|
type RowData = {
|
126
125
|
[key: string]: any;
|
@@ -128,6 +127,6 @@ type RowData = {
|
|
128
127
|
interface ListParams {
|
129
128
|
[propName: string]: string | string[];
|
130
129
|
}
|
131
|
-
declare const DataTableMainFrameSortable: <TData extends RowData, TValue>({ table, columns, isLoadingTable, setQueryParams, dataLabel, actionColumns, data, messageEmpty, onDataChange, rowKey, dividingColumnKey, }: DataTableViewOptionsProps<TData, TValue>) => react_jsx_runtime.JSX.Element;
|
130
|
+
declare const DataTableMainFrameSortable: <TData extends RowData, TValue>({ table, columns, isLoadingTable, loadingContent, setQueryParams, dataLabel, actionColumns, data, messageEmpty, onDataChange, rowKey, dividingColumnKey, }: DataTableViewOptionsProps<TData, TValue>) => react_jsx_runtime.JSX.Element;
|
132
131
|
|
133
132
|
export { DataTableMainFrame, DataTableMainFrameSortable, DataTablePagination, DataTablePaginationSkeleton, DataTableRowSkeleton, DataTableSearch, DataTableSkeleton, DataTableStatus, DataTableViewOptions };
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import t,{forwardRef as a,createElement as n,useRef as l}from"react";import{c as r}from"../chunks/utils-B9uwc_lt.mjs";import{C as s}from"../chunks/chevron-down-BlskY22a.mjs";import{C as c,b as m,c as o,d as i,e as u,f as d,S as g}from"../chunks/command-DYONarI_.mjs";import{C as p}from"../chunks/check-DoBi3iW5.mjs";import{P as h,a as f,b as E}from"../chunks/popover-CSY_ub7s.mjs";import{B as w}from"../chunks/button-B7K2JEBG.mjs";import{I as N}from"../chunks/input-BtSMyTkT.mjs";import{T as y}from"../chunks/TextWrap-DM8p5RY0.mjs";import{S as k,h as b,i as x,a as C,c as v}from"../chunks/select-Co76oy2I.mjs";import{C as S}from"../chunks/chevron-left-BXFDtxhQ.mjs";import{C as j}from"../chunks/chevron-right-DAqTCOj7.mjs";import{c as R,f as z}from"../chunks/pagination-BiktkEzi.mjs";import{S as P}from"../chunks/skeleton-cvIjllDp.mjs";import{e as A,f as F,T as M,a as I,d as L,b as V}from"../chunks/table-xzX2584j.mjs";import{S as $,a as T}from"../chunks/scroll-area-B-b-oQYr.mjs";import{c as D}from"../chunks/createLucideIcon-CkKdyF_L.mjs";import{S as B,b as O}from"../chunks/sortable-DaXPlC2-.mjs";import"../chunks/bundle-mjs-BYGwPY3j.mjs";import"../chunks/index-Dix9fE1x.mjs";import"../chunks/index-IXx8l3RV.mjs";import"../chunks/index-DuMyb05s.mjs";import"../chunks/index-BX6nSpY1.mjs";import"react/jsx-runtime";import"../chunks/index-DdNjMgpV.mjs";import"../chunks/index-DyUn0c26.mjs";import"../chunks/index-DZldl4eo.mjs";import"../chunks/index-BSf-atXx.mjs";import"react-dom";import"@radix-ui/react-slot";import"../chunks/index-qP_a6BiF.mjs";import"../chunks/tslib.es6-CC_zzJ2l.mjs";import"../chunks/dialog-Bs3UmyLz.mjs";import"../chunks/x-Bdqqbrz4.mjs";import"../chunks/index-Ck1fOwnt.mjs";import"../chunks/index-XatPIL6c.mjs";import"class-variance-authority";import"@radix-ui/react-select";import"../chunks/index-DB6P4Tz1.mjs";const W=D("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),q=D("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);function H({table:t,transformColumnName:a}){const n=e.useRef(null);return e.createElement(h,{modal:!0},e.createElement(f,{asChild:!0},e.createElement(w,{ref:n,"aria-label":"Toggle columns",variant:"outline",className:"text-muted-foreground hover:text-muted-foreground w-full max-w-[12.5rem] items-center justify-between bg-inherit px-3 py-2 hover:bg-inherit"},"Colunas",e.createElement(s,{className:"h-4 w-4"}))),e.createElement(E,{align:"end",className:"w-44 p-0",onCloseAutoFocus:()=>n.current?.focus()},e.createElement(c,null,e.createElement(m,{placeholder:"Pesquisar colunas..."}),e.createElement(o,null,e.createElement(i,null,"Nenhuma coluna encontrada."),e.createElement(u,null,t.getAllColumns().filter((e=>void 0!==e.accessorFn&&e.getCanHide())).map((t=>e.createElement(d,{key:t.id,onSelect:()=>t.toggleVisibility(!t.getIsVisible())},e.createElement("span",{className:"truncate"},a?a(t.id):t.id),e.createElement(p,{className:r("ml-auto size-4 shrink-0",t.getIsVisible()?"opacity-100":"opacity-0")})))))))))}function Z({table:e,keySearch:t,placeholder:a}){return React.createElement("div",{className:"relative w-full max-w-sm"},React.createElement(g,{className:"text-muted-foreground absolute top-3 left-3 h-4 w-4"}),React.createElement(N,{placeholder:a,value:e.getColumn(t)?.getFilterValue()??"",onChange:a=>e.getColumn(t)?.setFilterValue(a.target.value),className:"w-full pl-8 xl:w-80"}))}var G=["color"],K=a((function(e,t){var a=e.color,l=void 0===a?"currentColor":a,r=function(e,t){if(null==e)return{};var a,n,l={},r=Object.keys(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||(l[a]=e[a]);return l}(e,G);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),n("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:l,fillRule:"evenodd",clipRule:"evenodd"}))}));function Q(t,a){return t?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(n=t)||"function"==typeof n||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?e.createElement(t,a):t:null;var n}function U({table:e,pageSizeOptions:a=[20,30,50,100,200],dataLabel:n="Fundos"}){const l=a[0],r=e.getState().pagination.pageIndex+1,s=e.getRowCount(),c=Math.ceil(s/e.getState().pagination.pageSize);return t.createElement("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-2"},t.createElement("div",{className:"text-muted-foreground flex gap-1 text-sm"},t.createElement("p",{className:"ml-2"},"Mostrando ",e.getRowModel().rows.length.toLocaleString()," de ",s," ",n,".")),t.createElement("div",{className:"flex flex-wrap items-center justify-between gap-2 gap-y-4"},t.createElement(k,{value:String(e.getState().pagination.pageSize)||String(l),onValueChange:t=>e.setPageSize(Number(t))},t.createElement(b,{className:"w-fit"},t.createElement(x,{placeholder:`Mostrar ${e.getState().pagination.pageSize||l}`})),t.createElement(C,null,s&&(0===s||s<l)?t.createElement(v,{value:String(l)},"Mostrar ",l):t.createElement(t.Fragment,null,a.map((e=>t.createElement(v,{key:e,value:String(e)},"Mostrar ",e)))))),t.createElement("div",{className:"flex flex-wrap gap-2 gap-y-4"},t.createElement(w,{variant:"ghost",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),"aria-label":"Ir para página anterior",className:"gap-1"},t.createElement(S,{className:"size-4"}),"Anterior"),t.createElement("div",{className:"flex gap-2"},(()=>{const a=[];if(c<=3)for(let n=1;n<=c;n++)a.push(t.createElement(w,{variant:r===n?"outline":"ghost",key:n,onClick:()=>e.setPageIndex(n-1),className:"size-9"},n));else{a.push(t.createElement(w,{variant:1===r?"outline":"ghost",key:1,onClick:()=>e.setPageIndex(0),className:"size-9"},"1"));const n=Math.max(2,Math.min(r,c-2)),l=Math.min(c-1,n+3-2);n>2&&a.push(t.createElement(R,{key:"ellipsis-start",className:"list-none"},t.createElement(z,null)));for(let s=n;s<=l;s++)a.push(t.createElement(w,{variant:r===s?"outline":"ghost",key:s,onClick:()=>e.setPageIndex(s-1),className:"size-9"},s));l<c-1&&a.push(t.createElement(R,{key:"ellipsis-end",className:"list-none"},t.createElement(z,null))),a.push(t.createElement(w,{variant:r===c?"outline":"ghost",key:c,onClick:()=>e.setPageIndex(c-1)},c))}return a})()),t.createElement(w,{variant:"ghost",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),"aria-label":"Ir para próxima página",className:"gap-1"},"Próximo",t.createElement(j,{className:"size-4"})))))}function _({className:e}){return React.createElement("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-2"},React.createElement(P,{className:r("h-5 w-40",e)}),React.createElement("div",{className:"flex flex-wrap items-center justify-between gap-2 gap-y-4"},React.createElement(P,{className:r("h-10 w-28",e)}),React.createElement(P,{className:r("h-9 w-[16rem]",e)})))}function J(e){const{columnCount:t,rowCount:a=8,cellWidths:n=["auto"],shrinkZero:l=!1}=e;return React.createElement(React.Fragment,null,Array.from({length:a}).map(((e,a)=>React.createElement(A,{key:`row-${String(a)}`,className:"hover:bg-transparent"},Array.from({length:t}).map(((e,t)=>React.createElement(F,{key:`cell-${String(a)}-${t}`,style:{width:n[t],minWidth:l?n[t]:"auto"}},React.createElement(P,{className:"h-6 w-full"}))))))))}const X=({table:e,columns:a,isLoadingTable:n,setQueryParams:l,dataLabel:r,actionColumns:s=[],messageEmpty:c=t.createElement(t.Fragment,null,"Sem resultados")})=>{const m=Number(e.getState().pagination.pageIndex).toString(),o=Number(e.getState().pagination.pageSize).toString(),i=e.getState().sorting;return t.useEffect((()=>{if(!l)return;const e={sortingBy:"",order:""};i.length>0&&(e.sortingBy=i[0].id,e.order=i[0].desc?"DESC":"ASC"),l((t=>({...t,pageSize:o,page:m,...e})))}),[m,o,l,i]),t.createElement(t.Fragment,null,t.createElement($,{className:"bg-background w-full rounded-md border whitespace-nowrap"},t.createElement(M,null,t.createElement(I,{className:"group rounded-md"},e.getHeaderGroups().map((e=>t.createElement(A,{key:e.id},e.headers.map((e=>{const{column:{id:a}}=e,n=["actions",...s].includes(a);return t.createElement(L,{key:e.id},e.isPlaceholder?null:t.createElement(t.Fragment,null,t.createElement("div",{className:!n&&e.column.getCanSort()?"flex w-full items-center justify-start cursor-pointer gap-1 font-medium":"",onClick:n?void 0:e.column.getToggleSortingHandler()},Q(e.column.columnDef.header,e.getContext()),(!n&&e.column.getCanSort()&&{asc:t.createElement(W,{className:"h-3.5 w-3.5"}),desc:t.createElement(q,{className:"h-3.5 w-3.5"}),false:t.createElement(K,{className:"h-4 w-4"})}[e.column.getIsSorted()])??t.createElement(W,{className:"h-3.5 w-3.5"}))))})))))),t.createElement(V,null,!n&&e.getRowModel().rows?.length?e.getRowModel().rows.map((e=>t.createElement(A,{key:e.id,"data-state":e.getIsSelected()&&"selected",className:"even:bg-body/50"},e.getVisibleCells().map((e=>t.createElement(F,{key:e.id,className:"p-2"},t.createElement(y,null,Q(e.column.columnDef.cell,e.getContext())))))))):n?t.createElement(J,{columnCount:e.getAllColumns().length}):t.createElement(A,null,t.createElement(F,{colSpan:a.length,className:"h-24 text-center"},c)))),t.createElement(T,{orientation:"horizontal"})),n?t.createElement(_,null):t.createElement(U,{table:e,dataLabel:r}))};function Y(e){const{columnCount:a,rowCount:n=10,searchableColumnCount:l=0,filterableColumnCount:s=0,showViewOptions:c=!0,cellWidths:m=["auto"],withPagination:o=!0,shrinkZero:i=!1,className:u,...d}=e;return t.createElement("div",{className:r("w-full space-y-2.5 overflow-auto",u),...d},t.createElement("div",{className:"flex w-full items-center justify-between space-x-2 overflow-auto p-1"},t.createElement("div",{className:"flex flex-1 items-center space-x-2"},l>0?Array.from({length:l}).map(((e,a)=>t.createElement(P,{key:`${String(a)}`,className:"h-7 w-40 lg:w-60"}))):null,s>0?Array.from({length:s}).map(((e,a)=>t.createElement(P,{key:`${String(a)}`,className:"h-7 w-[4.5rem] border-dashed"}))):null),c?t.createElement(P,{className:"ml-auto hidden h-7 w-[4.5rem] lg:flex"}):null),t.createElement("div",{className:"rounded-md border"},t.createElement(M,null,t.createElement(I,null,Array.from({length:1}).map(((e,n)=>t.createElement(A,{key:`${String(n)}`,className:"hover:bg-transparent"},Array.from({length:a}).map(((e,a)=>t.createElement(L,{key:`${String(a)}`,style:{width:m[a],minWidth:i?m[a]:"auto"}},t.createElement(P,{className:"h-6 w-full"})))))))),t.createElement(V,null,Array.from({length:n}).map(((e,n)=>t.createElement(A,{key:`${String(n)}`,className:"hover:bg-transparent"},Array.from({length:a}).map(((e,a)=>t.createElement(F,{key:`${String(a)}`,style:{width:m[a],minWidth:i?m[a]:"auto"}},t.createElement(P,{className:"h-6 w-full"})))))))))),o?t.createElement("div",{className:"flex w-full items-center justify-between gap-4 overflow-auto p-1 sm:gap-8"},t.createElement(P,{className:"h-7 w-40 shrink-0"}),t.createElement("div",{className:"flex items-center gap-4 sm:gap-6 lg:gap-8"},t.createElement("div",{className:"flex items-center space-x-2"},t.createElement(P,{className:"h-7 w-24"}),t.createElement(P,{className:"h-7 w-[4.5rem]"})),t.createElement("div",{className:"flex items-center justify-center text-sm font-medium"},t.createElement(P,{className:"h-7 w-20"})),t.createElement("div",{className:"flex items-center space-x-2"},t.createElement(P,{className:"hidden size-7 lg:block"}),t.createElement(P,{className:"size-7"}),t.createElement(P,{className:"size-7"}),t.createElement(P,{className:"hidden size-7 lg:block"})))):null)}function ee({table:e,uniqueStatusValues:t,renderStatusMessage:a,className:n}){const u=l(null),g=e.getColumn("status")?.getFilterValue();return React.createElement(h,{modal:!0},React.createElement(f,{asChild:!0},React.createElement(w,{ref:u,"aria-label":"Filtre por status",variant:"outline",className:r("border-input text-muted-foreground ring-offset-background placeholder:text-muted-foreground hover:text-muted-foreground focus:ring-ring flex h-10 w-full max-w-60 items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm hover:bg-inherit focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",n)},g?a(g):"Todos os status",React.createElement(s,{className:"h-4 w-4"}))),React.createElement(E,{align:"end",className:"w-44 p-0",onCloseAutoFocus:()=>u.current?.focus()},React.createElement(c,null,React.createElement(m,{placeholder:"Pesquisar status..."}),React.createElement(o,null,React.createElement(i,null,"Nenhum status encontrado."),React.createElement(d,{key:"all",onSelect:()=>e.getColumn("status")?.setFilterValue(void 0)},React.createElement("span",{className:"truncate"},"Todos os status")),t.map((t=>{if(!t)return null;const n=a(t);return React.createElement(d,{key:`${String(t)}`,onSelect:()=>e.getColumn("status")?.setFilterValue(t)},React.createElement("span",{className:"truncate"},n))}))))))}const te=(e,t)=>"function"==typeof t?t(e):e[t],ae=({table:e,columns:a,isLoadingTable:n,setQueryParams:l,dataLabel:s,actionColumns:c=[],data:m,messageEmpty:o=t.createElement(t.Fragment,null,"Sem resultados"),onDataChange:i,rowKey:u,dividingColumnKey:d})=>{const[g,p]=t.useState(m);t.useEffect((()=>{p(m)}),[m]);const h=Number(e.getState().pagination.pageIndex).toString(),f=Number(e.getState().pagination.pageSize).toString(),E=e.getState().sorting;return t.useEffect((()=>{if(!l)return;const e={sortingBy:"",order:""};E.length>0&&(e.sortingBy=E[0].id,e.order=E[0].desc?"DESC":"ASC"),l((t=>({...t,pageSize:f,page:h,...e})))}),[h,f,l,E]),t.createElement(t.Fragment,null,t.createElement($,{className:"bg-background w-full rounded-md border whitespace-nowrap"},t.createElement(M,null,t.createElement(I,{className:"group rounded-md"},e.getHeaderGroups().map((e=>t.createElement(A,{key:e.id},e.headers.map((e=>{const{column:{id:a}}=e,n=["actions",...c].includes(a);return t.createElement(L,{className:d?.includes(a)?"border-r":"",key:e.id},e.isPlaceholder?null:t.createElement(t.Fragment,null,t.createElement("div",{className:!n&&e.column.getCanSort()?"flex w-full items-center justify-start cursor-pointer gap-1 font-medium":"",onClick:n?void 0:e.column.getToggleSortingHandler()},Q(e.column.columnDef.header,e.getContext()),(!n&&e.column.getCanSort()&&{asc:t.createElement(W,{className:"h-3.5 w-3.5"}),desc:t.createElement(q,{className:"h-3.5 w-3.5"}),false:t.createElement(K,{className:"h-4 w-4"})}[e.column.getIsSorted()])??t.createElement(W,{className:"h-3.5 w-3.5"}))))})))))),t.createElement(V,null,t.createElement(B,{value:g.map((e=>({...e,id:te(e,u)}))),onValueChange:e=>{p(e),i?.(e)}},!n&&e.getRowModel().rows?.length?e.getRowModel().rows.map((e=>{const a=e.original,n=te(a,u);return t.createElement(O,{key:e.id,value:n,asChild:!0},t.createElement(A,{key:e.id,"data-state":e.getIsSelected()&&"selected",className:"even:bg-body/50"},e.getVisibleCells().map((e=>t.createElement(F,{key:e.id,className:r("p-2",d?.includes(e.column.id)&&"border-r")},t.createElement(y,null,Q(e.column.columnDef.cell,e.getContext())))))))})):n?t.createElement(J,{columnCount:e.getAllColumns().length}):t.createElement(A,null,t.createElement(F,{colSpan:a.length,className:"h-24 text-center"},o))))),t.createElement(T,{orientation:"horizontal"})),n?t.createElement(_,null):t.createElement(U,{table:e,dataLabel:s}))};export{X as DataTableMainFrame,ae as DataTableMainFrameSortable,U as DataTablePagination,_ as DataTablePaginationSkeleton,J as DataTableRowSkeleton,Z as DataTableSearch,Y as DataTableSkeleton,ee as DataTableStatus,H as DataTableViewOptions};
|
1
|
+
import*as e from"react";import t,{forwardRef as a,createElement as n,useRef as l}from"react";import{c as r}from"../chunks/utils-B9uwc_lt.mjs";import{C as s}from"../chunks/chevron-down-BlskY22a.mjs";import{C as m,b as c,c as o,d as i,e as u,f as d,S as g}from"../chunks/command-DYONarI_.mjs";import{C as p}from"../chunks/check-DoBi3iW5.mjs";import{P as h,a as f,b as E}from"../chunks/popover-CSY_ub7s.mjs";import{B as w}from"../chunks/button-B7K2JEBG.mjs";import{I as N}from"../chunks/input-BtSMyTkT.mjs";import{T as y}from"../chunks/TextWrap-DM8p5RY0.mjs";import{S as x,h as b,i as k,a as C,c as v}from"../chunks/select-Co76oy2I.mjs";import{C as S}from"../chunks/chevron-left-BXFDtxhQ.mjs";import{C as j}from"../chunks/chevron-right-DAqTCOj7.mjs";import{c as R,f as z}from"../chunks/pagination-BiktkEzi.mjs";import{S as P}from"../chunks/skeleton-cvIjllDp.mjs";import{e as A,f as F,T as M,a as I,d as L,b as V}from"../chunks/table-xzX2584j.mjs";import{S as $,a as T}from"../chunks/scroll-area-B-b-oQYr.mjs";import{c as D}from"../chunks/createLucideIcon-CkKdyF_L.mjs";import{S as B,b as O}from"../chunks/sortable-DaXPlC2-.mjs";import"../chunks/bundle-mjs-BYGwPY3j.mjs";import"../chunks/index-Dix9fE1x.mjs";import"../chunks/index-IXx8l3RV.mjs";import"../chunks/index-DuMyb05s.mjs";import"../chunks/index-BX6nSpY1.mjs";import"react/jsx-runtime";import"../chunks/index-DdNjMgpV.mjs";import"../chunks/index-DyUn0c26.mjs";import"../chunks/index-DZldl4eo.mjs";import"../chunks/index-BSf-atXx.mjs";import"react-dom";import"@radix-ui/react-slot";import"../chunks/index-qP_a6BiF.mjs";import"../chunks/tslib.es6-CC_zzJ2l.mjs";import"../chunks/dialog-Bs3UmyLz.mjs";import"../chunks/x-Bdqqbrz4.mjs";import"../chunks/index-Ck1fOwnt.mjs";import"../chunks/index-XatPIL6c.mjs";import"class-variance-authority";import"@radix-ui/react-select";import"../chunks/index-DB6P4Tz1.mjs";const W=D("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),q=D("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);function H({table:t,transformColumnName:a}){const n=e.useRef(null);return e.createElement(h,{modal:!0},e.createElement(f,{asChild:!0},e.createElement(w,{ref:n,"aria-label":"Toggle columns",variant:"outline",className:"text-muted-foreground hover:text-muted-foreground w-full max-w-[12.5rem] items-center justify-between bg-inherit px-3 py-2 hover:bg-inherit"},"Colunas",e.createElement(s,{className:"h-4 w-4"}))),e.createElement(E,{align:"end",className:"w-44 p-0",onCloseAutoFocus:()=>n.current?.focus()},e.createElement(m,null,e.createElement(c,{placeholder:"Pesquisar colunas..."}),e.createElement(o,null,e.createElement(i,null,"Nenhuma coluna encontrada."),e.createElement(u,null,t.getAllColumns().filter((e=>void 0!==e.accessorFn&&e.getCanHide())).map((t=>e.createElement(d,{key:t.id,onSelect:()=>t.toggleVisibility(!t.getIsVisible())},e.createElement("span",{className:"truncate"},a?a(t.id):t.id),e.createElement(p,{className:r("ml-auto size-4 shrink-0",t.getIsVisible()?"opacity-100":"opacity-0")})))))))))}function Z({table:e,keySearch:t,placeholder:a}){return React.createElement("div",{className:"relative w-full max-w-sm"},React.createElement(g,{className:"text-muted-foreground absolute top-3 left-3 h-4 w-4"}),React.createElement(N,{placeholder:a,value:e.getColumn(t)?.getFilterValue()??"",onChange:a=>e.getColumn(t)?.setFilterValue(a.target.value),className:"w-full pl-8 xl:w-80"}))}var G=["color"],K=a((function(e,t){var a=e.color,l=void 0===a?"currentColor":a,r=function(e,t){if(null==e)return{};var a,n,l={},r=Object.keys(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||(l[a]=e[a]);return l}(e,G);return n("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),n("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:l,fillRule:"evenodd",clipRule:"evenodd"}))}));function Q(t,a){return t?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(n=t)||"function"==typeof n||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?e.createElement(t,a):t:null;var n}function U({table:e,pageSizeOptions:a=[20,30,50,100,200],dataLabel:n="Fundos"}){const l=a[0],r=e.getState().pagination.pageIndex+1,s=e.getRowCount(),m=Math.ceil(s/e.getState().pagination.pageSize);return t.createElement("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-2"},t.createElement("div",{className:"text-muted-foreground flex gap-1 text-sm"},t.createElement("p",{className:"ml-2"},"Mostrando ",e.getRowModel().rows.length.toLocaleString()," de ",s," ",n,".")),t.createElement("div",{className:"flex flex-wrap items-center justify-between gap-2 gap-y-4"},t.createElement(x,{value:String(e.getState().pagination.pageSize)||String(l),onValueChange:t=>e.setPageSize(Number(t))},t.createElement(b,{className:"w-fit"},t.createElement(k,{placeholder:`Mostrar ${e.getState().pagination.pageSize||l}`})),t.createElement(C,null,s&&(0===s||s<l)?t.createElement(v,{value:String(l)},"Mostrar ",l):t.createElement(t.Fragment,null,a.map((e=>t.createElement(v,{key:e,value:String(e)},"Mostrar ",e)))))),t.createElement("div",{className:"flex flex-wrap gap-2 gap-y-4"},t.createElement(w,{variant:"ghost",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),"aria-label":"Ir para página anterior",className:"gap-1"},t.createElement(S,{className:"size-4"}),"Anterior"),t.createElement("div",{className:"flex gap-2"},(()=>{const a=[];if(m<=3)for(let n=1;n<=m;n++)a.push(t.createElement(w,{variant:r===n?"outline":"ghost",key:n,onClick:()=>e.setPageIndex(n-1),className:"size-9"},n));else{a.push(t.createElement(w,{variant:1===r?"outline":"ghost",key:1,onClick:()=>e.setPageIndex(0),className:"size-9"},"1"));const n=Math.max(2,Math.min(r,m-2)),l=Math.min(m-1,n+3-2);n>2&&a.push(t.createElement(R,{key:"ellipsis-start",className:"list-none"},t.createElement(z,null)));for(let s=n;s<=l;s++)a.push(t.createElement(w,{variant:r===s?"outline":"ghost",key:s,onClick:()=>e.setPageIndex(s-1),className:"size-9"},s));l<m-1&&a.push(t.createElement(R,{key:"ellipsis-end",className:"list-none"},t.createElement(z,null))),a.push(t.createElement(w,{variant:r===m?"outline":"ghost",key:m,onClick:()=>e.setPageIndex(m-1)},m))}return a})()),t.createElement(w,{variant:"ghost",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),"aria-label":"Ir para próxima página",className:"gap-1"},"Próximo",t.createElement(j,{className:"size-4"})))))}const _=({className:e})=>t.createElement("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-2"},t.createElement(P,{className:r("h-5 w-40",e)}),t.createElement("div",{className:"flex flex-wrap items-center justify-between gap-2 gap-y-4"},t.createElement(P,{className:r("h-10 w-28",e)}),t.createElement(P,{className:r("h-9 w-[16rem]",e)})));function J(e){const{columnCount:t,rowCount:a=8,cellWidths:n=["auto"],shrinkZero:l=!1}=e;return React.createElement(React.Fragment,null,Array.from({length:a}).map(((e,a)=>React.createElement(A,{key:`row-${String(a)}`,className:"hover:bg-transparent"},Array.from({length:t}).map(((e,t)=>React.createElement(F,{key:`cell-${String(a)}-${t}`,style:{width:n[t],minWidth:l?n[t]:"auto"}},React.createElement(P,{className:"h-6 w-full"}))))))))}const X=({table:e,columns:a,isLoadingTable:n,setQueryParams:l,dataLabel:r,actionColumns:s=[],messageEmpty:m=t.createElement(t.Fragment,null,"Sem resultados")})=>{const c=Number(e.getState().pagination.pageIndex).toString(),o=Number(e.getState().pagination.pageSize).toString(),i=e.getState().sorting;return t.useEffect((()=>{if(!l)return;const e={sortingBy:"",order:""};i.length>0&&(e.sortingBy=i[0].id,e.order=i[0].desc?"DESC":"ASC"),l((t=>({...t,pageSize:o,page:c,...e})))}),[c,o,l,i]),t.createElement(t.Fragment,null,t.createElement($,{className:"bg-background w-full rounded-md border whitespace-nowrap"},t.createElement(M,null,t.createElement(I,{className:"group rounded-md"},e.getHeaderGroups().map((e=>t.createElement(A,{key:e.id},e.headers.map((e=>{const{column:{id:a}}=e,n=["actions",...s].includes(a);return t.createElement(L,{key:e.id},e.isPlaceholder?null:t.createElement(t.Fragment,null,t.createElement("div",{className:!n&&e.column.getCanSort()?"flex w-full items-center justify-start cursor-pointer gap-1 font-medium":"",onClick:n?void 0:e.column.getToggleSortingHandler()},Q(e.column.columnDef.header,e.getContext()),(!n&&e.column.getCanSort()&&{asc:t.createElement(W,{className:"h-3.5 w-3.5"}),desc:t.createElement(q,{className:"h-3.5 w-3.5"}),false:t.createElement(K,{className:"h-4 w-4"})}[e.column.getIsSorted()])??t.createElement(W,{className:"h-3.5 w-3.5"}))))})))))),t.createElement(V,null,!n&&e.getRowModel().rows?.length?e.getRowModel().rows.map((e=>t.createElement(A,{key:e.id,"data-state":e.getIsSelected()&&"selected",className:"even:bg-body/50"},e.getVisibleCells().map((e=>t.createElement(F,{key:e.id,className:"p-2"},t.createElement(y,null,Q(e.column.columnDef.cell,e.getContext())))))))):n?t.createElement(J,{columnCount:e.getAllColumns().length}):t.createElement(A,null,t.createElement(F,{colSpan:a.length,className:"h-24 text-center"},m)))),t.createElement(T,{orientation:"horizontal"})),n?t.createElement(_,null):t.createElement(U,{table:e,dataLabel:r}))};function Y(e){const{columnCount:a,rowCount:n=10,searchableColumnCount:l=0,filterableColumnCount:s=0,showViewOptions:m=!0,cellWidths:c=["auto"],withPagination:o=!0,shrinkZero:i=!1,className:u,...d}=e;return t.createElement("div",{className:r("w-full space-y-2.5 overflow-auto",u),...d},t.createElement("div",{className:"flex w-full items-center justify-between space-x-2 overflow-auto p-1"},t.createElement("div",{className:"flex flex-1 items-center space-x-2"},l>0?Array.from({length:l}).map(((e,a)=>t.createElement(P,{key:`${String(a)}`,className:"h-7 w-40 lg:w-60"}))):null,s>0?Array.from({length:s}).map(((e,a)=>t.createElement(P,{key:`${String(a)}`,className:"h-7 w-[4.5rem] border-dashed"}))):null),m?t.createElement(P,{className:"ml-auto hidden h-7 w-[4.5rem] lg:flex"}):null),t.createElement("div",{className:"rounded-md border"},t.createElement(M,null,t.createElement(I,null,Array.from({length:1}).map(((e,n)=>t.createElement(A,{key:`${String(n)}`,className:"hover:bg-transparent"},Array.from({length:a}).map(((e,a)=>t.createElement(L,{key:`${String(a)}`,style:{width:c[a],minWidth:i?c[a]:"auto"}},t.createElement(P,{className:"h-6 w-full"})))))))),t.createElement(V,null,Array.from({length:n}).map(((e,n)=>t.createElement(A,{key:`${String(n)}`,className:"hover:bg-transparent"},Array.from({length:a}).map(((e,a)=>t.createElement(F,{key:`${String(a)}`,style:{width:c[a],minWidth:i?c[a]:"auto"}},t.createElement(P,{className:"h-6 w-full"})))))))))),o?t.createElement("div",{className:"flex w-full items-center justify-between gap-4 overflow-auto p-1 sm:gap-8"},t.createElement(P,{className:"h-7 w-40 shrink-0"}),t.createElement("div",{className:"flex items-center gap-4 sm:gap-6 lg:gap-8"},t.createElement("div",{className:"flex items-center space-x-2"},t.createElement(P,{className:"h-7 w-24"}),t.createElement(P,{className:"h-7 w-[4.5rem]"})),t.createElement("div",{className:"flex items-center justify-center text-sm font-medium"},t.createElement(P,{className:"h-7 w-20"})),t.createElement("div",{className:"flex items-center space-x-2"},t.createElement(P,{className:"hidden size-7 lg:block"}),t.createElement(P,{className:"size-7"}),t.createElement(P,{className:"size-7"}),t.createElement(P,{className:"hidden size-7 lg:block"})))):null)}function ee({table:e,uniqueStatusValues:t,renderStatusMessage:a,className:n}){const u=l(null),g=e.getColumn("status")?.getFilterValue();return React.createElement(h,{modal:!0},React.createElement(f,{asChild:!0},React.createElement(w,{ref:u,"aria-label":"Filtre por status",variant:"outline",className:r("border-input text-muted-foreground ring-offset-background placeholder:text-muted-foreground hover:text-muted-foreground focus:ring-ring flex h-10 w-full max-w-60 items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm hover:bg-inherit focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",n)},g?a(g):"Todos os status",React.createElement(s,{className:"h-4 w-4"}))),React.createElement(E,{align:"end",className:"w-44 p-0",onCloseAutoFocus:()=>u.current?.focus()},React.createElement(m,null,React.createElement(c,{placeholder:"Pesquisar status..."}),React.createElement(o,null,React.createElement(i,null,"Nenhum status encontrado."),React.createElement(d,{key:"all",onSelect:()=>e.getColumn("status")?.setFilterValue(void 0)},React.createElement("span",{className:"truncate"},"Todos os status")),t.map((t=>{if(!t)return null;const n=a(t);return React.createElement(d,{key:`${String(t)}`,onSelect:()=>e.getColumn("status")?.setFilterValue(t)},React.createElement("span",{className:"truncate"},n))}))))))}const te=(e,t)=>"function"==typeof t?t(e):e[t],ae=({table:e,columns:a,isLoadingTable:n,loadingContent:l,setQueryParams:s,dataLabel:m,actionColumns:c=[],data:o,messageEmpty:i=t.createElement(t.Fragment,null,"Sem resultados"),onDataChange:u,rowKey:d,dividingColumnKey:g})=>{const[p,h]=t.useState(o);t.useEffect((()=>{h(o)}),[o]);const f=Number(e.getState().pagination.pageIndex).toString(),E=Number(e.getState().pagination.pageSize).toString(),w=e.getState().sorting;t.useEffect((()=>{if(!s)return;const e={sortingBy:"",order:""};w.length>0&&(e.sortingBy=w[0].id,e.order=w[0].desc?"DESC":"ASC"),s((t=>({...t,pageSize:E,page:f,...e})))}),[f,E,s,w]);return t.createElement(t.Fragment,null,t.createElement($,{className:"bg-background w-full rounded-md border whitespace-nowrap"},t.createElement(M,null,t.createElement(I,{className:"group rounded-md"},e.getHeaderGroups().map((e=>t.createElement(A,{key:e.id},e.headers.map((e=>{const{column:{id:a}}=e,n=["actions",...c].includes(a);return t.createElement(L,{className:g?.includes(a)?"border-r":"",key:e.id},e.isPlaceholder?null:t.createElement(t.Fragment,null,t.createElement("div",{className:!n&&e.column.getCanSort()?"flex w-full items-center justify-start cursor-pointer gap-1 font-medium":"",onClick:n?void 0:e.column.getToggleSortingHandler()},Q(e.column.columnDef.header,e.getContext()),(!n&&e.column.getCanSort()&&{asc:t.createElement(W,{className:"h-3.5 w-3.5"}),desc:t.createElement(q,{className:"h-3.5 w-3.5"}),false:t.createElement(K,{className:"h-4 w-4"})}[e.column.getIsSorted()])??t.createElement(W,{className:"h-3.5 w-3.5"}))))})))))),t.createElement(V,null,t.createElement(B,{value:p.map((e=>({...e,id:te(e,d)}))),onValueChange:e=>{h(e),u?.(e)}},n&&!l?t.createElement(J,{columnCount:e.getAllColumns().length}):n&&l?t.createElement(F,{colSpan:a.length,className:"h-24 text-center"},l):0===e.getRowModel().rows.length?t.createElement(A,null,t.createElement(F,{colSpan:a.length,className:"h-24 text-center"},i)):e.getRowModel().rows.map((e=>{const a=e.original,n=te(a,d);return t.createElement(O,{key:e.id,value:n,asChild:!0},t.createElement(A,{"data-state":e.getIsSelected()&&"selected",className:"even:bg-body/50"},e.getVisibleCells().map((e=>t.createElement(F,{key:e.id,className:r("p-2",g?.includes(e.column.id)&&"border-r")},t.createElement(y,null,Q(e.column.columnDef.cell,e.getContext())))))))}))))),t.createElement(T,{orientation:"horizontal"})),n?t.createElement(_,null):t.createElement(U,{table:e,dataLabel:m}))};export{X as DataTableMainFrame,ae as DataTableMainFrameSortable,U as DataTablePagination,_ as DataTablePaginationSkeleton,J as DataTableRowSkeleton,Z as DataTableSearch,Y as DataTableSkeleton,ee as DataTableStatus,H as DataTableViewOptions};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/arrow-down.js","../../node_modules/lucide-react/dist/esm/icons/arrow-up.js","../../src/components/default/data-table/DataTableViewOptions.tsx","../../src/components/default/data-table/DataTableSearch.tsx","../../node_modules/@tanstack/react-table/build/lib/index.mjs","../../src/components/default/data-table/DataTablePagination.tsx","../../src/components/default/data-table/DataTablePaginationSkeleton.tsx","../../src/components/default/data-table/DataTableRowSkeleton.tsx","../../src/components/default/data-table/DataTableMainFrame.tsx","../../src/components/default/data-table/DataTableSkeleton.tsx","../../src/components/default/data-table/DataTableStatus.tsx","../../src/components/default/data-table/DataTableMainFrameSortable.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.479.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }],\n [\"path\", { d: \"m19 12-7 7-7-7\", key: \"1idqje\" }]\n];\nconst ArrowDown = createLucideIcon(\"ArrowDown\", __iconNode);\n\nexport { __iconNode, ArrowDown as default };\n//# sourceMappingURL=arrow-down.js.map\n","/**\n * @license lucide-react v0.479.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m5 12 7-7 7 7\", key: \"hav0vg\" }],\n [\"path\", { d: \"M12 19V5\", key: \"x0mq9r\" }]\n];\nconst ArrowUp = createLucideIcon(\"ArrowUp\", __iconNode);\n\nexport { __iconNode, ArrowUp as default };\n//# sourceMappingURL=arrow-up.js.map\n","import type { Table } from \"@tanstack/react-table\";\nimport { Check, ChevronDownIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\nimport { cn } from \"@/lib/utils\";\n\ninterface DataTableViewOptionsProps<TData> {\n\ttable: Table<TData>;\n\ttransformColumnName?: (id: string) => string;\n}\n\nexport function DataTableViewOptions<TData>({\n\ttable,\n\ttransformColumnName,\n}: DataTableViewOptionsProps<TData>) {\n\tconst triggerRef = React.useRef<HTMLButtonElement>(null);\n\n\treturn (\n\t\t<Popover modal>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tref={triggerRef}\n\t\t\t\t\taria-label=\"Toggle columns\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName=\"text-muted-foreground hover:text-muted-foreground w-full max-w-[12.5rem] items-center justify-between bg-inherit px-3 py-2 hover:bg-inherit\"\n\t\t\t\t>\n\t\t\t\t\tColunas\n\t\t\t\t\t<ChevronDownIcon className=\"h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent\n\t\t\t\talign=\"end\"\n\t\t\t\tclassName=\"w-44 p-0\"\n\t\t\t\tonCloseAutoFocus={() => triggerRef.current?.focus()}\n\t\t\t>\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandInput placeholder=\"Pesquisar colunas...\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>Nenhuma coluna encontrada.</CommandEmpty>\n\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t{table\n\t\t\t\t\t\t\t\t.getAllColumns()\n\t\t\t\t\t\t\t\t.filter((column) => typeof column.accessorFn !== \"undefined\" && column.getCanHide())\n\t\t\t\t\t\t\t\t.map((column) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\tkey={column.id}\n\t\t\t\t\t\t\t\t\t\t\tonSelect={() => column.toggleVisibility(!column.getIsVisible())}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"truncate\">\n\t\t\t\t\t\t\t\t\t\t\t\t{transformColumnName ? transformColumnName(column.id) : column.id}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<Check\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto size-4 shrink-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolumn.getIsVisible() ? \"opacity-100\" : \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","import { Input } from \"@/components/ui/input\";\nimport type { Table } from \"@tanstack/react-table\";\nimport { SearchIcon } from \"lucide-react\";\n\ninterface DataTableSearchProps<TData> {\n\ttable: Table<TData>;\n\tkeySearch: string;\n\tplaceholder: string;\n}\n\nexport function DataTableSearch<TData>({\n\ttable,\n\tkeySearch,\n\tplaceholder,\n}: DataTableSearchProps<TData>) {\n\treturn (\n\t\t<div className=\"relative w-full max-w-sm\">\n\t\t\t<SearchIcon className=\"text-muted-foreground absolute top-3 left-3 h-4 w-4\" />\n\t\t\t<Input\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\tvalue={(table.getColumn(keySearch)?.getFilterValue() as string) ?? \"\"}\n\t\t\t\tonChange={(event) => table.getColumn(keySearch)?.setFilterValue(event.target.value)}\n\t\t\t\tclassName=\"w-full pl-8 xl:w-80\"\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","/**\n * react-table\n *\n * Copyright (c) TanStack\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { createTable } from '@tanstack/table-core';\nexport * from '@tanstack/table-core';\n\n//\n\n/**\n * If rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`.\n */\nfunction flexRender(Comp, props) {\n return !Comp ? null : isReactComponent(Comp) ? /*#__PURE__*/React.createElement(Comp, props) : Comp;\n}\nfunction isReactComponent(component) {\n return isClassComponent(component) || typeof component === 'function' || isExoticComponent(component);\n}\nfunction isClassComponent(component) {\n return typeof component === 'function' && (() => {\n const proto = Object.getPrototypeOf(component);\n return proto.prototype && proto.prototype.isReactComponent;\n })();\n}\nfunction isExoticComponent(component) {\n return typeof component === 'object' && typeof component.$$typeof === 'symbol' && ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description);\n}\nfunction useReactTable(options) {\n // Compose in the generic options to the user options\n const resolvedOptions = {\n state: {},\n // Dummy state\n onStateChange: () => {},\n // noop\n renderFallbackValue: null,\n ...options\n };\n\n // Create a new table and store it in state\n const [tableRef] = React.useState(() => ({\n current: createTable(resolvedOptions)\n }));\n\n // By default, manage table state here using the table's initial state\n const [state, setState] = React.useState(() => tableRef.current.initialState);\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n tableRef.current.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater);\n options.onStateChange == null || options.onStateChange(updater);\n }\n }));\n return tableRef.current;\n}\n\nexport { flexRender, useReactTable };\n//# sourceMappingURL=index.mjs.map\n","import type { Table } from \"@tanstack/react-table\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { PaginationEllipsis, PaginationItem } from \"@/components/ui/pagination\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\nimport React from \"react\";\ninterface DataTablePaginationProps<TData> {\n\ttable: Table<TData>;\n\tpageSizeOptions?: number[];\n\tdataLabel?: string;\n}\n\nexport function DataTablePagination<TData>({\n\ttable,\n\tpageSizeOptions = [20, 30, 50, 100, 200],\n\tdataLabel = \"Fundos\",\n}: DataTablePaginationProps<TData>) {\n\tconst pageSize = pageSizeOptions[0];\n\tconst currentPage = table.getState().pagination.pageIndex + 1;\n\tconst rowCount = table.getRowCount();\n\tconst totalPageCount = Math.ceil(rowCount / table.getState().pagination.pageSize);\n\n\tconst renderPageNumbers = () => {\n\t\tconst items: React.ReactNode[] = [];\n\t\tconst maxVisiblePages = 3;\n\n\t\tif (totalPageCount <= maxVisiblePages) {\n\t\t\tfor (let i = 1; i <= totalPageCount; i++) {\n\t\t\t\titems.push(\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={currentPage === i ? \"outline\" : \"ghost\"}\n\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\tonClick={() => table.setPageIndex(i - 1)}\n\t\t\t\t\t\tclassName=\"size-9\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{i}\n\t\t\t\t\t</Button>,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\titems.push(\n\t\t\t\t<Button\n\t\t\t\t\tvariant={currentPage === 1 ? \"outline\" : \"ghost\"}\n\t\t\t\t\tkey={1}\n\t\t\t\t\tonClick={() => table.setPageIndex(0)}\n\t\t\t\t\tclassName=\"size-9\"\n\t\t\t\t>\n\t\t\t\t\t1\n\t\t\t\t</Button>,\n\t\t\t);\n\n\t\t\tconst start = Math.max(2, Math.min(currentPage, totalPageCount - (maxVisiblePages - 1)));\n\t\t\tconst end = Math.min(totalPageCount - 1, start + maxVisiblePages - 2);\n\n\t\t\tif (start > 2) {\n\t\t\t\titems.push(\n\t\t\t\t\t<PaginationItem key=\"ellipsis-start\" className=\"list-none\">\n\t\t\t\t\t\t<PaginationEllipsis />\n\t\t\t\t\t</PaginationItem>,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tfor (let i = start; i <= end; i++) {\n\t\t\t\titems.push(\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={currentPage === i ? \"outline\" : \"ghost\"}\n\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\tonClick={() => table.setPageIndex(i - 1)}\n\t\t\t\t\t\tclassName=\"size-9\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{i}\n\t\t\t\t\t</Button>,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (end < totalPageCount - 1) {\n\t\t\t\titems.push(\n\t\t\t\t\t<PaginationItem key=\"ellipsis-end\" className=\"list-none\">\n\t\t\t\t\t\t<PaginationEllipsis />\n\t\t\t\t\t</PaginationItem>,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push(\n\t\t\t\t<Button\n\t\t\t\t\tvariant={currentPage === totalPageCount ? \"outline\" : \"ghost\"}\n\t\t\t\t\tkey={totalPageCount}\n\t\t\t\t\tonClick={() => table.setPageIndex(totalPageCount - 1)}\n\t\t\t\t>\n\t\t\t\t\t{totalPageCount}\n\t\t\t\t</Button>,\n\t\t\t);\n\t\t}\n\n\t\treturn items;\n\t};\n\treturn (\n\t\t<div className=\"mt-4 flex flex-wrap items-center justify-between gap-2\">\n\t\t\t<div className=\"text-muted-foreground flex gap-1 text-sm\">\n\t\t\t\t<p className=\"ml-2\">\n\t\t\t\t\tMostrando {table.getRowModel().rows.length.toLocaleString()} de {rowCount} {dataLabel}.\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t<div className=\"flex flex-wrap items-center justify-between gap-2 gap-y-4\">\n\t\t\t\t<Select\n\t\t\t\t\tvalue={String(table.getState().pagination.pageSize) || String(pageSize)}\n\t\t\t\t\tonValueChange={(value) => table.setPageSize(Number(value))}\n\t\t\t\t>\n\t\t\t\t\t<SelectTrigger className=\"w-fit\">\n\t\t\t\t\t\t<SelectValue\n\t\t\t\t\t\t\tplaceholder={`Mostrar ${table.getState().pagination.pageSize || pageSize}`}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t{rowCount && (rowCount === 0 || rowCount < pageSize) ? (\n\t\t\t\t\t\t\t<SelectItem value={String(pageSize)}>Mostrar {pageSize}</SelectItem>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{pageSizeOptions.map((pageSize) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={pageSize} value={String(pageSize)}>\n\t\t\t\t\t\t\t\t\t\tMostrar {pageSize}\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\n\t\t\t\t<div className=\"flex flex-wrap gap-2 gap-y-4\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tonClick={() => table.previousPage()}\n\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t\taria-label=\"Ir para página anterior\"\n\t\t\t\t\t\tclassName=\"gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ChevronLeftIcon className=\"size-4\" />\n\t\t\t\t\t\tAnterior\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<div className=\"flex gap-2\">{renderPageNumbers()}</div>\n\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tonClick={() => table.nextPage()}\n\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t\taria-label=\"Ir para próxima página\"\n\t\t\t\t\t\tclassName=\"gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\tPróximo\n\t\t\t\t\t\t<ChevronRightIcon className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import { Skeleton } from \"@/components/ui/skeleton\";\nimport { cn } from \"@/lib/utils\";\n\nexport function DataTablePaginationSkeleton({\n\tclassName,\n}: {\n\tclassName?: string;\n}) {\n\treturn (\n\t\t<div className=\"mt-4 flex flex-wrap items-center justify-between gap-2\">\n\t\t\t<Skeleton className={cn(\"h-5 w-40\", className)} />\n\t\t\t<div className=\"flex flex-wrap items-center justify-between gap-2 gap-y-4\">\n\t\t\t\t<Skeleton className={cn(\"h-10 w-28\", className)} />\n\t\t\t\t<Skeleton className={cn(\"h-9 w-[16rem]\", className)} />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import { Skeleton } from \"@/components/ui/skeleton\";\nimport { TableCell, TableRow } from \"@/components/ui/table\";\n\ninterface DataTableRowSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n\tcolumnCount: number;\n\trowCount?: number;\n\tcellWidths?: string[];\n\tshrinkZero?: boolean;\n}\n\nexport function DataTableRowSkeleton(props: DataTableRowSkeletonProps) {\n\tconst { columnCount, rowCount = 8, cellWidths = [\"auto\"], shrinkZero = false } = props;\n\n\treturn (\n\t\t<>\n\t\t\t{Array.from({ length: rowCount }).map((_, i) => (\n\t\t\t\t<TableRow key={`row-${String(i)}`} className=\"hover:bg-transparent\">\n\t\t\t\t\t{Array.from({ length: columnCount }).map((_, j) => (\n\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\tkey={`cell-${String(i)}-${j}`}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: cellWidths[j],\n\t\t\t\t\t\t\t\tminWidth: shrinkZero ? cellWidths[j] : \"auto\",\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-full\" />\n\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t))}\n\t\t\t\t</TableRow>\n\t\t\t))}\n\t\t</>\n\t);\n}\n","import { TextWrap } from \"@/components/default/base/TextWrap\";\nimport { ScrollArea, ScrollBar } from \"@/components/ui/scroll-area\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { CaretSortIcon } from \"@radix-ui/react-icons\";\nimport type { ColumnDef, Table as TableType } from \"@tanstack/react-table\";\nimport { flexRender } from \"@tanstack/react-table\";\nimport { ArrowDownIcon, ArrowUpIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { DataTablePagination } from \"./DataTablePagination\";\nimport { DataTablePaginationSkeleton } from \"./DataTablePaginationSkeleton\";\nimport { DataTableRowSkeleton } from \"./DataTableRowSkeleton\";\n\ninterface ListParams {\n\t[propName: string]: string | string[];\n}\n\ninterface DataTableViewOptionsProps<TData, TValue> {\n\ttable: TableType<TData>;\n\tcolumns: ColumnDef<TData, TValue>[];\n\tsetQueryParams?: React.Dispatch<React.SetStateAction<ListParams>>;\n\tisLoadingTable?: boolean;\n\tdataLabel: string;\n\tactionColumns?: string[];\n\tmessageEmpty?: React.ReactNode;\n}\n\nexport const DataTableMainFrame = <TData, TValue>({\n\ttable,\n\tcolumns,\n\tisLoadingTable,\n\tsetQueryParams,\n\tdataLabel,\n\tactionColumns = [],\n\tmessageEmpty = <>Sem resultados</>,\n}: DataTableViewOptionsProps<TData, TValue>) => {\n\tconst currentPage = Number(table.getState().pagination.pageIndex).toString();\n\tconst pageSize = Number(table.getState().pagination.pageSize).toString();\n\tconst sorting = table.getState().sorting;\n\tReact.useEffect(() => {\n\t\tif (!setQueryParams) return;\n\t\tconst sortingParams = { sortingBy: \"\", order: \"\" };\n\t\tif (sorting.length > 0) {\n\t\t\tsortingParams.sortingBy = sorting[0].id;\n\t\t\tsortingParams.order = sorting[0].desc ? \"DESC\" : \"ASC\";\n\t\t}\n\t\tsetQueryParams((prev) => ({\n\t\t\t...prev,\n\t\t\tpageSize,\n\t\t\tpage: currentPage,\n\t\t\t...sortingParams,\n\t\t}));\n\t}, [currentPage, pageSize, setQueryParams, sorting]);\n\n\treturn (\n\t\t<>\n\t\t\t<ScrollArea className=\"bg-background w-full rounded-md border whitespace-nowrap\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader className=\"group rounded-md\">\n\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => {\n\t\t\t\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\t\t\t\tcolumn: { id },\n\t\t\t\t\t\t\t\t\t\t} = header;\n\n\t\t\t\t\t\t\t\t\t\tconst isActionsColumn = [\"actions\", ...actionColumns].includes(id);\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<TableHead key={header.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder ? null : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!isActionsColumn && header.column.getCanSort()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"flex w-full items-center justify-start cursor-pointer gap-1 font-medium\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick: !isActionsColumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? header.column.getToggleSortingHandler()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(header.column.columnDef.header, header.getContext())}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(!isActionsColumn &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.getCanSort() &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasc: <ArrowDownIcon className=\"h-3.5 w-3.5\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdesc: <ArrowUpIcon className=\"h-3.5 w-3.5\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse: <CaretSortIcon className=\"h-4 w-4\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}[header.column.getIsSorted() as string]) ?? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ArrowDownIcon className=\"h-3.5 w-3.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</TableHeader>\n\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{!isLoadingTable && table.getRowModel().rows?.length ? (\n\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t\t\t\t\tclassName=\"even:bg-body/50\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<TableCell key={cell.id} className=\"p-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TextWrap>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(cell.column.columnDef.cell, cell.getContext())}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TextWrap>\n\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t) : isLoadingTable ? (\n\t\t\t\t\t\t\t<DataTableRowSkeleton columnCount={table.getAllColumns().length} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableCell colSpan={columns.length} className=\"h-24 text-center\">\n\t\t\t\t\t\t\t\t\t{messageEmpty}\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t\t<ScrollBar orientation=\"horizontal\" />\n\t\t\t</ScrollArea>\n\t\t\t{isLoadingTable ? (\n\t\t\t\t<DataTablePaginationSkeleton />\n\t\t\t) : (\n\t\t\t\t<DataTablePagination table={table} dataLabel={dataLabel} />\n\t\t\t)}\n\t\t</>\n\t);\n};\n","import { Skeleton } from \"@/components/ui/skeleton\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { cn } from \"@/lib/utils\";\nimport React from \"react\";\ninterface DataTableSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * The number of columns in the table.\n\t * @type number\n\t */\n\tcolumnCount: number;\n\n\t/**\n\t * The number of rows in the table.\n\t * @default 10\n\t * @type number | undefined\n\t */\n\trowCount?: number;\n\n\t/**\n\t * The number of searchable columns in the table.\n\t * @default 0\n\t * @type number | undefined\n\t */\n\tsearchableColumnCount?: number;\n\n\t/**\n\t * The number of filterable columns in the table.\n\t * @default 0\n\t * @type number | undefined\n\t */\n\tfilterableColumnCount?: number;\n\n\t/**\n\t * Flag to show the table view options.\n\t * @default undefined\n\t * @type boolean | undefined\n\t */\n\tshowViewOptions?: boolean;\n\n\t/**\n\t * The width of each cell in the table.\n\t * The length of the array should be equal to the columnCount.\n\t * Any valid CSS width value is accepted.\n\t * @default [\"auto\"]\n\t * @type string[] | undefined\n\t */\n\tcellWidths?: string[];\n\n\t/**\n\t * Flag to show the pagination bar.\n\t * @default true\n\t * @type boolean | undefined\n\t */\n\twithPagination?: boolean;\n\n\t/**\n\t * Flag to prevent the table cells from shrinking.\n\t * @default false\n\t * @type boolean | undefined\n\t */\n\tshrinkZero?: boolean;\n}\n\nexport function DataTableSkeleton(props: DataTableSkeletonProps) {\n\tconst {\n\t\tcolumnCount,\n\t\trowCount = 10,\n\t\tsearchableColumnCount = 0,\n\t\tfilterableColumnCount = 0,\n\t\tshowViewOptions = true,\n\t\tcellWidths = [\"auto\"],\n\t\twithPagination = true,\n\t\tshrinkZero = false,\n\t\tclassName,\n\t\t...skeletonProps\n\t} = props;\n\n\treturn (\n\t\t<div className={cn(\"w-full space-y-2.5 overflow-auto\", className)} {...skeletonProps}>\n\t\t\t<div className=\"flex w-full items-center justify-between space-x-2 overflow-auto p-1\">\n\t\t\t\t<div className=\"flex flex-1 items-center space-x-2\">\n\t\t\t\t\t{searchableColumnCount > 0\n\t\t\t\t\t\t? Array.from({ length: searchableColumnCount }).map((_, i) => (\n\t\t\t\t\t\t\t\t<Skeleton key={`${String(i)}`} className=\"h-7 w-40 lg:w-60\" />\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t: null}\n\t\t\t\t\t{filterableColumnCount > 0\n\t\t\t\t\t\t? Array.from({ length: filterableColumnCount }).map((_, i) => (\n\t\t\t\t\t\t\t\t<Skeleton key={`${String(i)}`} className=\"h-7 w-[4.5rem] border-dashed\" />\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t: null}\n\t\t\t\t</div>\n\t\t\t\t{showViewOptions ? <Skeleton className=\"ml-auto hidden h-7 w-[4.5rem] lg:flex\" /> : null}\n\t\t\t</div>\n\t\t\t<div className=\"rounded-md border\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t{Array.from({ length: 1 }).map((_, i) => (\n\t\t\t\t\t\t\t<TableRow key={`${String(i)}`} className=\"hover:bg-transparent\">\n\t\t\t\t\t\t\t\t{Array.from({ length: columnCount }).map((_, j) => (\n\t\t\t\t\t\t\t\t\t<TableHead\n\t\t\t\t\t\t\t\t\t\tkey={`${String(j)}`}\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\twidth: cellWidths[j],\n\t\t\t\t\t\t\t\t\t\t\tminWidth: shrinkZero ? cellWidths[j] : \"auto\",\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-full\" />\n\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableHeader>\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{Array.from({ length: rowCount }).map((_, i) => (\n\t\t\t\t\t\t\t<TableRow key={`${String(i)}`} className=\"hover:bg-transparent\">\n\t\t\t\t\t\t\t\t{Array.from({ length: columnCount }).map((_, j) => (\n\t\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\t\tkey={`${String(j)}`}\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\twidth: cellWidths[j],\n\t\t\t\t\t\t\t\t\t\t\tminWidth: shrinkZero ? cellWidths[j] : \"auto\",\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-full\" />\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t</div>\n\t\t\t{withPagination ? (\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-4 overflow-auto p-1 sm:gap-8\">\n\t\t\t\t\t<Skeleton className=\"h-7 w-40 shrink-0\" />\n\t\t\t\t\t<div className=\"flex items-center gap-4 sm:gap-6 lg:gap-8\">\n\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t<Skeleton className=\"h-7 w-24\" />\n\t\t\t\t\t\t\t<Skeleton className=\"h-7 w-[4.5rem]\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-center justify-center text-sm font-medium\">\n\t\t\t\t\t\t\t<Skeleton className=\"h-7 w-20\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t<Skeleton className=\"hidden size-7 lg:block\" />\n\t\t\t\t\t\t\t<Skeleton className=\"size-7\" />\n\t\t\t\t\t\t\t<Skeleton className=\"size-7\" />\n\t\t\t\t\t\t\t<Skeleton className=\"hidden size-7 lg:block\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\nimport { cn } from \"@/lib/utils\";\nimport type { Table } from \"@tanstack/react-table\";\nimport { ChevronDownIcon } from \"lucide-react\";\nimport { useRef } from \"react\";\n\ninterface DataTableStatusProps<TData, TEnum> {\n\ttable: Table<TData>;\n\tuniqueStatusValues: TEnum[];\n\trenderStatusMessage(status: TEnum): string;\n\tclassName?: string;\n}\n\nexport function DataTableStatus<TData, TEnum>({\n\ttable,\n\tuniqueStatusValues,\n\trenderStatusMessage,\n\tclassName,\n}: DataTableStatusProps<TData, TEnum>) {\n\tconst triggerRef = useRef<HTMLButtonElement>(null);\n\n\tconst currentFilter = table.getColumn(\"status\")?.getFilterValue() as TEnum | undefined;\n\n\treturn (\n\t\t<Popover modal>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tref={triggerRef}\n\t\t\t\t\taria-label=\"Filtre por status\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"border-input text-muted-foreground ring-offset-background placeholder:text-muted-foreground hover:text-muted-foreground focus:ring-ring flex h-10 w-full max-w-60 items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm hover:bg-inherit focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{currentFilter ? renderStatusMessage(currentFilter) : \"Todos os status\"}\n\t\t\t\t\t<ChevronDownIcon className=\"h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent\n\t\t\t\talign=\"end\"\n\t\t\t\tclassName=\"w-44 p-0\"\n\t\t\t\tonCloseAutoFocus={() => triggerRef.current?.focus()}\n\t\t\t>\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandInput placeholder=\"Pesquisar status...\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>Nenhum status encontrado.</CommandEmpty>\n\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\tkey=\"all\"\n\t\t\t\t\t\t\tonSelect={() => table.getColumn(\"status\")?.setFilterValue(undefined)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"truncate\">Todos os status</span>\n\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t{uniqueStatusValues.map((item) => {\n\t\t\t\t\t\t\tif (!item) return null;\n\n\t\t\t\t\t\t\tconst statusMessage = renderStatusMessage(item as TEnum);\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\tkey={`${String(item)}`}\n\t\t\t\t\t\t\t\t\tonSelect={() => table.getColumn(\"status\")?.setFilterValue(item)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className=\"truncate\">{statusMessage}</span>\n\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","import { TextWrap } from \"@/components/default/base/TextWrap\";\nimport { ScrollArea, ScrollBar } from \"@/components/ui/scroll-area\";\nimport { Sortable, SortableItem } from \"@/components/ui/sortable\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { cn } from \"@/lib/utils\";\nimport { CaretSortIcon } from \"@radix-ui/react-icons\";\nimport type { ColumnDef, Table as TableType } from \"@tanstack/react-table\";\nimport { flexRender } from \"@tanstack/react-table\";\nimport { ArrowDownIcon, ArrowUpIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { DataTablePagination } from \"./DataTablePagination\";\nimport { DataTablePaginationSkeleton } from \"./DataTablePaginationSkeleton\";\nimport { DataTableRowSkeleton } from \"./DataTableRowSkeleton\";\n\ninterface DataTableViewOptionsProps<TData, TValue> {\n\ttable: TableType<TData>;\n\tcolumns: ColumnDef<TData, TValue>[];\n\tsetQueryParams?: React.Dispatch<React.SetStateAction<ListParams>>;\n\tisLoadingTable?: boolean;\n\tdataLabel: string;\n\tactionColumns?: string[];\n\tdata: TData[];\n\tonDataChange?: (newData: TData[]) => void;\n\tmessageEmpty?: React.ReactNode;\n\trowKey: keyof TData | ((row: TData) => string | number);\n\tdividingColumnKey?: string[];\n}\n\ntype RowData = {\n\t// biome-ignore lint/suspicious/noExplicitAny: <explanation>\n\t[key: string]: any;\n};\n\ninterface ListParams {\n\t[propName: string]: string | string[];\n}\n\nconst getRowKey = <TData extends RowData>(\n\trow: TData,\n\trowKey: keyof TData | ((row: TData) => string | number),\n): string | number => {\n\tif (typeof rowKey === \"function\") {\n\t\treturn rowKey(row);\n\t}\n\treturn row[rowKey] as string | number;\n};\n\nexport const DataTableMainFrameSortable = <TData extends RowData, TValue>({\n\ttable,\n\tcolumns,\n\tisLoadingTable,\n\tsetQueryParams,\n\tdataLabel,\n\tactionColumns = [],\n\tdata,\n\tmessageEmpty = <>Sem resultados</>,\n\tonDataChange,\n\trowKey,\n\tdividingColumnKey,\n}: DataTableViewOptionsProps<TData, TValue>) => {\n\tconst [newData, setNewData] = React.useState<TData[]>(data);\n\n\tReact.useEffect(() => {\n\t\tsetNewData(data);\n\t}, [data]);\n\n\tconst handleValueChange = (updatedData: TData[]) => {\n\t\tsetNewData(updatedData);\n\t\tonDataChange?.(updatedData);\n\t};\n\n\tconst currentPage = Number(table.getState().pagination.pageIndex).toString();\n\tconst pageSize = Number(table.getState().pagination.pageSize).toString();\n\tconst sorting = table.getState().sorting;\n\tReact.useEffect(() => {\n\t\tif (!setQueryParams) return;\n\t\tconst sortingParams = { sortingBy: \"\", order: \"\" };\n\t\tif (sorting.length > 0) {\n\t\t\tsortingParams.sortingBy = sorting[0].id;\n\t\t\tsortingParams.order = sorting[0].desc ? \"DESC\" : \"ASC\";\n\t\t}\n\t\tsetQueryParams((prev) => ({\n\t\t\t...prev,\n\t\t\tpageSize,\n\t\t\tpage: currentPage,\n\t\t\t...sortingParams,\n\t\t}));\n\t}, [currentPage, pageSize, setQueryParams, sorting]);\n\n\treturn (\n\t\t<>\n\t\t\t<ScrollArea className=\"bg-background w-full rounded-md border whitespace-nowrap\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader className=\"group rounded-md\">\n\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => {\n\t\t\t\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\t\t\t\tcolumn: { id },\n\t\t\t\t\t\t\t\t\t\t} = header;\n\n\t\t\t\t\t\t\t\t\t\tconst isActionsColumn = [\"actions\", ...actionColumns].includes(id);\n\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<TableHead\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={dividingColumnKey?.includes(id) ? \"border-r\" : \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\tkey={header.id}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder ? null : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!isActionsColumn && header.column.getCanSort()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"flex w-full items-center justify-start cursor-pointer gap-1 font-medium\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick: !isActionsColumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? header.column.getToggleSortingHandler()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(header.column.columnDef.header, header.getContext())}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(!isActionsColumn &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.getCanSort() &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasc: <ArrowDownIcon className=\"h-3.5 w-3.5\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdesc: <ArrowUpIcon className=\"h-3.5 w-3.5\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse: <CaretSortIcon className=\"h-4 w-4\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}[header.column.getIsSorted() as string]) ?? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ArrowDownIcon className=\"h-3.5 w-3.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</TableHeader>\n\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t<Sortable\n\t\t\t\t\t\t\tvalue={newData.map((item) => ({\n\t\t\t\t\t\t\t\t...item,\n\t\t\t\t\t\t\t\tid: getRowKey(item, rowKey),\n\t\t\t\t\t\t\t}))}\n\t\t\t\t\t\t\tonValueChange={handleValueChange}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{!isLoadingTable && table.getRowModel().rows?.length ? (\n\t\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => {\n\t\t\t\t\t\t\t\t\tconst data = row.original;\n\t\t\t\t\t\t\t\t\tconst key = getRowKey(data, rowKey);\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<SortableItem key={row.id} value={key} asChild>\n\t\t\t\t\t\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"even:bg-body/50\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={cell.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"p-2\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdividingColumnKey?.includes(cell.column.id) && \"border-r\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TextWrap>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(cell.column.columnDef.cell, cell.getContext())}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TextWrap>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t</SortableItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t) : isLoadingTable ? (\n\t\t\t\t\t\t\t\t<DataTableRowSkeleton columnCount={table.getAllColumns().length} />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t\t<TableCell colSpan={columns.length} className=\"h-24 text-center\">\n\t\t\t\t\t\t\t\t\t\t{messageEmpty}\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Sortable>\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t\t<ScrollBar orientation=\"horizontal\" />\n\t\t\t</ScrollArea>\n\n\t\t\t{isLoadingTable ? (\n\t\t\t\t<DataTablePaginationSkeleton />\n\t\t\t) : (\n\t\t\t\t<DataTablePagination table={table} dataLabel={dataLabel} />\n\t\t\t)}\n\t\t</>\n\t);\n};\n"],"names":["ArrowDown","createLucideIcon","d","key","ArrowUp","DataTableViewOptions","table","transformColumnName","triggerRef","React","useRef","Popover","modal","PopoverTrigger","asChild","Button","ref","aria-label","variant","className","ChevronDownIcon","PopoverContent","align","onCloseAutoFocus","current","focus","createElement","Command","CommandInput","placeholder","CommandList","CommandEmpty","CommandGroup","getAllColumns","filter","column","accessorFn","getCanHide","map","CommandItem","id","onSelect","toggleVisibility","getIsVisible","span","Check","cn","DataTableSearch","keySearch","div","SearchIcon","Input","value","getColumn","getFilterValue","onChange","event","setFilterValue","target","flexRender","Comp","props","component","proto","Object","getPrototypeOf","prototype","isReactComponent","isClassComponent","$$typeof","includes","description","isExoticComponent","DataTablePagination","pageSizeOptions","dataLabel","pageSize","currentPage","getState","pagination","pageIndex","rowCount","getRowCount","totalPageCount","Math","ceil","p","getRowModel","rows","length","toLocaleString","Select","String","onValueChange","setPageSize","Number","SelectTrigger","SelectValue","SelectContent","SelectItem","onClick","previousPage","disabled","getCanPreviousPage","ChevronLeftIcon","items","i","push","setPageIndex","start","max","min","end","PaginationItem","PaginationEllipsis","renderPageNumbers","nextPage","getCanNextPage","ChevronRightIcon","DataTablePaginationSkeleton","Skeleton","DataTableRowSkeleton","columnCount","cellWidths","shrinkZero","Fragment","Array","from","_","TableRow","j","TableCell","style","width","minWidth","DataTableMainFrame","columns","isLoadingTable","setQueryParams","actionColumns","messageEmpty","toString","sorting","useEffect","sortingParams","sortingBy","order","desc","prev","page","ScrollArea","Table","TableHeader","getHeaderGroups","headerGroup","headers","header","isActionsColumn","TableHead","isPlaceholder","getCanSort","undefined","getToggleSortingHandler","columnDef","getContext","asc","ArrowDownIcon","ArrowUpIcon","false","CaretSortIcon","getIsSorted","TableBody","row","data-state","getIsSelected","getVisibleCells","cell","TextWrap","colSpan","ScrollBar","orientation","DataTableSkeleton","searchableColumnCount","filterableColumnCount","showViewOptions","withPagination","skeletonProps","DataTableStatus","uniqueStatusValues","renderStatusMessage","currentFilter","item","statusMessage","getRowKey","rowKey","DataTableMainFrameSortable","data","onDataChange","dividingColumnKey","newData","setNewData","useState","Sortable","updatedData","original","SortableItem"],"mappings":"o0DAGO,MAgBDA,EAAYC,EAAiB,YAhBC,CAClC,CAAC,OAAQ,CAAEC,EAAG,WAAYC,IAAK,WAC/B,CAAC,OAAQ,CAAED,EAAG,iBAAkBC,IAAK,aCcjCC,EAAUH,EAAiB,UAhBG,CAClC,CAAC,OAAQ,CAAEC,EAAG,gBAAiBC,IAAK,WACpC,CAAC,OAAQ,CAAED,EAAG,WAAYC,IAAK,aCgB1B,SAASE,GAA4BC,MAC3CA,EAAKC,oBACLA,IAEA,MAAMC,EAAaC,EAAMC,OAA0B,MAEnD,OACCD,EAACE,cAAAA,EAAAA,CAAQC,OAAAA,GACRH,EAACI,cAAAA,EAAAA,CAAeC,SAAAA,GACfL,EAACM,cAAAA,EAAAA,CACAC,IAAKR,EACLS,aAAW,iBACXC,QAAQ,UACRC,UAAU,+IACV,UAEAV,EAACW,cAAAA,EAAAA,CAAgBD,UAAU,cAG7BV,EAACY,cAAAA,EAAAA,CACAC,MAAM,MACNH,UAAU,WACVI,iBAAkB,IAAMf,EAAWgB,SAASC,SAE5ChB,EAAAiB,cAACC,OACAlB,EAACmB,cAAAA,EAAAA,CAAaC,YAAY,yBAC1BpB,EAACqB,cAAAA,EAAAA,KACArB,gBAACsB,EAAa,KAAA,8BACdtB,gBAACuB,EACC1B,KAAAA,EACC2B,gBACAC,QAAQC,QAAwC,IAAtBA,EAAOC,YAA8BD,EAAOE,eACtEC,KAAKH,GAEJ1B,EAAC8B,cAAAA,EAAAA,CACApC,IAAKgC,EAAOK,GACZC,SAAU,IAAMN,EAAOO,kBAAkBP,EAAOQ,iBAEhDlC,EAACmC,cAAAA,OAAAA,CAAKzB,UAAU,YACdZ,EAAsBA,EAAoB4B,EAAOK,IAAML,EAAOK,IAEhE/B,EAACoC,cAAAA,EAAAA,CACA1B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AAC0H,cAAAA,EAAAA,CACAhI,IAAK6K,EAAKxI,GACVrB,UAAW2B,EACV,MACAwJ,GAAmBhI,SAAS0G,EAAK7I,OAAOK,KAAO,aAGhD/B,EAACwK,cAAAA,EAAAA,KACCtH,EAAWqH,EAAK7I,OAAOgI,UAAUa,KAAMA,EAAKZ,mBAIjD,IAKD3B,EACHhI,EAACgH,cAAAA,EAAAA,CAAqBC,YAAapH,EAAM2B,gBAAgBwD,SAEzDhF,EAAAiB,cAACuG,OACAxH,EAAC0H,cAAAA,EAAAA,CAAU+C,QAAS1C,EAAQ/C,OAAQtE,UAAU,oBAC5CyH,OAOPnI,EAAC0K,cAAAA,EAAAA,CAAUC,YAAY,gBAGvB3C,EACAhI,EAAAiB,cAAC6F,QAED9G,EAACgE,cAAAA,EAAAA,CAAoBnE,MAAOA,EAAOqE,UAAWA","x_google_ignoreList":[0,1,4]}
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/arrow-down.js","../../node_modules/lucide-react/dist/esm/icons/arrow-up.js","../../src/components/default/data-table/DataTableViewOptions.tsx","../../src/components/default/data-table/DataTableSearch.tsx","../../node_modules/@tanstack/react-table/build/lib/index.mjs","../../src/components/default/data-table/DataTablePagination.tsx","../../src/components/default/data-table/DataTablePaginationSkeleton.tsx","../../src/components/default/data-table/DataTableRowSkeleton.tsx","../../src/components/default/data-table/DataTableMainFrame.tsx","../../src/components/default/data-table/DataTableSkeleton.tsx","../../src/components/default/data-table/DataTableStatus.tsx","../../src/components/default/data-table/DataTableMainFrameSortable.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.479.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }],\n [\"path\", { d: \"m19 12-7 7-7-7\", key: \"1idqje\" }]\n];\nconst ArrowDown = createLucideIcon(\"ArrowDown\", __iconNode);\n\nexport { __iconNode, ArrowDown as default };\n//# sourceMappingURL=arrow-down.js.map\n","/**\n * @license lucide-react v0.479.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m5 12 7-7 7 7\", key: \"hav0vg\" }],\n [\"path\", { d: \"M12 19V5\", key: \"x0mq9r\" }]\n];\nconst ArrowUp = createLucideIcon(\"ArrowUp\", __iconNode);\n\nexport { __iconNode, ArrowUp as default };\n//# sourceMappingURL=arrow-up.js.map\n","import type { Table } from \"@tanstack/react-table\";\nimport { Check, ChevronDownIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\nimport { cn } from \"@/lib/utils\";\n\ninterface DataTableViewOptionsProps<TData> {\n\ttable: Table<TData>;\n\ttransformColumnName?: (id: string) => string;\n}\n\nexport function DataTableViewOptions<TData>({\n\ttable,\n\ttransformColumnName,\n}: DataTableViewOptionsProps<TData>) {\n\tconst triggerRef = React.useRef<HTMLButtonElement>(null);\n\n\treturn (\n\t\t<Popover modal>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tref={triggerRef}\n\t\t\t\t\taria-label=\"Toggle columns\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName=\"text-muted-foreground hover:text-muted-foreground w-full max-w-[12.5rem] items-center justify-between bg-inherit px-3 py-2 hover:bg-inherit\"\n\t\t\t\t>\n\t\t\t\t\tColunas\n\t\t\t\t\t<ChevronDownIcon className=\"h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent\n\t\t\t\talign=\"end\"\n\t\t\t\tclassName=\"w-44 p-0\"\n\t\t\t\tonCloseAutoFocus={() => triggerRef.current?.focus()}\n\t\t\t>\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandInput placeholder=\"Pesquisar colunas...\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>Nenhuma coluna encontrada.</CommandEmpty>\n\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t{table\n\t\t\t\t\t\t\t\t.getAllColumns()\n\t\t\t\t\t\t\t\t.filter((column) => typeof column.accessorFn !== \"undefined\" && column.getCanHide())\n\t\t\t\t\t\t\t\t.map((column) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\tkey={column.id}\n\t\t\t\t\t\t\t\t\t\t\tonSelect={() => column.toggleVisibility(!column.getIsVisible())}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"truncate\">\n\t\t\t\t\t\t\t\t\t\t\t\t{transformColumnName ? transformColumnName(column.id) : column.id}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<Check\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto size-4 shrink-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolumn.getIsVisible() ? \"opacity-100\" : \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","import { Input } from \"@/components/ui/input\";\nimport type { Table } from \"@tanstack/react-table\";\nimport { SearchIcon } from \"lucide-react\";\n\ninterface DataTableSearchProps<TData> {\n\ttable: Table<TData>;\n\tkeySearch: string;\n\tplaceholder: string;\n}\n\nexport function DataTableSearch<TData>({\n\ttable,\n\tkeySearch,\n\tplaceholder,\n}: DataTableSearchProps<TData>) {\n\treturn (\n\t\t<div className=\"relative w-full max-w-sm\">\n\t\t\t<SearchIcon className=\"text-muted-foreground absolute top-3 left-3 h-4 w-4\" />\n\t\t\t<Input\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\tvalue={(table.getColumn(keySearch)?.getFilterValue() as string) ?? \"\"}\n\t\t\t\tonChange={(event) => table.getColumn(keySearch)?.setFilterValue(event.target.value)}\n\t\t\t\tclassName=\"w-full pl-8 xl:w-80\"\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","/**\n * react-table\n *\n * Copyright (c) TanStack\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { createTable } from '@tanstack/table-core';\nexport * from '@tanstack/table-core';\n\n//\n\n/**\n * If rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`.\n */\nfunction flexRender(Comp, props) {\n return !Comp ? null : isReactComponent(Comp) ? /*#__PURE__*/React.createElement(Comp, props) : Comp;\n}\nfunction isReactComponent(component) {\n return isClassComponent(component) || typeof component === 'function' || isExoticComponent(component);\n}\nfunction isClassComponent(component) {\n return typeof component === 'function' && (() => {\n const proto = Object.getPrototypeOf(component);\n return proto.prototype && proto.prototype.isReactComponent;\n })();\n}\nfunction isExoticComponent(component) {\n return typeof component === 'object' && typeof component.$$typeof === 'symbol' && ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description);\n}\nfunction useReactTable(options) {\n // Compose in the generic options to the user options\n const resolvedOptions = {\n state: {},\n // Dummy state\n onStateChange: () => {},\n // noop\n renderFallbackValue: null,\n ...options\n };\n\n // Create a new table and store it in state\n const [tableRef] = React.useState(() => ({\n current: createTable(resolvedOptions)\n }));\n\n // By default, manage table state here using the table's initial state\n const [state, setState] = React.useState(() => tableRef.current.initialState);\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n tableRef.current.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater);\n options.onStateChange == null || options.onStateChange(updater);\n }\n }));\n return tableRef.current;\n}\n\nexport { flexRender, useReactTable };\n//# sourceMappingURL=index.mjs.map\n","import type { Table } from \"@tanstack/react-table\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { PaginationEllipsis, PaginationItem } from \"@/components/ui/pagination\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\nimport React from \"react\";\ninterface DataTablePaginationProps<TData> {\n\ttable: Table<TData>;\n\tpageSizeOptions?: number[];\n\tdataLabel?: string;\n}\n\nexport function DataTablePagination<TData>({\n\ttable,\n\tpageSizeOptions = [20, 30, 50, 100, 200],\n\tdataLabel = \"Fundos\",\n}: DataTablePaginationProps<TData>) {\n\tconst pageSize = pageSizeOptions[0];\n\tconst currentPage = table.getState().pagination.pageIndex + 1;\n\tconst rowCount = table.getRowCount();\n\tconst totalPageCount = Math.ceil(rowCount / table.getState().pagination.pageSize);\n\n\tconst renderPageNumbers = () => {\n\t\tconst items: React.ReactNode[] = [];\n\t\tconst maxVisiblePages = 3;\n\n\t\tif (totalPageCount <= maxVisiblePages) {\n\t\t\tfor (let i = 1; i <= totalPageCount; i++) {\n\t\t\t\titems.push(\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={currentPage === i ? \"outline\" : \"ghost\"}\n\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\tonClick={() => table.setPageIndex(i - 1)}\n\t\t\t\t\t\tclassName=\"size-9\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{i}\n\t\t\t\t\t</Button>,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\titems.push(\n\t\t\t\t<Button\n\t\t\t\t\tvariant={currentPage === 1 ? \"outline\" : \"ghost\"}\n\t\t\t\t\tkey={1}\n\t\t\t\t\tonClick={() => table.setPageIndex(0)}\n\t\t\t\t\tclassName=\"size-9\"\n\t\t\t\t>\n\t\t\t\t\t1\n\t\t\t\t</Button>,\n\t\t\t);\n\n\t\t\tconst start = Math.max(2, Math.min(currentPage, totalPageCount - (maxVisiblePages - 1)));\n\t\t\tconst end = Math.min(totalPageCount - 1, start + maxVisiblePages - 2);\n\n\t\t\tif (start > 2) {\n\t\t\t\titems.push(\n\t\t\t\t\t<PaginationItem key=\"ellipsis-start\" className=\"list-none\">\n\t\t\t\t\t\t<PaginationEllipsis />\n\t\t\t\t\t</PaginationItem>,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tfor (let i = start; i <= end; i++) {\n\t\t\t\titems.push(\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={currentPage === i ? \"outline\" : \"ghost\"}\n\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\tonClick={() => table.setPageIndex(i - 1)}\n\t\t\t\t\t\tclassName=\"size-9\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{i}\n\t\t\t\t\t</Button>,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (end < totalPageCount - 1) {\n\t\t\t\titems.push(\n\t\t\t\t\t<PaginationItem key=\"ellipsis-end\" className=\"list-none\">\n\t\t\t\t\t\t<PaginationEllipsis />\n\t\t\t\t\t</PaginationItem>,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push(\n\t\t\t\t<Button\n\t\t\t\t\tvariant={currentPage === totalPageCount ? \"outline\" : \"ghost\"}\n\t\t\t\t\tkey={totalPageCount}\n\t\t\t\t\tonClick={() => table.setPageIndex(totalPageCount - 1)}\n\t\t\t\t>\n\t\t\t\t\t{totalPageCount}\n\t\t\t\t</Button>,\n\t\t\t);\n\t\t}\n\n\t\treturn items;\n\t};\n\treturn (\n\t\t<div className=\"mt-4 flex flex-wrap items-center justify-between gap-2\">\n\t\t\t<div className=\"text-muted-foreground flex gap-1 text-sm\">\n\t\t\t\t<p className=\"ml-2\">\n\t\t\t\t\tMostrando {table.getRowModel().rows.length.toLocaleString()} de {rowCount} {dataLabel}.\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t<div className=\"flex flex-wrap items-center justify-between gap-2 gap-y-4\">\n\t\t\t\t<Select\n\t\t\t\t\tvalue={String(table.getState().pagination.pageSize) || String(pageSize)}\n\t\t\t\t\tonValueChange={(value) => table.setPageSize(Number(value))}\n\t\t\t\t>\n\t\t\t\t\t<SelectTrigger className=\"w-fit\">\n\t\t\t\t\t\t<SelectValue\n\t\t\t\t\t\t\tplaceholder={`Mostrar ${table.getState().pagination.pageSize || pageSize}`}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t{rowCount && (rowCount === 0 || rowCount < pageSize) ? (\n\t\t\t\t\t\t\t<SelectItem value={String(pageSize)}>Mostrar {pageSize}</SelectItem>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{pageSizeOptions.map((pageSize) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={pageSize} value={String(pageSize)}>\n\t\t\t\t\t\t\t\t\t\tMostrar {pageSize}\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\n\t\t\t\t<div className=\"flex flex-wrap gap-2 gap-y-4\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tonClick={() => table.previousPage()}\n\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t\taria-label=\"Ir para página anterior\"\n\t\t\t\t\t\tclassName=\"gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ChevronLeftIcon className=\"size-4\" />\n\t\t\t\t\t\tAnterior\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<div className=\"flex gap-2\">{renderPageNumbers()}</div>\n\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tonClick={() => table.nextPage()}\n\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t\taria-label=\"Ir para próxima página\"\n\t\t\t\t\t\tclassName=\"gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\tPróximo\n\t\t\t\t\t\t<ChevronRightIcon className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import { Skeleton } from \"@/components/ui/skeleton\";\nimport { cn } from \"@/lib/utils\";\nimport React from \"react\";\n\nexport const DataTablePaginationSkeleton: React.FC = ({\n\tclassName,\n}: {\n\tclassName?: string;\n}) => {\n\treturn (\n\t\t<div className=\"mt-4 flex flex-wrap items-center justify-between gap-2\">\n\t\t\t<Skeleton className={cn(\"h-5 w-40\", className)} />\n\t\t\t<div className=\"flex flex-wrap items-center justify-between gap-2 gap-y-4\">\n\t\t\t\t<Skeleton className={cn(\"h-10 w-28\", className)} />\n\t\t\t\t<Skeleton className={cn(\"h-9 w-[16rem]\", className)} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { Skeleton } from \"@/components/ui/skeleton\";\nimport { TableCell, TableRow } from \"@/components/ui/table\";\n\ninterface DataTableRowSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n\tcolumnCount: number;\n\trowCount?: number;\n\tcellWidths?: string[];\n\tshrinkZero?: boolean;\n}\n\nexport function DataTableRowSkeleton(props: DataTableRowSkeletonProps) {\n\tconst { columnCount, rowCount = 8, cellWidths = [\"auto\"], shrinkZero = false } = props;\n\n\treturn (\n\t\t<>\n\t\t\t{Array.from({ length: rowCount }).map((_, i) => (\n\t\t\t\t<TableRow key={`row-${String(i)}`} className=\"hover:bg-transparent\">\n\t\t\t\t\t{Array.from({ length: columnCount }).map((_, j) => (\n\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\tkey={`cell-${String(i)}-${j}`}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: cellWidths[j],\n\t\t\t\t\t\t\t\tminWidth: shrinkZero ? cellWidths[j] : \"auto\",\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-full\" />\n\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t))}\n\t\t\t\t</TableRow>\n\t\t\t))}\n\t\t</>\n\t);\n}\n","import { TextWrap } from \"@/components/default/base/TextWrap\";\nimport { ScrollArea, ScrollBar } from \"@/components/ui/scroll-area\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { CaretSortIcon } from \"@radix-ui/react-icons\";\nimport type { ColumnDef, Table as TableType } from \"@tanstack/react-table\";\nimport { flexRender } from \"@tanstack/react-table\";\nimport { ArrowDownIcon, ArrowUpIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { DataTablePagination } from \"./DataTablePagination\";\nimport { DataTablePaginationSkeleton } from \"./DataTablePaginationSkeleton\";\nimport { DataTableRowSkeleton } from \"./DataTableRowSkeleton\";\n\ninterface ListParams {\n\t[propName: string]: string | string[];\n}\n\ninterface DataTableViewOptionsProps<TData, TValue> {\n\ttable: TableType<TData>;\n\tcolumns: ColumnDef<TData, TValue>[];\n\tsetQueryParams?: React.Dispatch<React.SetStateAction<ListParams>>;\n\tisLoadingTable?: boolean;\n\tdataLabel: string;\n\tactionColumns?: string[];\n\tmessageEmpty?: React.ReactNode;\n}\n\nexport const DataTableMainFrame = <TData, TValue>({\n\ttable,\n\tcolumns,\n\tisLoadingTable,\n\tsetQueryParams,\n\tdataLabel,\n\tactionColumns = [],\n\tmessageEmpty = <>Sem resultados</>,\n}: DataTableViewOptionsProps<TData, TValue>) => {\n\tconst currentPage = Number(table.getState().pagination.pageIndex).toString();\n\tconst pageSize = Number(table.getState().pagination.pageSize).toString();\n\tconst sorting = table.getState().sorting;\n\tReact.useEffect(() => {\n\t\tif (!setQueryParams) return;\n\t\tconst sortingParams = { sortingBy: \"\", order: \"\" };\n\t\tif (sorting.length > 0) {\n\t\t\tsortingParams.sortingBy = sorting[0].id;\n\t\t\tsortingParams.order = sorting[0].desc ? \"DESC\" : \"ASC\";\n\t\t}\n\t\tsetQueryParams((prev) => ({\n\t\t\t...prev,\n\t\t\tpageSize,\n\t\t\tpage: currentPage,\n\t\t\t...sortingParams,\n\t\t}));\n\t}, [currentPage, pageSize, setQueryParams, sorting]);\n\n\treturn (\n\t\t<>\n\t\t\t<ScrollArea className=\"bg-background w-full rounded-md border whitespace-nowrap\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader className=\"group rounded-md\">\n\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => {\n\t\t\t\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\t\t\t\tcolumn: { id },\n\t\t\t\t\t\t\t\t\t\t} = header;\n\n\t\t\t\t\t\t\t\t\t\tconst isActionsColumn = [\"actions\", ...actionColumns].includes(id);\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<TableHead key={header.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder ? null : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!isActionsColumn && header.column.getCanSort()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"flex w-full items-center justify-start cursor-pointer gap-1 font-medium\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick: !isActionsColumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? header.column.getToggleSortingHandler()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(header.column.columnDef.header, header.getContext())}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(!isActionsColumn &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.getCanSort() &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasc: <ArrowDownIcon className=\"h-3.5 w-3.5\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdesc: <ArrowUpIcon className=\"h-3.5 w-3.5\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse: <CaretSortIcon className=\"h-4 w-4\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}[header.column.getIsSorted() as string]) ?? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ArrowDownIcon className=\"h-3.5 w-3.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</TableHeader>\n\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{!isLoadingTable && table.getRowModel().rows?.length ? (\n\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t\t\t\t\tclassName=\"even:bg-body/50\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<TableCell key={cell.id} className=\"p-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TextWrap>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(cell.column.columnDef.cell, cell.getContext())}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TextWrap>\n\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t) : isLoadingTable ? (\n\t\t\t\t\t\t\t<DataTableRowSkeleton columnCount={table.getAllColumns().length} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableCell colSpan={columns.length} className=\"h-24 text-center\">\n\t\t\t\t\t\t\t\t\t{messageEmpty}\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t\t<ScrollBar orientation=\"horizontal\" />\n\t\t\t</ScrollArea>\n\t\t\t{isLoadingTable ? (\n\t\t\t\t<DataTablePaginationSkeleton />\n\t\t\t) : (\n\t\t\t\t<DataTablePagination table={table} dataLabel={dataLabel} />\n\t\t\t)}\n\t\t</>\n\t);\n};\n","import { Skeleton } from \"@/components/ui/skeleton\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { cn } from \"@/lib/utils\";\nimport React from \"react\";\ninterface DataTableSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * The number of columns in the table.\n\t * @type number\n\t */\n\tcolumnCount: number;\n\n\t/**\n\t * The number of rows in the table.\n\t * @default 10\n\t * @type number | undefined\n\t */\n\trowCount?: number;\n\n\t/**\n\t * The number of searchable columns in the table.\n\t * @default 0\n\t * @type number | undefined\n\t */\n\tsearchableColumnCount?: number;\n\n\t/**\n\t * The number of filterable columns in the table.\n\t * @default 0\n\t * @type number | undefined\n\t */\n\tfilterableColumnCount?: number;\n\n\t/**\n\t * Flag to show the table view options.\n\t * @default undefined\n\t * @type boolean | undefined\n\t */\n\tshowViewOptions?: boolean;\n\n\t/**\n\t * The width of each cell in the table.\n\t * The length of the array should be equal to the columnCount.\n\t * Any valid CSS width value is accepted.\n\t * @default [\"auto\"]\n\t * @type string[] | undefined\n\t */\n\tcellWidths?: string[];\n\n\t/**\n\t * Flag to show the pagination bar.\n\t * @default true\n\t * @type boolean | undefined\n\t */\n\twithPagination?: boolean;\n\n\t/**\n\t * Flag to prevent the table cells from shrinking.\n\t * @default false\n\t * @type boolean | undefined\n\t */\n\tshrinkZero?: boolean;\n}\n\nexport function DataTableSkeleton(props: DataTableSkeletonProps) {\n\tconst {\n\t\tcolumnCount,\n\t\trowCount = 10,\n\t\tsearchableColumnCount = 0,\n\t\tfilterableColumnCount = 0,\n\t\tshowViewOptions = true,\n\t\tcellWidths = [\"auto\"],\n\t\twithPagination = true,\n\t\tshrinkZero = false,\n\t\tclassName,\n\t\t...skeletonProps\n\t} = props;\n\n\treturn (\n\t\t<div className={cn(\"w-full space-y-2.5 overflow-auto\", className)} {...skeletonProps}>\n\t\t\t<div className=\"flex w-full items-center justify-between space-x-2 overflow-auto p-1\">\n\t\t\t\t<div className=\"flex flex-1 items-center space-x-2\">\n\t\t\t\t\t{searchableColumnCount > 0\n\t\t\t\t\t\t? Array.from({ length: searchableColumnCount }).map((_, i) => (\n\t\t\t\t\t\t\t\t<Skeleton key={`${String(i)}`} className=\"h-7 w-40 lg:w-60\" />\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t: null}\n\t\t\t\t\t{filterableColumnCount > 0\n\t\t\t\t\t\t? Array.from({ length: filterableColumnCount }).map((_, i) => (\n\t\t\t\t\t\t\t\t<Skeleton key={`${String(i)}`} className=\"h-7 w-[4.5rem] border-dashed\" />\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t: null}\n\t\t\t\t</div>\n\t\t\t\t{showViewOptions ? <Skeleton className=\"ml-auto hidden h-7 w-[4.5rem] lg:flex\" /> : null}\n\t\t\t</div>\n\t\t\t<div className=\"rounded-md border\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t{Array.from({ length: 1 }).map((_, i) => (\n\t\t\t\t\t\t\t<TableRow key={`${String(i)}`} className=\"hover:bg-transparent\">\n\t\t\t\t\t\t\t\t{Array.from({ length: columnCount }).map((_, j) => (\n\t\t\t\t\t\t\t\t\t<TableHead\n\t\t\t\t\t\t\t\t\t\tkey={`${String(j)}`}\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\twidth: cellWidths[j],\n\t\t\t\t\t\t\t\t\t\t\tminWidth: shrinkZero ? cellWidths[j] : \"auto\",\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-full\" />\n\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableHeader>\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{Array.from({ length: rowCount }).map((_, i) => (\n\t\t\t\t\t\t\t<TableRow key={`${String(i)}`} className=\"hover:bg-transparent\">\n\t\t\t\t\t\t\t\t{Array.from({ length: columnCount }).map((_, j) => (\n\t\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\t\tkey={`${String(j)}`}\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\twidth: cellWidths[j],\n\t\t\t\t\t\t\t\t\t\t\tminWidth: shrinkZero ? cellWidths[j] : \"auto\",\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-full\" />\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t</div>\n\t\t\t{withPagination ? (\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-4 overflow-auto p-1 sm:gap-8\">\n\t\t\t\t\t<Skeleton className=\"h-7 w-40 shrink-0\" />\n\t\t\t\t\t<div className=\"flex items-center gap-4 sm:gap-6 lg:gap-8\">\n\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t<Skeleton className=\"h-7 w-24\" />\n\t\t\t\t\t\t\t<Skeleton className=\"h-7 w-[4.5rem]\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-center justify-center text-sm font-medium\">\n\t\t\t\t\t\t\t<Skeleton className=\"h-7 w-20\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t<Skeleton className=\"hidden size-7 lg:block\" />\n\t\t\t\t\t\t\t<Skeleton className=\"size-7\" />\n\t\t\t\t\t\t\t<Skeleton className=\"size-7\" />\n\t\t\t\t\t\t\t<Skeleton className=\"hidden size-7 lg:block\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\nimport { cn } from \"@/lib/utils\";\nimport type { Table } from \"@tanstack/react-table\";\nimport { ChevronDownIcon } from \"lucide-react\";\nimport { useRef } from \"react\";\n\ninterface DataTableStatusProps<TData, TEnum> {\n\ttable: Table<TData>;\n\tuniqueStatusValues: TEnum[];\n\trenderStatusMessage(status: TEnum): string;\n\tclassName?: string;\n}\n\nexport function DataTableStatus<TData, TEnum>({\n\ttable,\n\tuniqueStatusValues,\n\trenderStatusMessage,\n\tclassName,\n}: DataTableStatusProps<TData, TEnum>) {\n\tconst triggerRef = useRef<HTMLButtonElement>(null);\n\n\tconst currentFilter = table.getColumn(\"status\")?.getFilterValue() as TEnum | undefined;\n\n\treturn (\n\t\t<Popover modal>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tref={triggerRef}\n\t\t\t\t\taria-label=\"Filtre por status\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"border-input text-muted-foreground ring-offset-background placeholder:text-muted-foreground hover:text-muted-foreground focus:ring-ring flex h-10 w-full max-w-60 items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm hover:bg-inherit focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{currentFilter ? renderStatusMessage(currentFilter) : \"Todos os status\"}\n\t\t\t\t\t<ChevronDownIcon className=\"h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent\n\t\t\t\talign=\"end\"\n\t\t\t\tclassName=\"w-44 p-0\"\n\t\t\t\tonCloseAutoFocus={() => triggerRef.current?.focus()}\n\t\t\t>\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandInput placeholder=\"Pesquisar status...\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>Nenhum status encontrado.</CommandEmpty>\n\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\tkey=\"all\"\n\t\t\t\t\t\t\tonSelect={() => table.getColumn(\"status\")?.setFilterValue(undefined)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"truncate\">Todos os status</span>\n\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t{uniqueStatusValues.map((item) => {\n\t\t\t\t\t\t\tif (!item) return null;\n\n\t\t\t\t\t\t\tconst statusMessage = renderStatusMessage(item as TEnum);\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\tkey={`${String(item)}`}\n\t\t\t\t\t\t\t\t\tonSelect={() => table.getColumn(\"status\")?.setFilterValue(item)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className=\"truncate\">{statusMessage}</span>\n\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","import { TextWrap } from \"@/components/default/base/TextWrap\";\nimport { ScrollArea, ScrollBar } from \"@/components/ui/scroll-area\";\nimport { Sortable, SortableItem } from \"@/components/ui/sortable\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { cn } from \"@/lib/utils\";\nimport { CaretSortIcon } from \"@radix-ui/react-icons\";\nimport type { ColumnDef, Row, Table as TableType } from \"@tanstack/react-table\";\nimport { flexRender } from \"@tanstack/react-table\";\nimport { ArrowDownIcon, ArrowUpIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { DataTablePagination } from \"./DataTablePagination\";\nimport { DataTablePaginationSkeleton } from \"./DataTablePaginationSkeleton\";\nimport { DataTableRowSkeleton } from \"./DataTableRowSkeleton\";\n\ninterface DataTableViewOptionsProps<TData, TValue> {\n\ttable: TableType<TData>;\n\tcolumns: ColumnDef<TData, TValue>[];\n\tsetQueryParams?: React.Dispatch<React.SetStateAction<ListParams>>;\n\tisLoadingTable?: boolean;\n\tdataLabel: string;\n\tactionColumns?: string[];\n\tdata: TData[];\n\tonDataChange?: (newData: TData[]) => void;\n\tmessageEmpty?: React.ReactNode;\n\trowKey: keyof TData | ((row: TData) => string | number);\n\tdividingColumnKey?: string[];\n\tloadingContent?: React.ReactNode;\n}\n\ntype RowData = {\n\t// biome-ignore lint/suspicious/noExplicitAny: <explanation>\n\t[key: string]: any;\n};\n\ninterface ListParams {\n\t[propName: string]: string | string[];\n}\n\nconst getRowKey = <TData extends RowData>(\n\trow: TData,\n\trowKey: keyof TData | ((row: TData) => string | number),\n): string | number => {\n\tif (typeof rowKey === \"function\") {\n\t\treturn rowKey(row);\n\t}\n\treturn row[rowKey] as string | number;\n};\n\nexport const DataTableMainFrameSortable = <TData extends RowData, TValue>({\n\ttable,\n\tcolumns,\n\tisLoadingTable,\n\tloadingContent,\n\tsetQueryParams,\n\tdataLabel,\n\tactionColumns = [],\n\tdata,\n\tmessageEmpty = <>Sem resultados</>,\n\tonDataChange,\n\trowKey,\n\tdividingColumnKey,\n}: DataTableViewOptionsProps<TData, TValue>) => {\n\tconst [newData, setNewData] = React.useState<TData[]>(data);\n\n\tReact.useEffect(() => {\n\t\tsetNewData(data);\n\t}, [data]);\n\n\tconst handleValueChange = (updatedData: TData[]) => {\n\t\tsetNewData(updatedData);\n\t\tonDataChange?.(updatedData);\n\t};\n\n\tconst currentPage = Number(table.getState().pagination.pageIndex).toString();\n\tconst pageSize = Number(table.getState().pagination.pageSize).toString();\n\tconst sorting = table.getState().sorting;\n\n\tReact.useEffect(() => {\n\t\tif (!setQueryParams) return;\n\t\tconst sortingParams = { sortingBy: \"\", order: \"\" };\n\t\tif (sorting.length > 0) {\n\t\t\tsortingParams.sortingBy = sorting[0].id;\n\t\t\tsortingParams.order = sorting[0].desc ? \"DESC\" : \"ASC\";\n\t\t}\n\t\tsetQueryParams((prev) => ({\n\t\t\t...prev,\n\t\t\tpageSize,\n\t\t\tpage: currentPage,\n\t\t\t...sortingParams,\n\t\t}));\n\t}, [currentPage, pageSize, setQueryParams, sorting]);\n\n\tconst renderTableBodyContent = () => {\n\t\tif (isLoadingTable && !loadingContent) {\n\t\t\treturn <DataTableRowSkeleton columnCount={table.getAllColumns().length} />;\n\t\t}\n\n\t\tif (isLoadingTable && loadingContent) {\n\t\t\treturn (\n\t\t\t\t<TableCell colSpan={columns.length} className=\"h-24 text-center\">\n\t\t\t\t\t{loadingContent}\n\t\t\t\t</TableCell>\n\t\t\t);\n\t\t}\n\n\t\tif (table.getRowModel().rows.length === 0) {\n\t\t\treturn (\n\t\t\t\t<TableRow>\n\t\t\t\t\t<TableCell colSpan={columns.length} className=\"h-24 text-center\">\n\t\t\t\t\t\t{messageEmpty}\n\t\t\t\t\t</TableCell>\n\t\t\t\t</TableRow>\n\t\t\t);\n\t\t}\n\n\t\treturn table.getRowModel().rows.map((row: Row<TData>) => {\n\t\t\tconst rowData = row.original;\n\t\t\tconst key = getRowKey(rowData, rowKey);\n\n\t\t\treturn (\n\t\t\t\t<SortableItem key={row.id} value={key} asChild>\n\t\t\t\t\t<TableRow data-state={row.getIsSelected() && \"selected\"} className=\"even:bg-body/50\">\n\t\t\t\t\t\t{/* biome-ignore lint/suspicious/noExplicitAny: <explanation> */}\n\t\t\t\t\t\t{row.getVisibleCells().map((cell: any) => (\n\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\tkey={cell.id}\n\t\t\t\t\t\t\t\tclassName={cn(\"p-2\", dividingColumnKey?.includes(cell.column.id) && \"border-r\")}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<TextWrap>{flexRender(cell.column.columnDef.cell, cell.getContext())}</TextWrap>\n\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableRow>\n\t\t\t\t</SortableItem>\n\t\t\t);\n\t\t});\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScrollArea className=\"bg-background w-full rounded-md border whitespace-nowrap\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader className=\"group rounded-md\">\n\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => {\n\t\t\t\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\t\t\t\tcolumn: { id },\n\t\t\t\t\t\t\t\t\t\t} = header;\n\n\t\t\t\t\t\t\t\t\t\tconst isActionsColumn = [\"actions\", ...actionColumns].includes(id);\n\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<TableHead\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={dividingColumnKey?.includes(id) ? \"border-r\" : \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\tkey={header.id}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder ? null : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!isActionsColumn && header.column.getCanSort()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"flex w-full items-center justify-start cursor-pointer gap-1 font-medium\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick: !isActionsColumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? header.column.getToggleSortingHandler()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(header.column.columnDef.header, header.getContext())}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(!isActionsColumn &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.getCanSort() &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasc: <ArrowDownIcon className=\"h-3.5 w-3.5\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdesc: <ArrowUpIcon className=\"h-3.5 w-3.5\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse: <CaretSortIcon className=\"h-4 w-4\" />,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}[header.column.getIsSorted() as string]) ?? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ArrowDownIcon className=\"h-3.5 w-3.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</TableHeader>\n\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t<Sortable\n\t\t\t\t\t\t\tvalue={newData.map((item) => ({\n\t\t\t\t\t\t\t\t...item,\n\t\t\t\t\t\t\t\tid: getRowKey(item, rowKey),\n\t\t\t\t\t\t\t}))}\n\t\t\t\t\t\t\tonValueChange={handleValueChange}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{renderTableBodyContent()}\n\t\t\t\t\t\t</Sortable>\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t\t<ScrollBar orientation=\"horizontal\" />\n\t\t\t</ScrollArea>\n\n\t\t\t{isLoadingTable ? (\n\t\t\t\t<DataTablePaginationSkeleton />\n\t\t\t) : (\n\t\t\t\t<DataTablePagination table={table} dataLabel={dataLabel} />\n\t\t\t)}\n\t\t</>\n\t);\n};\n"],"names":["ArrowDown","createLucideIcon","d","key","ArrowUp","DataTableViewOptions","table","transformColumnName","triggerRef","React","useRef","Popover","modal","PopoverTrigger","asChild","Button","ref","aria-label","variant","className","ChevronDownIcon","PopoverContent","align","onCloseAutoFocus","current","focus","createElement","Command","CommandInput","placeholder","CommandList","CommandEmpty","CommandGroup","getAllColumns","filter","column","accessorFn","getCanHide","map","CommandItem","id","onSelect","toggleVisibility","getIsVisible","span","Check","cn","DataTableSearch","keySearch","div","SearchIcon","Input","value","getColumn","getFilterValue","onChange","event","setFilterValue","target","flexRender","Comp","props","component","proto","Object","getPrototypeOf","prototype","isReactComponent","isClassComponent","$$typeof","includes","description","isExoticComponent","DataTablePagination","pageSizeOptions","dataLabel","pageSize","currentPage","getState","pagination","pageIndex","rowCount","getRowCount","totalPageCount","Math","ceil","p","getRowModel","rows","length","toLocaleString","Select","String","onValueChange","setPageSize","Number","SelectTrigger","SelectValue","SelectContent","SelectItem","onClick","previousPage","disabled","getCanPreviousPage","ChevronLeftIcon","items","i","push","setPageIndex","start","max","min","end","PaginationItem","PaginationEllipsis","renderPageNumbers","nextPage","getCanNextPage","ChevronRightIcon","DataTablePaginationSkeleton","Skeleton","DataTableRowSkeleton","columnCount","cellWidths","shrinkZero","Fragment","Array","from","_","TableRow","j","TableCell","style","width","minWidth","DataTableMainFrame","columns","isLoadingTable","setQueryParams","actionColumns","messageEmpty","toString","sorting","useEffect","sortingParams","sortingBy","order","desc","prev","page","ScrollArea","Table","TableHeader","getHeaderGroups","headerGroup","headers","header","isActionsColumn","TableHead","isPlaceholder","getCanSort","undefined","getToggleSortingHandler","columnDef","getContext","asc","ArrowDownIcon","ArrowUpIcon","false","CaretSortIcon","getIsSorted","TableBody","row","data-state","getIsSelected","getVisibleCells","cell","TextWrap","colSpan","ScrollBar","orientation","DataTableSkeleton","searchableColumnCount","filterableColumnCount","showViewOptions","withPagination","skeletonProps","DataTableStatus","uniqueStatusValues","renderStatusMessage","currentFilter","item","statusMessage","getRowKey","rowKey","DataTableMainFrameSortable","loadingContent","data","onDataChange","dividingColumnKey","newData","setNewData","useState","Sortable","updatedData","rowData","original","SortableItem"],"mappings":"o0DAGO,MAgBDA,EAAYC,EAAiB,YAhBC,CAClC,CAAC,OAAQ,CAAEC,EAAG,WAAYC,IAAK,WAC/B,CAAC,OAAQ,CAAED,EAAG,iBAAkBC,IAAK,aCcjCC,EAAUH,EAAiB,UAhBG,CAClC,CAAC,OAAQ,CAAEC,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