dgz-ui-shared 1.0.65 → 1.0.66

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.
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-DUiatUiq.cjs"),W=require("../../button-Bp2lHjov-D9UnCnYX.cjs"),f=require("../../dropdown-menu-BPBcxHRB-towSSPIs.cjs"),L=require("../../MyLimitSelect-BFWr_fUn.cjs"),T=require("../../FilterWrapper-DiuKsyOG.cjs"),c=require("react"),R=require("../../lodash-C5w_OPmE.cjs"),j=require("../../index-DqTIeHVj-DlSOwhuZ.cjs"),n=require("../../utils-B6fNqzRf-BNysSCt9.cjs"),A=require("../../useSortable-Dx_e142l.cjs"),D=require("../../radio-group-CqPTye2U-CXc2TUFE.cjs"),$=require("../../SortOrder-81BrXp3i.cjs"),O=require("../../Empty--unTFnpg.cjs"),I=require("../../createLucideIcon-BnAj0RnC.cjs"),G=require("../../Loader-bUUShWXh.cjs"),J=require("../../useTranslation-CZf20ucv.cjs"),B=c.forwardRef(({className:s,...t},i)=>j.ae.jsx("table",{ref:i,className:n.mo("w-full caption-bottom text-sm",s),...t}));B.displayName="Table";const H=c.forwardRef(({className:s,...t},i)=>j.ae.jsx("thead",{ref:i,className:n.mo("[&_tr]:border-b",s),...t}));H.displayName="TableHeader";const C=c.forwardRef(({className:s,...t},i)=>j.ae.jsx("tbody",{ref:i,className:n.mo("[&_tr:last-child]:border-0",s),...t}));C.displayName="TableBody";const Q=c.forwardRef(({className:s,...t},i)=>j.ae.jsx("tfoot",{ref:i,className:n.mo("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",s),...t}));Q.displayName="TableFooter";const M=c.forwardRef(({className:s,...t},i)=>j.ae.jsx("tr",{ref:i,className:n.mo("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",s),...t}));M.displayName="TableRow";const q=c.forwardRef(({className:s,...t},i)=>j.ae.jsx("th",{ref:i,className:n.mo("text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",s),...t}));q.displayName="TableHead";const y=c.forwardRef(({className:s,...t},i)=>j.ae.jsx("td",{ref:i,className:n.mo("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...t}));y.displayName="TableCell";const X=c.forwardRef(({className:s,...t},i)=>j.ae.jsx("caption",{ref:i,className:n.mo("text-muted-foreground mt-4 text-sm",s),...t}));X.displayName="TableCaption";/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-DUiatUiq.cjs"),O=require("../../button-Bp2lHjov-D9UnCnYX.cjs"),R=require("../../dropdown-menu-BPBcxHRB-towSSPIs.cjs"),L=require("../../MyLimitSelect-BFWr_fUn.cjs"),T=require("../../FilterWrapper-DiuKsyOG.cjs"),a=require("react"),E=require("../../lodash-C5w_OPmE.cjs"),m=require("../../index-DqTIeHVj-DlSOwhuZ.cjs"),n=require("../../utils-B6fNqzRf-BNysSCt9.cjs"),D=require("../../useSortable-Dx_e142l.cjs"),F=require("../../radio-group-CqPTye2U-CXc2TUFE.cjs"),$=require("../../SortOrder-81BrXp3i.cjs"),G=require("../../Empty--unTFnpg.cjs"),I=require("../../createLucideIcon-BnAj0RnC.cjs"),J=require("../../Loader-bUUShWXh.cjs"),Q=require("../../useTranslation-CZf20ucv.cjs"),B=a.forwardRef(({className:s,...t},i)=>m.ae.jsx("table",{ref:i,className:n.mo("w-full caption-bottom text-sm",s),...t}));B.displayName="Table";const H=a.forwardRef(({className:s,...t},i)=>m.ae.jsx("thead",{ref:i,className:n.mo("[&_tr]:border-b",s),...t}));H.displayName="TableHeader";const U=a.forwardRef(({className:s,...t},i)=>m.ae.jsx("tbody",{ref:i,className:n.mo("[&_tr:last-child]:border-0",s),...t}));U.displayName="TableBody";const X=a.forwardRef(({className:s,...t},i)=>m.ae.jsx("tfoot",{ref:i,className:n.mo("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",s),...t}));X.displayName="TableFooter";const M=a.forwardRef(({className:s,...t},i)=>m.ae.jsx("tr",{ref:i,className:n.mo("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",s),...t}));M.displayName="TableRow";const q=a.forwardRef(({className:s,...t},i)=>m.ae.jsx("th",{ref:i,className:n.mo("text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",s),...t}));q.displayName="TableHead";const b=a.forwardRef(({className:s,...t},i)=>m.ae.jsx("td",{ref:i,className:n.mo("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...t}));b.displayName="TableCell";const Y=a.forwardRef(({className:s,...t},i)=>m.ae.jsx("caption",{ref:i,className:n.mo("text-muted-foreground mt-4 text-sm",s),...t}));Y.displayName="TableCaption";/**
2
2
  * @license lucide-react v0.511.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Y=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]],Z=I.createLucideIcon("arrow-down-wide-narrow",Y);/**
6
+ */const Z=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]],K=I.createLucideIcon("arrow-down-wide-narrow",Z);/**
7
7
  * @license lucide-react v0.511.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const P=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],K=I.createLucideIcon("arrow-up-down",P);/**
11
+ */const C=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],P=I.createLucideIcon("arrow-up-down",C);/**
12
12
  * @license lucide-react v0.511.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
@@ -18,4 +18,4 @@
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const te=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],re=I.createLucideIcon("refresh-cw",te),U=({rows:s=[],columns:t,onRowClick:i,rowKey:m,params:a={page:1,limit:L.DEFAULT_LIMIT},hasNumbers:h=!1,hasCheckbox:E=!1,selectedItems:_,onSelectedItemsChange:g,onSortOrderChange:x,isStickyHeader:F})=>{const{sortObject:d,handleSort:N}=A.useSortable({sortField:a==null?void 0:a.sortField,sortOrder:a==null?void 0:a.sortField,onSortOrderChange:x}),{selectedRows:u,isRowSelected:b,isAllRowsSelected:p,handleSelectAllRows:w,handleSelectRow:k}=A.useDataTable({rows:s,defaultSelectedRows:_});return c.useEffect(()=>{g&&g(u)},[u]),e.jsxRuntimeExports.jsxs(B,{className:"relative",children:[e.jsxRuntimeExports.jsx(H,{className:n.mo("bg-bg",F&&"sticky top-0 z-10"),children:e.jsxRuntimeExports.jsxs(M,{children:[E&&e.jsxRuntimeExports.jsx(q,{className:"w-12 p-3",children:e.jsxRuntimeExports.jsx(D.Tl,{className:"mt-1",checked:p(m),onCheckedChange:r=>w(m,!!r),"aria-label":"Select all"})}),h&&e.jsxRuntimeExports.jsx(q,{className:"w-12 p-2",children:"#"}),t.filter(r=>!r.hidden).map(r=>e.jsxRuntimeExports.jsx(q,{style:r.styles,className:n.mo("p-2",r.sortable&&"cursor-pointer"),onClick:()=>N(r.dataIndex),children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[r.name," ",r.sortable&&((d==null?void 0:d.sortField)===r.key?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[(d==null?void 0:d.sortOrder)===$.SortOrder.DESC&&e.jsxRuntimeExports.jsx(Z,{size:15}),(d==null?void 0:d.sortOrder)===$.SortOrder.ASC&&e.jsxRuntimeExports.jsx(se,{size:15})]}):e.jsxRuntimeExports.jsx(K,{size:15}))]})},r.key))]})}),e.jsxRuntimeExports.jsx(C,{className:"[&>tr:nth-child(even)]:bg-bg-secondary",children:s.length?s.map((r,v)=>e.jsxRuntimeExports.jsxs(M,{onClick:()=>i==null?void 0:i(r),className:n.mo(i&&"cursor-pointer"),"data-state":b(r[m])&&"selected",children:[E&&e.jsxRuntimeExports.jsx(y,{className:"w-12 p-3",onClick:l=>l.stopPropagation(),children:e.jsxRuntimeExports.jsx(D.Tl,{className:"mt-1",checked:b(r[m]),onCheckedChange:l=>k(r[m],!!l),"aria-label":"Select row"})}),h&&e.jsxRuntimeExports.jsx(y,{className:"w-12 p-2",children:(a.page-1)*(a.limit||L.DEFAULT_LIMIT)+v+1}),t.filter(l=>!l.hidden).map(l=>e.jsxRuntimeExports.jsx(y,{className:"text-body-xs-medium max-w-xs overflow-hidden p-2 text-ellipsis",style:l.styles,children:l.render?l.render(R.lodashExports.get(r,l.dataIndex),r):R.lodashExports.get(r,l.dataIndex,"")},`${v}-${l.key}`))]},`${r[m]}`)):e.jsxRuntimeExports.jsx(M,{children:e.jsxRuntimeExports.jsx(y,{colSpan:h?E?t.length+2:t.length+1:t.length,children:e.jsxRuntimeExports.jsx(O.Empty,{})})})})]})},ie=({dataSource:s,columns:t,onRowClick:i,rowKey:m,hasNumbers:a,hasSearch:h,hasCheckbox:E,hasPagination:_,isStickyHeader:g,onParamChange:x,dataKey:F="docs",loading:d,tableKey:N,filters:u=[],handleFilterChange:b,params:p,hasColumnsVisibilityDropdown:w})=>{const{t:k}=J.useTranslation(),[r,v]=c.useState([]),{formattedColumns:l,handleColumnsChange:S,resetColumns:V}=A.useColumns({key:N,columns:t});return e.jsxRuntimeExports.jsxs("div",{className:"border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",children:[(h||w&&N||!R.lodashExports.isEmpty(u))&&e.jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 p-4",children:[e.jsxRuntimeExports.jsx("div",{className:"w-full shrink",children:h&&e.jsxRuntimeExports.jsx(T.Search,{defaultValue:R.lodashExports.get(p,"search",""),onSearchChange:o=>({...p,search:o,page:1})})}),e.jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 items-center justify-end gap-3",children:[w&&N&&e.jsxRuntimeExports.jsxs(f.Nt,{children:[e.jsxRuntimeExports.jsx(f.jt,{asChild:!0,children:e.jsxRuntimeExports.jsxs(W.u,{variant:"secondary",size:"sm",className:"ml-auto rounded-lg px-3",children:[e.jsxRuntimeExports.jsx(T.yn,{})," ",e.jsxRuntimeExports.jsx("span",{className:"hidden lg:!inline",children:k("Customize columns")}),e.jsxRuntimeExports.jsx(T.f1,{})]})}),e.jsxRuntimeExports.jsxs(f.ut,{align:"end",children:[e.jsxRuntimeExports.jsxs(f.it,{className:"capitalize",onClick:V,children:[e.jsxRuntimeExports.jsx(re,{})," ",k("Reset columns")]}),e.jsxRuntimeExports.jsx(f.ft,{}),l.map(o=>e.jsxRuntimeExports.jsx(f.dt,{className:"capitalize",checked:!o.hidden,onCheckedChange:z=>S(o,!z),children:o.name},o.key))]})]}),!R.lodashExports.isEmpty(u)&&e.jsxRuntimeExports.jsx(T.FilterWrapper,{filters:u,onFilter:b})]})]}),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col overflow-auto border-y",children:d?e.jsxRuntimeExports.jsx(G.Loader,{}):e.jsxRuntimeExports.jsx(U,{params:p,rows:R.lodashExports.get(s,F,[]),rowKey:m,selectedItems:r,isStickyHeader:g,columns:l,hasCheckbox:E,hasNumbers:a,onRowClick:i,onSelectedItemsChange:v,onSortOrderChange:({sortField:o,sortOrder:z})=>{x==null||x({...p,sortField:o,sortOrder:z})}})}),_&&e.jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row",children:[e.jsxRuntimeExports.jsx("div",{className:"text-sm",children:e.jsxRuntimeExports.jsx(L.MyLimitSelect,{onLimitChange:o=>x==null?void 0:x({...p,limit:o,page:1}),defaultValue:s==null?void 0:s.limit})}),e.jsxRuntimeExports.jsxs("div",{className:"text-muted-foreground text-sm",children:[r.length," of ",(s==null?void 0:s.total)||0," row(s) selected."]}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(L.MyPagination,{onPageChange:o=>x==null?void 0:x({...p,page:o}),currentPage:s==null?void 0:s.page,totalPages:s==null?void 0:s.totalPages})})]})]})};exports.DataTable=ie;exports.MyTable=U;
21
+ */const te=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],re=I.createLucideIcon("refresh-cw",te),S=({rows:s=[],columns:t,onRowClick:i,rowKey:j,params:c={page:1,limit:L.DEFAULT_LIMIT},hasNumbers:u=!1,hasCheckbox:N=!1,selectedItems:_,onSelectedItemsChange:w,onSortOrderChange:l,isStickyHeader:z})=>{const{sortObject:d,handleSort:y}=D.useSortable({sortField:c==null?void 0:c.sortField,sortOrder:c==null?void 0:c.sortField,onSortOrderChange:l}),{selectedRows:h,isRowSelected:f,isAllRowsSelected:p,handleSelectAllRows:k,handleSelectRow:g}=D.useDataTable({rows:s,defaultSelectedRows:_});return a.useEffect(()=>{w&&w(h)},[h]),e.jsxRuntimeExports.jsxs(B,{className:"relative",children:[e.jsxRuntimeExports.jsx(H,{className:n.mo("bg-bg",z&&"sticky top-0 z-10"),children:e.jsxRuntimeExports.jsxs(M,{children:[N&&e.jsxRuntimeExports.jsx(q,{className:"w-12 p-3",children:e.jsxRuntimeExports.jsx(F.Tl,{className:"mt-1",checked:p(j),onCheckedChange:r=>k(j,!!r),"aria-label":"Select all"})}),u&&e.jsxRuntimeExports.jsx(q,{className:"w-12 p-2",children:"#"}),t.filter(r=>!r.hidden).map(r=>e.jsxRuntimeExports.jsx(q,{style:r.styles,className:n.mo("p-2",r.sortable&&"cursor-pointer"),onClick:()=>y(r.dataIndex),children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[r.name," ",r.sortable&&((d==null?void 0:d.sortField)===r.key?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[(d==null?void 0:d.sortOrder)===$.SortOrder.DESC&&e.jsxRuntimeExports.jsx(K,{size:15}),(d==null?void 0:d.sortOrder)===$.SortOrder.ASC&&e.jsxRuntimeExports.jsx(se,{size:15})]}):e.jsxRuntimeExports.jsx(P,{size:15}))]})},r.key))]})}),e.jsxRuntimeExports.jsx(U,{className:"[&>tr:nth-child(even)]:bg-bg-secondary",children:s.length?s.map((r,v)=>e.jsxRuntimeExports.jsxs(M,{onClick:()=>i==null?void 0:i(r),className:n.mo(i&&"cursor-pointer"),"data-state":f(r[j])&&"selected",children:[N&&e.jsxRuntimeExports.jsx(b,{className:"w-12 p-3",onClick:x=>x.stopPropagation(),children:e.jsxRuntimeExports.jsx(F.Tl,{className:"mt-1",checked:f(r[j]),onCheckedChange:x=>g(r[j],!!x),"aria-label":"Select row"})}),u&&e.jsxRuntimeExports.jsx(b,{className:"w-12 p-2",children:(c.page-1)*(c.limit||L.DEFAULT_LIMIT)+v+1}),t.filter(x=>!x.hidden).map(x=>e.jsxRuntimeExports.jsx(b,{className:"text-body-xs-medium max-w-xs overflow-hidden p-2 text-ellipsis",style:x.styles,children:x.render?x.render(E.lodashExports.get(r,x.dataIndex),r):E.lodashExports.get(r,x.dataIndex,"")},`${v}-${x.key}`))]},`${r[j]}`)):e.jsxRuntimeExports.jsx(M,{children:e.jsxRuntimeExports.jsx(b,{colSpan:u?N?t.length+2:t.length+1:t.length,children:e.jsxRuntimeExports.jsx(G.Empty,{})})})})]})},ie=({dataSource:s,columns:t,onRowClick:i,rowKey:j,hasNumbers:c,hasSearch:u,hasCheckbox:N,hasPagination:_,isStickyHeader:w,onParamChange:l,dataKey:z="docs",loading:d,tableKey:y,filters:h=[],handleFilterChange:f,params:p,hasColumnsVisibilityDropdown:k})=>{const{t:g}=Q.useTranslation(),[r,v]=a.useState([]),{formattedColumns:x,handleColumnsChange:V,resetColumns:W}=D.useColumns({key:y,columns:t});return e.jsxRuntimeExports.jsxs("div",{className:"border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",children:[(u||k&&y||!E.lodashExports.isEmpty(h))&&e.jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 p-4",children:[e.jsxRuntimeExports.jsx("div",{className:"w-full shrink",children:u&&e.jsxRuntimeExports.jsx(T.Search,{defaultValue:E.lodashExports.get(p,"search",""),onSearchChange:o=>l==null?void 0:l({...p,search:o,page:1})})}),e.jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 items-center justify-end gap-3",children:[k&&y&&e.jsxRuntimeExports.jsxs(R.Nt,{children:[e.jsxRuntimeExports.jsx(R.jt,{asChild:!0,children:e.jsxRuntimeExports.jsxs(O.u,{variant:"secondary",size:"sm",className:"ml-auto rounded-lg px-3",children:[e.jsxRuntimeExports.jsx(T.yn,{})," ",e.jsxRuntimeExports.jsx("span",{className:"hidden lg:!inline",children:g("Customize columns")}),e.jsxRuntimeExports.jsx(T.f1,{})]})}),e.jsxRuntimeExports.jsxs(R.ut,{align:"end",children:[e.jsxRuntimeExports.jsxs(R.it,{className:"capitalize",onClick:W,children:[e.jsxRuntimeExports.jsx(re,{})," ",g("Reset columns")]}),e.jsxRuntimeExports.jsx(R.ft,{}),x.map(o=>e.jsxRuntimeExports.jsx(R.dt,{className:"capitalize",checked:!o.hidden,onCheckedChange:A=>V(o,!A),children:o.name},o.key))]})]}),!E.lodashExports.isEmpty(h)&&e.jsxRuntimeExports.jsx(T.FilterWrapper,{filters:h,onFilter:o=>{l==null||l({...p,...o,page:1}),f==null||f(o)}})]})]}),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col overflow-auto border-y",children:d?e.jsxRuntimeExports.jsx(J.Loader,{}):e.jsxRuntimeExports.jsx(S,{params:p,rows:E.lodashExports.get(s,z,[]),rowKey:j,selectedItems:r,isStickyHeader:w,columns:x,hasCheckbox:N,hasNumbers:c,onRowClick:i,onSelectedItemsChange:v,onSortOrderChange:({sortField:o,sortOrder:A})=>{l==null||l({...p,sortField:o,sortOrder:A})}})}),_&&e.jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row",children:[e.jsxRuntimeExports.jsx("div",{className:"text-sm",children:e.jsxRuntimeExports.jsx(L.MyLimitSelect,{onLimitChange:o=>l==null?void 0:l({...p,limit:o,page:1}),defaultValue:s==null?void 0:s.limit})}),e.jsxRuntimeExports.jsxs("div",{className:"text-muted-foreground text-sm",children:[r.length," of ",(s==null?void 0:s.total)||0," row(s) selected."]}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(L.MyPagination,{onPageChange:o=>l==null?void 0:l({...p,page:o}),currentPage:s==null?void 0:s.page,totalPages:s==null?void 0:s.totalPages})})]})]})};exports.DataTable=ie;exports.MyTable=S;
@@ -1,45 +1,45 @@
1
1
  import { j as e } from "../../jsx-runtime-C5mzlN2N.js";
