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.
@@ -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 t } from "./jsx-runtime-C5mzlN2N.js";
2
- import { m as s } from "./utils-B6fNqzRf-B1_jG1K7.js";
3
- const a = (e) => /* @__PURE__ */ t.jsxs(
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
- ...e,
10
- className: s("mr-1 size-5 animate-spin text-white", e == null ? void 0 : e.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__ */ t.jsx(
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__ */ t.jsx(
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
- m as L,
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-OOat6KFm.cjs");exports.Actions=t.Actions;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../Actions-Bg4_0weq.cjs");exports.Actions=t.Actions;
@@ -1,4 +1,4 @@
1
- import { A as s } from "../../Actions-lri6QFUm.js";
1
+ import { A as s } from "../../Actions-BuREhr4C.js";
2
2
  export {
3
3
  s as Actions
4
4
  };
@@ -1,21 +1,21 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-DUiatUiq.cjs"),Q=require("../../button-Bp2lHjov-D9UnCnYX.cjs"),R=require("../../dropdown-menu-CxOevPOj-Iyvvp16W.cjs"),T=require("../../MyLimitSelect-DlOUfv_X.cjs"),$=require("../../index-CGv7FLNy.cjs"),n=require("react"),N=require("../../lodash-C5w_OPmE.cjs"),m=require("../../index-DqTIeHVj-DlSOwhuZ.cjs"),c=require("../../utils-B6fNqzRf-BNysSCt9.cjs"),z=require("../../useSortable-ByFhUHQb.cjs"),H=require("../../input-mask-PwosgXFZ-DkKZA7fM.cjs"),S=require("../../SortOrder-81BrXp3i.cjs"),Y=require("../../Empty--unTFnpg.cjs"),L=require("../../createLucideIcon-BnAj0RnC.cjs"),V=require("../../FilterWrapper-D-9XhNZS.cjs"),U=require("../../Loader-bUUShWXh.cjs"),K=require("../../Actions-OOat6KFm.cjs"),C=require("../../ExportData-DaEw8iEt.cjs"),P=require("../../useTranslation-CZf20ucv.cjs"),W=n.forwardRef(({className:s,...r},i)=>m.ae.jsx("table",{ref:i,className:c.mo("w-full caption-bottom text-sm",s),...r}));W.displayName="Table";const B=n.forwardRef(({className:s,...r},i)=>m.ae.jsx("thead",{ref:i,className:c.mo("[&_tr]:border-b",s),...r}));B.displayName="TableHeader";const O=n.forwardRef(({className:s,...r},i)=>m.ae.jsx("tbody",{ref:i,className:c.mo("[&_tr:last-child]:border-0",s),...r}));O.displayName="TableBody";const ee=n.forwardRef(({className:s,...r},i)=>m.ae.jsx("tfoot",{ref:i,className:c.mo("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",s),...r}));ee.displayName="TableFooter";const q=n.forwardRef(({className:s,...r},i)=>m.ae.jsx("tr",{ref:i,className:c.mo("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",s),...r}));q.displayName="TableRow";const M=n.forwardRef(({className:s,...r},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),...r}));M.displayName="TableHead";const w=n.forwardRef(({className:s,...r},i)=>m.ae.jsx("td",{ref:i,className:c.mo("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...r}));w.displayName="TableCell";const se=n.forwardRef(({className:s,...r},i)=>m.ae.jsx("caption",{ref:i,className:c.mo("text-muted-foreground mt-4 text-sm",s),...r}));se.displayName="TableCaption";/**
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 te=[["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"}]],re=L.createLucideIcon("arrow-down-wide-narrow",te);/**
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 ie=[["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",ie);/**
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 le=[["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"}]],oe=L.createLucideIcon("arrow-up-wide-narrow",le);/**
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 de=[["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"}]],ce=L.createLucideIcon("refresh-cw",de),Z=({rows:s=[],columns:r,onRowClick:i,rowKey:p,params:a={page:1,limit:T.DEFAULT_LIMIT},hasNumbers:h=!1,hasCheckbox:u=!1,selectedItems:I,onSelectedItemsChange:k,onSortOrderChange:_,isStickyHeader:x})=>{const{sortObject:d,handleSort:A}=z.useSortable({sortField:a==null?void 0:a.sortField,sortOrder:a==null?void 0:a.sortField,onSortOrderChange:_}),{selectedRows:f,isRowSelected:E,isAllRowsSelected:g,handleSelectAllRows:y,handleSelectRow:j}=z.useDataTable({rows:s,defaultSelectedRows:I});return n.useEffect(()=>{k&&k(f)},[f]),e.jsxRuntimeExports.jsxs(W,{className:"relative",children:[e.jsxRuntimeExports.jsx(B,{className:c.mo("bg-bg",x&&"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(H.Zf,{className:"mt-1",checked:g(p),onCheckedChange:t=>y(p,!!t),"aria-label":"Select all"})}),h&&e.jsxRuntimeExports.jsx(M,{className:"w-12 p-2",children:"#"}),r.filter(t=>!t.hidden).map(t=>e.jsxRuntimeExports.jsx(M,{style:t.styles,className:c.mo("p-2",t.sortable&&"cursor-pointer"),onClick:()=>t.sortable&&A(t.dataIndex),children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[t.name," ",t.sortable&&((d==null?void 0:d.sortField)===t.key?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[(d==null?void 0:d.sortOrder)===S.SortOrder.DESC&&e.jsxRuntimeExports.jsx(re,{size:15}),(d==null?void 0:d.sortOrder)===S.SortOrder.ASC&&e.jsxRuntimeExports.jsx(oe,{size:15})]}):e.jsxRuntimeExports.jsx(xe,{size:15}))]})},t.key))]})}),e.jsxRuntimeExports.jsx(O,{className:"[&>tr:nth-child(even)]:bg-bg-secondary",children:s.length?s.map((t,b)=>e.jsxRuntimeExports.jsxs(q,{onClick:()=>i==null?void 0:i(t),className:c.mo(i&&"cursor-pointer"),"data-state":E(t[p])&&"selected",children:[u&&e.jsxRuntimeExports.jsx(w,{className:"w-12 p-3",onClick:l=>l.stopPropagation(),children:e.jsxRuntimeExports.jsx(H.Zf,{className:"mt-1",checked:E(t[p]),onCheckedChange:l=>j(t[p],!!l),"aria-label":"Select row"})}),h&&e.jsxRuntimeExports.jsx(w,{className:"w-12 p-2",children:(a.page-1)*(a.limit||T.DEFAULT_LIMIT)+b+1}),r.filter(l=>!l.hidden).map(l=>e.jsxRuntimeExports.jsx(w,{className:"text-body-xs-medium max-w-xs p-2",style:l.styles,children:l.render?l.render(N.lodashExports.get(t,l.dataIndex),t):N.lodashExports.get(t,l.dataIndex,"")},`${b}-${l.key}`))]},`${t[p]}`)):e.jsxRuntimeExports.jsx(q,{children:e.jsxRuntimeExports.jsx(w,{colSpan:h?u?r.length+2:r.length+1:r.length,children:e.jsxRuntimeExports.jsx(Y.Empty,{})})})})]})},ne=({dataSource:s,columns:r,onRowClick:i,rowKey:p,hasNumbers:a,hasSearch:h,exportOptions:u,hasCheckbox:I,hasPagination:k,isStickyHeader:_,onParamChange:x,dataKey:d="docs",loading:A,tableKey:f,filters:E,actions:g,handleFilterChange:y,params:j,onColumnsUpdate:t,hasColumnsVisibilityDropdown:b})=>{const{t:l}=P.useTranslation(),[F,X]=n.useState([]),{formattedColumns:v,handleColumnsChange:G,resetColumns:J}=z.useColumns({key:f,columns:r});return n.useEffect(()=>{t==null||t(v)},[v,t]),e.jsxRuntimeExports.jsxs("div",{className:"border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",children:[(h||b&&f||!N.lodashExports.isEmpty(u)||!N.lodashExports.isEmpty(E))&&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:h&&e.jsxRuntimeExports.jsx(V.Search,{defaultValue:N.lodashExports.get(j,"search",""),onSearchChange:o=>x==null?void 0:x({...j,search:o,page:1})})}),e.jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 items-center justify-end gap-3",children:[u&&e.jsxRuntimeExports.jsx(C.ExportData,{options:u}),b&&f&&e.jsxRuntimeExports.jsxs(R.jt,{children:[e.jsxRuntimeExports.jsx(R.Tt,{asChild:!0,children:e.jsxRuntimeExports.jsxs(Q.u,{variant:"secondary",size:"sm",className:"ml-auto rounded-lg px-3",children:[e.jsxRuntimeExports.jsx($.yn,{})," ",e.jsxRuntimeExports.jsx("span",{className:"hidden lg:!inline",children:l("Customize columns")}),e.jsxRuntimeExports.jsx($.f1,{})]})}),e.jsxRuntimeExports.jsxs(R.it,{align:"end",children:[e.jsxRuntimeExports.jsxs(R.ut,{className:"capitalize",onClick:J,children:[e.jsxRuntimeExports.jsx(ce,{})," ",l("Reset columns")]}),e.jsxRuntimeExports.jsx(R.ft,{}),v.map(o=>e.jsxRuntimeExports.jsx(R.dt,{className:"capitalize",checked:!o.hidden,onCheckedChange:D=>G(o,!D),children:o.name},o.key))]})]}),g&&e.jsxRuntimeExports.jsx(K.Actions,{actions:g}),E&&e.jsxRuntimeExports.jsx(V.FilterWrapper,{filters:E,onFilter:o=>{x==null||x({...j,...o,page:1}),y==null||y(o)}})]})]}),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col overflow-auto border-y",children:A?e.jsxRuntimeExports.jsx(U.Loader,{}):e.jsxRuntimeExports.jsx(Z,{params:j,rows:N.lodashExports.get(s,d,[]),rowKey:p,selectedItems:F,isStickyHeader:_,columns:v,hasCheckbox:I,hasNumbers:a,onRowClick:i,onSelectedItemsChange:X,onSortOrderChange:({sortField:o,sortOrder:D})=>{x==null||x({...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=>x==null?void 0:x({...j,limit:o,page:1}),defaultValue:s==null?void 0:s.limit})}),e.jsxRuntimeExports.jsxs("div",{className:"text-muted-foreground text-sm",children:[F.length," of ",(s==null?void 0:s.total)||0," row(s) selected."]}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(T.MyPagination,{onPageChange:o=>x==null?void 0:x({...j,page:o}),currentPage:s==null?void 0:s.page,totalPages:s==null?void 0:s.totalPages})})]})]})};exports.DataTable=ne;exports.MyTable=Z;
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 J } from "../../button-Bp2lHjov-BTlHPcva.js";
3
- import { j as Q, T as S, i as X, u as Y, f as O, d as U } from "../../dropdown-menu-CxOevPOj-ezMrzPHK.js";
4
- import { D as I, a as K, M as C } from "../../MyLimitSelect-CSOpZUZQ.js";
5
- import { y as P, f as ee } from "../../index-BrQ82Wyu.js";
6
- import { forwardRef as p, useEffect as q, useState as se } from "react";
7
- import { l as b } from "../../lodash-CYNxjS-I.js";
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 te, a as le, b as de } from "../../useSortable-DRvyr1Gy.js";
11
- import { Z as F } from "../../input-mask-PwosgXFZ-D_jh0tAh.js";
12
- import { S as $ } from "../../SortOrder-CwuehjY1.js";
13
- import { E as ie } from "../../Empty--aMfJ9Jw.js";
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 re, F as ce } from "../../FilterWrapper-D0bk94tC.js";
16
- import { L as ae } from "../../Loader-CVKJNLck.js";
17
- import { A as oe } from "../../Actions-lri6QFUm.js";
18
- import { E as xe } from "../../ExportData-1TWLqqru.js";
19
- import { u as me } from "../../useTranslation-dH-uwymc.js";
20
- const H = p(
21
- ({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
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
- ...l
26
+ ...t
27
27
  }
28
28
  )
29
29
  );
30
- H.displayName = "Table";
31
- const V = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx("thead", { ref: d, className: o("[&_tr]:border-b", s), ...l }));
32
- V.displayName = "TableHeader";
33
- const W = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
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
- ...l
38
+ ...t
39
39
  }
40
40
  ));
41
- W.displayName = "TableBody";
42
- const fe = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
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
- ...l
50
+ ...t
51
51
  }
52
52
  ));
53
- fe.displayName = "TableFooter";
54
- const u = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
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
- ...l
62
+ ...t
63
63
  }
64
64
  ));
65
65
  u.displayName = "TableRow";
66
- const E = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
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
- ...l
74
+ ...t
75
75
  }
76
76
  ));
77
77
  E.displayName = "TableHead";
78
- const g = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
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
- ...l
83
+ ...t
84
84
  }
85
85
  ));
86
86
  g.displayName = "TableCell";
87
- const pe = p(({ className: s, ...l }, d) => /* @__PURE__ */ h.jsx(
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
- ...l
92
+ ...t
93
93
  }
