zaravand-ui 7.0.0 → 7.0.2

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 (57) hide show
  1. package/README.md +45 -45
  2. package/dist/components/Dialog/Dialog.cjs +1 -1
  3. package/dist/components/Dialog/Dialog.js +1 -1
  4. package/dist/components/Select/Select.cjs +1 -1
  5. package/dist/components/Select/Select.d.cts +4 -1
  6. package/dist/components/Select/Select.d.ts +4 -1
  7. package/dist/components/Select/Select.interface.d.cts +15 -1
  8. package/dist/components/Select/Select.interface.d.ts +15 -1
  9. package/dist/components/Select/Select.js +697 -566
  10. package/dist/components/Table/Table.cjs +1 -1
  11. package/dist/components/Table/Table.constants.cjs +1 -1
  12. package/dist/components/Table/Table.constants.d.cts +1 -0
  13. package/dist/components/Table/Table.constants.d.ts +1 -0
  14. package/dist/components/Table/Table.constants.js +2 -2
  15. package/dist/components/Table/Table.interface.d.cts +39 -0
  16. package/dist/components/Table/Table.interface.d.ts +39 -0
  17. package/dist/components/Table/Table.js +448 -371
  18. package/dist/components/Table/Table.utils.cjs +1 -1
  19. package/dist/components/Table/Table.utils.d.cts +10 -1
  20. package/dist/components/Table/Table.utils.d.ts +10 -1
  21. package/dist/components/Table/Table.utils.js +23 -1
  22. package/dist/components/Table/Table.variant.cjs +1 -1
  23. package/dist/components/Table/Table.variant.d.cts +5 -0
  24. package/dist/components/Table/Table.variant.d.ts +5 -0
  25. package/dist/components/Table/Table.variant.js +17 -11
  26. package/dist/components/Table/TableActiveFilters.cjs +1 -0
  27. package/dist/components/Table/TableActiveFilters.d.cts +12 -0
  28. package/dist/components/Table/TableActiveFilters.d.ts +12 -0
  29. package/dist/components/Table/TableActiveFilters.js +55 -0
  30. package/dist/components/Table/TableColumnFilter.cjs +1 -0
  31. package/dist/components/Table/TableColumnFilter.d.cts +17 -0
  32. package/dist/components/Table/TableColumnFilter.d.ts +17 -0
  33. package/dist/components/Table/TableColumnFilter.js +70 -0
  34. package/dist/components/Table/TableEmptyState.cjs +1 -1
  35. package/dist/components/Table/TableEmptyState.d.cts +1 -1
  36. package/dist/components/Table/TableEmptyState.d.ts +1 -1
  37. package/dist/components/Table/TableEmptyState.js +16 -7
  38. package/dist/components/Table/TableSkeletonRows.cjs +1 -1
  39. package/dist/components/Table/TableSkeletonRows.js +7 -7
  40. package/dist/components/Table/TableSortToggle.cjs +1 -1
  41. package/dist/components/Table/TableSortToggle.js +8 -8
  42. package/dist/components/Table/hooks/useTableFilter.cjs +1 -0
  43. package/dist/components/Table/hooks/useTableFilter.d.cts +18 -0
  44. package/dist/components/Table/hooks/useTableFilter.d.ts +18 -0
  45. package/dist/components/Table/hooks/useTableFilter.js +49 -0
  46. package/dist/components/Uploader/Uploader.variant.cjs +1 -1
  47. package/dist/components/Uploader/Uploader.variant.d.cts +1 -1
  48. package/dist/components/Uploader/Uploader.variant.d.ts +1 -1
  49. package/dist/components/Uploader/Uploader.variant.js +1 -1
  50. package/dist/config/messages.cjs +1 -1
  51. package/dist/config/messages.d.cts +4 -0
  52. package/dist/config/messages.d.ts +4 -0
  53. package/dist/config/messages.js +10 -2
  54. package/dist/index.css +1 -1
  55. package/dist/index.d.cts +1 -1
  56. package/dist/index.d.ts +1 -1
  57. package/package.json +99 -98
@@ -11,39 +11,42 @@ import { useExclusiveAction as te } from "../shared/useExclusiveAction.js";
11
11
  import { useStickyToolbar as ne } from "../shared/useStickyToolbar.js";
12
12
  import { useIsMobileViewport as re } from "../shared/viewport.js";
13
13
  import ie from "../Select/Select.js";
14
- import { tableContainerVariants as ae, tableVariants as oe } from "./Table.variant.js";
15
- import se from "./TableEmptyState.js";
16
- import ce from "./TablePaginationControls.js";
17
- import { actionIconClassName as le, actionsColumnClassName as ue, actionsColumnStickyClassName as de, pagingToggleIconClassName as fe, rowActionButtonClassName as pe, rowNumberColumnClassName as me, stickyHeaderCellClassName as he } from "./Table.constants.js";
18
- import { TableBody as ge, TableCell as u, TableHead as d, TableHeader as _e, TableRow as ve } from "./TableParts.js";
19
- import { formatCellValue as ye, replaceRowByIdentifier as be, resolveAriaSort as xe, resolveColumnWidthPercentages as Se, resolveLoadingRowsCount as Ce, resolvePlaceholder as we, resolveSafeRowId as Te } from "./Table.utils.js";
20
- import Ee from "./TableSkeletonRows.js";
21
- import De from "./TableSortToggle.js";
22
- import { useTablePagination as Oe } from "./hooks/useTablePagination.js";
23
- import { useTableCardLabels as ke } from "./hooks/useTableCardLabels.js";
24
- import { useTableSearch as Ae } from "./hooks/useTableSearch.js";
25
- import { useTableSort as je } from "./hooks/useTableSort.js";
26
- import * as f from "react";
27
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
28
- import { ArrowDown as Me, ArrowUp as Ne, ArrowUpDown as Pe, EllipsisVertical as Fe, Eye as Ie, FileSpreadsheet as Le, Infinity as Re, Pencil as ze, Plus as Be, Printer as Ve, RotateCcw as He, Rows3 as Ue, Trash2 as We } from "lucide-react";
14
+ import { actionIconClassName as ae, actionsColumnClassName as oe, actionsColumnStickyClassName as se, pagingToggleIconClassName as ce, rowActionButtonClassName as le, rowNumberColumnClassName as ue, stickyHeaderCellClassName as de } from "./Table.constants.js";
15
+ import { formatCellValue as fe, isEmptyFilterValue as pe, replaceRowByIdentifier as me, resolveAriaSort as he, resolveColumnWidthPercentages as ge, resolveFilterOptions as _e, resolveFilterText as ve, resolveLoadingRowsCount as ye, resolvePlaceholder as be, resolveSafeRowId as xe } from "./Table.utils.js";
16
+ import { tableContainerVariants as Se, tableVariants as Ce } from "./Table.variant.js";
17
+ import we from "./TableActiveFilters.js";
18
+ import Te, { TableColumnFilterSheet as Ee } from "./TableColumnFilter.js";
19
+ import De from "./TableEmptyState.js";
20
+ import Oe from "./TablePaginationControls.js";
21
+ import { TableBody as ke, TableCell as u, TableHead as Ae, TableHeader as je, TableRow as Me } from "./TableParts.js";
22
+ import Ne from "./TableSkeletonRows.js";
23
+ import Pe from "./TableSortToggle.js";
24
+ import { useTablePagination as Fe } from "./hooks/useTablePagination.js";
25
+ import { useTableCardLabels as Ie } from "./hooks/useTableCardLabels.js";
26
+ import { useTableFilter as Le } from "./hooks/useTableFilter.js";
27
+ import { useTableSearch as Re } from "./hooks/useTableSearch.js";
28
+ import { useTableSort as ze } from "./hooks/useTableSort.js";
29
+ import * as d from "react";
30
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
31
+ import { ArrowDown as Be, ArrowUp as Ve, ArrowUpDown as He, EllipsisVertical as Ue, Eye as We, FileSpreadsheet as Ge, Funnel as Ke, Infinity as qe, Pencil as Je, Plus as Ye, Printer as Xe, RotateCcw as Ze, Rows3 as Qe, Trash2 as $e } from "lucide-react";
29
32
  //#region src/components/Table/Table.tsx
