dgz-ui-shared 1.2.30 → 1.2.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,79 +1,84 @@
1
- import { jsx as e, jsxs as N, Fragment as O } from "react/jsx-runtime";
2
- import { y as ee, f as te } from "../../chunks/index-E1NtSoNr.es.js";
1
+ import { jsx as e, jsxs as p, Fragment as b } from "react/jsx-runtime";
2
+ import { y as te, f as le } from "../../chunks/index-E1NtSoNr.es.js";
3
3
  import { Button as Q } from "dgz-ui/button";
4
- import { DropdownMenu as le, DropdownMenuTrigger as de, DropdownMenuContent as se, DropdownMenuItem as fe, DropdownMenuSeparator as ie, DropdownMenuCheckboxItem as re } from "dgz-ui/dropdown";
4
+ import { DropdownMenu as de, DropdownMenuTrigger as se, DropdownMenuContent as ie, DropdownMenuItem as fe, DropdownMenuSeparator as re, DropdownMenuCheckboxItem as pe } from "dgz-ui/dropdown";
5
5
  import { cn as o } from "dgz-ui/utils";
6
- import { l as z } from "../../chunks/lodash-CRDOWzbs.es.js";
7
- import { XIcon as h, ArrowDownWideNarrow as pe, ArrowUpWideNarrow as Ne, ArrowUpDown as xe, RefreshCw as ce } from "lucide-react";
8
- import { memo as me, useMemo as we, useEffect as Y, useState as ge } from "react";
9
- import { useTranslation as b } from "react-i18next";
6
+ import { l as M } from "../../chunks/lodash-CRDOWzbs.es.js";
7
+ import { XIcon as h, ArrowDownWideNarrow as Ne, ArrowUpWideNarrow as ce, ArrowUpDown as xe, RefreshCw as me } from "lucide-react";
8
+ import { memo as we, useMemo as I, useEffect as Y, useState as ge } from "react";
9
+ import { useTranslation as K } from "react-i18next";
10
10
  import { u as ne, a as Ee, b as Te } from "../../chunks/useSortable-BXNk8Wth.es.js";
11
- import { A as De } from "../../chunks/Actions-Du8iQ3WR.es.js";
12
- import { E as ve } from "../../chunks/ExportData-CwotVgye.es.js";
13
- import { S as Ae, F as Me } from "../../chunks/Search-BtiKC-dt.es.js";
11
+ import { A as Ae } from "../../chunks/Actions-Du8iQ3WR.es.js";
12
+ import { E as De } from "../../chunks/ExportData-CwotVgye.es.js";
13
+ import { S as ve, F as Me } from "../../chunks/Search-BtiKC-dt.es.js";
14
14
  import { ButtonGroup as ze } from "dgz-ui";
15
15
  import { L as ke } from "../../chunks/Loader-zvzAi0F6.es.js";
16
- import { D as I, M as Le, a as Re } from "../../chunks/MyPagination-B0czoGZK.es.js";
17
- import { Checkbox as U } from "dgz-ui/form";
18
- import { Table as oe, TableHeader as We, TableRow as X, TableHead as q, TableBody as Be, TableCell as J } from "dgz-ui/table";
19
- import { S as j } from "../../chunks/SortOrder-CwuehjY1.es.js";
16
+ import { D as U, M as Le, a as Re } from "../../chunks/MyPagination-B0czoGZK.es.js";
17
+ import { Checkbox as j } from "dgz-ui/form";
18
+ import { Table as oe, TableHeader as We, TableRow as X, TableHead as q, TableBody as Be, TableCell as H } from "dgz-ui/table";
19
+ import { S as O } from "../../chunks/SortOrder-CwuehjY1.es.js";
20
20
  import { E as $e } from "../../chunks/Empty-BReVQKje.es.js";