94
94
  ));
95
- pe.displayName = "TableCaption";
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 he = [
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
- ], ne = _("arrow-down-wide-narrow", he);
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 je = [
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
- ], Ne = _("arrow-up-down", je);
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 ye = [
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
- ], be = _("arrow-up-wide-narrow", ye);
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 ke = [
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
- ], we = _("refresh-cw", ke), ge = ({
145
+ ], ge = _("refresh-cw", we), ve = ({
146
146
  rows: s = [],
147
- columns: l,
147
+ columns: t,
148
148
  onRowClick: d,
149
149
  rowKey: f,
150
150
  params: x = {
151
151
  page: 1,
152
- limit: I
152
+ limit: F
153
153
  },
154
- hasNumbers: j = !1,
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: a, handleSort: z } = te({
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: N,
167
- isRowSelected: y,
166
+ selectedRows: y,
167
+ isRowSelected: b,
168
168
  isAllRowsSelected: M,
169
- handleSelectAllRows: k,
169
+ handleSelectAllRows: w,
170
170
  handleSelectRow: m
171
- } = le({ rows: s, defaultSelectedRows: A });
172
- return q(() => {
173
- v && v(N);
174
- }, [N]), /* @__PURE__ */ e.jsxs(H, { className: "relative", children: [
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
- V,
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
- F,
181
+ $,
182
182
  {
183
183
  className: "mt-1",
184
184
  checked: M(f),
185
- onCheckedChange: (t) => k(f, !!t),
185
+ onCheckedChange: (l) => w(f, !!l),
186
186
  "aria-label": "Select all"
187
187
  }
188
188
  ) }),
189
- j && /* @__PURE__ */ e.jsx(E, { className: "w-12 p-2", children: "#" }),
190
- l.filter((t) => !t.hidden).map((t) => /* @__PURE__ */ e.jsx(
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: t.styles,
194
- className: o("p-2", t.sortable && "cursor-pointer"),
195
- onClick: () => t.sortable && z(t.dataIndex),
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
- t.name,
197
+ l.name,
198
198
  " ",
199
- t.sortable && ((a == null ? void 0 : a.sortField) === t.key ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
200
- (a == null ? void 0 : a.sortOrder) === $.DESC && /* @__PURE__ */ e.jsx(ne, { size: 15 }),
201
- (a == null ? void 0 : a.sortOrder) === $.ASC && /* @__PURE__ */ e.jsx(be, { size: 15 })
202
- ] }) : /* @__PURE__ */ e.jsx(Ne, { size: 15 }))
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
- t.key
205
+ l.key
206
206
  ))