2
- import { u as U } from "../../button-Bp2lHjov-BTlHPcva.js";
3
- import { N as V, j as W, u as B, i as G, f as J, d as O } from "../../dropdown-menu-BPBcxHRB-EjT0ADL9.js";
4
- import { D as R, a as Q, M as S } from "../../MyLimitSelect-Bzc40bxS.js";
5
- import { S as X, y as Y, f as Z, F as K } from "../../FilterWrapper-DwZpntbw.js";
6
- import { forwardRef as h, useEffect as P, useState as ee } from "react";
7
- import { l as N } from "../../lodash-CYNxjS-I.js";
8
- import { a as p } from "../../index-DqTIeHVj-CeLMF2B2.js";
2
+ import { u as V } from "../../button-Bp2lHjov-BTlHPcva.js";
3
+ import { N as W, j as B, u as G, i as J, f as O, d as Q } from "../../dropdown-menu-BPBcxHRB-EjT0ADL9.js";
4
+ import { D as A, a as S, M as X } from "../../MyLimitSelect-Bzc40bxS.js";
5
+ import { S as Y, y as Z, f as K, F as C } from "../../FilterWrapper-DwZpntbw.js";
6
+ import { forwardRef as p, useEffect as P, useState as ee } from "react";
7
+ import { l as y } from "../../lodash-CYNxjS-I.js";
8
+ import { a as h } from "../../index-DqTIeHVj-CeLMF2B2.js";
9
9
  import { m as o } from "../../utils-B6fNqzRf-B1_jG1K7.js";
