dgz-ui-shared 1.2.29 → 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.
Files changed (26) hide show
  1. package/dist/chunks/{ExportData-DQzwB_yW.es.js → ExportData-CwotVgye.es.js} +12 -12
  2. package/dist/chunks/{ExportData-DQzwB_yW.es.js.map → ExportData-CwotVgye.es.js.map} +1 -1
  3. package/dist/chunks/ExportData-DJE0jOHc.cjs.js +2 -0
  4. package/dist/chunks/{ExportData-BjS0xAqH.cjs.js.map → ExportData-DJE0jOHc.cjs.js.map} +1 -1
  5. package/dist/chunks/{Search-CR54BX3a.es.js → Search-BtiKC-dt.es.js} +11 -11
  6. package/dist/chunks/Search-BtiKC-dt.es.js.map +1 -0
  7. package/dist/chunks/Search-DfRA43qp.cjs.js +2 -0
  8. package/dist/chunks/Search-DfRA43qp.cjs.js.map +1 -0
  9. package/dist/components/datatable/index.cjs.js +1 -1
  10. package/dist/components/datatable/index.cjs.js.map +1 -1
  11. package/dist/components/datatable/index.es.js +222 -223
  12. package/dist/components/datatable/index.es.js.map +1 -1
  13. package/dist/components/export/index.cjs.js +1 -1
  14. package/dist/components/export/index.es.js +1 -1
  15. package/dist/components/filters/index.cjs.js +1 -1
  16. package/dist/components/filters/index.es.js +1 -1
  17. package/dist/styles.css +1 -1
  18. package/dist/types/App.d.ts.map +1 -1
  19. package/dist/types/components/datatable/DataTable.d.ts.map +1 -1
  20. package/dist/types/components/export/ExportData.d.ts.map +1 -1
  21. package/dist/types/components/filters/AppliedFilters.d.ts.map +1 -1
  22. package/package.json +1 -1
  23. package/dist/chunks/ExportData-BjS0xAqH.cjs.js +0 -2
  24. package/dist/chunks/Search-CR54BX3a.es.js.map +0 -1
  25. package/dist/chunks/Search-D0G4Mda4.cjs.js +0 -2
  26. package/dist/chunks/Search-D0G4Mda4.cjs.js.map +0 -1
@@ -1,81 +1,86 @@
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";
3
- import { Button as q } from "dgz-ui/button";
4
- import { DropdownMenu as le, DropdownMenuTrigger as de, DropdownMenuContent as se, DropdownMenuItem as ie, DropdownMenuSeparator as fe, DropdownMenuCheckboxItem as re } from "dgz-ui/dropdown";
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
+ import { Button as Q } from "dgz-ui/button";
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
6
  import { l as M } from "../../chunks/lodash-CRDOWzbs.es.js";