207
207
  ] })
208
208
  }
209
209
  ),
210
- /* @__PURE__ */ e.jsx(W, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: s.length ? s.map((t, w) => /* @__PURE__ */ e.jsxs(
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(t),
213
+ onClick: () => d == null ? void 0 : d(l),
214
214
  className: o(d && "cursor-pointer"),
215
- "data-state": y(t[f]) && "selected",
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
- F,
223
+ $,
224
224
  {
225
225
  className: "mt-1",
226
- checked: y(t[f]),
227
- onCheckedChange: (r) => m(t[f], !!r),
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
- j && /* @__PURE__ */ e.jsx(g, { className: "w-12 p-2", children: (x.page - 1) * (x.limit || I) + w + 1 }),
234
- l.filter((r) => !r.hidden).map((r) => /* @__PURE__ */ e.jsx(
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(b.get(t, r.dataIndex), t) : b.get(t, r.dataIndex, "")
239
+ children: r.render ? r.render(k.get(l, r.dataIndex), l) : k.get(l, r.dataIndex, "")
240
240
  },
241
- `${w}-${r.key}`
241
+ `${j}-${r.key}`
242
242
  ))
243
243
  ]
244
244
  },
245
- `${t[f]}`
245
+ `${l[f]}`
246
246
  )) : /* @__PURE__ */ e.jsx(u, { children: /* @__PURE__ */ e.jsx(
247
247
  g,
248
248
  {
249
- colSpan: j ? n ? l.length + 2 : l.length + 1 : l.length,
250
- children: /* @__PURE__ */ e.jsx(ie, {})
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
- }, Be = ({
254
+ }, Ge = ({
255
255
  dataSource: s,
256
- columns: l,
256
+ columns: t,
257
257
  onRowClick: d,
258
258
  rowKey: f,
259
259
  hasNumbers: x,
260
- hasSearch: j,
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: a = "docs",
266
+ dataKey: c = "docs",
267
267
  loading: z,
268
- tableKey: N,
269
- filters: y,
268
+ tableKey: y,
269
+ filters: b,
270
270
  actions: M,
271
- handleFilterChange: k,
271
+ handleFilterChange: w,
272
272
  params: m,
273
- onColumnsUpdate: t,
274
- hasColumnsVisibilityDropdown: w
273
+ exportLoading: l = !1,
274
+ onColumnsUpdate: j,
275
+ hasColumnsVisibilityDropdown: r
275
276
  }) => {
276
- const { t: r } = me(), [D, Z] = se([]), { formattedColumns: T, handleColumnsChange: B, resetColumns: G } = de({ key: N, columns: l });
277
- return q(() => {
278
- t == null || t(T);
279
- }, [T, t]), /* @__PURE__ */ e.jsxs(
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
- (j || w && N || !b.isEmpty(n) || !b.isEmpty(y)) && /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row", children: [
285
- /* @__PURE__ */ e.jsx("div", { className: "w-full shrink", children: j && /* @__PURE__ */ e.jsx(
286
- re,
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: b.get(m, "search", ""),
289
- onSearchChange: (c) => i == null ? void 0 : i({ ...m, search: c, page: 1 })
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(xe, { options: n }),
294
- w && N && /* @__PURE__ */ e.jsxs(Q, { children: [
295
- /* @__PURE__ */ e.jsx(S, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
296
- J,
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(P, {}),
303
+ /* @__PURE__ */ e.jsx(ee, {}),
303
304
  " ",
304
- /* @__PURE__ */ e.jsx("span", { className: "hidden lg:!inline", children: r("Customize columns") }),
305
- /* @__PURE__ */ e.jsx(ee, {})
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(X, { align: "end", children: [
310
+ /* @__PURE__ */ e.jsxs(Y, { align: "end", children: [
310
311
  /* @__PURE__ */ e.jsxs(
311
- Y,
312
+ O,
312
313
  {
313
314
  className: "capitalize",
314
- onClick: G,
315
+ onClick: J,
315
316
  children: [
316
- /* @__PURE__ */ e.jsx(we, {}),
317
+ /* @__PURE__ */ e.jsx(ge, {}),
317
318
  " ",
318
- r("Reset columns")
319
+ D("Reset columns")
319
320
  ]
320
321
  }
321
322
  ),
322
- /* @__PURE__ */ e.jsx(O, {}),
323
- T.map((c) => /* @__PURE__ */ e.jsx(
324
- U,
323
+ /* @__PURE__ */ e.jsx(U, {}),
324
+ T.map((a) => /* @__PURE__ */ e.jsx(
325
+ K,
325
326
  {
326
327
  className: "capitalize",
327
- checked: !c.hidden,
328
- onCheckedChange: (R) => B(c, !R),
329
- children: c.name
328
+ checked: !a.hidden,
329
+ onCheckedChange: (R) => G(a, !R),
330
+ children: a.name
330
331
  },
331
- c.key
332
+ a.key
332
333
  ))
333
334
  ] })
334
335
  ] }),
335
- M && /* @__PURE__ */ e.jsx(oe, { actions: M }),
336
- y && /* @__PURE__ */ e.jsx(
336
+ M && /* @__PURE__ */ e.jsx(xe, { actions: M }),
337
+ b && /* @__PURE__ */ e.jsx(
337
338
  ce,
338
339
  {
339
- filters: y,
340
- onFilter: (c) => {
341
- i == null || i({ ...m, ...c, page: 1 }), k == null || k(c);
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(ae, {}) : /* @__PURE__ */ e.jsx(
348
- ge,
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: b.get(s, a, []),
352
+ rows: k.get(s, c, []),
352
353
  rowKey: f,
353
- selectedItems: D,
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: Z,
360
- onSortOrderChange: ({ sortField: c, sortOrder: R }) => {
361
- i == null || i({ ...m, sortField: c, sortOrder: R });
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
- K,
368
+ C,
368
369
  {
369
- onLimitChange: (c) => i == null ? void 0 : i({ ...m, limit: c, page: 1 }),
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
- D.length,
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
- C,
381
+ P,
381
382
  {
382
- onPageChange: (c) => i == null ? void 0 : i({ ...m, page: c }),
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
- Be as DataTable,
394
- ge as MyTable
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-DaEw8iEt.cjs");exports.ExportData=t.ExportData;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../ExportData-DspH4HLF.cjs");exports.ExportData=t.ExportData;
@@ -1,4 +1,4 @@
1
- import { E as r } from "../../ExportData-1TWLqqru.js";
1
+ import { E as r } from "../../ExportData-C97WQKG3.js";
2
2
  export {
3
3
  r as ExportData
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Loader-bUUShWXh.cjs");exports.Loader=e.Loader;exports.Spin=e.Spin;
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,5 +1,6 @@
1
- import { L as r, S as e } from "../../Loader-CVKJNLck.js";
1
+ import { S as a } from "../../Spin-4v-RUSBk.js";
2
+ import { L as p } from "../../Loader-Bbz39yY0.js";
2
3
  export {
3
- r as Loader,
4
- e as Spin
4
+ p as Loader,
5
+ a as Spin
5
6
  };
@@ -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,aAAkB,YAAY,4CA2BrD,CAAC"}
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;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,eAAO,MAAM,SAAS,GACpB,KAAK,EACL,eAAe,SACb,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EACzD,wQAqBC,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,4CAmIxC,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;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,KAAK,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,GAAI,aAAkB,eAAe,4CA2B3D,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,6 +1,6 @@
1
1
  {
2
2
  "name": "dgz-ui-shared",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -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;
@@ -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;