10
10
  import { u as se, a as te, b as le } from "../../useSortable-QB1cZsY8.js";
11
- import { T as A } from "../../radio-group-CqPTye2U-DGs9dBuR.js";
12
- import { S as I } from "../../SortOrder-CwuehjY1.js";
13
- import { E as ae } from "../../Empty--aMfJ9Jw.js";
14
- import { c as F } from "../../createLucideIcon-B950nf2d.js";
15
- import { L as de } from "../../Loader-CVKJNLck.js";
16
- import { u as ie } from "../../useTranslation-dH-uwymc.js";
17
- const D = h(
18
- ({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
11
+ import { T as I } from "../../radio-group-CqPTye2U-DGs9dBuR.js";
12
+ import { S as D } from "../../SortOrder-CwuehjY1.js";
13
+ import { E as de } from "../../Empty--aMfJ9Jw.js";
14
+ import { c as E } from "../../createLucideIcon-B950nf2d.js";
15
+ import { L as ie } from "../../Loader-CVKJNLck.js";
16
+ import { u as re } from "../../useTranslation-dH-uwymc.js";
17
+ const F = p(
18
+ ({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
19
19
  "table",
20
20
  {
21
- ref: a,
21
+ ref: d,
22
22
  className: o("w-full caption-bottom text-sm", s),
23
23
  ...t
24
24
  }
25
25
  )
26
26
  );
27
- D.displayName = "Table";
28
- const $ = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx("thead", { ref: a, className: o("[&_tr]:border-b", s), ...t }));
27
+ F.displayName = "Table";
28
+ const $ = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx("thead", { ref: d, className: o("[&_tr]:border-b", s), ...t }));
29
29
  $.displayName = "TableHeader";
30
- const C = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
30
+ const q = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
31
31
  "tbody",
32
32
  {
33
- ref: a,
33
+ ref: d,
34
34
  className: o("[&_tr:last-child]:border-0", s),
35
35
  ...t
36
36
  }
37
37
  ));