21
- const He = me(function({
22
- filters: m,
23
- params: E,
24
- onFilter: x,
25
- className: w,
26
- ...k
21
+ const ye = we(function({
22
+ filters: x,
23
+ params: g,
24
+ onFilter: N,
25
+ className: m,
26
+ ...L
27
27
  }) {
28
- const { t: T } = b(), s = we(
28
+ const { t: E } = K(), s = I(
29
29
  () => Object.fromEntries(
30
- (m == null ? void 0 : m.map((f) => {
31
- var c;
30
+ (x == null ? void 0 : x.map((c) => {
31
+ var t;
32
32
  return [
33
- f.name,
33
+ c.name,
34
34
  Object.fromEntries(
35
- ((c = f.options) == null ? void 0 : c.map(({ label: t, value: n }) => [n, t])) || []
35
+ ((t = c.options) == null ? void 0 : t.map(({ label: R, value: n }) => [n, R])) || []
36
36
  )
37
37
  ];
38
38
  })) || []
39
39
  ),
40
- [m]
40
+ [x]
41
+ ), z = I(
42
+ () => Object.entries(g || {}).filter(
43
+ ([c, t]) => !!(s != null && s[c]) && !M.isEmpty(t)
44
+ ),
45
+ [s, g]
41
46
  );
42
- return /* @__PURE__ */ e("div", { ...k, className: o("flex flex-wrap gap-2", w), children: Object.entries(E || {}).filter(([f, c]) => !!(s != null && s[f]) && !z.isEmpty(c)).map(
43
- ([f, c]) => {
44
- var t;
45
- return Array.isArray(c) ? /* @__PURE__ */ e(ze, { children: c.filter((n) => {
46
- var L;
47
- return ((L = s == null ? void 0 : s[f]) == null ? void 0 : L[n]) && n;
48
- }).map((n, L) => {
49
- var p;
50
- return /* @__PURE__ */ N(
47
+ return !M.isEmpty(z) && /* @__PURE__ */ e("div", { ...L, className: o("flex flex-wrap gap-2", m), children: z.map(
48
+ ([c, t]) => {
49
+ var R;
50
+ return Array.isArray(t) ? /* @__PURE__ */ e(ze, { children: t.filter((n) => {
51
+ var i;
52
+ return ((i = s == null ? void 0 : s[c]) == null ? void 0 : i[n]) && n;
53
+ }).map((n, i) => {
54
+ var T;
55
+ return /* @__PURE__ */ p(
51
56
  Q,
52
57
  {
53
58
  size: "sm",
54
59
  onClick: () => {
55
- x == null || x({
56
- ...E,
57
- [f]: c.filter((M) => M !== n)
60
+ N == null || N({
61
+ ...g,
62
+ [c]: t.filter((k) => k !== n)
58
63
  });
59
64
  },
60
65
  children: [
61
- T(String(((p = s == null ? void 0 : s[f]) == null ? void 0 : p[n]) || "")),
66
+ E(String(((T = s == null ? void 0 : s[c]) == null ? void 0 : T[n]) || "")),
62
67
  " ",
63
68
  /* @__PURE__ */ e(h, {})
64
69
  ]
65
70
  },
66
- L
71
+ i
67
72
  );
68
- }) }, f) : /* @__PURE__ */ N(
73
+ }) }, c) : /* @__PURE__ */ p(
69
74
  Q,
70
75
  {
71
76
  size: "sm",
72
77
  onClick: () => {
73
- x == null || x(z.omit(E, f));
78
+ N == null || N(M.omit(g, c));
74
79
  },
75
80
  children: [
76
- T(String(((t = s == null ? void 0 : s[f]) == null ? void 0 : t[c]) || "")),
81
+ E(String(((R = s == null ? void 0 : s[c]) == null ? void 0 : R[t]) || "")),
77
82
  " ",
78
83
  /* @__PURE__ */ e(h, {})
79
84
  ]
@@ -81,65 +86,65 @@ const He = me(function({
81
86
  );
82
87
  }
83
88
  ) });
84
- }), Je = ({
89
+ }), He = ({
85
90
  rows: l = [],
86
- columns: m,
87
- onRowClick: E,
88
- rowKey: x,
89
- params: w = {
91
+ columns: x,
92
+ onRowClick: g,
93
+ rowKey: N,
94
+ params: m = {
90
95
  page: 1,
91
- limit: I
96
+ limit: U
92
97
  },
93
- hasNumbers: k = !1,
94
- hasCheckbox: T = !1,
98
+ hasNumbers: L = !1,
99
+ hasCheckbox: E = !1,
95
100
  selectedItems: s,
96
- onSelectedItemsChange: f,
101
+ onSelectedItemsChange: z,
97
102
  onSortOrderChange: c,
98
103
  isStickyHeader: t,
99
- className: n,
100
- ...L
104
+ className: R,
105
+ ...n
101
106
  }) => {
102
- const { sortObject: p, handleSort: M } = ne({
103
- sortField: w == null ? void 0 : w.sortField,
104
- sortOrder: w == null ? void 0 : w.sortOrder,
107
+ const { sortObject: i, handleSort: T } = ne({
108
+ sortField: m == null ? void 0 : m.sortField,
109
+ sortOrder: m == null ? void 0 : m.sortOrder,
105
110
  onSortOrderChange: c
106
111
  }), {
107
- selectedRows: R,
108
- isRowSelected: D,
109
- isAllRowsSelected: v,
110
- handleSelectAllRows: _,
112
+ selectedRows: k,
113
+ isRowSelected: A,
114
+ isAllRowsSelected: D,
115
+ handleSelectAllRows: J,
111
116
  handleSelectRow: W
112
117
  } = Ee({ rows: l, defaultSelectedRows: s });
113
118
  return Y(() => {
114
- JSON.stringify(s) !== JSON.stringify(R) && R && (f == null || f(R));
115
- }, [R, s, f]), /* @__PURE__ */ N(oe, { ...L, className: o("relative", n), children: [
119
+ JSON.stringify(s) !== JSON.stringify(k) && k && (z == null || z(k));
120
+ }, [k, s, z]), /* @__PURE__ */ p(oe, { ...n, className: o("relative", R), children: [
116
121
  /* @__PURE__ */ e(
117
122
  We,
118
123
  {
119
124
  className: o("bg-bg", t && "sticky top-0 z-1"),
120
- children: /* @__PURE__ */ N(X, { children: [
121
- T && /* @__PURE__ */ e(q, { className: "w-12 p-3", children: /* @__PURE__ */ e(
122
- U,
125
+ children: /* @__PURE__ */ p(X, { children: [
126
+ E && /* @__PURE__ */ e(q, { className: "w-12 p-3", children: /* @__PURE__ */ e(
127
+ j,
123
128
  {
124
129
  className: "mt-1",
125
- checked: v(x),
126
- onCheckedChange: (d) => _(x, !!d),
130
+ checked: D(N),
131
+ onCheckedChange: (d) => J(N, !!d),
127
132
  "aria-label": "Select all"
128
133
  }
129
134
  ) }),
130
- k && /* @__PURE__ */ e(q, { className: "w-12 p-2", children: "#" }),
131
- m.filter((d) => !d.hidden).map((d) => /* @__PURE__ */ e(
135
+ L && /* @__PURE__ */ e(q, { className: "w-12 p-2", children: "#" }),
136
+ x.filter((d) => !d.hidden).map((d) => /* @__PURE__ */ e(
132
137
  q,
133
138
  {
134
139
  style: d.styles,
135
140
  className: o("p-2", d.sortable && "cursor-pointer"),
136
- onClick: () => d.sortable && M(d.dataIndex),
137
- children: /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
141
+ onClick: () => d.sortable && T(d.dataIndex),
142
+ children: /* @__PURE__ */ p("div", { className: "flex items-center gap-2", children: [
138
143
  d.name,
139
144
  " ",
140
- d.sortable && ((p == null ? void 0 : p.sortField) === d.key ? /* @__PURE__ */ N(O, { children: [
141
- (p == null ? void 0 : p.sortOrder) === j.DESC && /* @__PURE__ */ e(pe, { size: 15 }),
142
- (p == null ? void 0 : p.sortOrder) === j.ASC && /* @__PURE__ */ e(Ne, { size: 15 })
145
+ d.sortable && ((i == null ? void 0 : i.sortField) === d.key ? /* @__PURE__ */ p(b, { children: [
146
+ (i == null ? void 0 : i.sortOrder) === O.DESC && /* @__PURE__ */ e(Ne, { size: 15 }),
147
+ (i == null ? void 0 : i.sortOrder) === O.ASC && /* @__PURE__ */ e(ce, { size: 15 })
143
148
  ] }) : /* @__PURE__ */ e(xe, { size: 15 }))
144
149
  ] })
145
150
  },
@@ -148,245 +153,245 @@ const He = me(function({
148
153
  ] })
149
154
  }
150
155
  ),
151
- /* @__PURE__ */ e(Be, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: l.length ? l.map((d, B) => /* @__PURE__ */ N(
156
+ /* @__PURE__ */ e(Be, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: l.length ? l.map((d, B) => /* @__PURE__ */ p(
152
157
  X,
153
158
  {
154
- onClick: () => E == null ? void 0 : E(d),
155
- className: o(E && "cursor-pointer"),
156
- "data-state": D(d[x]) && "selected",
159
+ onClick: () => g == null ? void 0 : g(d),
160
+ className: o(g && "cursor-pointer"),
161
+ "data-state": A(d[N]) && "selected",
157
162
  children: [
158
- T && /* @__PURE__ */ e(
159
- J,
163
+ E && /* @__PURE__ */ e(
164
+ H,
160
165
  {
161
166
  className: "w-12 p-3",
162
167
  onClick: (r) => r.stopPropagation(),
163
168
  children: /* @__PURE__ */ e(
164
- U,
169
+ j,
165
170
  {
166
171
  className: "mt-1",
167
- checked: D(d[x]),
168
- onCheckedChange: (r) => W(d[x], !!r),
172
+ checked: A(d[N]),
173
+ onCheckedChange: (r) => W(d[N], !!r),
169
174
  "aria-label": "Select row"
170
175
  }
171
176
  )
172
177
  }
173
178
  ),
174
- k && /* @__PURE__ */ e(J, { className: "w-12 p-2", children: (w.page - 1) * (w.limit || I) + B + 1 }),
175
- m.filter((r) => !r.hidden).map((r) => /* @__PURE__ */ e(
176
- J,
179
+ L && /* @__PURE__ */ e(H, { className: "w-12 p-2", children: (m.page - 1) * (m.limit || U) + B + 1 }),
180
+ x.filter((r) => !r.hidden).map((r) => /* @__PURE__ */ e(
181
+ H,
177
182
  {
178
183
  className: "text-body-xs-medium max-w-xs p-2",
179
184
  style: r.styles,
180
- children: r.render ? r.render(z.get(d, r.dataIndex), d) : z.get(d, r.dataIndex, "")
185
+ children: r.render ? r.render(M.get(d, r.dataIndex), d) : M.get(d, r.dataIndex, "")
181
186
  },
182
187
  `${B}-${r.key}`
183
188
  ))
184
189
  ]
185
190
  },
186
- `${d[x]}`
191
+ `${d[N]}`
187
192
  )) : /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
188
- J,
193
+ H,
189
194
  {
190
- colSpan: k ? T ? m.length + 2 : m.length + 1 : m.length,
195
+ colSpan: L ? E ? x.length + 2 : x.length + 1 : x.length,
191
196
  children: /* @__PURE__ */ e($e, {})
192
197
  }
193
198
  ) }) })
194
199
  ] });
195
200
  }, Ce = ({
196
201
  dataSource: l,
197
- columns: m,
198
- onRowClick: E,
199
- rowKey: x,
200
- hasNumbers: w,
201
- hasSearch: k,
202
- exportOptions: T,
202
+ columns: x,
203
+ onRowClick: g,
204
+ rowKey: N,
205
+ hasNumbers: m,
206
+ hasSearch: L,
207
+ exportOptions: E,
203
208
  hasCheckbox: s,
204
- hasPagination: f,
209
+ hasPagination: z,
205
210
  isStickyHeader: c,
206
211
  onParamChange: t,
207
- dataKey: n = "docs",
208
- loading: L,
209
- tableKey: p,
210
- filters: M,
211
- actions: R,
212
- handleFilterChange: D,
213
- params: v,
214
- exportLoading: _ = !1,
212
+ dataKey: R = "docs",
213
+ loading: n,
214
+ tableKey: i,
215
+ filters: T,
216
+ actions: k,
217
+ handleFilterChange: A,
218
+ params: D,
219
+ exportLoading: J = !1,
215
220
  onColumnsUpdate: W,
216
221
  hasColumnsVisibilityDropdown: d,
217
222
  showAppliedFilters: B = !1,
218
223
  onSelectedItemsChange: r,
219
- actionProps: K,
220
- filterWrapperProps: F,
221
- exportOptionsProps: S,
222
- columnsVisibilityProps: g,
223
- paginationProps: V,
224
- searchProps: A,
225
- ...u
224
+ actionProps: F,
225
+ filterWrapperProps: S,
226
+ exportOptionsProps: V,
227
+ columnsVisibilityProps: w,
228
+ paginationProps: u,
229
+ searchProps: v,
230
+ ...a
226
231
  }) => {
227
232
  var Z;
228
- const { t: y } = b(), [$, a] = ge([]), { formattedColumns: H, handleColumnsChange: C, resetColumns: P } = Te({ key: p, columns: m });
233
+ const { t: _ } = K(), [$, C] = ge([]), { formattedColumns: y, handleColumnsChange: P, resetColumns: ee } = Te({ key: i, columns: x });
229
234
  return Y(() => {
230
- W == null || W(H);
231
- }, [H, W]), Y(() => {
235
+ W == null || W(y);
236
+ }, [y, W]), Y(() => {
232
237
  r == null || r($);
233
- }, [$, r]), /* @__PURE__ */ N(
238
+ }, [$, r]), /* @__PURE__ */ p(
234
239
  "div",
235
240
  {
236
241
  className: "border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",
237
242
  children: [
238
- /* @__PURE__ */ N("div", { className: "flex flex-col gap-4 p-4", children: [
239
- (k || d && p || !z.isEmpty(T) || !z.isEmpty(M)) && /* @__PURE__ */ N("div", { className: "flex flex-col justify-between gap-3 lg:flex-row lg:items-center", children: [
240
- /* @__PURE__ */ e("div", { className: "grow", children: k && /* @__PURE__ */ e(
241
- Ae,
243
+ /* @__PURE__ */ p("div", { className: "flex flex-col gap-4 p-4", children: [
244
+ (L || d && i || !M.isEmpty(E) || !M.isEmpty(T)) && /* @__PURE__ */ p("div", { className: "flex flex-col justify-between gap-3 lg:flex-row lg:items-center", children: [
245
+ /* @__PURE__ */ e("div", { className: "grow", children: L && /* @__PURE__ */ e(
246
+ ve,
242
247
  {
243
- ...A,
248
+ ...v,
244
249
  inputProps: {
245
- ...A == null ? void 0 : A.inputProps,
250
+ ...v == null ? void 0 : v.inputProps,
246
251
  className: o(
247
252
  "h-8 grow",
248
- (Z = A == null ? void 0 : A.inputProps) == null ? void 0 : Z.className
253
+ (Z = v == null ? void 0 : v.inputProps) == null ? void 0 : Z.className
249
254
  )
250
255
  },
251
256
  className: o(
252
- "max-w-full lg:max-w-80 [&_button]:-top-1",
253
- A == null ? void 0 : A.className
257
+ "max-w-full lg:max-w-80! [&_button]:-top-1",
258
+ v == null ? void 0 : v.className
254
259
  ),
255
- defaultValue: z.get(v, "search", ""),
256
- onSearchChange: (i) => t == null ? void 0 : t({ ...v, search: i, page: 1 })
260
+ defaultValue: M.get(D, "search", ""),
261
+ onSearchChange: (f) => t == null ? void 0 : t({ ...D, search: f, page: 1 })
257
262
  }
258
263
  ) }),
259
- /* @__PURE__ */ N("div", { className: "flex items-center justify-end gap-3", children: [
260
- T && /* @__PURE__ */ e(
261
- ve,
264
+ /* @__PURE__ */ p("div", { className: "flex items-center justify-end gap-3", children: [
265
+ E && /* @__PURE__ */ e(
266
+ De,
262
267
  {
263
- ...S,
264
- options: T,
265
- loading: _
268
+ ...V,
269
+ options: E,
270
+ loading: J
266
271
  }
267
272
  ),
268
- d && p && /* @__PURE__ */ N(le, { children: [
273
+ d && i && /* @__PURE__ */ p(de, { children: [
269
274
  /* @__PURE__ */ e(
270
- de,
275
+ se,
271
276
  {
272
277
  asChild: !0,
273
278
  className: "grow",
274
- ...g == null ? void 0 : g.triggerProps,
279
+ ...w == null ? void 0 : w.triggerProps,
275
280
  children: /* @__PURE__ */ e(
276
281
  Q,
277
282
  {
278
283
  variant: "secondary",
279
284
  size: "sm",
280
285
  className: "ml-auto rounded-lg px-3",
281
- children: (g == null ? void 0 : g.title) || /* @__PURE__ */ N(O, { children: [
282
- /* @__PURE__ */ e(ee, {}),
286
+ children: (w == null ? void 0 : w.title) || /* @__PURE__ */ p(b, { children: [
287
+ /* @__PURE__ */ e(te, {}),
283
288
  " ",
284
- /* @__PURE__ */ e("span", { className: "hidden md:inline!", children: y("Customize columns") }),
285
- /* @__PURE__ */ e(te, {})
289
+ /* @__PURE__ */ e("span", { className: "hidden md:inline!", children: _("Customize columns") }),
290
+ /* @__PURE__ */ e(le, {})
286
291
  ] })
287
292
  }
288
293
  )
289
294
  }
290
295
  ),
291
- /* @__PURE__ */ N(
292
- se,
296
+ /* @__PURE__ */ p(
297
+ ie,
293
298
  {
294
299
  align: "end",
295
- ...g == null ? void 0 : g.contentProps,
300
+ ...w == null ? void 0 : w.contentProps,
296
301
  children: [
297
- /* @__PURE__ */ N(
302
+ /* @__PURE__ */ p(
298
303
  fe,
299
304
  {
300
305
  className: "capitalize",
301
- onClick: P,
306
+ onClick: ee,
302
307
  children: [
303
- /* @__PURE__ */ e(ce, {}),
308
+ /* @__PURE__ */ e(me, {}),
304
309
  " ",
305
- (g == null ? void 0 : g.resetText) || y("Reset columns")
310
+ (w == null ? void 0 : w.resetText) || _("Reset columns")
306
311
  ]
307
312
  }
308
313
  ),
309
- /* @__PURE__ */ e(ie, {}),
310
- H.map((i) => /* @__PURE__ */ e(
311
- re,
314
+ /* @__PURE__ */ e(re, {}),
315
+ y.map((f) => /* @__PURE__ */ e(
316
+ pe,
312
317
  {
313
318
  className: "capitalize",
314
- checked: !i.hidden,
315
- onCheckedChange: (G) => C(i, !G),
316
- children: i.name
319
+ checked: !f.hidden,
320
+ onCheckedChange: (G) => P(f, !G),
321
+ children: f.name
317
322
  },
318
- i.key
323
+ f.key
319
324
  ))
320
325
  ]
321
326
  }
322
327
  )
323
328
  ] }),
324
- R && /* @__PURE__ */ e(De, { ...K, actions: R }),
325
- M && /* @__PURE__ */ e(
329
+ k && /* @__PURE__ */ e(Ae, { ...F, actions: k }),
330
+ T && /* @__PURE__ */ e(
326
331
  Me,
327
332
  {
328
- ...F,
329
- filters: M,
330
- params: v,
331
- onChange: D,
332
- onFilter: (i) => {
333
- t == null || t({ ...i, page: 1 }), D == null || D(i);
333
+ ...S,
334
+ filters: T,
335
+ params: D,
336
+ onChange: A,
337
+ onFilter: (f) => {
338
+ t == null || t({ ...f, page: 1 }), A == null || A(f);
334
339
  }
335
340
  }
336
341
  )
337
342
  ] })
338
343
  ] }),
339
- B && !z.isEmpty(M) && /* @__PURE__ */ e(
340
- He,
344
+ B && !M.isEmpty(T) && /* @__PURE__ */ e(
345
+ ye,
341
346
  {
342
- filters: M,
343
- params: v,
344
- onFilter: (i) => {
345
- t == null || t({ ...i, page: 1 }), D == null || D(i);
347
+ filters: T,
348
+ params: D,
349
+ onFilter: (f) => {
350
+ t == null || t({ ...f, page: 1 }), A == null || A(f);
346
351
  }
347
352
  }
348
353
  )
349
354
  ] }),
350
- /* @__PURE__ */ e("div", { className: "flex flex-col overflow-auto border-y", children: L ? /* @__PURE__ */ e(ke, {}) : /* @__PURE__ */ e(
351
- Je,
355
+ /* @__PURE__ */ e("div", { className: "flex flex-col overflow-auto border-y", children: n ? /* @__PURE__ */ e(ke, {}) : /* @__PURE__ */ e(
356
+ He,
352
357
  {
353
- ...u,
358
+ ...a,
354
359
  params: {
355
360
  page: (l == null ? void 0 : l.page) || 1,
356
361
  limit: l == null ? void 0 : l.limit,
357
- ...v
362
+ ...D
358
363
  },
359
- rows: z.get(l, n, []),
360
- rowKey: x,
364
+ rows: M.get(l, R, []),
365
+ rowKey: N,
361
366
  selectedItems: $,
362
367
  isStickyHeader: c,
363
- columns: H,
368
+ columns: y,
364
369
  hasCheckbox: s,
365
- hasNumbers: w,
366
- onRowClick: E,
367
- onSelectedItemsChange: a,
368
- onSortOrderChange: ({ sortField: i, sortOrder: G }) => {
369
- t == null || t({ ...v, sortField: i, sortOrder: G });
370
+ hasNumbers: m,
371
+ onRowClick: g,
372
+ onSelectedItemsChange: C,
373
+ onSortOrderChange: ({ sortField: f, sortOrder: G }) => {
374
+ t == null || t({ ...D, sortField: f, sortOrder: G });
370
375
  }
371
376
  }
372
377
  ) }),
373
- f && /* @__PURE__ */ N("div", { className: "flex shrink-0 flex-wrap items-center justify-center gap-3 p-4 lg:justify-between", children: [
378
+ z && /* @__PURE__ */ p("div", { className: "flex shrink-0 flex-wrap items-center justify-center gap-3 p-4 lg:justify-between", children: [
374
379
  /* @__PURE__ */ e("div", { className: "text-sm", children: /* @__PURE__ */ e(
375
380
  Le,
376
381
  {
377
- onLimitChange: (i) => t == null ? void 0 : t({ ...v, limit: i, page: 1 }),
382
+ onLimitChange: (f) => t == null ? void 0 : t({ ...D, limit: f, page: 1 }),
378
383
  defaultValue: l == null ? void 0 : l.limit
379
384
  }
380
385
  ) }),
381
- /* @__PURE__ */ e("div", { className: "text-muted-foreground text-sm", children: y("{{selectedCount}} of {{total}} row(s) selected", {
386
+ /* @__PURE__ */ e("div", { className: "text-muted-foreground text-sm", children: _("{{selectedCount}} of {{total}} row(s) selected", {
382
387
  selectedCount: $.length,
383
388
  total: (l == null ? void 0 : l.total) || 0
384
389
  }) }),
385
390
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
386
391
  Re,
387
392
  {
388
- ...V,
389
- onPageChange: (i) => t == null ? void 0 : t({ ...v, page: i }),
393
+ ...u,
394
+ onPageChange: (f) => t == null ? void 0 : t({ ...D, page: f }),
390
395
  currentPage: l == null ? void 0 : l.page,
391
396
  totalPages: l == null ? void 0 : l.totalPages
392
397
  }
@@ -398,6 +403,6 @@ const He = me(function({
398
403
  };
399
404
  export {
400
405
  Ce as DataTable,
401
- Je as MyTable
406
+ He as MyTable
402
407
  };
403
408
  //# sourceMappingURL=index.es.js.map