7
- import { XIcon as Z, ArrowDownWideNarrow as pe, ArrowUpWideNarrow as Ne, ArrowUpDown as ce, RefreshCw as xe } from "lucide-react";
8
- import { memo as we, useMemo as me, useEffect as Q, useState as ge } from "react";
9
- import { useTranslation as b } from "react-i18next";
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 ke } from "../../chunks/ExportData-DQzwB_yW.es.js";
13
- import { S as ve, F as Ae } from "../../chunks/Search-CR54BX3a.es.js";
14
- import { ButtonGroup as Me } from "dgz-ui";
15
- import { L as ze } 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 G, TableHead as X, TableBody as Be, TableCell as H } from "dgz-ui/table";
19
- import { S as j } from "../../chunks/SortOrder-CwuehjY1.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
+ import { ButtonGroup as ze } from "dgz-ui";
15
+ import { L as ke } from "../../chunks/Loader-zvzAi0F6.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
21
  const ye = we(function({
22
- filters: w,
23
- params: E,
24
- onFilter: c,
22
+ filters: x,
23
+ params: g,
24
+ onFilter: N,
25
25
  className: m,
26
- ...z
26
+ ...L
27
27
  }) {
28
- const { t: T } = b(), s = me(
28
+ const { t: E } = K(), s = I(
29
29
  () => Object.fromEntries(
30
- (w == null ? void 0 : w.map((i) => {
31
- var x;
30
+ (x == null ? void 0 : x.map((c) => {
31
+ var t;
32
32
  return [
33
- i.name,
33
+ c.name,
34
34
  Object.fromEntries(
35
- ((x = i.options) == null ? void 0 : x.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
- [w]
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", { ...z, className: o("flex flex-wrap gap-2", m), children: Object.entries(E || {}).filter(([i, x]) => !!(s != null && s[i]) && !M.isEmpty(x)).map(
43
- ([i, x]) => {
44
- var t;
45
- return Array.isArray(x) ? /* @__PURE__ */ e(Me, { children: x.filter((n) => {
46
- var L;
47
- return ((L = s == null ? void 0 : s[i]) == null ? void 0 : L[n]) && n;
48
- }).map((n, L) => {
49
- var p;
50
- return /* @__PURE__ */ N(
51
- q,
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(
56
+ Q,
52
57
  {
53
58
  size: "sm",
54
59
  onClick: () => {
55
- c == null || c({
56
- ...E,
57
- [i]: x.filter((A) => A !== 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[i]) == null ? void 0 : p[n]) || "")),
66
+ E(String(((T = s == null ? void 0 : s[c]) == null ? void 0 : T[n]) || "")),
62
67
  " ",
63
- /* @__PURE__ */ e(Z, {})
68
+ /* @__PURE__ */ e(h, {})
64
69
  ]
65
70
  },
66
- L
71
+ i
67
72
  );
68
- }) }, i) : /* @__PURE__ */ N(
69
- q,
73
+ }) }, c) : /* @__PURE__ */ p(
74
+ Q,
70
75
  {
71
76
  size: "sm",
72
77
  onClick: () => {
73
- c == null || c(M.omit(E, i));
78
+ N == null || N(M.omit(g, c));
74
79
  },
75
80
  children: [
76
- T(String(((t = s == null ? void 0 : s[i]) == null ? void 0 : t[x]) || "")),
81
+ E(String(((R = s == null ? void 0 : s[c]) == null ? void 0 : R[t]) || "")),
77
82
  " ",
78
- /* @__PURE__ */ e(Z, {})
83
+ /* @__PURE__ */ e(h, {})
79
84
  ]
80
85
  }
81
86
  );
@@ -83,64 +88,64 @@ const ye = we(function({
83
88
  ) });
84
89
  }), He = ({
85
90
  rows: l = [],
86
- columns: w,
87
- onRowClick: E,
88
- rowKey: c,
91
+ columns: x,
92
+ onRowClick: g,
93
+ rowKey: N,
89
94
  params: m = {
90
95
  page: 1,
91
- limit: I
96
+ limit: U
92
97
  },
93
- hasNumbers: z = !1,
94
- hasCheckbox: T = !1,
98
+ hasNumbers: L = !1,
99
+ hasCheckbox: E = !1,
95
100
  selectedItems: s,
96
- onSelectedItemsChange: i,
97
- onSortOrderChange: x,
101
+ onSelectedItemsChange: z,
102
+ onSortOrderChange: c,
98
103
  isStickyHeader: t,
99
- className: n,
100
- ...L
104
+ className: R,
105
+ ...n
101
106
  }) => {
102
- const { sortObject: p, handleSort: A } = ne({
107
+ const { sortObject: i, handleSort: T } = ne({
103
108
  sortField: m == null ? void 0 : m.sortField,
104
109
  sortOrder: m == null ? void 0 : m.sortOrder,
105
- onSortOrderChange: x
110
+ onSortOrderChange: c
106
111
  }), {
107
- selectedRows: R,
108
- isRowSelected: D,
109
- isAllRowsSelected: k,
112
+ selectedRows: k,
113
+ isRowSelected: A,
114
+ isAllRowsSelected: D,
110
115
  handleSelectAllRows: J,
111
116
  handleSelectRow: W
112
117
  } = Ee({ rows: l, defaultSelectedRows: s });
113
- return Q(() => {
114
- JSON.stringify(s) !== JSON.stringify(R) && R && (i == null || i(R));
115
- }, [R, s, i]), /* @__PURE__ */ N(oe, { ...L, className: o("relative", n), children: [
118
+ return Y(() => {
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(G, { children: [
121
- T && /* @__PURE__ */ e(X, { 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: k(c),
126
- onCheckedChange: (d) => J(c, !!d),
130
+ checked: D(N),
131
+ onCheckedChange: (d) => J(N, !!d),
127
132
  "aria-label": "Select all"
128
133
  }
129
134
  ) }),
130
- z && /* @__PURE__ */ e(X, { className: "w-12 p-2", children: "#" }),
131
- w.filter((d) => !d.hidden).map((d) => /* @__PURE__ */ e(
132
- X,
135
+ L && /* @__PURE__ */ e(q, { className: "w-12 p-2", children: "#" }),
136
+ x.filter((d) => !d.hidden).map((d) => /* @__PURE__ */ e(
137
+ q,
133
138
  {
134
139
  style: d.styles,
135
140
  className: o("p-2", d.sortable && "cursor-pointer"),
136
- onClick: () => d.sortable && A(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 })
143
- ] }) : /* @__PURE__ */ e(ce, { 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 })
148
+ ] }) : /* @__PURE__ */ e(xe, { size: 15 }))
144
149
  ] })
145
150
  },
146
151
  d.key
@@ -148,31 +153,31 @@ const ye = we(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(
152
- G,
156
+ /* @__PURE__ */ e(Be, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: l.length ? l.map((d, B) => /* @__PURE__ */ p(
157
+ X,
153
158
  {
154
- onClick: () => E == null ? void 0 : E(d),
155
- className: o(E && "cursor-pointer"),
156
- "data-state": D(d[c]) && "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(
163
+ E && /* @__PURE__ */ e(
159
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[c]),
168
- onCheckedChange: (r) => W(d[c], !!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
- z && /* @__PURE__ */ e(H, { className: "w-12 p-2", children: (m.page - 1) * (m.limit || I) + B + 1 }),
175
- w.filter((r) => !r.hidden).map((r) => /* @__PURE__ */ e(
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(
176
181
  H,
177
182
  {
178
183
  className: "text-body-xs-medium max-w-xs p-2",
@@ -183,61 +188,61 @@ const ye = we(function({
183
188
  ))
184
189
  ]
185
190
  },
186
- `${d[c]}`
187
- )) : /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
191
+ `${d[N]}`
192
+ )) : /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
188
193
  H,
189
194
  {
190
- colSpan: z ? T ? w.length + 2 : w.length + 1 : w.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: w,
198
- onRowClick: E,
199
- rowKey: c,
202
+ columns: x,
203
+ onRowClick: g,
204
+ rowKey: N,
200
205
  hasNumbers: m,
201
- hasSearch: z,
202
- exportOptions: T,
206
+ hasSearch: L,
207
+ exportOptions: E,
203
208
  hasCheckbox: s,
204
- hasPagination: i,
205
- isStickyHeader: x,
209
+ hasPagination: z,
210
+ isStickyHeader: c,
206
211
  onParamChange: t,
207
- dataKey: n = "docs",
208
- loading: L,
209
- tableKey: p,
210
- filters: A,
211
- actions: R,
212
- handleFilterChange: D,
213
- params: k,
212
+ dataKey: R = "docs",
213
+ loading: n,
214
+ tableKey: i,
215
+ filters: T,
216
+ actions: k,
217
+ handleFilterChange: A,
218
+ params: D,
214
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,
224
+ actionProps: F,
225
+ filterWrapperProps: S,
226
+ exportOptionsProps: V,
227
+ columnsVisibilityProps: w,
223
228
  paginationProps: u,
224
229
  searchProps: v,
225
- ...V
230
+ ...a
226
231
  }) => {
227
- var Y;
228
- const { t: _ } = b(), [$, a] = ge([]), { formattedColumns: y, handleColumnsChange: C, resetColumns: P } = Te({ key: p, columns: w });
229
- return Q(() => {
232
+ var Z;
233
+ const { t: _ } = K(), [$, C] = ge([]), { formattedColumns: y, handleColumnsChange: P, resetColumns: ee } = Te({ key: i, columns: x });
234
+ return Y(() => {
230
235
  W == null || W(y);
231
- }, [y, W]), Q(() => {
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: "space-y-4 p-4", children: [
239
- (z || d && p || !M.isEmpty(T) || !M.isEmpty(A)) && /* @__PURE__ */ N("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 lg:flex-row", children: [
240
- /* @__PURE__ */ e("div", { className: "w-full shrink-0 grow lg:w-auto", children: z && /* @__PURE__ */ e(
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(
241
246
  ve,
242
247
  {
243
248
  ...v,
@@ -245,142 +250,136 @@ const ye = we(function({
245
250
  ...v == null ? void 0 : v.inputProps,
246
251
  className: o(
247
252
  "h-8 grow",
248
- (Y = v == null ? void 0 : v.inputProps) == null ? void 0 : Y.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-78 [&_button]:-top-1",
257
+ "max-w-full lg:max-w-80! [&_button]:-top-1",
253
258
  v == null ? void 0 : v.className
254
259
  ),
255
- defaultValue: M.get(k, "search", ""),
256
- onSearchChange: (f) => t == null ? void 0 : t({ ...k, search: f, 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(
260
- "div",
261
- {
262
- className: "flex w-full shrink items-center justify-end gap-3 lg:w-auto",
263
- children: [
264
- T && /* @__PURE__ */ e(
265
- ke,
266
- {
267
- ...S,
268
- options: T,
269
- loading: J
270
- }
271
- ),
272
- d && p && /* @__PURE__ */ N(le, { children: [
273
- /* @__PURE__ */ e(
274
- de,
275
- {
276
- asChild: !0,
277
- className: "grow",
278
- ...g == null ? void 0 : g.triggerProps,
279
- children: /* @__PURE__ */ e(
280
- q,
281
- {
282
- variant: "secondary",
283
- size: "sm",
284
- className: "ml-auto rounded-lg px-3",
285
- children: (g == null ? void 0 : g.title) || /* @__PURE__ */ N(O, { children: [
286
- /* @__PURE__ */ e(ee, {}),
287
- " ",
288
- /* @__PURE__ */ e("span", { className: "hidden md:inline!", children: _("Customize columns") }),
289
- /* @__PURE__ */ e(te, {})
290
- ] })
291
- }
292
- )
293
- }
294
- ),
295
- /* @__PURE__ */ N(
296
- se,
264
+ /* @__PURE__ */ p("div", { className: "flex items-center justify-end gap-3", children: [
265
+ E && /* @__PURE__ */ e(
266
+ De,
267
+ {
268
+ ...V,
269
+ options: E,
270
+ loading: J
271
+ }
272
+ ),
273
+ d && i && /* @__PURE__ */ p(de, { children: [
274
+ /* @__PURE__ */ e(
275
+ se,
276
+ {
277
+ asChild: !0,
278
+ className: "grow",
279
+ ...w == null ? void 0 : w.triggerProps,
280
+ children: /* @__PURE__ */ e(
281
+ Q,
297
282
  {
298
- align: "end",
299
- ...g == null ? void 0 : g.contentProps,
300
- children: [
301
- /* @__PURE__ */ N(
302
- ie,
303
- {
304
- className: "capitalize",
305
- onClick: P,
306
- children: [
307
- /* @__PURE__ */ e(xe, {}),
308
- " ",
309
- (g == null ? void 0 : g.resetText) || _("Reset columns")
310
- ]
311
- }
312
- ),
313
- /* @__PURE__ */ e(fe, {}),
314
- y.map((f) => /* @__PURE__ */ e(
315
- re,
316
- {
317
- className: "capitalize",
318
- checked: !f.hidden,
319
- onCheckedChange: (h) => C(f, !h),
320
- children: f.name
321
- },
322
- f.key
323
- ))
324
- ]
283
+ variant: "secondary",
284
+ size: "sm",
285
+ className: "ml-auto rounded-lg px-3",
286
+ children: (w == null ? void 0 : w.title) || /* @__PURE__ */ p(b, { children: [
287
+ /* @__PURE__ */ e(te, {}),
288
+ " ",
289
+ /* @__PURE__ */ e("span", { className: "hidden md:inline!", children: _("Customize columns") }),
290
+ /* @__PURE__ */ e(le, {})
291
+ ] })
325
292
  }
326
293
  )
327
- ] }),
328
- R && /* @__PURE__ */ e(De, { ...K, actions: R }),
329
- A && /* @__PURE__ */ e(
330
- Ae,
331
- {
332
- ...F,
333
- filters: A,
334
- params: k,
335
- onChange: D,
336
- onFilter: (f) => {
337
- t == null || t({ ...f, page: 1 }), D == null || D(f);
338
- }
339
- }
340
- )
341
- ]
342
- }
343
- )
294
+ }
295
+ ),
296
+ /* @__PURE__ */ p(
297
+ ie,
298
+ {
299
+ align: "end",
300
+ ...w == null ? void 0 : w.contentProps,
301
+ children: [
302
+ /* @__PURE__ */ p(
303
+ fe,
304
+ {
305
+ className: "capitalize",
306
+ onClick: ee,
307
+ children: [
308
+ /* @__PURE__ */ e(me, {}),
309
+ " ",
310
+ (w == null ? void 0 : w.resetText) || _("Reset columns")
311
+ ]
312
+ }
313
+ ),
314
+ /* @__PURE__ */ e(re, {}),
315
+ y.map((f) => /* @__PURE__ */ e(
316
+ pe,
317
+ {
318
+ className: "capitalize",
319
+ checked: !f.hidden,
320
+ onCheckedChange: (G) => P(f, !G),
321
+ children: f.name
322
+ },
323
+ f.key
324
+ ))
325
+ ]
326
+ }
327
+ )
328
+ ] }),
329
+ k && /* @__PURE__ */ e(Ae, { ...F, actions: k }),
330
+ T && /* @__PURE__ */ e(
331
+ Me,
332
+ {
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);
339
+ }
340
+ }
341
+ )
342
+ ] })
344
343
  ] }),
345
- B && !M.isEmpty(A) && /* @__PURE__ */ e(
344
+ B && !M.isEmpty(T) && /* @__PURE__ */ e(
346
345
  ye,
347
346
  {
348
- filters: A,
349
- params: k,
347
+ filters: T,
348
+ params: D,
350
349
  onFilter: (f) => {
351
- t == null || t({ ...f, page: 1 }), D == null || D(f);
350
+ t == null || t({ ...f, page: 1 }), A == null || A(f);
352
351
  }
353
352
  }
354
353
  )
355
354
  ] }),
356
- /* @__PURE__ */ e("div", { className: "flex flex-col overflow-auto border-y", children: L ? /* @__PURE__ */ e(ze, {}) : /* @__PURE__ */ e(
355
+ /* @__PURE__ */ e("div", { className: "flex flex-col overflow-auto border-y", children: n ? /* @__PURE__ */ e(ke, {}) : /* @__PURE__ */ e(
357
356
  He,
358
357
  {
359
- ...V,
358
+ ...a,
360
359
  params: {
361
360
  page: (l == null ? void 0 : l.page) || 1,
362
361
  limit: l == null ? void 0 : l.limit,
363
- ...k
362
+ ...D
364
363
  },
365
- rows: M.get(l, n, []),
366
- rowKey: c,
364
+ rows: M.get(l, R, []),
365
+ rowKey: N,
367
366
  selectedItems: $,
368
- isStickyHeader: x,
367
+ isStickyHeader: c,
369
368
  columns: y,
370
369
  hasCheckbox: s,
371
370
  hasNumbers: m,
372
- onRowClick: E,
373
- onSelectedItemsChange: a,
374
- onSortOrderChange: ({ sortField: f, sortOrder: h }) => {
375
- t == null || t({ ...k, sortField: f, sortOrder: h });
371
+ onRowClick: g,
372
+ onSelectedItemsChange: C,
373
+ onSortOrderChange: ({ sortField: f, sortOrder: G }) => {
374
+ t == null || t({ ...D, sortField: f, sortOrder: G });
376
375
  }
377
376
  }
378
377
  ) }),
379
- i && /* @__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: [
380
379
  /* @__PURE__ */ e("div", { className: "text-sm", children: /* @__PURE__ */ e(
381
380
  Le,
382
381
  {
383
- onLimitChange: (f) => t == null ? void 0 : t({ ...k, limit: f, page: 1 }),
382
+ onLimitChange: (f) => t == null ? void 0 : t({ ...D, limit: f, page: 1 }),
384
383
  defaultValue: l == null ? void 0 : l.limit
385
384
  }
386
385
  ) }),
@@ -392,7 +391,7 @@ const ye = we(function({
392
391
  Re,
393
392
  {
394
393
  ...u,
395
- onPageChange: (f) => t == null ? void 0 : t({ ...k, page: f }),
394
+ onPageChange: (f) => t == null ? void 0 : t({ ...D, page: f }),
396
395
  currentPage: l == null ? void 0 : l.page,
397
396
  totalPages: l == null ? void 0 : l.totalPages
398
397
  }