38
- C.displayName = "TableBody";
39
- const re = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
38
+ q.displayName = "TableBody";
39
+ const ce = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
40
40
  "tfoot",
41
41
  {
42
- ref: a,
42
+ ref: d,
43
43
  className: o(
44
44
  "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
45
45
  s
@@ -47,11 +47,11 @@ const re = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
47
47
  ...t
48
48
  }
49
49
  ));
50
- re.displayName = "TableFooter";
51
- const T = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
50
+ ce.displayName = "TableFooter";
51
+ const T = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
52
52
  "tr",
53
53
  {
54
- ref: a,
54
+ ref: d,
55
55
  className: o(
56
56
  "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
57
57
  s
@@ -60,10 +60,10 @@ const T = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
60
60
  }
61
61
  ));
62
62
  T.displayName = "TableRow";
63
- const _ = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
63
+ const _ = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
64
64
  "th",
65
65
  {
66
- ref: a,
66
+ ref: d,
67
67
  className: o(
68
68
  "text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
69
69
  s
@@ -72,24 +72,24 @@ const _ = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
72
72
  }
73
73
  ));
74
74
  _.displayName = "TableHead";
75
- const k = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
75
+ const w = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
76
76
  "td",
77
77
  {
78
- ref: a,
78
+ ref: d,
79
79
  className: o("p-4 align-middle [&:has([role=checkbox])]:pr-0", s),
80
80
  ...t
81
81
  }
