dgz-ui-shared 1.1.5 → 1.1.6
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.
- package/dist/Actions-Bg4_0weq.cjs +1 -0
- package/dist/{Actions-lri6QFUm.js → Actions-BuREhr4C.js} +1 -1
- package/dist/ExportData-C97WQKG3.js +29 -0
- package/dist/ExportData-DspH4HLF.cjs +1 -0
- package/dist/Loader-BMHIikqX.cjs +1 -0
- package/dist/Loader-Bbz39yY0.js +13 -0
- package/dist/{Loader-CVKJNLck.js → Spin-4v-RUSBk.js} +8 -16
- package/dist/Spin-BtIXLZuq.cjs +1 -0
- package/dist/components/actions/index.cjs.js +1 -1
- package/dist/components/actions/index.es.js +1 -1
- package/dist/components/datatable/index.cjs.js +5 -5
- package/dist/components/datatable/index.es.js +139 -138
- package/dist/components/export/index.cjs.js +1 -1
- package/dist/components/export/index.es.js +1 -1
- package/dist/components/loader/index.cjs.js +1 -1
- package/dist/components/loader/index.es.js +4 -3
- package/dist/types/components/actions/Actions.d.ts.map +1 -1
- package/dist/types/components/datatable/DataTable.d.ts +3 -1
- package/dist/types/components/datatable/DataTable.d.ts.map +1 -1
- package/dist/types/components/export/ExportData.d.ts +5 -1
- package/dist/types/components/export/ExportData.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/Actions-OOat6KFm.cjs +0 -1
- package/dist/ExportData-1TWLqqru.js +0 -28
- package/dist/ExportData-DaEw8iEt.cjs +0 -1
- package/dist/Loader-bUUShWXh.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./jsx-runtime-DUiatUiq.cjs"),n=require("./dropdown-menu-CxOevPOj-Iyvvp16W.cjs"),x=require("./button-Bp2lHjov-D9UnCnYX.cjs"),t=require("./index-CGv7FLNy.cjs"),u=require("./useTranslation-CZf20ucv.cjs"),c=({actions:i})=>{const{t:r}=u.useTranslation();return s.jsxRuntimeExports.jsxs(n.jt,{children:[s.jsxRuntimeExports.jsx(n.Tt,{asChild:!0,children:s.jsxRuntimeExports.jsxs(x.u,{variant:"secondary",size:"sm",className:"ml-auto rounded-lg px-3",children:[s.jsxRuntimeExports.jsx(t.Wg,{})," ",s.jsxRuntimeExports.jsx("span",{className:"hidden lg:!inline",children:r("Actions")}),s.jsxRuntimeExports.jsx(t.f1,{})]})}),s.jsxRuntimeExports.jsx(n.it,{align:"end",children:i.map((e,o)=>s.jsxRuntimeExports.jsx(n.ut,{onClick:()=>e.onClick(),children:e.label},o))})]})};exports.Actions=c;
|
|
@@ -3,7 +3,7 @@ import { j as t, T as e, i as o, u as l } from "./dropdown-menu-CxOevPOj-ezMrzPH
|
|
|
3
3
|
import { u as m } from "./button-Bp2lHjov-BTlHPcva.js";
|
|
4
4
|
import { W as c, f as d } from "./index-BrQ82Wyu.js";
|
|
5
5
|
import { u as j } from "./useTranslation-dH-uwymc.js";
|
|
6
|
-
const g = ({ actions: i
|
|
6
|
+
const g = ({ actions: i }) => {
|
|
7
7
|
const { t: n } = j();
|
|
8
8
|
return /* @__PURE__ */ s.jsxs(t, { children: [
|
|
9
9
|
/* @__PURE__ */ s.jsx(e, { asChild: !0, children: /* @__PURE__ */ s.jsxs(
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { j as s } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { j as e, T as o, i as l, u as m } from "./dropdown-menu-CxOevPOj-ezMrzPHK.js";
|
|
3
|
+
import { u as x } from "./button-Bp2lHjov-BTlHPcva.js";
|
|
4
|
+
import { Z as c, f as d } from "./index-BrQ82Wyu.js";
|
|
5
|
+
import { S as j } from "./Spin-4v-RUSBk.js";
|
|
6
|
+
import { u as p } from "./useTranslation-dH-uwymc.js";
|
|
7
|
+
const T = ({ options: a, loading: i = !1 }) => {
|
|
8
|
+
const { t: n } = p();
|
|
9
|
+
return /* @__PURE__ */ s.jsxs(e, { children: [
|
|
10
|
+
/* @__PURE__ */ s.jsx(o, { asChild: !0, children: /* @__PURE__ */ s.jsxs(
|
|
11
|
+
x,
|
|
12
|
+
{
|
|
13
|
+
variant: "secondary",
|
|
14
|
+
size: "sm",
|
|
15
|
+
className: "ml-auto rounded-lg px-3",
|
|
16
|
+
children: [
|
|
17
|
+
i ? /* @__PURE__ */ s.jsx(j, {}) : /* @__PURE__ */ s.jsx(c, {}),
|
|
18
|
+
" ",
|
|
19
|
+
/* @__PURE__ */ s.jsx("span", { className: "hidden lg:!inline", children: n("Export") }),
|
|
20
|
+
/* @__PURE__ */ s.jsx(d, {})
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
) }),
|
|
24
|
+
/* @__PURE__ */ s.jsx(l, { align: "end", children: a.map((r, t) => /* @__PURE__ */ s.jsx(m, { onClick: () => r.onClick(), children: r.label }, t)) })
|
|
25
|
+
] });
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
T as E
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./jsx-runtime-DUiatUiq.cjs"),e=require("./dropdown-menu-CxOevPOj-Iyvvp16W.cjs"),u=require("./button-Bp2lHjov-D9UnCnYX.cjs"),n=require("./index-CGv7FLNy.cjs"),a=require("./Spin-BtIXLZuq.cjs"),j=require("./useTranslation-CZf20ucv.cjs"),l=({options:r,loading:i=!1})=>{const{t:x}=j.useTranslation();return s.jsxRuntimeExports.jsxs(e.jt,{children:[s.jsxRuntimeExports.jsx(e.Tt,{asChild:!0,children:s.jsxRuntimeExports.jsxs(u.u,{variant:"secondary",size:"sm",className:"ml-auto rounded-lg px-3",children:[i?s.jsxRuntimeExports.jsx(a.Spin,{}):s.jsxRuntimeExports.jsx(n.ZC,{})," ",s.jsxRuntimeExports.jsx("span",{className:"hidden lg:!inline",children:x("Export")}),s.jsxRuntimeExports.jsx(n.f1,{})]})}),s.jsxRuntimeExports.jsx(e.it,{align:"end",children:r.map((t,o)=>s.jsxRuntimeExports.jsx(e.ut,{onClick:()=>t.onClick(),children:t.label},o))})]})};exports.ExportData=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-DUiatUiq.cjs"),s=require("./Spin-BtIXLZuq.cjs"),r=t=>e.jsxRuntimeExports.jsx("div",{className:"text-item-primary mx-auto flex w-full items-center justify-center p-4",...t,children:e.jsxRuntimeExports.jsx(s.Spin,{className:"text-item-primary size-6"})});exports.Loader=r;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { S as r } from "./Spin-4v-RUSBk.js";
|
|
3
|
+
const m = (t) => /* @__PURE__ */ e.jsx(
|
|
4
|
+
"div",
|
|
5
|
+
{
|
|
6
|
+
className: "text-item-primary mx-auto flex w-full items-center justify-center p-4",
|
|
7
|
+
...t,
|
|
8
|
+
children: /* @__PURE__ */ e.jsx(r, { className: "text-item-primary size-6" })
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
export {
|
|
12
|
+
m as L
|
|
13
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { m as
|
|
3
|
-
const
|
|
1
|
+
import { j as s } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { m as e } from "./utils-B6fNqzRf-B1_jG1K7.js";
|
|
3
|
+
const r = (t) => /* @__PURE__ */ s.jsxs(
|
|
4
4
|
"svg",
|
|
5
5
|
{
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
fill: "none",
|
|
8
8
|
viewBox: "0 0 24 24",
|
|
9
|
-
...
|
|
10
|
-
className:
|
|
9
|
+
...t,
|
|
10
|
+
className: e("mr-1 size-5 animate-spin text-white", t == null ? void 0 : t.className),
|
|
11
11
|
children: [
|
|
12
|
-
/* @__PURE__ */
|
|
12
|
+
/* @__PURE__ */ s.jsx(
|
|
13
13
|
"circle",
|
|
14
14
|
{
|
|
15
15
|
className: "opacity-25",
|
|
@@ -20,7 +20,7 @@ const a = (e) => /* @__PURE__ */ t.jsxs(
|
|
|
20
20
|
strokeWidth: "4"
|
|
21
21
|
}
|
|
22
22
|
),
|
|
23
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ s.jsx(
|
|
24
24
|
"path",
|
|
25
25
|
{
|
|
26
26
|
className: "opacity-75",
|
|
@@ -30,15 +30,7 @@ const a = (e) => /* @__PURE__ */ t.jsxs(
|
|
|
30
30
|
)
|
|
31
31
|
]
|
|
32
32
|
}
|
|
33
|
-
), m = (e) => /* @__PURE__ */ t.jsx(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
className: "text-item-primary mx-auto flex w-full items-center justify-center p-4",
|
|
37
|
-
...e,
|
|
38
|
-
children: /* @__PURE__ */ t.jsx(a, { className: "text-item-primary size-6" })
|
|
39
|
-
}
|
|
40
33
|
);
|
|
41
34
|
export {
|
|
42
|
-
|
|
43
|
-
a as S
|
|
35
|
+
r as S
|
|
44
36
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./jsx-runtime-DUiatUiq.cjs"),e=require("./utils-B6fNqzRf-BNysSCt9.cjs"),i=t=>s.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t,className:e.mo("mr-1 size-5 animate-spin text-white",t==null?void 0:t.className),children:[s.jsxRuntimeExports.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsxRuntimeExports.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});exports.Spin=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../Actions-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../Actions-Bg4_0weq.cjs");exports.Actions=t.Actions;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-DUiatUiq.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-DUiatUiq.cjs"),Y=require("../../button-Bp2lHjov-D9UnCnYX.cjs"),N=require("../../dropdown-menu-CxOevPOj-Iyvvp16W.cjs"),T=require("../../MyLimitSelect-DlOUfv_X.cjs"),H=require("../../index-CGv7FLNy.cjs"),n=require("react"),y=require("../../lodash-C5w_OPmE.cjs"),m=require("../../index-DqTIeHVj-DlSOwhuZ.cjs"),c=require("../../utils-B6fNqzRf-BNysSCt9.cjs"),z=require("../../useSortable-ByFhUHQb.cjs"),S=require("../../input-mask-PwosgXFZ-DkKZA7fM.cjs"),V=require("../../SortOrder-81BrXp3i.cjs"),U=require("../../Empty--unTFnpg.cjs"),L=require("../../createLucideIcon-BnAj0RnC.cjs"),W=require("../../FilterWrapper-D-9XhNZS.cjs"),K=require("../../Loader-BMHIikqX.cjs"),C=require("../../Actions-Bg4_0weq.cjs"),P=require("../../ExportData-DspH4HLF.cjs"),ee=require("../../useTranslation-CZf20ucv.cjs"),B=n.forwardRef(({className:s,...t},i)=>m.ae.jsx("table",{ref:i,className:c.mo("w-full caption-bottom text-sm",s),...t}));B.displayName="Table";const O=n.forwardRef(({className:s,...t},i)=>m.ae.jsx("thead",{ref:i,className:c.mo("[&_tr]:border-b",s),...t}));O.displayName="TableHeader";const Z=n.forwardRef(({className:s,...t},i)=>m.ae.jsx("tbody",{ref:i,className:c.mo("[&_tr:last-child]:border-0",s),...t}));Z.displayName="TableBody";const se=n.forwardRef(({className:s,...t},i)=>m.ae.jsx("tfoot",{ref:i,className:c.mo("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",s),...t}));se.displayName="TableFooter";const q=n.forwardRef(({className:s,...t},i)=>m.ae.jsx("tr",{ref:i,className:c.mo("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",s),...t}));q.displayName="TableRow";const M=n.forwardRef(({className:s,...t},i)=>m.ae.jsx("th",{ref:i,className:c.mo("text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",s),...t}));M.displayName="TableHead";const w=n.forwardRef(({className:s,...t},i)=>m.ae.jsx("td",{ref:i,className:c.mo("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...t}));w.displayName="TableCell";const te=n.forwardRef(({className:s,...t},i)=>m.ae.jsx("caption",{ref:i,className:c.mo("text-muted-foreground mt-4 text-sm",s),...t}));te.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
|
|
6
|
+
*/const re=[["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"}]],ie=L.createLucideIcon("arrow-down-wide-narrow",re);/**
|
|
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
|
|
11
|
+
*/const le=[["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"}]],xe=L.createLucideIcon("arrow-up-down",le);/**
|
|
12
12
|
* @license lucide-react v0.511.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const oe=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h4",key:"1krc32"}]],de=L.createLucideIcon("arrow-up-wide-narrow",oe);/**
|
|
17
17
|
* @license lucide-react v0.511.0 - ISC
|
|
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
|
|
21
|
+
*/const ce=[["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"}]],ne=L.createLucideIcon("refresh-cw",ce),X=({rows:s=[],columns:t,onRowClick:i,rowKey:p,params:a={page:1,limit:T.DEFAULT_LIMIT},hasNumbers:f=!1,hasCheckbox:u=!1,selectedItems:I,onSelectedItemsChange:k,onSortOrderChange:_,isStickyHeader:l})=>{const{sortObject:d,handleSort:A}=z.useSortable({sortField:a==null?void 0:a.sortField,sortOrder:a==null?void 0:a.sortField,onSortOrderChange:_}),{selectedRows:E,isRowSelected:R,isAllRowsSelected:g,handleSelectAllRows:b,handleSelectRow:j}=z.useDataTable({rows:s,defaultSelectedRows:I});return n.useEffect(()=>{k&&k(E)},[E]),e.jsxRuntimeExports.jsxs(B,{className:"relative",children:[e.jsxRuntimeExports.jsx(O,{className:c.mo("bg-bg",l&&"sticky top-0 z-10"),children:e.jsxRuntimeExports.jsxs(q,{children:[u&&e.jsxRuntimeExports.jsx(M,{className:"w-12 p-3",children:e.jsxRuntimeExports.jsx(S.Zf,{className:"mt-1",checked:g(p),onCheckedChange:r=>b(p,!!r),"aria-label":"Select all"})}),f&&e.jsxRuntimeExports.jsx(M,{className:"w-12 p-2",children:"#"}),t.filter(r=>!r.hidden).map(r=>e.jsxRuntimeExports.jsx(M,{style:r.styles,className:c.mo("p-2",r.sortable&&"cursor-pointer"),onClick:()=>r.sortable&&A(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)===V.SortOrder.DESC&&e.jsxRuntimeExports.jsx(ie,{size:15}),(d==null?void 0:d.sortOrder)===V.SortOrder.ASC&&e.jsxRuntimeExports.jsx(de,{size:15})]}):e.jsxRuntimeExports.jsx(xe,{size:15}))]})},r.key))]})}),e.jsxRuntimeExports.jsx(Z,{className:"[&>tr:nth-child(even)]:bg-bg-secondary",children:s.length?s.map((r,h)=>e.jsxRuntimeExports.jsxs(q,{onClick:()=>i==null?void 0:i(r),className:c.mo(i&&"cursor-pointer"),"data-state":R(r[p])&&"selected",children:[u&&e.jsxRuntimeExports.jsx(w,{className:"w-12 p-3",onClick:x=>x.stopPropagation(),children:e.jsxRuntimeExports.jsx(S.Zf,{className:"mt-1",checked:R(r[p]),onCheckedChange:x=>j(r[p],!!x),"aria-label":"Select row"})}),f&&e.jsxRuntimeExports.jsx(w,{className:"w-12 p-2",children:(a.page-1)*(a.limit||T.DEFAULT_LIMIT)+h+1}),t.filter(x=>!x.hidden).map(x=>e.jsxRuntimeExports.jsx(w,{className:"text-body-xs-medium max-w-xs p-2",style:x.styles,children:x.render?x.render(y.lodashExports.get(r,x.dataIndex),r):y.lodashExports.get(r,x.dataIndex,"")},`${h}-${x.key}`))]},`${r[p]}`)):e.jsxRuntimeExports.jsx(q,{children:e.jsxRuntimeExports.jsx(w,{colSpan:f?u?t.length+2:t.length+1:t.length,children:e.jsxRuntimeExports.jsx(U.Empty,{})})})})]})},ae=({dataSource:s,columns:t,onRowClick:i,rowKey:p,hasNumbers:a,hasSearch:f,exportOptions:u,hasCheckbox:I,hasPagination:k,isStickyHeader:_,onParamChange:l,dataKey:d="docs",loading:A,tableKey:E,filters:R,actions:g,handleFilterChange:b,params:j,exportLoading:r=!1,onColumnsUpdate:h,hasColumnsVisibilityDropdown:x})=>{const{t:F}=ee.useTranslation(),[$,G]=n.useState([]),{formattedColumns:v,handleColumnsChange:J,resetColumns:Q}=z.useColumns({key:E,columns:t});return n.useEffect(()=>{h==null||h(v)},[v,h]),e.jsxRuntimeExports.jsxs("div",{className:"border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",children:[(f||x&&E||!y.lodashExports.isEmpty(u)||!y.lodashExports.isEmpty(R))&&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:"w-full shrink",children:f&&e.jsxRuntimeExports.jsx(W.Search,{defaultValue:y.lodashExports.get(j,"search",""),onSearchChange:o=>l==null?void 0:l({...j,search:o,page:1})})}),e.jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 items-center justify-end gap-3",children:[u&&e.jsxRuntimeExports.jsx(P.ExportData,{options:u,loading:r}),x&&E&&e.jsxRuntimeExports.jsxs(N.jt,{children:[e.jsxRuntimeExports.jsx(N.Tt,{asChild:!0,children:e.jsxRuntimeExports.jsxs(Y.u,{variant:"secondary",size:"sm",className:"ml-auto rounded-lg px-3",children:[e.jsxRuntimeExports.jsx(H.yn,{})," ",e.jsxRuntimeExports.jsx("span",{className:"hidden lg:!inline",children:F("Customize columns")}),e.jsxRuntimeExports.jsx(H.f1,{})]})}),e.jsxRuntimeExports.jsxs(N.it,{align:"end",children:[e.jsxRuntimeExports.jsxs(N.ut,{className:"capitalize",onClick:Q,children:[e.jsxRuntimeExports.jsx(ne,{})," ",F("Reset columns")]}),e.jsxRuntimeExports.jsx(N.ft,{}),v.map(o=>e.jsxRuntimeExports.jsx(N.dt,{className:"capitalize",checked:!o.hidden,onCheckedChange:D=>J(o,!D),children:o.name},o.key))]})]}),g&&e.jsxRuntimeExports.jsx(C.Actions,{actions:g}),R&&e.jsxRuntimeExports.jsx(W.FilterWrapper,{filters:R,onFilter:o=>{l==null||l({...j,...o,page:1}),b==null||b(o)}})]})]}),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col overflow-auto border-y",children:A?e.jsxRuntimeExports.jsx(K.Loader,{}):e.jsxRuntimeExports.jsx(X,{params:j,rows:y.lodashExports.get(s,d,[]),rowKey:p,selectedItems:$,isStickyHeader:_,columns:v,hasCheckbox:I,hasNumbers:a,onRowClick:i,onSelectedItemsChange:G,onSortOrderChange:({sortField:o,sortOrder:D})=>{l==null||l({...j,sortField:o,sortOrder:D})}})}),k&&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(T.MyLimitSelect,{onLimitChange:o=>l==null?void 0:l({...j,limit:o,page:1}),defaultValue:s==null?void 0:s.limit})}),e.jsxRuntimeExports.jsxs("div",{className:"text-muted-foreground text-sm",children:[$.length," of ",(s==null?void 0:s.total)||0," row(s) selected."]}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(T.MyPagination,{onPageChange:o=>l==null?void 0:l({...j,page:o}),currentPage:s==null?void 0:s.page,totalPages:s==null?void 0:s.totalPages})})]})]})};exports.DataTable=ae;exports.MyTable=X;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { j as e } from "../../jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { u as
|
|
3
|
-
import { j as
|
|
4
|
-
import { D as
|
|
5
|
-
import { y as
|
|
6
|
-
import { forwardRef as p, useEffect as
|
|
7
|
-
import { l as
|
|
2
|
+
import { u as Q } from "../../button-Bp2lHjov-BTlHPcva.js";
|
|
3
|
+
import { j as S, T as X, i as Y, u as O, f as U, d as K } from "../../dropdown-menu-CxOevPOj-ezMrzPHK.js";
|
|
4
|
+
import { D as F, a as C, M as P } from "../../MyLimitSelect-CSOpZUZQ.js";
|
|
5
|
+
import { y as ee, f as se } from "../../index-BrQ82Wyu.js";
|
|
6
|
+
import { forwardRef as p, useEffect as H, useState as te } from "react";
|
|
7
|
+
import { l as k } from "../../lodash-CYNxjS-I.js";
|
|
8
8
|
import { a as h } from "../../index-DqTIeHVj-CeLMF2B2.js";
|
|
9
9
|
import { m as o } from "../../utils-B6fNqzRf-B1_jG1K7.js";
|
|
10
|
-
import { u as
|
|
11
|
-
import { Z as
|
|
12
|
-
import { S as
|
|
13
|
-
import { E as
|
|
10
|
+
import { u as le, a as de, b as ie } from "../../useSortable-DRvyr1Gy.js";
|
|
11
|
+
import { Z as $ } from "../../input-mask-PwosgXFZ-D_jh0tAh.js";
|
|
12
|
+
import { S as q } from "../../SortOrder-CwuehjY1.js";
|
|
13
|
+
import { E as re } from "../../Empty--aMfJ9Jw.js";
|
|
14
14
|
import { c as _ } from "../../createLucideIcon-B950nf2d.js";
|
|
15
|
-
import { S as
|
|
16
|
-
import { L as
|
|
17
|
-
import { A as
|
|
18
|
-
import { E as
|
|
19
|
-
import { u as
|
|
20
|
-
const
|
|
21
|
-
({ className: s, ...
|
|
15
|
+
import { S as ae, F as ce } from "../../FilterWrapper-D0bk94tC.js";
|
|
16
|
+
import { L as oe } from "../../Loader-Bbz39yY0.js";
|
|
17
|
+
import { A as xe } from "../../Actions-BuREhr4C.js";
|
|
18
|
+
import { E as me } from "../../ExportData-C97WQKG3.js";
|
|
19
|
+
import { u as fe } from "../../useTranslation-dH-uwymc.js";
|
|
20
|
+
const V = p(
|
|
21
|
+
({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
|
|
22
22
|
"table",
|
|
23
23
|
{
|
|
24
24
|
ref: d,
|
|
25
25
|
className: o("w-full caption-bottom text-sm", s),
|
|
26
|
-
...
|
|
26
|
+
...t
|
|
27
27
|
}
|
|
28
28
|
)
|
|
29
29
|
);
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
const
|
|
30
|
+
V.displayName = "Table";
|
|
31
|
+
const W = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx("thead", { ref: d, className: o("[&_tr]:border-b", s), ...t }));
|
|
32
|
+
W.displayName = "TableHeader";
|
|
33
|
+
const Z = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
|
|
34
34
|
"tbody",
|
|
35
35
|
{
|
|
36
36
|
ref: d,
|
|
37
37
|
className: o("[&_tr:last-child]:border-0", s),
|
|
38
|
-
...
|
|
38
|
+
...t
|
|
39
39
|
}
|
|
40
40
|
));
|
|
41
|
-
|
|
42
|
-
const
|
|
41
|
+
Z.displayName = "TableBody";
|
|
42
|
+
const pe = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
|
|
43
43
|
"tfoot",
|
|
44
44
|
{
|
|
45
45
|
ref: d,
|
|
@@ -47,11 +47,11 @@ const fe = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
|
|
|
47
47
|
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
48
48
|
s
|
|
49
49
|
),
|
|
50
|
-
...
|
|
50
|
+
...t
|
|
51
51
|
}
|
|
52
52
|
));
|
|
53
|
-
|
|
54
|
-
const u = p(({ className: s, ...
|
|
53
|
+
pe.displayName = "TableFooter";
|
|
54
|
+
const u = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
|
|
55
55
|
"tr",
|
|
56
56
|
{
|
|
57
57
|
ref: d,
|
|
@@ -59,11 +59,11 @@ const u = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
|
|
|
59
59
|
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
60
60
|
s
|
|
61
61
|
),
|
|
62
|
-
...
|
|
62
|
+
...t
|
|
63
63
|
}
|
|
64
64
|
));
|
|
65
65
|
u.displayName = "TableRow";
|
|
66
|
-
const E = p(({ className: s, ...
|
|
66
|
+
const E = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
|
|
67
67
|
"th",
|
|
68
68
|
{
|
|
69
69
|
ref: d,
|
|
@@ -71,148 +71,148 @@ const E = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
|
|
|
71
71
|
"text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
|
|
72
72
|
s
|
|
73
73
|
),
|
|
74
|
-
...
|
|
74
|
+
...t
|
|
75
75
|
}
|
|
76
76
|
));
|
|
77
77
|
E.displayName = "TableHead";
|
|
78
|
-
const g = p(({ className: s, ...
|
|
78
|
+
const g = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
|
|
79
79
|
"td",
|
|
80
80
|
{
|
|
81
81
|
ref: d,
|
|
82
82
|
className: o("p-4 align-middle [&:has([role=checkbox])]:pr-0", s),
|
|
83
|
-
...
|
|
83
|
+
...t
|
|
84
84
|
}
|
|
85
85
|
));
|
|
86
86
|
g.displayName = "TableCell";
|
|
87
|
-
const
|
|
87
|
+
const he = p(({ className: s, ...t }, d) => /* @__PURE__ */ h.jsx(
|
|
88
88
|
"caption",
|
|
89
89
|
{
|
|
90
90
|
ref: d,
|
|
91
91
|
className: o("text-muted-foreground mt-4 text-sm", s),
|
|
92
|
-
...
|
|
92
|
+
...t
|
|
93
93
|
}
|
|
94
94
|
));
|
|
95
|
-
|
|
95
|
+
he.displayName = "TableCaption";
|
|
96
96
|
/**
|
|
97
97
|
* @license lucide-react v0.511.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
101
|
*/
|
|
102
|
-
const
|
|
102
|
+
const ne = [
|
|
103
103
|
["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
|
|
104
104
|
["path", { d: "M7 20V4", key: "1yoxec" }],
|
|
105
105
|
["path", { d: "M11 4h10", key: "1w87gc" }],
|
|
106
106
|
["path", { d: "M11 8h7", key: "djye34" }],
|
|
107
107
|
["path", { d: "M11 12h4", key: "q8tih4" }]
|
|
108
|
-
],
|
|
108
|
+
], je = _("arrow-down-wide-narrow", ne);
|
|
109
109
|
/**
|
|
110
110
|
* @license lucide-react v0.511.0 - ISC
|
|
111
111
|
*
|
|
112
112
|
* This source code is licensed under the ISC license.
|
|
113
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
114
114
|
*/
|
|
115
|
-
const
|
|
115
|
+
const Ne = [
|
|
116
116
|
["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
|
|
117
117
|
["path", { d: "M17 20V4", key: "1ejh1v" }],
|
|
118
118
|
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
|
|
119
119
|
["path", { d: "M7 4v16", key: "1glfcx" }]
|
|
120
|
-
],
|
|
120
|
+
], ye = _("arrow-up-down", Ne);
|
|
121
121
|
/**
|
|
122
122
|
* @license lucide-react v0.511.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
126
|
*/
|
|
127
|
-
const
|
|
127
|
+
const be = [
|
|
128
128
|
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
|
|
129
129
|
["path", { d: "M7 4v16", key: "1glfcx" }],
|
|
130
130
|
["path", { d: "M11 12h10", key: "1438ji" }],
|
|
131
131
|
["path", { d: "M11 16h7", key: "uosisv" }],
|
|
132
132
|
["path", { d: "M11 20h4", key: "1krc32" }]
|
|
133
|
-
],
|
|
133
|
+
], ke = _("arrow-up-wide-narrow", be);
|
|
134
134
|
/**
|
|
135
135
|
* @license lucide-react v0.511.0 - ISC
|
|
136
136
|
*
|
|
137
137
|
* This source code is licensed under the ISC license.
|
|
138
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
139
139
|
*/
|
|
140
|
-
const
|
|
140
|
+
const we = [
|
|
141
141
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
142
142
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
143
143
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
144
144
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
145
|
-
],
|
|
145
|
+
], ge = _("refresh-cw", we), ve = ({
|
|
146
146
|
rows: s = [],
|
|
147
|
-
columns:
|
|
147
|
+
columns: t,
|
|
148
148
|
onRowClick: d,
|
|
149
149
|
rowKey: f,
|
|
150
150
|
params: x = {
|
|
151
151
|
page: 1,
|
|
152
|
-
limit:
|
|
152
|
+
limit: F
|
|
153
153
|
},
|
|
154
|
-
hasNumbers:
|
|
154
|
+
hasNumbers: N = !1,
|
|
155
155
|
hasCheckbox: n = !1,
|
|
156
156
|
selectedItems: A,
|
|
157
157
|
onSelectedItemsChange: v,
|
|
158
158
|
onSortOrderChange: L,
|
|
159
159
|
isStickyHeader: i
|
|
160
160
|
}) => {
|
|
161
|
-
const { sortObject:
|
|
161
|
+
const { sortObject: c, handleSort: z } = le({
|
|
162
162
|
sortField: x == null ? void 0 : x.sortField,
|
|
163
163
|
sortOrder: x == null ? void 0 : x.sortField,
|
|
164
164
|
onSortOrderChange: L
|
|
165
165
|
}), {
|
|
166
|
-
selectedRows:
|
|
167
|
-
isRowSelected:
|
|
166
|
+
selectedRows: y,
|
|
167
|
+
isRowSelected: b,
|
|
168
168
|
isAllRowsSelected: M,
|
|
169
|
-
handleSelectAllRows:
|
|
169
|
+
handleSelectAllRows: w,
|
|
170
170
|
handleSelectRow: m
|
|
171
|
-
} =
|
|
172
|
-
return
|
|
173
|
-
v && v(
|
|
174
|
-
}, [
|
|
171
|
+
} = de({ rows: s, defaultSelectedRows: A });
|
|
172
|
+
return H(() => {
|
|
173
|
+
v && v(y);
|
|
174
|
+
}, [y]), /* @__PURE__ */ e.jsxs(V, { className: "relative", children: [
|
|
175
175
|
/* @__PURE__ */ e.jsx(
|
|
176
|
-
|
|
176
|
+
W,
|
|
177
177
|
{
|
|
178
178
|
className: o("bg-bg", i && "sticky top-0 z-10"),
|
|
179
179
|
children: /* @__PURE__ */ e.jsxs(u, { children: [
|
|
180
180
|
n && /* @__PURE__ */ e.jsx(E, { className: "w-12 p-3", children: /* @__PURE__ */ e.jsx(
|
|
181
|
-
|
|
181
|
+
$,
|
|
182
182
|
{
|
|
183
183
|
className: "mt-1",
|
|
184
184
|
checked: M(f),
|
|
185
|
-
onCheckedChange: (
|
|
185
|
+
onCheckedChange: (l) => w(f, !!l),
|
|
186
186
|
"aria-label": "Select all"
|
|
187
187
|
}
|
|
188
188
|
) }),
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
N && /* @__PURE__ */ e.jsx(E, { className: "w-12 p-2", children: "#" }),
|
|
190
|
+
t.filter((l) => !l.hidden).map((l) => /* @__PURE__ */ e.jsx(
|
|
191
191
|
E,
|
|
192
192
|
{
|
|
193
|
-
style:
|
|
194
|
-
className: o("p-2",
|
|
195
|
-
onClick: () =>
|
|
193
|
+
style: l.styles,
|
|
194
|
+
className: o("p-2", l.sortable && "cursor-pointer"),
|
|
195
|
+
onClick: () => l.sortable && z(l.dataIndex),
|
|
196
196
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
197
|
-
|
|
197
|
+
l.name,
|
|
198
198
|
" ",
|
|
199
|
-
|
|
200
|
-
(
|
|
201
|
-
(
|
|
202
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
199
|
+
l.sortable && ((c == null ? void 0 : c.sortField) === l.key ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
200
|
+
(c == null ? void 0 : c.sortOrder) === q.DESC && /* @__PURE__ */ e.jsx(je, { size: 15 }),
|
|
201
|
+
(c == null ? void 0 : c.sortOrder) === q.ASC && /* @__PURE__ */ e.jsx(ke, { size: 15 })
|
|
202
|
+
] }) : /* @__PURE__ */ e.jsx(ye, { size: 15 }))
|
|
203
203
|
] })
|
|
204
204
|
},
|
|
205
|
-
|
|
205
|
+
l.key
|
|
206
206
|
))
|
|
207
207
|
] })
|
|
208
208
|
}
|
|
209
209
|
),
|
|
210
|
-
/* @__PURE__ */ e.jsx(
|
|
210
|
+
/* @__PURE__ */ e.jsx(Z, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: s.length ? s.map((l, j) => /* @__PURE__ */ e.jsxs(
|
|
211
211
|
u,
|
|
212
212
|
{
|
|
213
|
-
onClick: () => d == null ? void 0 : d(
|
|
213
|
+
onClick: () => d == null ? void 0 : d(l),
|
|
214
214
|
className: o(d && "cursor-pointer"),
|
|
215
|
-
"data-state":
|
|
215
|
+
"data-state": b(l[f]) && "selected",
|
|
216
216
|
children: [
|
|
217
217
|
n && /* @__PURE__ */ e.jsx(
|
|
218
218
|
g,
|
|
@@ -220,166 +220,167 @@ const ke = [
|
|
|
220
220
|
className: "w-12 p-3",
|
|
221
221
|
onClick: (r) => r.stopPropagation(),
|
|
222
222
|
children: /* @__PURE__ */ e.jsx(
|
|
223
|
-
|
|
223
|
+
$,
|
|
224
224
|
{
|
|
225
225
|
className: "mt-1",
|
|
226
|
-
checked:
|
|
227
|
-
onCheckedChange: (r) => m(
|
|
226
|
+
checked: b(l[f]),
|
|
227
|
+
onCheckedChange: (r) => m(l[f], !!r),
|
|
228
228
|
"aria-label": "Select row"
|
|
229
229
|
}
|
|
230
230
|
)
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
N && /* @__PURE__ */ e.jsx(g, { className: "w-12 p-2", children: (x.page - 1) * (x.limit || F) + j + 1 }),
|
|
234
|
+
t.filter((r) => !r.hidden).map((r) => /* @__PURE__ */ e.jsx(
|
|
235
235
|
g,
|
|
236
236
|
{
|
|
237
237
|
className: "text-body-xs-medium max-w-xs p-2",
|
|
238
238
|
style: r.styles,
|
|
239
|
-
children: r.render ? r.render(
|
|
239
|
+
children: r.render ? r.render(k.get(l, r.dataIndex), l) : k.get(l, r.dataIndex, "")
|
|
240
240
|
},
|
|
241
|
-
`${
|
|
241
|
+
`${j}-${r.key}`
|
|
242
242
|
))
|
|
243
243
|
]
|
|
244
244
|
},
|
|
245
|
-
`${
|
|
245
|
+
`${l[f]}`
|
|
246
246
|
)) : /* @__PURE__ */ e.jsx(u, { children: /* @__PURE__ */ e.jsx(
|
|
247
247
|
g,
|
|
248
248
|
{
|
|
249
|
-
colSpan:
|
|
250
|
-
children: /* @__PURE__ */ e.jsx(
|
|
249
|
+
colSpan: N ? n ? t.length + 2 : t.length + 1 : t.length,
|
|
250
|
+
children: /* @__PURE__ */ e.jsx(re, {})
|
|
251
251
|
}
|
|
252
252
|
) }) })
|
|
253
253
|
] });
|
|
254
|
-
},
|
|
254
|
+
}, Ge = ({
|
|
255
255
|
dataSource: s,
|
|
256
|
-
columns:
|
|
256
|
+
columns: t,
|
|
257
257
|
onRowClick: d,
|
|
258
258
|
rowKey: f,
|
|
259
259
|
hasNumbers: x,
|
|
260
|
-
hasSearch:
|
|
260
|
+
hasSearch: N,
|
|
261
261
|
exportOptions: n,
|
|
262
262
|
hasCheckbox: A,
|
|
263
263
|
hasPagination: v,
|
|
264
264
|
isStickyHeader: L,
|
|
265
265
|
onParamChange: i,
|
|
266
|
-
dataKey:
|
|
266
|
+
dataKey: c = "docs",
|
|
267
267
|
loading: z,
|
|
268
|
-
tableKey:
|
|
269
|
-
filters:
|
|
268
|
+
tableKey: y,
|
|
269
|
+
filters: b,
|
|
270
270
|
actions: M,
|
|
271
|
-
handleFilterChange:
|
|
271
|
+
handleFilterChange: w,
|
|
272
272
|
params: m,
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
exportLoading: l = !1,
|
|
274
|
+
onColumnsUpdate: j,
|
|
275
|
+
hasColumnsVisibilityDropdown: r
|
|
275
276
|
}) => {
|
|
276
|
-
const { t:
|
|
277
|
-
return
|
|
278
|
-
|
|
279
|
-
}, [T,
|
|
277
|
+
const { t: D } = fe(), [I, B] = te([]), { formattedColumns: T, handleColumnsChange: G, resetColumns: J } = ie({ key: y, columns: t });
|
|
278
|
+
return H(() => {
|
|
279
|
+
j == null || j(T);
|
|
280
|
+
}, [T, j]), /* @__PURE__ */ e.jsxs(
|
|
280
281
|
"div",
|
|
281
282
|
{
|
|
282
283
|
className: "border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",
|
|
283
284
|
children: [
|
|
284
|
-
(
|
|
285
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-full shrink", children:
|
|
286
|
-
|
|
285
|
+
(N || r && y || !k.isEmpty(n) || !k.isEmpty(b)) && /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row", children: [
|
|
286
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-full shrink", children: N && /* @__PURE__ */ e.jsx(
|
|
287
|
+
ae,
|
|
287
288
|
{
|
|
288
|
-
defaultValue:
|
|
289
|
-
onSearchChange: (
|
|
289
|
+
defaultValue: k.get(m, "search", ""),
|
|
290
|
+
onSearchChange: (a) => i == null ? void 0 : i({ ...m, search: a, page: 1 })
|
|
290
291
|
}
|
|
291
292
|
) }),
|
|
292
293
|
/* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 items-center justify-end gap-3", children: [
|
|
293
|
-
n && /* @__PURE__ */ e.jsx(
|
|
294
|
-
|
|
295
|
-
/* @__PURE__ */ e.jsx(
|
|
296
|
-
|
|
294
|
+
n && /* @__PURE__ */ e.jsx(me, { options: n, loading: l }),
|
|
295
|
+
r && y && /* @__PURE__ */ e.jsxs(S, { children: [
|
|
296
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
297
|
+
Q,
|
|
297
298
|
{
|
|
298
299
|
variant: "secondary",
|
|
299
300
|
size: "sm",
|
|
300
301
|
className: "ml-auto rounded-lg px-3",
|
|
301
302
|
children: [
|
|
302
|
-
/* @__PURE__ */ e.jsx(
|
|
303
|
+
/* @__PURE__ */ e.jsx(ee, {}),
|
|
303
304
|
" ",
|
|
304
|
-
/* @__PURE__ */ e.jsx("span", { className: "hidden lg:!inline", children:
|
|
305
|
-
/* @__PURE__ */ e.jsx(
|
|
305
|
+
/* @__PURE__ */ e.jsx("span", { className: "hidden lg:!inline", children: D("Customize columns") }),
|
|
306
|
+
/* @__PURE__ */ e.jsx(se, {})
|
|
306
307
|
]
|
|
307
308
|
}
|
|
308
309
|
) }),
|
|
309
|
-
/* @__PURE__ */ e.jsxs(
|
|
310
|
+
/* @__PURE__ */ e.jsxs(Y, { align: "end", children: [
|
|
310
311
|
/* @__PURE__ */ e.jsxs(
|
|
311
|
-
|
|
312
|
+
O,
|
|
312
313
|
{
|
|
313
314
|
className: "capitalize",
|
|
314
|
-
onClick:
|
|
315
|
+
onClick: J,
|
|
315
316
|
children: [
|
|
316
|
-
/* @__PURE__ */ e.jsx(
|
|
317
|
+
/* @__PURE__ */ e.jsx(ge, {}),
|
|
317
318
|
" ",
|
|
318
|
-
|
|
319
|
+
D("Reset columns")
|
|
319
320
|
]
|
|
320
321
|
}
|
|
321
322
|
),
|
|
322
|
-
/* @__PURE__ */ e.jsx(
|
|
323
|
-
T.map((
|
|
324
|
-
|
|
323
|
+
/* @__PURE__ */ e.jsx(U, {}),
|
|
324
|
+
T.map((a) => /* @__PURE__ */ e.jsx(
|
|
325
|
+
K,
|
|
325
326
|
{
|
|
326
327
|
className: "capitalize",
|
|
327
|
-
checked: !
|
|
328
|
-
onCheckedChange: (R) =>
|
|
329
|
-
children:
|
|
328
|
+
checked: !a.hidden,
|
|
329
|
+
onCheckedChange: (R) => G(a, !R),
|
|
330
|
+
children: a.name
|
|
330
331
|
},
|
|
331
|
-
|
|
332
|
+
a.key
|
|
332
333
|
))
|
|
333
334
|
] })
|
|
334
335
|
] }),
|
|
335
|
-
M && /* @__PURE__ */ e.jsx(
|
|
336
|
-
|
|
336
|
+
M && /* @__PURE__ */ e.jsx(xe, { actions: M }),
|
|
337
|
+
b && /* @__PURE__ */ e.jsx(
|
|
337
338
|
ce,
|
|
338
339
|
{
|
|
339
|
-
filters:
|
|
340
|
-
onFilter: (
|
|
341
|
-
i == null || i({ ...m, ...
|
|
340
|
+
filters: b,
|
|
341
|
+
onFilter: (a) => {
|
|
342
|
+
i == null || i({ ...m, ...a, page: 1 }), w == null || w(a);
|
|
342
343
|
}
|
|
343
344
|
}
|
|
344
345
|
)
|
|
345
346
|
] })
|
|
346
347
|
] }),
|
|
347
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col overflow-auto border-y", children: z ? /* @__PURE__ */ e.jsx(
|
|
348
|
-
|
|
348
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col overflow-auto border-y", children: z ? /* @__PURE__ */ e.jsx(oe, {}) : /* @__PURE__ */ e.jsx(
|
|
349
|
+
ve,
|
|
349
350
|
{
|
|
350
351
|
params: m,
|
|
351
|
-
rows:
|
|
352
|
+
rows: k.get(s, c, []),
|
|
352
353
|
rowKey: f,
|
|
353
|
-
selectedItems:
|
|
354
|
+
selectedItems: I,
|
|
354
355
|
isStickyHeader: L,
|
|
355
356
|
columns: T,
|
|
356
357
|
hasCheckbox: A,
|
|
357
358
|
hasNumbers: x,
|
|
358
359
|
onRowClick: d,
|
|
359
|
-
onSelectedItemsChange:
|
|
360
|
-
onSortOrderChange: ({ sortField:
|
|
361
|
-
i == null || i({ ...m, sortField:
|
|
360
|
+
onSelectedItemsChange: B,
|
|
361
|
+
onSortOrderChange: ({ sortField: a, sortOrder: R }) => {
|
|
362
|
+
i == null || i({ ...m, sortField: a, sortOrder: R });
|
|
362
363
|
}
|
|
363
364
|
}
|
|
364
365
|
) }),
|
|
365
366
|
v && /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row", children: [
|
|
366
367
|
/* @__PURE__ */ e.jsx("div", { className: "text-sm", children: /* @__PURE__ */ e.jsx(
|
|
367
|
-
|
|
368
|
+
C,
|
|
368
369
|
{
|
|
369
|
-
onLimitChange: (
|
|
370
|
+
onLimitChange: (a) => i == null ? void 0 : i({ ...m, limit: a, page: 1 }),
|
|
370
371
|
defaultValue: s == null ? void 0 : s.limit
|
|
371
372
|
}
|
|
372
373
|
) }),
|
|
373
374
|
/* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground text-sm", children: [
|
|
374
|
-
|
|
375
|
+
I.length,
|
|
375
376
|
" of ",
|
|
376
377
|
(s == null ? void 0 : s.total) || 0,
|
|
377
378
|
" row(s) selected."
|
|
378
379
|
] }),
|
|
379
380
|
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
|
380
|
-
|
|
381
|
+
P,
|
|
381
382
|
{
|
|
382
|
-
onPageChange: (
|
|
383
|
+
onPageChange: (a) => i == null ? void 0 : i({ ...m, page: a }),
|
|
383
384
|
currentPage: s == null ? void 0 : s.page,
|
|
384
385
|
totalPages: s == null ? void 0 : s.totalPages
|
|
385
386
|
}
|
|
@@ -390,6 +391,6 @@ const ke = [
|
|
|
390
391
|
);
|
|
391
392
|
};
|
|
392
393
|
export {
|
|
393
|
-
|
|
394
|
-
|
|
394
|
+
Ge as DataTable,
|
|
395
|
+
ve as MyTable
|
|
395
396
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../ExportData-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../ExportData-DspH4HLF.cjs");exports.ExportData=t.ExportData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Loader-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Spin-BtIXLZuq.cjs"),r=require("../../Loader-BMHIikqX.cjs");exports.Spin=e.Spin;exports.Loader=r.Loader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/Actions.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/Actions.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,aAAa,YAAY,4CA2BhD,CAAC"}
|
|
@@ -50,6 +50,7 @@ export interface DataTableProps<TData, TPaginationData extends PaginationInterfa
|
|
|
50
50
|
dataKey?: keyof TPaginationData;
|
|
51
51
|
hasColumnsVisibilityDropdown?: true;
|
|
52
52
|
onColumnsUpdate?: (columns: ColumnType<TData>[]) => void;
|
|
53
|
+
exportLoading?: boolean;
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
* DataTable is a composable, high-level table that brings together search, filters,
|
|
@@ -74,6 +75,7 @@ export interface DataTableProps<TData, TPaginationData extends PaginationInterfa
|
|
|
74
75
|
* - `hasNumbers` — Whether to show the row numbers column.
|
|
75
76
|
* - `hasSearch` — Set to `true` to display the search input in the header.
|
|
76
77
|
* - `exportOptions` — Export menu options shown by `ExportData` (see `ExportDataInterface[]`).
|
|
78
|
+
* - `exportLoading` — When `true`, shows a spinner in the Export button to indicate an export action is in progress.
|
|
77
79
|
* - `hasCheckbox` — Whether to show the selection checkbox column.
|
|
78
80
|
* - `hasPagination` — Set to `true` to render the pagination footer.
|
|
79
81
|
* - `isStickyHeader` — Whether to keep the table header sticky.
|
|
@@ -147,5 +149,5 @@ export interface DataTableProps<TData, TPaginationData extends PaginationInterfa
|
|
|
147
149
|
* Returns
|
|
148
150
|
* - React element that renders a complete data table experience.
|
|
149
151
|
*/
|
|
150
|
-
export declare const DataTable: <TData, TPaginationData extends PaginationInterface<TData> = PaginationInterface<TData>>({ dataSource, columns, onRowClick, rowKey, hasNumbers, hasSearch, exportOptions, hasCheckbox, hasPagination, isStickyHeader, onParamChange, dataKey, loading, tableKey, filters, actions, handleFilterChange, params, onColumnsUpdate, hasColumnsVisibilityDropdown, }: DataTableProps<TData, TPaginationData>) => import("react/jsx-runtime").JSX.Element;
|
|
152
|
+
export declare const DataTable: <TData, TPaginationData extends PaginationInterface<TData> = PaginationInterface<TData>>({ dataSource, columns, onRowClick, rowKey, hasNumbers, hasSearch, exportOptions, hasCheckbox, hasPagination, isStickyHeader, onParamChange, dataKey, loading, tableKey, filters, actions, handleFilterChange, params, exportLoading, onColumnsUpdate, hasColumnsVisibilityDropdown, }: DataTableProps<TData, TPaginationData>) => import("react/jsx-runtime").JSX.Element;
|
|
151
153
|
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -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;AAEzE,OAAO,EAAE,KAAK,eAAe,EAAW,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB,CAAC,KAAK;IACxC,kFAAkF;IAClF,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,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,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,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;IACpC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,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;AAEzE,OAAO,EAAE,KAAK,eAAe,EAAW,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB,CAAC,KAAK;IACxC,kFAAkF;IAClF,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,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,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,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;IACpC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AACH,eAAO,MAAM,SAAS,GACpB,KAAK,EACL,eAAe,SACb,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EACzD,uRAsBC,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,4CAqIxC,CAAC"}
|
|
@@ -15,9 +15,13 @@ export interface ExportDataInterface {
|
|
|
15
15
|
* Props for the `ExportData` component.
|
|
16
16
|
*
|
|
17
17
|
* - `options` — A list of export actions displayed in the dropdown.
|
|
18
|
+
* - `loading` — When `true`, shows a small spinner in the button to indicate an export is in progress.
|
|
18
19
|
*/
|
|
19
20
|
export interface ExportDataProps {
|
|
21
|
+
/** Export actions displayed in the dropdown. */
|
|
20
22
|
options: ExportDataInterface[];
|
|
23
|
+
/** If `true`, renders a spinner icon in the button. */
|
|
24
|
+
loading?: boolean;
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
27
|
* ExportData renders a compact dropdown button for exporting data in various formats.
|
|
@@ -33,5 +37,5 @@ export interface ExportDataProps {
|
|
|
33
37
|
* Internationalization
|
|
34
38
|
* - The button label is translated via `react-i18next` using the `Export` key.
|
|
35
39
|
*/
|
|
36
|
-
export declare const ExportData: ({ options }: ExportDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare const ExportData: ({ options, loading }: ExportDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
41
|
//# sourceMappingURL=ExportData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportData.d.ts","sourceRoot":"","sources":["../../../../src/components/export/ExportData.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ExportData.d.ts","sourceRoot":"","sources":["../../../../src/components/export/ExportData.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,KAAK,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,GAAI,sBAA8B,eAAe,4CA2BvE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./jsx-runtime-DUiatUiq.cjs"),n=require("./dropdown-menu-CxOevPOj-Iyvvp16W.cjs"),x=require("./button-Bp2lHjov-D9UnCnYX.cjs"),t=require("./index-CGv7FLNy.cjs"),u=require("./useTranslation-CZf20ucv.cjs"),c=({actions:i=[]})=>{const{t:r}=u.useTranslation();return s.jsxRuntimeExports.jsxs(n.jt,{children:[s.jsxRuntimeExports.jsx(n.Tt,{asChild:!0,children:s.jsxRuntimeExports.jsxs(x.u,{variant:"secondary",size:"sm",className:"ml-auto rounded-lg px-3",children:[s.jsxRuntimeExports.jsx(t.Wg,{})," ",s.jsxRuntimeExports.jsx("span",{className:"hidden lg:!inline",children:r("Actions")}),s.jsxRuntimeExports.jsx(t.f1,{})]})}),s.jsxRuntimeExports.jsx(n.it,{align:"end",children:i.map((e,o)=>s.jsxRuntimeExports.jsx(n.ut,{onClick:()=>e.onClick(),children:e.label},o))})]})};exports.Actions=c;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { j as t, T as e, i as o, u as l } from "./dropdown-menu-CxOevPOj-ezMrzPHK.js";
|
|
3
|
-
import { u as m } from "./button-Bp2lHjov-BTlHPcva.js";
|
|
4
|
-
import { Z as x, f as c } from "./index-BrQ82Wyu.js";
|
|
5
|
-
import { u as d } from "./useTranslation-dH-uwymc.js";
|
|
6
|
-
const C = ({ options: a = [] }) => {
|
|
7
|
-
const { t: i } = d();
|
|
8
|
-
return /* @__PURE__ */ s.jsxs(t, { children: [
|
|
9
|
-
/* @__PURE__ */ s.jsx(e, { asChild: !0, children: /* @__PURE__ */ s.jsxs(
|
|
10
|
-
m,
|
|
11
|
-
{
|
|
12
|
-
variant: "secondary",
|
|
13
|
-
size: "sm",
|
|
14
|
-
className: "ml-auto rounded-lg px-3",
|
|
15
|
-
children: [
|
|
16
|
-
/* @__PURE__ */ s.jsx(x, {}),
|
|
17
|
-
" ",
|
|
18
|
-
/* @__PURE__ */ s.jsx("span", { className: "hidden lg:!inline", children: i("Export") }),
|
|
19
|
-
/* @__PURE__ */ s.jsx(c, {})
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
) }),
|
|
23
|
-
/* @__PURE__ */ s.jsx(o, { align: "end", children: a.map((r, n) => /* @__PURE__ */ s.jsx(l, { onClick: () => r.onClick(), children: r.label }, n)) })
|
|
24
|
-
] });
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
C as E
|
|
28
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./jsx-runtime-DUiatUiq.cjs"),t=require("./dropdown-menu-CxOevPOj-Iyvvp16W.cjs"),o=require("./button-Bp2lHjov-D9UnCnYX.cjs"),n=require("./index-CGv7FLNy.cjs"),u=require("./useTranslation-CZf20ucv.cjs"),a=({options:r=[]})=>{const{t:i}=u.useTranslation();return s.jsxRuntimeExports.jsxs(t.jt,{children:[s.jsxRuntimeExports.jsx(t.Tt,{asChild:!0,children:s.jsxRuntimeExports.jsxs(o.u,{variant:"secondary",size:"sm",className:"ml-auto rounded-lg px-3",children:[s.jsxRuntimeExports.jsx(n.ZC,{})," ",s.jsxRuntimeExports.jsx("span",{className:"hidden lg:!inline",children:i("Export")}),s.jsxRuntimeExports.jsx(n.f1,{})]})}),s.jsxRuntimeExports.jsx(t.it,{align:"end",children:r.map((e,x)=>s.jsxRuntimeExports.jsx(t.ut,{onClick:()=>e.onClick(),children:e.label},x))})]})};exports.ExportData=a;
|
package/dist/Loader-bUUShWXh.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("./jsx-runtime-DUiatUiq.cjs"),i=require("./utils-B6fNqzRf-BNysSCt9.cjs"),s=e=>t.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,className:i.mo("mr-1 size-5 animate-spin text-white",e==null?void 0:e.className),children:[t.jsxRuntimeExports.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsxRuntimeExports.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r=e=>t.jsxRuntimeExports.jsx("div",{className:"text-item-primary mx-auto flex w-full items-center justify-center p-4",...e,children:t.jsxRuntimeExports.jsx(s,{className:"text-item-primary size-6"})});exports.Loader=r;exports.Spin=s;
|