30
- var Ge = f.forwardRef(function({ className: Ge, containerClassName: Ke, loading: g = !1, isMutating: _ = !1, stickyHeaderOnScroll: qe = !0, maxVisibleRowsBeforeScroll: Je, allowInfiniteMode: Ye = !0, stickyToolbar: Xe = !0, schema: v, data: y, setData: Ze, onAdd: b, onImportExcel: x, onEdit: S, onDelete: C, onPrint: w, onPreviewPrint: T, actions: Qe, onCellSelectChange: $e, getRowId: E, showNumberRow: et = !1, showColumnBorder: tt = !1, showRowBorder: nt = !1, toolbarExtra: rt, children: it }, at) {
31
- let { messages: D, digits: O, dir: ot } = e(), st = f.useMemo(() => ({
32
- digits: O,
33
- messages: D
34
- }), [O, D]), k = f.Children.count(it) > 0, A = re(), ct = f.useRef(null), lt = f.useMemo(() => r(at, ct), [at]);
35
- ke(ct, k);
36
- let j = f.useMemo(() => v.columns.filter((e) => e.view), [v.columns]), ut = f.useMemo(() => j.filter((e) => e.sortable), [j]), M = typeof b == "function", N = typeof x == "function", P = typeof S == "function", F = typeof C == "function", I = typeof w == "function", L = typeof T == "function", R = Qe ?? [], dt = R.length > 0, z = v.searchable ?? !1, B = et && !k, ft = rt != null && rt !== !1, pt = v.pagination, mt = pt?.onSearchChange, ht = typeof mt == "function", V = P || F || dt, { rowNumberColumnStyle: gt, columnStyleByKey: _t, actionsColumnStyle: vt } = f.useMemo(() => Se(j, B, V), [
37
- V,
38
- B,
39
- j
40
- ]), yt = f.useMemo(() => {
41
- let e = v.columns.map((e) => {
33
+ var et = d.forwardRef(function({ className: et, containerClassName: tt, loading: h = !1, isMutating: g = !1, stickyHeaderOnScroll: nt = !0, maxVisibleRowsBeforeScroll: rt, allowInfiniteMode: it = !0, stickyToolbar: at = !0, schema: _, data: v, setData: ot, onAdd: y, onImportExcel: b, onEdit: x, onDelete: st, onPrint: ct, onPreviewPrint: lt, actions: ut, onCellSelectChange: dt, getRowId: S, showNumberRow: ft = !1, showColumnBorder: pt = !1, showRowBorder: mt = !1, toolbarExtra: ht, children: gt }, _t) {
34
+ let { messages: C, digits: w, dir: T } = e(), E = d.useMemo(() => ({
35
+ digits: w,
36
+ messages: C
37
+ }), [w, C]), D = d.Children.count(gt) > 0, O = re(), vt = d.useRef(null), yt = d.useMemo(() => r(_t, vt), [_t]);
38
+ Ie(vt, D);
39
+ let k = d.useMemo(() => _.columns.filter((e) => e.view), [_.columns]), bt = d.useMemo(() => k.filter((e) => e.sortable), [k]), A = d.useMemo(() => k.filter((e) => e.filterable), [k]), xt = typeof y == "function", j = typeof b == "function", M = typeof x == "function", N = typeof st == "function", P = typeof ct == "function", F = typeof lt == "function", I = ut ?? [], St = I.length > 0, L = _.searchable ?? !1, R = ft && !D, Ct = ht != null && ht !== !1, wt = _.pagination, Tt = wt?.onSearchChange, Et = typeof Tt == "function", z = M || N || St, { rowNumberColumnStyle: Dt, columnStyleByKey: Ot, actionsColumnStyle: kt } = d.useMemo(() => ge(k, R, z), [
40
+ z,
41
+ R,
42
+ k
43
+ ]), At = d.useMemo(() => {
44
+ let e = _.columns.map((e) => {
42
45
  if (e.type !== "select" && e.type !== "radio") return [e.key, []];
43
46
  if (Array.isArray(e.options) && e.options.length > 0) return [e.key, e.options];
44
47
  if (e.optionsSource) return [e.key, []];
45
48
  let t = /* @__PURE__ */ new Set();
46
- return y.forEach((n) => {
49
+ return v.forEach((n) => {
47
50
  let r = n[e.key];
48
51
  if (typeof r == "string" || typeof r == "number") {
49
52
  let e = String(r).trim();
@@ -55,48 +58,48 @@ var Ge = f.forwardRef(function({ className: Ge, containerClassName: Ke, loading:
55
58
  }))];
56
59
  });
57
60
  return Object.fromEntries(e);
58
- }, [y, v.columns]), [bt, H] = te(), [xt, St] = f.useState(!1), [Ct, wt] = f.useState(!1), [Tt, Et] = f.useState({
61
+ }, [v, _.columns]), [jt, B] = te(), [Mt, Nt] = d.useState(!1), [Pt, Ft] = d.useState(!1), [It, Lt] = d.useState(!1), [Rt, zt] = d.useState(null), [Bt, Vt] = d.useState(!1), [Ht, Ut] = d.useState({
59
62
  open: !1,
60
63
  actions: []
61
- }), U = _ || bt, Dt = f.useCallback(async () => {
62
- _ || !b || await H(b);
64
+ }), V = g || jt, Wt = d.useCallback(async () => {
65
+ g || !y || await B(y);
63
66
  }, [
64
- _,
65
- b,
66
- H
67
- ]), Ot = f.useCallback(async () => {
68
- _ || !x || await H(x);
67
+ g,
68
+ y,
69
+ B
70
+ ]), Gt = d.useCallback(async () => {
71
+ g || !b || await B(b);
69
72
  }, [
70
- _,
71
- x,
72
- H
73
- ]), W = f.useCallback(async (e, t, n, r) => {
74
- _ || await H(() => e({
73
+ g,
74
+ b,
75
+ B
76
+ ]), H = d.useCallback(async (e, t, n, r) => {
77
+ g || await B(() => e({
75
78
  row: t,
76
79
  rowIndex: n,
77
- rowId: r ?? Te(t, n, E)
80
+ rowId: r ?? xe(t, n, S)
78
81
  }));
79
82
  }, [
80
- E,
81
- _,
82
- H
83
- ]), kt = f.useCallback(async (e, t, n) => {
84
- S && await W(S, e, t, n);
85
- }, [S, W]), At = f.useCallback(async (e, t, n) => {
86
- C && await W(C, e, t, n);
87
- }, [C, W]), jt = f.useCallback(async (e, t, n, r) => {
88
- await W(e.onClick, t, n, r);
89
- }, [W]), Mt = f.useCallback(async (e, t, n, r, i) => {
90
- if (_) return;
83
+ S,
84
+ g,
85
+ B
86
+ ]), Kt = d.useCallback(async (e, t, n) => {
87
+ x && await H(x, e, t, n);
88
+ }, [x, H]), qt = d.useCallback(async (e, t, n) => {
89
+ st && await H(st, e, t, n);
90
+ }, [st, H]), Jt = d.useCallback(async (e, t, n, r) => {
91
+ await H(e.onClick, t, n, r);
92
+ }, [H]), Yt = d.useCallback(async (e, t, n, r, i) => {
93
+ if (g) return;
91
94
  let a = i.trim(), o = a.length > 0 ? a : null;
92
95
  if (e[r] === o) return;
93
- let s = n ?? Te(e, t, E), c = {
96
+ let s = n ?? xe(e, t, S), c = {
94
97
  ...e,
95
98
  [r]: o
96
99
  };
97
- await H(async () => {
100
+ await B(async () => {
98
101
  try {
99
- if ($e && await $e({
102
+ if (dt && await dt({
100
103
  row: c,
101
104
  previousRow: e,
102
105
  rowIndex: t,
@@ -104,475 +107,549 @@ var Ge = f.forwardRef(function({ className: Ge, containerClassName: Ke, loading:
104
107
  columnKey: r,
105
108
  value: a
106
109
  }) === !1) return;
107
- Ze((e) => be(e, t, s, E, c));
110
+ ot((e) => me(e, t, s, S, c));
108
111
  } catch {
109
112
  return;
110
113
  }
111
114
  });
112
115
  }, [
113
- E,
114
- _,
115
- $e,
116
- H,
117
- Ze
118
- ]), Nt = f.useCallback((e, t, r) => {
119
- let i = (e) => /* @__PURE__ */ m("span", {
116
+ S,
117
+ g,
118
+ dt,
119
+ B,
120
+ ot
121
+ ]), Xt = d.useCallback((e, t, r) => {
122
+ let i = (e) => /* @__PURE__ */ p("span", {
120
123
  className: n("zui:inline-flex", s, "zui:[&>svg]:size-full"),
121
124
  children: e
122
125
  }), a = [];
123
- P && a.push({
126
+ M && a.push({
124
127
  key: "edit",
125
- label: D.common.edit,
126
- icon: i(/* @__PURE__ */ m(ze, { "aria-hidden": "true" })),
127
- onSelect: () => void kt(e, t, r)
128
- }), R.forEach((n, o) => {
128
+ label: C.common.edit,
129
+ icon: i(/* @__PURE__ */ p(Je, { "aria-hidden": "true" })),
130
+ onSelect: () => void Kt(e, t, r)
131
+ }), I.forEach((n, o) => {
129
132
  a.push({
130
133
  key: `custom-${o}`,
131
134
  label: n.tooltip,
132
135
  icon: i(n.icon),
133
- onSelect: () => void jt(n, e, t, r)
136
+ onSelect: () => void Jt(n, e, t, r)
134
137
  });
135
- }), F && a.push({
138
+ }), N && a.push({
136
139
  key: "delete",
137
- label: D.common.delete,
138
- icon: i(/* @__PURE__ */ m(We, { "aria-hidden": "true" })),
140
+ label: C.common.delete,
141
+ icon: i(/* @__PURE__ */ p($e, { "aria-hidden": "true" })),
139
142
  danger: !0,
140
- onSelect: () => void At(e, t, r)
141
- }), Et({
143
+ onSelect: () => void qt(e, t, r)
144
+ }), Ut({
142
145
  open: !0,
143
146
  actions: a
144
147
  });
145
148
  }, [
146
- jt,
147
- At,
148
- kt,
149
- D.common.delete,
150
- D.common.edit,
151
- R,
152
- F,
153
- P
154
- ]), { searchTerm: Pt, normalizedSearchTerm: Ft, filteredRows: It, handleSearchInputChange: Lt } = Ae({
155
- data: y,
156
- visibleColumns: j,
157
- showSearchInput: z,
158
- hasRemoteSearchHandler: ht,
159
- onSearchChange: mt,
160
- getRowId: E,
161
- cellFormatOptions: st
162
- }), { sortedRows: G, activeSort: K, handleSortToggle: Rt, handleSortClear: zt } = je({
163
- rows: It,
164
- columns: v.columns,
165
- sortConfig: v.sort
166
- }), Bt = f.useCallback(async () => {
167
- w && await w({
149
+ Jt,
150
+ qt,
151
+ Kt,
152
+ C.common.delete,
153
+ C.common.edit,
154
+ I,
155
+ N,
156
+ M
157
+ ]), { searchTerm: Zt, normalizedSearchTerm: Qt, filteredRows: $t, handleSearchInputChange: en } = Re({
158
+ data: v,
159
+ visibleColumns: k,
160
+ showSearchInput: L,
161
+ hasRemoteSearchHandler: Et,
162
+ onSearchChange: Tt,
163
+ getRowId: S,
164
+ cellFormatOptions: E
165
+ }), { filteredRows: tn, filterValues: U, activeFilterCount: nn, filterKey: rn, handleFilterChange: an, handleFilterClear: on } = Le({
166
+ rows: $t,
167
+ columns: _.columns,
168
+ filterConfig: _.filter
169
+ }), W = d.useMemo(() => Object.fromEntries(A.map((e) => [e.key, _e(e, v, E)])), [
170
+ E,
171
+ v,
172
+ A
173
+ ]), { sortedRows: G, activeSort: K, handleSortToggle: sn, handleSortClear: cn } = ze({
174
+ rows: tn,
175
+ columns: _.columns,
176
+ sortConfig: _.sort
177
+ }), ln = d.useCallback(async () => {
178
+ ct && await ct({
168
179
  rows: G.map(({ row: e }) => e),
169
- columns: j
180
+ columns: k
170
181
  });
171
182
  }, [
172
- w,
183
+ ct,
173
184
  G,
174
- j
175
- ]), Vt = f.useCallback(async () => {
176
- T && await T({
185
+ k
186
+ ]), un = d.useCallback(async () => {
187
+ lt && await lt({
177
188
  rows: G.map(({ row: e }) => e),
178
- columns: j
189
+ columns: k
179
190
  });
180
191
  }, [
181
- T,
192
+ lt,
182
193
  G,
183
- j
184
- ]), { pagingMode: q, currentPage: Ht, totalPages: Ut, resolvedPageSize: Wt, visibleRows: J, showPagingModeToggle: Y, shouldRenderPagination: Gt, shouldRenderInfiniteMode: Kt, canLoadMoreInInfiniteMode: qt, shouldUseRemotePaging: Jt, shouldUseScrollableRows: Yt, tableScrollViewportRef: Xt, tableScrollViewportStyle: Zt, handlePageChange: Qt, handlePagingModeToggle: $t, handleTableScrollViewport: en, isInfiniteRequestPending: tn } = Oe({
185
- hasChildren: k,
194
+ k
195
+ ]), { pagingMode: q, currentPage: dn, totalPages: fn, resolvedPageSize: pn, visibleRows: J, showPagingModeToggle: mn, shouldRenderPagination: hn, shouldRenderInfiniteMode: gn, canLoadMoreInInfiniteMode: _n, shouldUseRemotePaging: vn, shouldUseScrollableRows: yn, tableScrollViewportRef: bn, tableScrollViewportStyle: xn, handlePageChange: Sn, handlePagingModeToggle: Cn, handleTableScrollViewport: wn, isInfiniteRequestPending: Tn } = Fe({
196
+ hasChildren: D,
186
197
  filteredRows: G,
187
- paginationConfig: pt,
188
- loading: g,
189
- isRowActionBusy: U,
190
- searchKey: Ft,
198
+ paginationConfig: wt,
199
+ loading: h,
200
+ isRowActionBusy: V,
201
+ searchKey: `${Qt}|${rn}`,
191
202
  sortKey: K ? `${K.sortKey}:${K.direction}` : "",
192
- maxVisibleRowsBeforeScroll: Je,
193
- allowInfiniteMode: Ye
194
- }), X = Yt && qe, nn = f.useMemo(() => Ce(v.pagination?.pageSize, y.length), [y.length, v.pagination?.pageSize]), rn = g && (J.length === 0 || Jt && q === "pagination"), an = Kt && g && J.length > 0, on = Kt && J.length > 0, sn = on && (g || tn), cn = on && qt && !g && !tn, ln = on && !qt && !g && !tn, un = Math.min(nn, Math.max(1, Math.min(Wt, 3))), Z = g || U, dn = +!!P + R.length + +!!F, fn = q === "pagination" ? D.table.switchToInfinite : D.table.switchToPagination, pn = M || N || Y || I || L, Q = A && !k && ut.length > 0, $ = !k && (z || pn || Q), mn = f.useRef(null), hn = f.useRef(null);
195
- ne(mn, hn, A && Xe && $);
196
- let gn = f.useMemo(() => {
197
- let e = (e) => /* @__PURE__ */ m(e, {
203
+ maxVisibleRowsBeforeScroll: rt,
204
+ allowInfiniteMode: it
205
+ }), En = yn && nt, Dn = d.useMemo(() => ye(_.pagination?.pageSize, v.length), [v.length, _.pagination?.pageSize]), On = h && (J.length === 0 || vn && q === "pagination"), kn = gn && h && J.length > 0, An = gn && J.length > 0, jn = An && (h || Tn), Mn = An && _n && !h && !Tn, Nn = An && !_n && !h && !Tn, Pn = Math.min(Dn, Math.max(1, Math.min(pn, 3))), Y = h || V, Fn = +!!M + I.length + +!!N, In = q === "pagination" ? C.table.switchToInfinite : C.table.switchToPagination, Ln = xt || j || mn || P || F, X = O && !D && bt.length > 0, Z = O && !D && A.length > 0, Q = !D && (L || Ln || X || Z), Rn = d.useRef(null), zn = d.useRef(null);
206
+ ne(Rn, zn, O && at && Q);
207
+ let Bn = d.useMemo(() => {
208
+ let e = (e) => /* @__PURE__ */ p(e, {
198
209
  className: s,
199
210
  "aria-hidden": "true"
200
- }), n = ut.map((n) => {
201
- let r = K?.sortKey === n.key ? K.direction : void 0, i = t(n.label, O);
211
+ }), n = bt.map((n) => {
212
+ let r = K?.sortKey === n.key ? K.direction : void 0, i = t(n.label, w);
202
213
  return {
203
214
  key: n.key,
204
- label: r === void 0 ? i : `${i} (${r === "asc" ? D.table.sortAscending : D.table.sortDescending})`,
205
- icon: e(r === "asc" ? Ne : r === "desc" ? Me : Pe),
215
+ label: r === void 0 ? i : `${i} (${r === "asc" ? C.table.sortAscending : C.table.sortDescending})`,
216
+ icon: e(r === "asc" ? Ve : r === "desc" ? Be : He),
206
217
  active: r !== void 0,
207
- onSelect: () => Rt(n.key)
218
+ onSelect: () => sn(n.key)
208
219
  };
209
220
  });
210
221
  return K && n.push({
211
222
  key: "clear-sort",
212
- label: D.table.sortDefault,
213
- icon: e(He),
214
- onSelect: zt
223
+ label: C.table.sortDefault,
224
+ icon: e(Ze),
225
+ onSelect: cn
215
226
  }), n;
216
227
  }, [
217
228
  K,
218
- O,
219
- zt,
220
- Rt,
221
- D.table.sortAscending,
222
- D.table.sortDefault,
223
- D.table.sortDescending,
224
- ut
225
- ]), _n = f.useMemo(() => {
226
- let e = (e) => /* @__PURE__ */ m(e, {
229
+ w,
230
+ cn,
231
+ sn,
232
+ C.table.sortAscending,
233
+ C.table.sortDefault,
234
+ C.table.sortDescending,
235
+ bt
236
+ ]), Vn = d.useCallback((e) => {
237
+ zt(e), Vt(!0);
238
+ }, []), Hn = d.useMemo(() => A.map((e) => {
239
+ let n = U[e.key], r = n !== void 0 && !pe(n), i = t(e.label, w), a = r ? t(ve(n, W[e.key] ?? []), w) : "";
240
+ return {
241
+ key: e.key,
242
+ label: r ? `${i}: ${a}` : i,
243
+ icon: /* @__PURE__ */ p(Ke, {
244
+ className: s,
245
+ fill: r ? "currentColor" : "none",
246
+ "aria-hidden": "true"
247
+ }),
248
+ active: r,
249
+ onSelect: () => Vn(e.key)
250
+ };
251
+ }), [
252
+ w,
253
+ W,
254
+ U,
255
+ A,
256
+ Vn
257
+ ]), $ = A.find((e) => e.key === Rt), Un = d.useMemo(() => {
258
+ let e = (e) => /* @__PURE__ */ p(e, {
227
259
  className: s,
228
260
  "aria-hidden": "true"
229
261
  });
230
262
  return [
231
- M ? {
263
+ xt ? {
232
264
  key: "add",
233
- label: D.common.add,
234
- icon: e(Be),
235
- onSelect: () => void Dt()
265
+ label: C.common.add,
266
+ icon: e(Ye),
267
+ onSelect: () => void Wt()
236
268
  } : null,
237
- N ? {
269
+ j ? {
238
270
  key: "import",
239
- label: D.table.importExcel,
240
- icon: e(Le),
241
- onSelect: () => void Ot()
271
+ label: C.table.importExcel,
272
+ icon: e(Ge),
273
+ onSelect: () => void Gt()
242
274
  } : null,
243
- I ? {
275
+ P ? {
244
276
  key: "print",
245
- label: D.table.print,
246
- icon: e(Ve),
247
- onSelect: () => void Bt()
277
+ label: C.table.print,
278
+ icon: e(Xe),
279
+ onSelect: () => void ln()
248
280
  } : null,
249
- L ? {
281
+ F ? {
250
282
  key: "preview-print",
251
- label: D.table.printPreview,
252
- icon: e(Ie),
253
- onSelect: () => void Vt()
283
+ label: C.table.printPreview,
284
+ icon: e(We),
285
+ onSelect: () => void un()
254
286
  } : null,
255
- Y ? {
287
+ mn ? {
256
288
  key: "paging-mode",
257
- label: fn,
258
- icon: e(q === "pagination" ? Re : Ue),
259
- onSelect: $t
289
+ label: In,
290
+ icon: e(q === "pagination" ? qe : Qe),
291
+ onSelect: Cn
260
292
  } : null
261
293
  ].filter((e) => e !== null);
262
294
  }, [
263
- Dt,
264
- Ot,
265
- $t,
266
- Vt,
267
- Bt,
268
- D.common.add,
269
- D.table.importExcel,
270
- D.table.print,
271
- D.table.printPreview,
295
+ Wt,
296
+ Gt,
297
+ Cn,
298
+ un,
299
+ ln,
300
+ C.common.add,
301
+ C.table.importExcel,
302
+ C.table.print,
303
+ C.table.printPreview,
272
304
  q,
273
- fn,
274
- M,
275
- N,
276
- Y,
277
- L,
278
- I
279
- ]), vn = A && (_n.length > 0 || Q), yn = A && _n.length > 1, bn = ft && $ && z, xn = ft && $ && !z, Sn = ft && !$, Cn = /* @__PURE__ */ m("div", {
305
+ In,
306
+ xt,
307
+ j,
308
+ mn,
309
+ F,
310
+ P
311
+ ]), Wn = O && (Un.length > 0 || X || Z), Gn = O && Un.length > 1, Kn = Ct && Q && L, qn = Ct && Q && !L, Jn = Ct && !Q, Yn = /* @__PURE__ */ p("div", {
280
312
  "data-slot": "table-toolbar-extra",
281
313
  className: n("zui:flex zui:w-full zui:items-center", i),
282
- children: rt
314
+ children: ht
283
315
  });
284
- return /* @__PURE__ */ h("div", {
316
+ return /* @__PURE__ */ m("div", {
285
317
  "data-slot": "table-container",
286
- dir: ot,
287
- className: n(ae(), Ke),
318
+ dir: T,
319
+ className: n(Se(), tt),
288
320
  children: [
289
- Sn ? /* @__PURE__ */ m("div", {
321
+ Jn ? /* @__PURE__ */ p("div", {
290
322
  "data-slot": "table-toolbar-extra-row",
291
323
  className: "zui:mb-3",
292
- children: Cn
324
+ children: Yn
293
325
  }) : null,
294
- $ ? /* @__PURE__ */ h(p, { children: [
295
- /* @__PURE__ */ m("div", {
296
- ref: hn,
326
+ Q ? /* @__PURE__ */ m(f, { children: [
327
+ /* @__PURE__ */ p("div", {
328
+ ref: zn,
297
329
  "aria-hidden": "true",
298
330
  "data-slot": "table-sticky-sentinel"
299
331
  }),
300
- /* @__PURE__ */ h("div", {
301
- ref: mn,
332
+ /* @__PURE__ */ m("div", {
333
+ ref: Rn,
302
334
  "data-slot": "table-sticky-toolbar",
303
- "data-sticky-toolbar": A && Xe ? "true" : void 0,
335
+ "data-sticky-toolbar": O && at ? "true" : void 0,
304
336
  className: "zui:mb-3",
305
- children: [bn ? /* @__PURE__ */ m("div", {
337
+ children: [Kn ? /* @__PURE__ */ p("div", {
306
338
  "data-slot": "table-toolbar-extra-row",
307
339
  className: "zui:mb-2",
308
- children: Cn
309
- }) : null, /* @__PURE__ */ m(ee, {
340
+ children: Yn
341
+ }) : null, /* @__PURE__ */ p(ee, {
310
342
  "data-slot": "table-controls",
311
343
  searchSlot: "table-search-input",
312
344
  actionsSlot: "table-add-action",
313
- inlineActionsOnMobile: vn,
314
- search: z ? {
315
- value: Pt,
316
- onChange: Lt,
317
- placeholder: D.common.searchPlaceholder,
318
- ariaLabel: D.table.searchAriaLabel,
319
- disabled: U
345
+ inlineActionsOnMobile: Wn,
346
+ search: L ? {
347
+ value: Zt,
348
+ onChange: en,
349
+ placeholder: C.common.searchPlaceholder,
350
+ ariaLabel: C.table.searchAriaLabel,
351
+ disabled: V
320
352
  } : void 0,
321
- leading: xn ? Cn : void 0,
322
- actions: Q || yn || pn ? /* @__PURE__ */ h(p, { children: [Q ? /* @__PURE__ */ m(l, {
323
- "data-slot": "table-sort-button",
324
- label: D.table.sortBy,
325
- disabled: Z,
326
- onClick: () => wt(!0),
327
- icon: /* @__PURE__ */ m(Pe, { "aria-hidden": "true" })
328
- }) : null, yn ? /* @__PURE__ */ m(l, {
329
- "data-slot": "table-toolbar-menu-button",
330
- label: D.table.actions,
331
- disabled: Z,
332
- onClick: () => St(!0),
333
- icon: /* @__PURE__ */ m(Fe, { "aria-hidden": "true" })
334
- }) : pn ? /* @__PURE__ */ h(p, { children: [
335
- Y ? /* @__PURE__ */ m(l, {
336
- "data-slot": "table-paging-mode-toggle-button",
337
- label: fn,
338
- disabled: Z,
339
- onClick: $t,
340
- icon: m(q === "pagination" ? Re : Ue, {
341
- className: fe,
342
- "aria-hidden": "true"
343
- })
344
- }) : null,
345
- L ? /* @__PURE__ */ m(l, {
346
- "data-slot": "table-action-preview-print-button",
347
- label: D.table.printPreview,
348
- disabled: Z,
349
- onClick: () => void Vt(),
350
- icon: /* @__PURE__ */ m(Ie, {})
353
+ leading: qn ? Yn : void 0,
354
+ actions: X || Z || Gn || Ln ? /* @__PURE__ */ m(f, { children: [
355
+ X ? /* @__PURE__ */ p(l, {
356
+ "data-slot": "table-sort-button",
357
+ label: C.table.sortBy,
358
+ disabled: Y,
359
+ onClick: () => Ft(!0),
360
+ icon: /* @__PURE__ */ p(He, { "aria-hidden": "true" })
351
361
  }) : null,
352
- I ? /* @__PURE__ */ m(l, {
353
- "data-slot": "table-action-print-button",
354
- label: D.table.print,
355
- disabled: Z,
356
- onClick: () => void Bt(),
357
- icon: /* @__PURE__ */ m(Ve, {})
358
- }) : null,
359
- N ? /* @__PURE__ */ m(l, {
360
- "data-slot": "table-action-import-excel-button",
361
- label: D.table.importExcel,
362
- disabled: Z,
363
- onClick: () => void Ot(),
364
- icon: /* @__PURE__ */ m(Le, {})
362
+ Z ? /* @__PURE__ */ p(l, {
363
+ "data-slot": "table-filter-button",
364
+ label: C.table.filterBy,
365
+ disabled: Y,
366
+ onClick: () => Lt(!0),
367
+ icon: /* @__PURE__ */ m("span", {
368
+ className: "zui:relative zui:inline-flex",
369
+ children: [/* @__PURE__ */ p(Ke, {
370
+ fill: nn > 0 ? "currentColor" : "none",
371
+ "aria-hidden": "true"
372
+ }), nn > 0 ? /* @__PURE__ */ p("span", {
373
+ "aria-hidden": "true",
374
+ "data-slot": "table-filter-active-dot",
375
+ className: "zui:absolute zui:-end-1 zui:-top-1 zui:size-2 zui:rounded-full zui:bg-[var(--zui-theme-action-primary)] zui:ring-2 zui:ring-[var(--zui-color-surface)]"
376
+ }) : null]
377
+ })
365
378
  }) : null,
366
- M ? /* @__PURE__ */ m(l, {
367
- "data-slot": "table-action-add-button",
368
- label: D.common.add,
369
- disabled: Z,
370
- onClick: () => void Dt(),
371
- icon: /* @__PURE__ */ m(Be, {})
372
- }) : null
373
- ] }) : null] }) : void 0
379
+ Gn ? /* @__PURE__ */ p(l, {
380
+ "data-slot": "table-toolbar-menu-button",
381
+ label: C.table.actions,
382
+ disabled: Y,
383
+ onClick: () => Nt(!0),
384
+ icon: /* @__PURE__ */ p(Ue, { "aria-hidden": "true" })
385
+ }) : Ln ? /* @__PURE__ */ m(f, { children: [
386
+ mn ? /* @__PURE__ */ p(l, {
387
+ "data-slot": "table-paging-mode-toggle-button",
388
+ label: In,
389
+ disabled: Y,
390
+ onClick: Cn,
391
+ icon: p(q === "pagination" ? qe : Qe, {
392
+ className: ce,
393
+ "aria-hidden": "true"
394
+ })
395
+ }) : null,
396
+ F ? /* @__PURE__ */ p(l, {
397
+ "data-slot": "table-action-preview-print-button",
398
+ label: C.table.printPreview,
399
+ disabled: Y,
400
+ onClick: () => void un(),
401
+ icon: /* @__PURE__ */ p(We, {})
402
+ }) : null,
403
+ P ? /* @__PURE__ */ p(l, {
404
+ "data-slot": "table-action-print-button",
405
+ label: C.table.print,
406
+ disabled: Y,
407
+ onClick: () => void ln(),
408
+ icon: /* @__PURE__ */ p(Xe, {})
409
+ }) : null,
410
+ j ? /* @__PURE__ */ p(l, {
411
+ "data-slot": "table-action-import-excel-button",
412
+ label: C.table.importExcel,
413
+ disabled: Y,
414
+ onClick: () => void Gt(),
415
+ icon: /* @__PURE__ */ p(Ge, {})
416
+ }) : null,
417
+ xt ? /* @__PURE__ */ p(l, {
418
+ "data-slot": "table-action-add-button",
419
+ label: C.common.add,
420
+ disabled: Y,
421
+ onClick: () => void Wt(),
422
+ icon: /* @__PURE__ */ p(Ye, {})
423
+ }) : null
424
+ ] }) : null
425
+ ] }) : void 0
374
426
  })]
375
427
  }),
376
- Q ? /* @__PURE__ */ m(o, {
377
- open: Ct,
378
- onOpenChange: wt,
379
- actions: gn,
380
- label: D.table.sortBy
428
+ X ? /* @__PURE__ */ p(o, {
429
+ open: Pt,
430
+ onOpenChange: Ft,
431
+ actions: Bn,
432
+ label: C.table.sortBy
381
433
  }) : null,
382
- yn ? /* @__PURE__ */ m(o, {
383
- open: xt,
384
- onOpenChange: St,
385
- actions: _n.map((e) => ({
434
+ Z ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(o, {
435
+ open: It,
436
+ onOpenChange: Lt,
437
+ actions: Hn,
438
+ label: C.table.filterBy
439
+ }), $ ? /* @__PURE__ */ p(Ee, {
440
+ column: $,
441
+ value: U[$.key],
442
+ onChange: (e) => an($.key, e),
443
+ options: W[$.key] ?? [],
444
+ open: Bt,
445
+ onOpenChange: Vt
446
+ }, $.key) : null] }) : null,
447
+ Gn ? /* @__PURE__ */ p(o, {
448
+ open: Mt,
449
+ onOpenChange: Nt,
450
+ actions: Un.map((e) => ({
386
451
  ...e,
387
- disabled: Z
452
+ disabled: Y
388
453
  })),
389
- label: D.table.actions
454
+ label: C.table.actions
390
455
  }) : null
391
456
  ] }) : null,
392
- /* @__PURE__ */ m("div", {
393
- ref: Xt,
457
+ D ? null : /* @__PURE__ */ p(we, {
458
+ columns: k,
459
+ values: U,
460
+ optionsByColumn: W,
461
+ onRemove: (e) => an(e, void 0),
462
+ onSelect: O ? Vn : void 0
463
+ }),
464
+ /* @__PURE__ */ p("div", {
465
+ ref: bn,
394
466
  "data-slot": "table-scroll-viewport",
395
- className: n("zui:relative zui:w-full zui:min-w-0 zui:overflow-x-auto zui-radius-xs zui:bg-[var(--zui-color-surface)] zui:shadow-[0_4px_14px_-12px_var(--zui-effect-shadow-ink-35)]", Yt ? "zui:overflow-y-auto" : void 0),
396
- style: Zt,
397
- onScroll: en,
398
- children: /* @__PURE__ */ m("table", {
399
- ref: lt,
467
+ className: n("zui:relative zui:w-full zui:min-w-0 zui:overflow-x-auto zui-radius-xs zui:bg-[var(--zui-color-surface)] zui:shadow-[0_4px_14px_-12px_var(--zui-effect-shadow-ink-35)]", yn ? "zui:overflow-y-auto" : void 0),
468
+ style: xn,
469
+ onScroll: wn,
470
+ children: /* @__PURE__ */ p("table", {
471
+ ref: yt,
400
472
  "data-slot": "table",
401
- className: n(oe({
402
- showColumnBorder: tt,
403
- showRowBorder: nt
404
- }), Ge),
405
- dir: ot,
406
- children: k ? it : j.length === 0 ? /* @__PURE__ */ m(ge, { children: /* @__PURE__ */ m(ve, { children: /* @__PURE__ */ m(u, {
473
+ className: n(Ce({
474
+ showColumnBorder: pt,
475
+ showRowBorder: mt
476
+ }), et),
477
+ dir: T,
478
+ children: D ? gt : k.length === 0 ? /* @__PURE__ */ p(ke, { children: /* @__PURE__ */ p(Me, { children: /* @__PURE__ */ p(u, {
407
479
  className: "zui:py-7 zui:text-center zui:text-[var(--zui-color-text)]",
408
- children: D.table.noColumns
409
- }) }) }) : /* @__PURE__ */ h(p, { children: [
410
- /* @__PURE__ */ h("colgroup", { children: [
411
- B ? /* @__PURE__ */ m("col", { style: gt }) : null,
412
- j.map((e) => /* @__PURE__ */ m("col", { style: _t[e.key] }, `col-${e.key}`)),
413
- V ? /* @__PURE__ */ m("col", { style: vt }) : null
480
+ children: C.table.noColumns
481
+ }) }) }) : /* @__PURE__ */ m(f, { children: [
482
+ /* @__PURE__ */ m("colgroup", { children: [
483
+ R ? /* @__PURE__ */ p("col", { style: Dt }) : null,
484
+ k.map((e) => /* @__PURE__ */ p("col", { style: Ot[e.key] }, `col-${e.key}`)),
485
+ z ? /* @__PURE__ */ p("col", { style: kt }) : null
414
486
  ] }),
415
- /* @__PURE__ */ m(_e, { children: /* @__PURE__ */ h(ve, { children: [
416
- B ? /* @__PURE__ */ m(d, {
487
+ /* @__PURE__ */ p(je, { children: /* @__PURE__ */ m(Me, { children: [
488
+ R ? /* @__PURE__ */ p(Ae, {
417
489
  align: "center",
418
- className: n(me, X ? he : void 0),
419
- children: D.table.rowNumber
490
+ className: n(ue, En ? de : void 0),
491
+ children: C.table.rowNumber
420
492
  }) : null,
421
- j.map((e) => {
422
- if (!e.sortable) return /* @__PURE__ */ m(d, {
423
- align: e.align,
424
- className: X ? he : void 0,
425
- children: t(e.label, O)
426
- }, `head-${e.key}`);
427
- let n = K?.sortKey === e.key ? K.direction : void 0;
428
- return /* @__PURE__ */ m(d, {
493
+ k.map((e) => {
494
+ let n = e.sortable && K?.sortKey === e.key ? K.direction : void 0, r = e.sortable ? /* @__PURE__ */ p(Pe, {
495
+ columnLabel: e.label,
496
+ direction: n,
497
+ onToggle: () => sn(e.key)
498
+ }) : null, i = e.filterable ? /* @__PURE__ */ p(Te, {
499
+ column: e,
500
+ value: U[e.key],
501
+ onChange: (t) => an(e.key, t),
502
+ options: W[e.key] ?? []
503
+ }) : null;
504
+ return /* @__PURE__ */ p(Ae, {
429
505
  align: e.align,
430
- className: X ? he : void 0,
431
- "aria-sort": xe(n),
432
- children: /* @__PURE__ */ h("span", {
506
+ className: En ? de : void 0,
507
+ "aria-sort": e.sortable ? he(n) : void 0,
508
+ children: e.sortable || e.filterable ? /* @__PURE__ */ m("span", {
433
509
  className: "zui:inline-flex zui:items-center zui:gap-2",
434
- children: [t(e.label, O), /* @__PURE__ */ m(De, {
435
- columnLabel: e.label,
436
- direction: n,
437
- onToggle: () => Rt(e.key)
510
+ children: [t(e.label, w), /* @__PURE__ */ m("span", {
511
+ className: "zui:inline-flex zui:items-center",
512
+ children: [T === "rtl" ? r : i, T === "rtl" ? i : r]
438
513
  })]
439
- })
514
+ }) : t(e.label, w)
440
515
  }, `head-${e.key}`);
441
516
  }),
442
- V ? /* @__PURE__ */ m(d, {
517
+ z ? /* @__PURE__ */ p(Ae, {
443
518
  align: "center",
444
- className: n(ue, de, X ? he : void 0),
445
- children: D.table.actions
519
+ className: n(oe, se, En ? de : void 0),
520
+ children: C.table.actions
446
521
  }) : null
447
522
  ] }) }),
448
- /* @__PURE__ */ m(ge, { children: rn ? /* @__PURE__ */ m(Ee, {
449
- count: nn,
523
+ /* @__PURE__ */ p(ke, { children: On ? /* @__PURE__ */ p(Ne, {
524
+ count: Dn,
450
525
  keyPrefix: "loading",
451
- showRowNumbers: B,
452
- columns: j,
453
- actionsCount: dn
454
- }) : J.length === 0 ? /* @__PURE__ */ m(se, {
455
- colSpan: j.length + +!!V + +!!B,
456
- showSearchInput: z,
457
- normalizedSearchTerm: Ft
458
- }) : /* @__PURE__ */ h(p, { children: [J.map(({ row: e, rowIndex: r, rowId: i }, o) => {
459
- let s = i === void 0 ? `row-${r}` : `row-id-${String(i)}`, ee = Gt ? (Ht - 1) * Wt + o + 1 : o + 1;
460
- return /* @__PURE__ */ h(ve, { children: [
461
- B ? /* @__PURE__ */ m(u, {
526
+ showRowNumbers: R,
527
+ columns: k,
528
+ actionsCount: Fn
529
+ }) : J.length === 0 ? /* @__PURE__ */ p(De, {
530
+ colSpan: k.length + +!!z + +!!R,
531
+ showSearchInput: L,
532
+ normalizedSearchTerm: Qt,
533
+ hasActiveFilters: nn > 0,
534
+ onClearFilters: on
535
+ }) : /* @__PURE__ */ m(f, { children: [J.map(({ row: e, rowIndex: r, rowId: i }, o) => {
536
+ let s = i === void 0 ? `row-${r}` : `row-id-${String(i)}`, ee = hn ? (dn - 1) * pn + o + 1 : o + 1;
537
+ return /* @__PURE__ */ m(Me, { children: [
538
+ R ? /* @__PURE__ */ p(u, {
462
539
  align: "center",
463
- className: me,
464
- "data-label": D.table.rowNumber,
465
- children: t(String(ee), O)
540
+ className: ue,
541
+ "data-label": C.table.rowNumber,
542
+ children: t(String(ee), w)
466
543
  }) : null,
467
- j.map((n) => {
544
+ k.map((n) => {
468
545
  let a = `cell-${n.key}-${s}`;
469
546
  if (n.viewType === "select") {
470
- let o = yt[n.key] ?? [], s = e[n.key], c = typeof s == "string" || typeof s == "number" ? String(s) : "";
471
- return /* @__PURE__ */ m(u, {
547
+ let o = At[n.key] ?? [], s = e[n.key], c = typeof s == "string" || typeof s == "number" ? String(s) : "";
548
+ return /* @__PURE__ */ p(u, {
472
549
  align: n.align,
473
- "data-label": t(n.label, O),
474
- children: /* @__PURE__ */ m(ie, {
475
- disabled: U || o.length === 0 && !n.optionsSource,
476
- placeholder: we(n),
550
+ "data-label": t(n.label, w),
551
+ children: /* @__PURE__ */ p(ie, {
552
+ disabled: V || o.length === 0 && !n.optionsSource,
553
+ placeholder: be(n),
477
554
  options: o,
478
555
  remoteOptions: n.optionsSource,
479
556
  value: c,
480
557
  onValueChange: (t) => {
481
558
  let a = Array.isArray(t) ? t[0] ?? "" : t;
482
- Mt(e, r, i, n.key, a);
559
+ Yt(e, r, i, n.key, a);
483
560
  }
484
561
  })
485
562
  }, a);
486
563
  }
487
- return /* @__PURE__ */ m(u, {
564
+ return /* @__PURE__ */ p(u, {
488
565
  align: n.align,
489
- "data-label": t(n.label, O),
490
- children: ye(e[n.key], n, st)
566
+ "data-label": t(n.label, w),
567
+ children: fe(e[n.key], n, E)
491
568
  }, a);
492
569
  }),
493
- V ? /* @__PURE__ */ m(u, {
570
+ z ? /* @__PURE__ */ p(u, {
494
571
  align: "center",
495
572
  "data-cell": "actions",
496
- className: n(ue, de),
497
- children: A ? /* @__PURE__ */ m(a, {
573
+ className: n(oe, se),
574
+ children: O ? /* @__PURE__ */ p(a, {
498
575
  "data-slot": "table-row-actions-button",
499
576
  kind: "cancel",
500
577
  fullWidth: !0,
501
- label: D.table.actions,
502
- disabled: U,
503
- onClick: () => Nt(e, r, i)
504
- }) : /* @__PURE__ */ h("div", {
578
+ label: C.table.actions,
579
+ disabled: V,
580
+ onClick: () => Xt(e, r, i)
581
+ }) : /* @__PURE__ */ m("div", {
505
582
  "data-slot": "table-row-actions",
506
583
  className: "zui:flex zui:items-center zui:justify-center zui:gap-0.5",
507
584
  children: [
508
- P ? /* @__PURE__ */ m(c, {
585
+ M ? /* @__PURE__ */ p(c, {
509
586
  "data-slot": "table-action-edit-button",
510
- label: D.common.edit,
511
- icon: /* @__PURE__ */ m(ze, {
512
- className: le,
587
+ label: C.common.edit,
588
+ icon: /* @__PURE__ */ p(Je, {
589
+ className: ae,
513
590
  "aria-hidden": "true"
514
591
  }),
515
- disabled: U,
516
- className: n(pe, "zui:text-[var(--zui-theme-text-primary)]"),
517
- onClick: () => void kt(e, r, i)
592
+ disabled: V,
593
+ className: n(le, "zui:text-[var(--zui-theme-text-primary)]"),
594
+ onClick: () => void Kt(e, r, i)
518
595
  }) : null,
519
- R.map((t, a) => /* @__PURE__ */ m(c, {
596
+ I.map((t, a) => /* @__PURE__ */ p(c, {
520
597
  "data-slot": "table-action-custom-button",
521
598
  label: t.tooltip,
522
599
  icon: t.icon,
523
- disabled: U,
524
- className: n(pe, "zui:text-[var(--zui-theme-text-primary)]"),
525
- onClick: () => void jt(t, e, r, i)
600
+ disabled: V,
601
+ className: n(le, "zui:text-[var(--zui-theme-text-primary)]"),
602
+ onClick: () => void Jt(t, e, r, i)
526
603
  }, `${t.tooltip}-${a}`)),
527
- F ? /* @__PURE__ */ m(c, {
604
+ N ? /* @__PURE__ */ p(c, {
528
605
  "data-slot": "table-action-delete-button",
529
- label: D.common.delete,
530
- icon: /* @__PURE__ */ m(We, {
531
- className: le,
606
+ label: C.common.delete,
607
+ icon: /* @__PURE__ */ p($e, {
608
+ className: ae,
532
609
  "aria-hidden": "true"
533
610
  }),
534
- disabled: U,
535
- className: n(pe, "zui:text-[var(--zui-theme-status-danger)]"),
536
- onClick: () => void At(e, r, i)
611
+ disabled: V,
612
+ className: n(le, "zui:text-[var(--zui-theme-status-danger)]"),
613
+ onClick: () => void qt(e, r, i)
537
614
  }) : null
538
615
  ]
539
616
  })
540
617
  }) : null
541
618
  ] }, s);
542
- }), an ? /* @__PURE__ */ m(Ee, {
543
- count: un,
619
+ }), kn ? /* @__PURE__ */ p(Ne, {
620
+ count: Pn,
544
621
  keyPrefix: "infinite-loading",
545
- showRowNumbers: B,
546
- columns: j,
547
- actionsCount: dn
622
+ showRowNumbers: R,
623
+ columns: k,
624
+ actionsCount: Fn
548
625
  }) : null] }) })
549
626
  ] })
550
627
  })
551
628
  }),
552
- A && V ? /* @__PURE__ */ m(o, {
553
- open: Tt.open,
554
- onOpenChange: (e) => Et((t) => ({
629
+ O && z ? /* @__PURE__ */ p(o, {
630
+ open: Ht.open,
631
+ onOpenChange: (e) => Ut((t) => ({
555
632
  ...t,
556
633
  open: e
557
634
  })),
558
- actions: Tt.actions,
559
- label: D.table.actions
635
+ actions: Ht.actions,
636
+ label: C.table.actions
560
637
  }) : null,
561
- /* @__PURE__ */ m(ce, {
562
- shouldRenderInfiniteMode: Kt,
563
- shouldShowInfiniteLoadingStatus: sn,
564
- shouldShowInfiniteReadyStatus: cn,
565
- shouldShowInfiniteCompletedStatus: ln,
566
- shouldRenderPagination: Gt,
567
- loading: g,
568
- isRowActionBusy: U,
569
- currentPage: Ht,
570
- totalPages: Ut,
571
- onPageChange: Qt
638
+ /* @__PURE__ */ p(Oe, {
639
+ shouldRenderInfiniteMode: gn,
640
+ shouldShowInfiniteLoadingStatus: jn,
641
+ shouldShowInfiniteReadyStatus: Mn,
642
+ shouldShowInfiniteCompletedStatus: Nn,
643
+ shouldRenderPagination: hn,
644
+ loading: h,
645
+ isRowActionBusy: V,
646
+ currentPage: dn,
647
+ totalPages: fn,
648
+ onPageChange: Sn
572
649
  })
573
650
  ]
574
651
  });
575
652
  });
576
- Ge.displayName = "Table";
653
+ et.displayName = "Table";
577
654
  //#endregion
578
- export { Ge as default };
655
+ export { et as default };