82
82
  ));
83
- k.displayName = "TableCell";
84
- const ce = h(({ className: s, ...t }, a) => /* @__PURE__ */ p.jsx(
83
+ w.displayName = "TableCell";
84
+ const ae = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
85
85
  "caption",
86
86
  {
87
- ref: a,
87
+ ref: d,
88
88
  className: o("text-muted-foreground mt-4 text-sm", s),
89
89
  ...t
90
90
  }
91
91
  ));
92
- ce.displayName = "TableCaption";
92
+ ae.displayName = "TableCaption";
93
93
  /**
94
94
  * @license lucide-react v0.511.0 - ISC
95
95
  *
@@ -102,32 +102,32 @@ const oe = [
102
102
  ["path", { d: "M11 4h10", key: "1w87gc" }],
103
103
  ["path", { d: "M11 8h7", key: "djye34" }],
104
104
  ["path", { d: "M11 12h4", key: "q8tih4" }]
105
- ], ne = F("arrow-down-wide-narrow", oe);
105
+ ], xe = E("arrow-down-wide-narrow", oe);
106
106
  /**
107
107
  * @license lucide-react v0.511.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
111
  */
112
- const me = [
112
+ const ne = [
113
113
  ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
114
114
  ["path", { d: "M17 20V4", key: "1ejh1v" }],
115
115
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
116
116
  ["path", { d: "M7 4v16", key: "1glfcx" }]
117
- ], xe = F("arrow-up-down", me);
117
+ ], me = E("arrow-up-down", ne);
118
118
  /**
119
119
  * @license lucide-react v0.511.0 - ISC
120
120
  *
121
121
  * This source code is licensed under the ISC license.
122
122
  * See the LICENSE file in the root directory of this source tree.
123
123
  */
124
- const he = [
124
+ const pe = [
125
125
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
126
126
  ["path", { d: "M7 4v16", key: "1glfcx" }],
127
127
  ["path", { d: "M11 12h10", key: "1438ji" }],
128
128
  ["path", { d: "M11 16h7", key: "uosisv" }],
129
129
  ["path", { d: "M11 20h4", key: "1krc32" }]
130
- ], pe = F("arrow-up-wide-narrow", he);
130
+ ], he = E("arrow-up-wide-narrow", pe);
131
131
  /**
132
132
  * @license lucide-react v0.511.0 - ISC
133
133
  *
@@ -139,46 +139,46 @@ const fe = [
139
139
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
140
140
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
141
141
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
142
- ], je = F("refresh-cw", fe), Ne = ({
142
+ ], je = E("refresh-cw", fe), Ne = ({
143
143
  rows: s = [],
144
144
  columns: t,
145
- onRowClick: a,
145
+ onRowClick: d,
146
146
  rowKey: m,
147
- params: n = {
147
+ params: x = {
148
148
  page: 1,
149
- limit: R
149
+ limit: A
150
150
  },
151
151
  hasNumbers: f = !1,
152
- hasCheckbox: y = !1,
153
- selectedItems: E,
154
- onSelectedItemsChange: b,
155
- onSortOrderChange: r,
156
- isStickyHeader: L
152
+ hasCheckbox: k = !1,
153
+ selectedItems: L,
154
+ onSelectedItemsChange: g,
155
+ onSortOrderChange: i,
156
+ isStickyHeader: z
157
157
  }) => {
158
- const { sortObject: c, handleSort: g } = se({
159
- sortField: n == null ? void 0 : n.sortField,
160
- sortOrder: n == null ? void 0 : n.sortField,
161
- onSortOrderChange: r
158
+ const { sortObject: a, handleSort: b } = se({
159
+ sortField: x == null ? void 0 : x.sortField,
160
+ sortOrder: x == null ? void 0 : x.sortField,
161
+ onSortOrderChange: i
162
162
  }), {
163
163
  selectedRows: j,
164
- isRowSelected: w,
165
- isAllRowsSelected: x,
164
+ isRowSelected: N,
165
+ isAllRowsSelected: n,
166
166
  handleSelectAllRows: v,
167
167
  handleSelectRow: u
168
- } = te({ rows: s, defaultSelectedRows: E });
168
+ } = te({ rows: s, defaultSelectedRows: L });
169
169
  return P(() => {
170
- b && b(j);
171
- }, [j]), /* @__PURE__ */ e.jsxs(D, { className: "relative", children: [
170
+ g && g(j);
171
+ }, [j]), /* @__PURE__ */ e.jsxs(F, { className: "relative", children: [
172
172
  /* @__PURE__ */ e.jsx(
173
173
  $,
174
174
  {
175
- className: o("bg-bg", L && "sticky top-0 z-10"),
175
+ className: o("bg-bg", z && "sticky top-0 z-10"),
176
176
  children: /* @__PURE__ */ e.jsxs(T, { children: [
177
- y && /* @__PURE__ */ e.jsx(_, { className: "w-12 p-3", children: /* @__PURE__ */ e.jsx(
178
- A,
177
+ k && /* @__PURE__ */ e.jsx(_, { className: "w-12 p-3", children: /* @__PURE__ */ e.jsx(
178
+ I,
179
179
  {
180
180
  className: "mt-1",
181
- checked: x(m),
181
+ checked: n(m),
182
182
  onCheckedChange: (l) => v(m, !!l),
183
183
  "aria-label": "Select all"
184
184
  }
@@ -189,14 +189,14 @@ const fe = [
189
189
  {
190
190
  style: l.styles,
191
191
  className: o("p-2", l.sortable && "cursor-pointer"),
192
- onClick: () => g(l.dataIndex),
192
+ onClick: () => b(l.dataIndex),
193
193
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
194
194
  l.name,
195
195
  " ",
196
- l.sortable && ((c == null ? void 0 : c.sortField) === l.key ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
197
- (c == null ? void 0 : c.sortOrder) === I.DESC && /* @__PURE__ */ e.jsx(ne, { size: 15 }),
198
- (c == null ? void 0 : c.sortOrder) === I.ASC && /* @__PURE__ */ e.jsx(pe, { size: 15 })
199
- ] }) : /* @__PURE__ */ e.jsx(xe, { size: 15 }))
196
+ l.sortable && ((a == null ? void 0 : a.sortField) === l.key ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
197
+ (a == null ? void 0 : a.sortOrder) === D.DESC && /* @__PURE__ */ e.jsx(xe, { size: 15 }),
198
+ (a == null ? void 0 : a.sortOrder) === D.ASC && /* @__PURE__ */ e.jsx(he, { size: 15 })
199
+ ] }) : /* @__PURE__ */ e.jsx(me, { size: 15 }))
200
200
  ] })
201
201
  },
202
202
  l.key
@@ -204,105 +204,105 @@ const fe = [
204
204
  ] })
205
205
  }
206
206
  ),
207
- /* @__PURE__ */ e.jsx(C, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: s.length ? s.map((l, M) => /* @__PURE__ */ e.jsxs(
207
+ /* @__PURE__ */ e.jsx(q, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: s.length ? s.map((l, M) => /* @__PURE__ */ e.jsxs(
208
208
  T,
209
209
  {
210
- onClick: () => a == null ? void 0 : a(l),
211
- className: o(a && "cursor-pointer"),
212
- "data-state": w(l[m]) && "selected",
210
+ onClick: () => d == null ? void 0 : d(l),
211
+ className: o(d && "cursor-pointer"),
212
+ "data-state": N(l[m]) && "selected",
213
213
  children: [
214
- y && /* @__PURE__ */ e.jsx(
215
- k,
214
+ k && /* @__PURE__ */ e.jsx(
215
+ w,
216
216
  {
217
217
  className: "w-12 p-3",
218
- onClick: (d) => d.stopPropagation(),
218
+ onClick: (r) => r.stopPropagation(),
219
219
  children: /* @__PURE__ */ e.jsx(
220
- A,
220
+ I,
221
221
  {
222
222
  className: "mt-1",
223
- checked: w(l[m]),
224
- onCheckedChange: (d) => u(l[m], !!d),
223
+ checked: N(l[m]),
224
+ onCheckedChange: (r) => u(l[m], !!r),
225
225
  "aria-label": "Select row"
226
226
  }
227
227
  )
228
228
  }
229
229
  ),
230
- f && /* @__PURE__ */ e.jsx(k, { className: "w-12 p-2", children: (n.page - 1) * (n.limit || R) + M + 1 }),
231
- t.filter((d) => !d.hidden).map((d) => /* @__PURE__ */ e.jsx(
232
- k,
230
+ f && /* @__PURE__ */ e.jsx(w, { className: "w-12 p-2", children: (x.page - 1) * (x.limit || A) + M + 1 }),
231
+ t.filter((r) => !r.hidden).map((r) => /* @__PURE__ */ e.jsx(
232
+ w,
233
233
  {
234
234
  className: "text-body-xs-medium max-w-xs overflow-hidden p-2 text-ellipsis",
235
- style: d.styles,
236
- children: d.render ? d.render(N.get(l, d.dataIndex), l) : N.get(l, d.dataIndex, "")
235
+ style: r.styles,
236
+ children: r.render ? r.render(y.get(l, r.dataIndex), l) : y.get(l, r.dataIndex, "")
237
237
  },
238
- `${M}-${d.key}`
238
+ `${M}-${r.key}`
239
239
  ))
240
240
  ]
241
241
  },
242
242
  `${l[m]}`
243
243
  )) : /* @__PURE__ */ e.jsx(T, { children: /* @__PURE__ */ e.jsx(
244
- k,
244
+ w,
245
245
  {
246
- colSpan: f ? y ? t.length + 2 : t.length + 1 : t.length,
247
- children: /* @__PURE__ */ e.jsx(ae, {})
246
+ colSpan: f ? k ? t.length + 2 : t.length + 1 : t.length,
247
+ children: /* @__PURE__ */ e.jsx(de, {})
248
248
  }
249
249
  ) }) })
250
250
  ] });
251
- }, Ie = ({
251
+ }, De = ({
252
252
  dataSource: s,
253
253
  columns: t,
254
- onRowClick: a,
254
+ onRowClick: d,
255
255
  rowKey: m,
256
- hasNumbers: n,
256
+ hasNumbers: x,
257
257
  hasSearch: f,
258
- hasCheckbox: y,
259
- hasPagination: E,
260
- isStickyHeader: b,
261
- onParamChange: r,
262
- dataKey: L = "docs",
263
- loading: c,
264
- tableKey: g,
258
+ hasCheckbox: k,
259
+ hasPagination: L,
260
+ isStickyHeader: g,
261
+ onParamChange: i,
262
+ dataKey: z = "docs",
263
+ loading: a,
264
+ tableKey: b,
265
265
  filters: j = [],
266
- handleFilterChange: w,
267
- params: x,
266
+ handleFilterChange: N,
267
+ params: n,
268
268
  hasColumnsVisibilityDropdown: v
269
269
  }) => {
270
- const { t: u } = ie(), [l, M] = ee([]), { formattedColumns: d, handleColumnsChange: q, resetColumns: H } = le({ key: g, columns: t });
270
+ const { t: u } = re(), [l, M] = ee([]), { formattedColumns: r, handleColumnsChange: H, resetColumns: U } = le({ key: b, columns: t });
271
271
  return /* @__PURE__ */ e.jsxs(
272
272
  "div",
273
273
  {
274
274
  className: "border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",
275
275
  children: [
276
- (f || v && g || !N.isEmpty(j)) && /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 items-center justify-between gap-3 p-4", children: [
276
+ (f || v && b || !y.isEmpty(j)) && /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 items-center justify-between gap-3 p-4", children: [
277
277
  /* @__PURE__ */ e.jsx("div", { className: "w-full shrink", children: f && /* @__PURE__ */ e.jsx(
278
- X,
278
+ Y,
279
279
  {
280
- defaultValue: N.get(x, "search", ""),
281
- onSearchChange: (i) => ({ ...x, search: i, page: 1 })
280
+ defaultValue: y.get(n, "search", ""),
281
+ onSearchChange: (c) => i == null ? void 0 : i({ ...n, search: c, page: 1 })
282
282
  }
283
283
  ) }),
284
284
  /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 items-center justify-end gap-3", children: [
285
- v && g && /* @__PURE__ */ e.jsxs(V, { children: [
286
- /* @__PURE__ */ e.jsx(W, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
287
- U,
285
+ v && b && /* @__PURE__ */ e.jsxs(W, { children: [
286
+ /* @__PURE__ */ e.jsx(B, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
287
+ V,
288
288
  {
289
289
  variant: "secondary",
290
290
  size: "sm",
291
291
  className: "ml-auto rounded-lg px-3",
292
292
  children: [
293
- /* @__PURE__ */ e.jsx(Y, {}),
293
+ /* @__PURE__ */ e.jsx(Z, {}),
294
294
  " ",
295
295
  /* @__PURE__ */ e.jsx("span", { className: "hidden lg:!inline", children: u("Customize columns") }),
296
- /* @__PURE__ */ e.jsx(Z, {})
296
+ /* @__PURE__ */ e.jsx(K, {})
297
297
  ]
298
298
  }
299
299
  ) }),
300
- /* @__PURE__ */ e.jsxs(B, { align: "end", children: [
300
+ /* @__PURE__ */ e.jsxs(G, { align: "end", children: [
301
301
  /* @__PURE__ */ e.jsxs(
302
- G,
302
+ J,
303
303
  {
304
304
  className: "capitalize",
305
- onClick: H,
305
+ onClick: U,
306
306
  children: [
307
307
  /* @__PURE__ */ e.jsx(je, {}),
308
308
  " ",
@@ -310,45 +310,53 @@ const fe = [
310
310
  ]
311
311
  }
312
312
  ),
313
- /* @__PURE__ */ e.jsx(J, {}),
314
- d.map((i) => /* @__PURE__ */ e.jsx(
315
- O,
313
+ /* @__PURE__ */ e.jsx(O, {}),
314
+ r.map((c) => /* @__PURE__ */ e.jsx(
315
+ Q,
316
316
  {
317
317
  className: "capitalize",
318
- checked: !i.hidden,
319
- onCheckedChange: (z) => q(i, !z),
320
- children: i.name
318
+ checked: !c.hidden,
319
+ onCheckedChange: (R) => H(c, !R),
320
+ children: c.name
321
321
  },
322
- i.key
322
+ c.key
323
323
  ))
324
324
  ] })
325
325
  ] }),
326
- !N.isEmpty(j) && /* @__PURE__ */ e.jsx(K, { filters: j, onFilter: w })
326
+ !y.isEmpty(j) && /* @__PURE__ */ e.jsx(
327
+ C,
328
+ {
329
+ filters: j,
330
+ onFilter: (c) => {
331
+ i == null || i({ ...n, ...c, page: 1 }), N == null || N(c);
332
+ }
333
+ }
334
+ )
327
335
  ] })
328
336
  ] }),
329
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-col overflow-auto border-y", children: c ? /* @__PURE__ */ e.jsx(de, {}) : /* @__PURE__ */ e.jsx(
337
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col overflow-auto border-y", children: a ? /* @__PURE__ */ e.jsx(ie, {}) : /* @__PURE__ */ e.jsx(
330
338
  Ne,
331
339
  {
332
- params: x,
333
- rows: N.get(s, L, []),
340
+ params: n,
341
+ rows: y.get(s, z, []),
334
342
  rowKey: m,
335
343
  selectedItems: l,
336
- isStickyHeader: b,
337
- columns: d,
338
- hasCheckbox: y,
339
- hasNumbers: n,
340
- onRowClick: a,
344
+ isStickyHeader: g,
345
+ columns: r,
346
+ hasCheckbox: k,
347
+ hasNumbers: x,
348
+ onRowClick: d,
341
349
  onSelectedItemsChange: M,
342
- onSortOrderChange: ({ sortField: i, sortOrder: z }) => {
343
- r == null || r({ ...x, sortField: i, sortOrder: z });
350
+ onSortOrderChange: ({ sortField: c, sortOrder: R }) => {
351
+ i == null || i({ ...n, sortField: c, sortOrder: R });
344
352
  }
345
353
  }
346
354
  ) }),
347
- E && /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row", children: [
355
+ L && /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row", children: [
348
356
  /* @__PURE__ */ e.jsx("div", { className: "text-sm", children: /* @__PURE__ */ e.jsx(
349
- Q,
357
+ S,
350
358
  {
351
- onLimitChange: (i) => r == null ? void 0 : r({ ...x, limit: i, page: 1 }),
359
+ onLimitChange: (c) => i == null ? void 0 : i({ ...n, limit: c, page: 1 }),
352
360
  defaultValue: s == null ? void 0 : s.limit
353
361
  }
354
362
  ) }),
@@ -359,9 +367,9 @@ const fe = [
359
367
  " row(s) selected."
360
368
  ] }),
361
369
  /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
362
- S,
370
+ X,
363
371
  {
364
- onPageChange: (i) => r == null ? void 0 : r({ ...x, page: i }),
372
+ onPageChange: (c) => i == null ? void 0 : i({ ...n, page: c }),
365
373
  currentPage: s == null ? void 0 : s.page,
366
374
  totalPages: s == null ? void 0 : s.totalPages
367
375
  }
@@ -372,6 +380,6 @@ const fe = [
372
380
  );
373
381
  };
374
382
  export {
375
- Ie as DataTable,
383
+ De as DataTable,
376
384
  Ne as MyTable
377
385
  };
@@ -1,17 +1,17 @@
1
1
  import { type MyTableProps } from './MyTable';
2
2
  import { type FilterInterface } from '../filters';
3
3
  export interface PaginationInterface<TData> {
4
- docs: TData[];
5
- offset: number;
4
+ docs?: TData[];
5
+ offset?: number;
6
6
  limit: number;
7
7
  totalPages: number;
8
- total: number;
8
+ total?: number;
9
9
  page: number;
10
- pagingCounter: number;
11
- hasPrevPage: boolean;
12
- hasNextPage: boolean;
13
- prevPage: number;
14
- nextPage: number;
10
+ pagingCounter?: number;
11
+ hasPrevPage?: boolean;
12
+ hasNextPage?: boolean;
13
+ prevPage?: number;
14
+ nextPage?: number;
15
15
  }
16
16
  export interface DataTableProps<TData, TPaginationData extends PaginationInterface<TData>> extends Omit<MyTableProps<TData>, 'rows'> {
17
17
  dataSource?: TPaginationData;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/datatable/DataTable.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,YAAY,CAAC;AAGzE,MAAM,WAAW,mBAAmB,CAAC,KAAK;IACxC,IAAI,EAAE,KAAK,EAAE,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc,CAC7B,KAAK,EACL,eAAe,SAAS,mBAAmB,CAAC,KAAK,CAAC,CAClD,SAAQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACzC,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,eAAe,CAAC;IAChC,4BAA4B,CAAC,EAAE,IAAI,CAAC;CACrC;AAED,eAAO,MAAM,SAAS,GACpB,KAAK,EACL,eAAe,SACb,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EACzD,+NAkBC,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,4CAoHxC,CAAC"}
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/datatable/DataTable.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,YAAY,CAAC;AAGzE,MAAM,WAAW,mBAAmB,CAAC,KAAK;IACxC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc,CAC7B,KAAK,EACL,eAAe,SAAS,mBAAmB,CAAC,KAAK,CAAC,CAClD,SAAQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACzC,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,eAAe,CAAC;IAChC,4BAA4B,CAAC,EAAE,IAAI,CAAC;CACrC;AAED,eAAO,MAAM,SAAS,GACpB,KAAK,EACL,eAAe,SACb,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EACzD,+NAkBC,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,4CA4HxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dgz-ui-shared",
3
- "version": "1.0.65",
3
+ "version": "1.0.66",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"