@noxickon/onyx 6.3.0 → 6.5.0

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.
@@ -2,83 +2,81 @@ import { createCompoundContext as e } from "../../internal/context/createCompoun
2
2
  import { OxButton as t } from "../Button/Button.js";
3
3
  import { OxDropdown as n } from "../Dropdown/index.js";
4
4
  import { OxCheckbox as r } from "../Checkbox/Checkbox.js";
5
- import { OxPopover as i } from "../Popover/index.js";
6
- import { OxSkeleton as a } from "../Skeleton/Skeleton2.js";
7
- import { useControllableState as o } from "../../internal/hooks/useControllableState/useControllableState.js";
8
- import { OxTable as s } from "../Table/index.js";
9
- import { dataTableVariants as c } from "./DataTable.styles.js";
10
- import { orderColumnIds as l, reorderColumns as u } from "./DataTable.utils.js";
11
- import { c as d } from "react/compiler-runtime";
12
- import { ArrowDown as f, ArrowUp as p, ArrowUpDown as m, ChevronLeft as h, ChevronRight as g, EllipsisVertical as _, EyeOff as v, GripVertical as y, Lock as b, Settings2 as x, Snowflake as S } from "lucide-react";
13
- import { Children as C, isValidElement as w, useId as T, useRef as E, useState as D } from "react";
14
- import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
15
- import { DndContext as j, KeyboardSensor as M, PointerSensor as N, closestCenter as P, useSensor as F, useSensors as I } from "@dnd-kit/core";
16
- import { SortableContext as L, sortableKeyboardCoordinates as R, useSortable as z, verticalListSortingStrategy as B } from "@dnd-kit/sortable";
17
- import { CSS as V } from "@dnd-kit/utilities";
18
- import { pick as H } from "es-toolkit";
5
+ import { OxPagination as i } from "../Pagination/index.js";
6
+ import { OxPopover as a } from "../Popover/index.js";
7
+ import { OxSkeleton as o } from "../Skeleton/Skeleton2.js";
8
+ import { useControllableState as s } from "../../internal/hooks/useControllableState/useControllableState.js";
9
+ import { OxTable as c } from "../Table/index.js";
10
+ import { useOxPagination as l } from "../../hooks/usePagination/usePagination.js";
11
+ import { dataTableVariants as u } from "./DataTable.styles.js";
12
+ import { orderColumnIds as d, reorderColumns as f } from "./DataTable.utils.js";
13
+ import { c as p } from "react/compiler-runtime";
14
+ import { ArrowDown as m, ArrowUp as h, ArrowUpDown as g, ChevronLeft as _, ChevronRight as v, EllipsisVertical as y, EyeOff as b, Funnel as x, GripVertical as S, Lock as C, Settings2 as w, Snowflake as T } from "lucide-react";
15
+ import { Children as E, Fragment as D, isValidElement as O, useId as k, useRef as A, useState as j } from "react";
16
+ import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
17
+ import { DndContext as F, KeyboardSensor as I, PointerSensor as L, closestCenter as R, useSensor as z, useSensors as B } from "@dnd-kit/core";
18
+ import { SortableContext as V, sortableKeyboardCoordinates as H, useSortable as U, verticalListSortingStrategy as W } from "@dnd-kit/sortable";
19
+ import { CSS as G } from "@dnd-kit/utilities";
20
+ import { pick as K } from "es-toolkit";
19
21
  //#region src/components/DataTable/DataTable.tsx
20
- var U = "__ox-expand", W = "__ox-select", ee = [
22
+ var ee = "__ox-expand", q = "__ox-select", J = [
21
23
  "w-3/5",
22
24
  "w-2/5",
23
25
  "w-4/5"
24
- ], { Provider: te, useRequiredContext: G } = e("OxDataTable"), K = (...e) => e.filter(Boolean).join(" ") || void 0, ne = (e) => {
26
+ ], { Provider: te, useRequiredContext: Y } = e("OxDataTable"), X = (...e) => e.filter(Boolean).join(" ") || void 0, ne = (e) => {
25
27
  if (typeof e == "number") return e;
26
28
  if (typeof e == "string" && e.endsWith("px")) return Number.parseFloat(e);
27
- }, re = (e) => e == null ? null : typeof e == "string" || typeof e == "number" ? e : typeof e == "boolean" ? e ? "Yes" : "No" : null, ie = (e) => w(e) && e.type === Z;
28
- function q(e) {
29
- let t = d(61), { caption: n, children: r, className: i, columnOrder: u, columnVisibility: f, columns: p, data: m, defaultColumnOrder: h, defaultColumnVisibility: g, defaultExpandedRows: _, defaultFrozenColumns: v, defaultPage: y, defaultSelectedRows: b, defaultSort: x, density: S, emptyState: w, endReachedThreshold: D, frozenColumns: O, getRowCanExpand: j, getRowId: M, hover: N, loading: P, maxHeight: F, onColumnOrderChange: I, onColumnVisibilityChange: L, onEndReached: R, onFrozenColumnsChange: z, onPageChange: B, onSelectionChange: V, onSortChange: H, page: G, pageSize: re, paginationMode: ie, renderExpandedRow: q, rowCount: pe, selectable: me, selectedRows: he, sort: J, stickyHeader: Y } = e, X = x === void 0 ? null : x, Z = S === void 0 ? "comfortable" : S, ge = w === void 0 ? "No results." : w, _e = D === void 0 ? 320 : D, ve = N === void 0 ? !0 : N, ye = P === void 0 ? !1 : P, be = re === void 0 ? 10 : re, xe = ie === void 0 ? "pages" : ie, Se = me === void 0 ? !1 : me, Ce = Y === void 0 ? !0 : Y, we = T(), Q = c({ density: Z }), Te = new Map(p.map(de)), Ee = ue, De;
30
- t[0] !== p || t[1] !== h ? (De = h ?? p.map(le), t[0] = p, t[1] = h, t[2] = De) : De = t[2];
31
- let Oe;
32
- t[3] !== u || t[4] !== I || t[5] !== De ? (Oe = {
33
- prop: u,
34
- defaultProp: De,
29
+ }, re = (e) => e == null ? null : typeof e == "string" || typeof e == "number" ? e : typeof e == "boolean" ? e ? "Yes" : "No" : null, Z = (e) => O(e) && e.type === we;
30
+ function ie(e) {
31
+ let t = p(56), { caption: n, children: r, className: i, columnOrder: a, columnVisibility: l, columns: f, data: m, defaultColumnOrder: h, defaultColumnVisibility: g, defaultExpandedRows: _, defaultFrozenColumns: v, defaultPage: y, defaultSelectedRows: b, defaultSort: x, density: S, emptyState: C, endReachedThreshold: w, frozenColumns: T, getRowCanExpand: D, getRowId: O, hover: j, loading: M, maxHeight: F, onColumnOrderChange: I, onColumnVisibilityChange: L, onEndReached: R, onFrozenColumnsChange: z, onPageChange: B, onSelectionChange: V, onSortChange: H, page: U, pageSize: W, paginationMode: G, renderExpandedRow: K, rowCount: Y, selectable: re, selectedRows: Z, sort: ie, stickyHeader: he } = e, Q = x === void 0 ? null : x, ge = S === void 0 ? "comfortable" : S, _e = C === void 0 ? "No results." : C, ve = w === void 0 ? 320 : w, ye = j === void 0 ? !0 : j, be = M === void 0 ? !1 : M, xe = W === void 0 ? 10 : W, Se = G === void 0 ? "pages" : G, Ce = re === void 0 ? !1 : re, we = he === void 0 ? !0 : he, Te = k(), $ = u({ density: ge }), Ee = new Map(f.map(pe)), De = fe, Oe;
32
+ t[0] !== f || t[1] !== h ? (Oe = h ?? f.map(de), t[0] = f, t[1] = h, t[2] = Oe) : Oe = t[2];
33
+ let ke;
34
+ t[3] !== a || t[4] !== I || t[5] !== Oe ? (ke = {
35
+ prop: a,
36
+ defaultProp: Oe,
35
37
  onChange: I
36
- }, t[3] = u, t[4] = I, t[5] = De, t[6] = Oe) : Oe = t[6];
37
- let [ke, Ae] = o(Oe), je;
38
- t[7] === g ? je = t[8] : (je = g ?? {}, t[7] = g, t[8] = je);
39
- let Me;
40
- t[9] !== f || t[10] !== L || t[11] !== je ? (Me = {
41
- prop: f,
42
- defaultProp: je,
38
+ }, t[3] = a, t[4] = I, t[5] = Oe, t[6] = ke) : ke = t[6];
39
+ let [Ae, je] = s(ke), Me;
40
+ t[7] === g ? Me = t[8] : (Me = g ?? {}, t[7] = g, t[8] = Me);
41
+ let Ne;
42
+ t[9] !== l || t[10] !== L || t[11] !== Me ? (Ne = {
43
+ prop: l,
44
+ defaultProp: Me,
43
45
  onChange: L
44
- }, t[9] = f, t[10] = L, t[11] = je, t[12] = Me) : Me = t[12];
45
- let [Ne, Pe] = o(Me), Fe;
46
- t[13] === v ? Fe = t[14] : (Fe = v ?? [], t[13] = v, t[14] = Fe);
47
- let Ie;
48
- t[15] !== O || t[16] !== z || t[17] !== Fe ? (Ie = {
49
- prop: O,
50
- defaultProp: Fe,
46
+ }, t[9] = l, t[10] = L, t[11] = Me, t[12] = Ne) : Ne = t[12];
47
+ let [Pe, Fe] = s(Ne), Ie;
48
+ t[13] === v ? Ie = t[14] : (Ie = v ?? [], t[13] = v, t[14] = Ie);
49
+ let Le;
50
+ t[15] !== T || t[16] !== z || t[17] !== Ie ? (Le = {
51
+ prop: T,
52
+ defaultProp: Ie,
51
53
  onChange: z
52
- }, t[15] = O, t[16] = z, t[17] = Fe, t[18] = Ie) : Ie = t[18];
53
- let [Le, Re] = o(Ie), ze;
54
- t[19] !== X || t[20] !== J ? (ze = {
55
- prop: J,
56
- defaultProp: X
57
- }, t[19] = X, t[20] = J, t[21] = ze) : ze = t[21];
58
- let [Be, Ve] = o(ze), He;
59
- t[22] === b ? He = t[23] : (He = b ?? /* @__PURE__ */ new Set(), t[22] = b, t[23] = He);
60
- let Ue;
61
- t[24] !== V || t[25] !== he || t[26] !== He ? (Ue = {
62
- prop: he,
63
- defaultProp: He,
54
+ }, t[15] = T, t[16] = z, t[17] = Ie, t[18] = Le) : Le = t[18];
55
+ let [Re, ze] = s(Le), Be;
56
+ t[19] !== Q || t[20] !== ie ? (Be = {
57
+ prop: ie,
58
+ defaultProp: Q
59
+ }, t[19] = Q, t[20] = ie, t[21] = Be) : Be = t[21];
60
+ let [Ve, He] = s(Be), Ue;
61
+ t[22] === b ? Ue = t[23] : (Ue = b ?? /* @__PURE__ */ new Set(), t[22] = b, t[23] = Ue);
62
+ let We;
63
+ t[24] !== V || t[25] !== Z || t[26] !== Ue ? (We = {
64
+ prop: Z,
65
+ defaultProp: Ue,
64
66
  onChange: V
65
- }, t[24] = V, t[25] = he, t[26] = He, t[27] = Ue) : Ue = t[27];
66
- let [We, Ge] = o(Ue), Ke = y ?? 1, qe;
67
- t[28] !== B || t[29] !== G || t[30] !== Ke ? (qe = {
68
- prop: G,
69
- defaultProp: Ke,
67
+ }, t[24] = V, t[25] = Z, t[26] = Ue, t[27] = We) : We = t[27];
68
+ let [Ge, Ke] = s(We), qe = y ?? 1, Je;
69
+ t[28] !== B || t[29] !== U || t[30] !== qe ? (Je = {
70
+ prop: U,
71
+ defaultProp: qe,
70
72
  onChange: B
71
- }, t[28] = B, t[29] = G, t[30] = Ke, t[31] = qe) : qe = t[31];
72
- let [Je, Ye] = o(qe), Xe = l(p, ke), Ze;
73
- t[32] === Ne ? Ze = t[33] : (Ze = (e) => Ne[e] !== !1, t[32] = Ne, t[33] = Ze);
74
- let Qe = Ze, $e = Xe.map((e) => Te.get(e)).filter(ce), et;
75
- t[34] === Qe ? et = t[35] : (et = (e) => Qe(e.id), t[34] = Qe, t[35] = et);
76
- let tt = $e.filter(et), nt = new Set(Le), rt = tt.filter((e) => nt.has(e.id)), it = [...rt, ...tt.filter((e) => !nt.has(e.id))], at = nt.size > 0, ot = [];
77
- q && ot.push({
78
- key: U,
73
+ }, t[28] = B, t[29] = U, t[30] = qe, t[31] = Je) : Je = t[31];
74
+ let [Ye, Xe] = s(Je), Ze = d(f, Ae), Qe = (e) => Pe[e] !== !1, $e = Ze.map((e) => Ee.get(e)).filter(ue), et = [...$e.filter(le), ...$e.filter(ce)], tt = et.filter((e) => e.system || Qe(e.id)), nt = new Set(Re), rt = tt.filter((e) => nt.has(e.id)), it = [...rt, ...tt.filter((e) => !nt.has(e.id))], at = nt.size > 0, ot = [];
75
+ K && ot.push({
76
+ key: ee,
79
77
  width: 44
80
- }), Se && ot.push({
81
- key: W,
78
+ }), Ce && ot.push({
79
+ key: q,
82
80
  width: 48
83
81
  });
84
82
  for (let e of rt) ot.push({
@@ -94,8 +92,8 @@ function q(e) {
94
92
  if (st.has(e)) if (at) i = "left", r.left = st.get(e), e !== lt && (a = "shadow-none", o = "shadow-none");
95
93
  else {
96
94
  Object.assign(r, { "--ox-frozen-left": `${st.get(e)}px` });
97
- let t = e === lt ? Q.frozenEdge() : void 0;
98
- a = K(Q.frozenHead(), t), o = K(Q.frozenCell(), t);
95
+ let t = e === lt ? $.frozenEdge() : void 0;
96
+ a = X($.frozenHead(), t), o = X($.frozenCell(), t);
99
97
  }
100
98
  return {
101
99
  sticky: i,
@@ -104,118 +102,117 @@ function q(e) {
104
102
  style: Object.keys(r).length > 0 ? r : void 0
105
103
  };
106
104
  }, dt;
107
- t[36] !== H || t[37] !== Ve || t[38] !== Be ? (dt = (e, t) => {
105
+ t[32] !== H || t[33] !== He || t[34] !== Ve ? (dt = (e, t) => {
108
106
  let n;
109
- n = t === void 0 ? !Be || Be.columnId !== e ? {
107
+ n = t === void 0 ? !Ve || Ve.columnId !== e ? {
110
108
  columnId: e,
111
109
  direction: "asc"
112
- } : Be.direction === "asc" ? {
110
+ } : Ve.direction === "asc" ? {
113
111
  columnId: e,
114
112
  direction: "desc"
115
113
  } : null : t === null ? null : {
116
114
  columnId: e,
117
115
  direction: t
118
- }, Ve(n), H?.(e, n?.direction ?? null);
119
- }, t[36] = H, t[37] = Ve, t[38] = Be, t[39] = dt) : dt = t[39];
116
+ }, He(n), H?.(e, n?.direction ?? null);
117
+ }, t[32] = H, t[33] = He, t[34] = Ve, t[35] = dt) : dt = t[35];
120
118
  let ft = dt, pt;
121
- t[40] === Re ? pt = t[41] : (pt = (e) => {
122
- Re((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
123
- }, t[40] = Re, t[41] = pt);
119
+ t[36] === ze ? pt = t[37] : (pt = (e) => {
120
+ ze((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
121
+ }, t[36] = ze, t[37] = pt);
124
122
  let mt = pt, ht;
125
- t[42] === Pe ? ht = t[43] : (ht = (e) => {
126
- Pe((t) => ({
123
+ t[38] === Fe ? ht = t[39] : (ht = (e) => {
124
+ Fe((t) => ({
127
125
  ...t,
128
126
  [e]: !1
129
127
  }));
130
- }, t[42] = Pe, t[43] = ht);
128
+ }, t[38] = Fe, t[39] = ht);
131
129
  let gt = ht, _t;
132
- t[44] === Ge ? _t = t[45] : (_t = () => Ge(/* @__PURE__ */ new Set()), t[44] = Ge, t[45] = _t);
130
+ t[40] === Ke ? _t = t[41] : (_t = () => Ke(/* @__PURE__ */ new Set()), t[40] = Ke, t[41] = _t);
133
131
  let vt = _t, yt;
134
- t[46] !== M || t[47] !== We ? (yt = (e) => We.has(M(e)), t[46] = M, t[47] = We, t[48] = yt) : yt = t[48];
135
- let bt = m.filter(yt), xt = pe == null ? void 0 : Math.max(1, Math.ceil(pe / be)), St;
136
- t[49] === Symbol.for("react.memo_cache_sentinel") ? (St = (e) => ({
137
- header: e.header,
138
- hideable: Ee(e),
139
- id: e.id,
140
- locked: e.locked ?? !1
141
- }), t[49] = St) : St = t[49];
142
- let Ct = {
143
- baseId: we,
132
+ t[42] !== O || t[43] !== Ge ? (yt = (e) => Ge.has(O(e)), t[42] = O, t[43] = Ge, t[44] = yt) : yt = t[44];
133
+ let bt = m.filter(yt), xt = Y == null ? void 0 : Math.max(1, Math.ceil(Y / xe)), St = {
134
+ baseId: Te,
144
135
  clearSelection: vt,
145
- columnVisibility: Ne,
146
- density: Z,
136
+ columnVisibility: Pe,
137
+ density: ge,
147
138
  frozenColumns: nt,
148
139
  hideColumn: gt,
149
- orderedColumns: $e.map(St),
150
- page: Je,
140
+ orderedColumns: et.map((e) => ({
141
+ header: e.header,
142
+ hideable: De(e),
143
+ id: e.id,
144
+ locked: e.locked ?? !1,
145
+ system: e.system ?? !1
146
+ })),
147
+ page: Ye,
151
148
  pageCount: xt,
152
- pageSize: be,
153
- paginationMode: xe,
149
+ pageSize: xe,
150
+ paginationMode: Se,
154
151
  requestSort: ft,
155
- rowCount: pe,
156
- selectable: Se,
152
+ rowCount: Y,
153
+ selectable: Ce,
157
154
  selectedCount: bt.length,
158
155
  selectedRows: bt,
159
- setColumnOrder: Ae,
160
- setColumnVisibility: Pe,
161
- setPage: Ye,
162
- sort: Be,
156
+ setColumnOrder: je,
157
+ setColumnVisibility: Fe,
158
+ setPage: Xe,
159
+ sort: Ve,
163
160
  toggleFrozen: mt
164
- }, wt = E(!1), Tt;
165
- t[50] !== _e || t[51] !== R || t[52] !== xe ? (Tt = (e) => {
166
- if (xe !== "infinite" || !R) return;
161
+ }, Ct = A(!1), wt;
162
+ t[45] !== ve || t[46] !== R || t[47] !== Se ? (wt = (e) => {
163
+ if (Se !== "infinite" || !R) return;
167
164
  let t = e.currentTarget;
168
- t.scrollHeight - t.scrollTop - t.clientHeight <= _e ? wt.current || (wt.current = !0, R()) : wt.current = !1;
169
- }, t[50] = _e, t[51] = R, t[52] = xe, t[53] = Tt) : Tt = t[53];
170
- let Et = Tt, Dt, Ot;
171
- if (t[54] !== r) {
172
- let e = C.toArray(r);
173
- Ot = e.filter(se), Dt = e.filter(oe), t[54] = r, t[55] = Dt, t[56] = Ot;
174
- } else Dt = t[55], Ot = t[56];
175
- let kt = Dt, At = it.length + +!!Se + +!!q, $ = ut(U), jt = ut(W), Mt = at ? void 0 : Q.selectCol(), Nt = ae, Pt = () => ye && xe === "pages" ? Array.from({ length: Math.min(be, 8) }, (e, t) => /* @__PURE__ */ A(s.Row, { children: [
176
- q != null && /* @__PURE__ */ k(s.Cell, {
177
- className: K("w-11", $.cellClass),
178
- sticky: $.sticky,
179
- style: $.style
165
+ t.scrollHeight - t.scrollTop - t.clientHeight <= ve ? Ct.current || (Ct.current = !0, R()) : Ct.current = !1;
166
+ }, t[45] = ve, t[46] = R, t[47] = Se, t[48] = wt) : wt = t[48];
167
+ let Tt = wt, Et, Dt;
168
+ if (t[49] !== r) {
169
+ let e = E.toArray(r);
170
+ Dt = e.filter(se), Et = e.filter(oe), t[49] = r, t[50] = Et, t[51] = Dt;
171
+ } else Et = t[50], Dt = t[51];
172
+ let Ot = Et, kt = it.length + +!!Ce + +!!K, At = ut(ee), jt = ut(q), Mt = at ? void 0 : $.selectCol(), Nt = ae, Pt = () => be && Se === "pages" ? Array.from({ length: Math.min(xe, 8) }, (e, t) => /* @__PURE__ */ P(c.Row, { children: [
173
+ K != null && /* @__PURE__ */ N(c.Cell, {
174
+ className: X("w-11", At.cellClass),
175
+ sticky: At.sticky,
176
+ style: At.style
180
177
  }),
181
- Se && /* @__PURE__ */ k(s.Cell, {
182
- className: K(Mt, jt.cellClass),
178
+ Ce && /* @__PURE__ */ N(c.Cell, {
179
+ className: X(Mt, jt.cellClass),
183
180
  sticky: jt.sticky,
184
181
  style: jt.style
185
182
  }),
186
183
  it.map((e, n) => {
187
184
  let r = ut(e.id, e.width, e.minWidth);
188
- return /* @__PURE__ */ k(s.Cell, {
185
+ return /* @__PURE__ */ N(c.Cell, {
189
186
  align: e.align,
190
187
  className: r.cellClass,
191
188
  sticky: r.sticky,
192
189
  style: r.style,
193
- children: /* @__PURE__ */ k(a, { className: K("h-2.5", ee[(t + n) % ee.length]) })
190
+ children: /* @__PURE__ */ N(o, { className: X("h-2.5", J[(t + n) % J.length]) })
194
191
  }, e.id);
195
192
  })
196
- ] }, `__ox-skeleton-${t}`)) : m.length === 0 ? /* @__PURE__ */ k(s.Row, { children: /* @__PURE__ */ k(s.Cell, {
197
- className: Q.empty(),
198
- colSpan: At || 1,
199
- children: ge
193
+ ] }, `__ox-skeleton-${t}`)) : m.length === 0 ? /* @__PURE__ */ N(c.Row, { children: /* @__PURE__ */ N(c.Cell, {
194
+ className: $.empty(),
195
+ colSpan: kt || 1,
196
+ children: _e
200
197
  }) }, "__ox-empty") : m.flatMap((e) => {
201
- let t = M(e), n = q != null && (j?.(e) ?? !0), r = [/* @__PURE__ */ A(s.Row, {
198
+ let t = O(e), n = K != null && (D?.(e) ?? !0), r = [/* @__PURE__ */ P(c.Row, {
202
199
  rowId: t,
203
200
  children: [
204
- q != null && /* @__PURE__ */ k(s.Cell, {
201
+ K != null && /* @__PURE__ */ N(c.Cell, {
205
202
  align: "center",
206
- className: K("w-11", $.cellClass),
207
- sticky: $.sticky,
208
- style: $.style,
209
- children: n && /* @__PURE__ */ k(s.ExpandTrigger, {})
203
+ className: X("w-11", At.cellClass),
204
+ sticky: At.sticky,
205
+ style: At.style,
206
+ children: n && /* @__PURE__ */ N(c.ExpandTrigger, {})
210
207
  }),
211
- Se && /* @__PURE__ */ k(s.SelectCell, {
212
- className: K(Mt, jt.cellClass),
208
+ Ce && /* @__PURE__ */ N(c.SelectCell, {
209
+ className: X(Mt, jt.cellClass),
213
210
  sticky: jt.sticky,
214
211
  style: jt.style
215
212
  }),
216
213
  it.map((t) => {
217
214
  let n = ut(t.id, t.width, t.minWidth);
218
- return /* @__PURE__ */ k(s.Cell, {
215
+ return /* @__PURE__ */ N(c.Cell, {
219
216
  align: t.align,
220
217
  className: n.cellClass,
221
218
  sticky: n.sticky,
@@ -225,57 +222,57 @@ function q(e) {
225
222
  })
226
223
  ]
227
224
  }, t)];
228
- return n && r.push(/* @__PURE__ */ k(s.ExpandedRow, {
225
+ return n && r.push(/* @__PURE__ */ N(c.ExpandedRow, {
229
226
  rowId: t,
230
- children: q(e)
227
+ children: K(e)
231
228
  }, `${t}__detail`)), r;
232
229
  }), Ft;
233
- t[57] === F ? Ft = t[58] : (Ft = F == null ? void 0 : { maxHeight: F }, t[57] = F, t[58] = Ft);
230
+ t[52] === F ? Ft = t[53] : (Ft = F == null ? void 0 : { maxHeight: F }, t[52] = F, t[53] = Ft);
234
231
  let It;
235
- return t[59] === n ? It = t[60] : (It = n != null && /* @__PURE__ */ k(s.Caption, { children: n }), t[59] = n, t[60] = It), /* @__PURE__ */ k(te, {
236
- value: Ct,
237
- children: /* @__PURE__ */ A("div", {
238
- className: Q.root({ class: i }),
232
+ return t[54] === n ? It = t[55] : (It = n != null && /* @__PURE__ */ N(c.Caption, { children: n }), t[54] = n, t[55] = It), /* @__PURE__ */ N(te, {
233
+ value: St,
234
+ children: /* @__PURE__ */ P("div", {
235
+ className: $.root({ class: i }),
239
236
  "data-ox-slot": "data-table",
240
237
  children: [
241
- Ot,
242
- /* @__PURE__ */ A("div", {
243
- "aria-busy": ye || void 0,
244
- className: Q.scroll(),
238
+ Dt,
239
+ /* @__PURE__ */ P("div", {
240
+ "aria-busy": be || void 0,
241
+ className: $.scroll(),
245
242
  "data-ox-slot": "data-table-scroll",
246
243
  style: Ft,
247
- onScroll: Et,
248
- children: [/* @__PURE__ */ A(s, {
244
+ onScroll: Tt,
245
+ children: [/* @__PURE__ */ P(c, {
249
246
  defaultExpandedRows: _,
250
- density: Z,
251
- hover: ve,
252
- selectable: Se,
253
- selectedRows: We,
254
- stickyHeader: Ce,
247
+ density: ge,
248
+ hover: ye,
249
+ selectable: Ce,
250
+ selectedRows: Ge,
251
+ stickyHeader: we,
255
252
  unwrapped: !0,
256
- onSelectedChange: Ge,
253
+ onSelectedChange: Ke,
257
254
  children: [
258
255
  It,
259
- /* @__PURE__ */ k(s.Header, { children: /* @__PURE__ */ A(s.Row, { children: [
260
- q != null && /* @__PURE__ */ k(s.Head, {
261
- className: K("w-11", $.headClass),
262
- sticky: $.sticky,
263
- style: $.style
256
+ /* @__PURE__ */ N(c.Header, { children: /* @__PURE__ */ P(c.Row, { children: [
257
+ K != null && /* @__PURE__ */ N(c.Head, {
258
+ className: X("w-11", At.headClass),
259
+ sticky: At.sticky,
260
+ style: At.style
264
261
  }),
265
- Se && /* @__PURE__ */ k(s.SelectAllCell, {
266
- className: K(Mt, jt.headClass),
262
+ Ce && /* @__PURE__ */ N(c.SelectAllCell, {
263
+ className: X(Mt, jt.headClass),
267
264
  sticky: jt.sticky,
268
265
  style: jt.style
269
266
  }),
270
267
  it.map((e) => {
271
268
  let t = ut(e.id, e.width, e.minWidth);
272
- return /* @__PURE__ */ k(fe, {
269
+ return /* @__PURE__ */ N(me, {
273
270
  id: e.id,
274
271
  align: e.align,
275
272
  className: t.headClass,
276
273
  freezable: e.freezable,
277
274
  header: e.header,
278
- hideable: Ee(e),
275
+ hideable: De(e),
279
276
  locked: e.locked,
280
277
  sortable: e.sortable,
281
278
  sticky: t.sticky,
@@ -283,18 +280,18 @@ function q(e) {
283
280
  }, e.id);
284
281
  })
285
282
  ] }) }),
286
- /* @__PURE__ */ k(s.Body, { children: Pt() })
283
+ /* @__PURE__ */ N(c.Body, { children: Pt() })
287
284
  ]
288
- }), xe === "infinite" && ye && /* @__PURE__ */ A("div", {
289
- className: Q.footer(),
285
+ }), Se === "infinite" && be && /* @__PURE__ */ P("div", {
286
+ className: $.footer(),
290
287
  "data-ox-slot": "data-table-loading",
291
- children: [/* @__PURE__ */ k("span", {
288
+ children: [/* @__PURE__ */ N("span", {
292
289
  "aria-hidden": "true",
293
- className: Q.spinner()
290
+ className: $.spinner()
294
291
  }), "Loading more…"]
295
292
  })]
296
293
  }),
297
- kt
294
+ Ot
298
295
  ]
299
296
  })
300
297
  });
@@ -303,79 +300,85 @@ function ae(e, t) {
303
300
  return e.cell ? e.cell(t) : re(typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor]);
304
301
  }
305
302
  function oe(e) {
306
- return ie(e);
303
+ return Z(e);
307
304
  }
308
305
  function se(e) {
309
- return !ie(e);
306
+ return !Z(e);
310
307
  }
311
308
  function ce(e) {
312
- return e != null;
309
+ return e.system;
313
310
  }
314
311
  function le(e) {
315
- return e.id;
312
+ return !e.system;
316
313
  }
317
314
  function ue(e) {
318
- return e.hideable ?? !e.locked;
315
+ return e != null;
319
316
  }
320
317
  function de(e) {
321
- return [e.id, e];
318
+ return e.id;
322
319
  }
323
320
  function fe(e) {
324
- let t = d(43), { align: r, className: i, freezable: a, header: o, hideable: l, id: u, locked: h, sortable: g, sticky: y, style: x } = e, { density: C, frozenColumns: w, hideColumn: T, requestSort: E, sort: D, toggleFrozen: j } = G(), M;
325
- t[0] !== w || t[1] !== u ? (M = w.has(u), t[0] = w, t[1] = u, t[2] = M) : M = t[2];
326
- let N = M, P = D?.columnId === u, F, I, L, R, z, B, V, H, U;
327
- if (t[3] !== r || t[4] !== i || t[5] !== C || t[6] !== a || t[7] !== o || t[8] !== T || t[9] !== l || t[10] !== u || t[11] !== P || t[12] !== N || t[13] !== h || t[14] !== E || t[15] !== D?.direction || t[16] !== g || t[17] !== y || t[18] !== x || t[19] !== j) {
328
- let e = c({
329
- density: C,
330
- sortActive: P
331
- }), d = !!(g || a || l), w = /* @__PURE__ */ k(m, {
321
+ return e.system ? !1 : e.hideable ?? !e.locked;
322
+ }
323
+ function pe(e) {
324
+ return [e.id, e];
325
+ }
326
+ function me(e) {
327
+ let t = p(43), { align: r, className: i, freezable: a, header: o, hideable: s, id: l, locked: d, sortable: f, sticky: _, style: v } = e, { density: x, frozenColumns: S, hideColumn: w, requestSort: E, sort: D, toggleFrozen: O } = Y(), k;
328
+ t[0] !== S || t[1] !== l ? (k = S.has(l), t[0] = S, t[1] = l, t[2] = k) : k = t[2];
329
+ let A = k, j = D?.columnId === l, F, I, L, R, z, B, V, H, U;
330
+ if (t[3] !== r || t[4] !== i || t[5] !== x || t[6] !== a || t[7] !== o || t[8] !== w || t[9] !== s || t[10] !== l || t[11] !== j || t[12] !== A || t[13] !== d || t[14] !== E || t[15] !== D?.direction || t[16] !== f || t[17] !== _ || t[18] !== v || t[19] !== O) {
331
+ let e = u({
332
+ density: x,
333
+ sortActive: j
334
+ }), p = !!(f || a || s), S = /* @__PURE__ */ N(g, {
332
335
  "aria-hidden": "true",
333
336
  className: e.headSortIcon()
334
337
  });
335
- P && (w = D?.direction === "desc" ? /* @__PURE__ */ k(f, {
338
+ j && (S = D?.direction === "desc" ? /* @__PURE__ */ N(m, {
336
339
  "aria-hidden": "true",
337
340
  className: e.headSortIcon()
338
- }) : /* @__PURE__ */ k(p, {
341
+ }) : /* @__PURE__ */ N(h, {
339
342
  "aria-hidden": "true",
340
343
  className: e.headSortIcon()
341
- })), F = s.Head, B = r, t[29] === i ? V = t[30] : (V = K("group/head", i), t[29] = i, t[30] = V), H = y, U = x, I = e.headCell(), L = h && /* @__PURE__ */ k(b, {
344
+ })), F = c.Head, B = r, t[29] === i ? V = t[30] : (V = X("group/head", i), t[29] = i, t[30] = V), H = _, U = v, I = e.headCell(), L = d && /* @__PURE__ */ N(C, {
342
345
  "aria-hidden": "true",
343
346
  className: e.lockIcon()
344
- }), R = g ? /* @__PURE__ */ A("button", {
345
- "aria-label": `Sort by ${typeof o == "string" ? o : u}`,
347
+ }), R = f ? /* @__PURE__ */ P("button", {
348
+ "aria-label": `Sort by ${typeof o == "string" ? o : l}`,
346
349
  className: e.headSort(),
347
350
  type: "button",
348
- onClick: () => E(u),
349
- children: [o, w]
350
- }) : /* @__PURE__ */ k("span", { children: o }), z = d && /* @__PURE__ */ A(n, { children: [/* @__PURE__ */ k(n.Trigger, { children: /* @__PURE__ */ k("button", {
351
+ onClick: () => E(l),
352
+ children: [o, S]
353
+ }) : /* @__PURE__ */ N("span", { children: o }), z = p && /* @__PURE__ */ P(n, { children: [/* @__PURE__ */ N(n.Trigger, { children: /* @__PURE__ */ N("button", {
351
354
  "aria-label": "Column options",
352
355
  className: e.headMenuTrigger(),
353
356
  type: "button",
354
- children: /* @__PURE__ */ k(_, { className: "size-4" })
355
- }) }), /* @__PURE__ */ A(n.Content, {
357
+ children: /* @__PURE__ */ N(y, { className: "size-4" })
358
+ }) }), /* @__PURE__ */ P(n.Content, {
356
359
  align: "end",
357
360
  children: [
358
- g && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ A(n.Item, {
359
- onClick: () => E(u, "asc"),
360
- children: [/* @__PURE__ */ k(p, {}), "Sort ascending"]
361
- }), /* @__PURE__ */ A(n.Item, {
362
- onClick: () => E(u, "desc"),
363
- children: [/* @__PURE__ */ k(f, {}), "Sort descending"]
361
+ f && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P(n.Item, {
362
+ onClick: () => E(l, "asc"),
363
+ children: [/* @__PURE__ */ N(h, {}), "Sort ascending"]
364
+ }), /* @__PURE__ */ P(n.Item, {
365
+ onClick: () => E(l, "desc"),
366
+ children: [/* @__PURE__ */ N(m, {}), "Sort descending"]
364
367
  })] }),
365
- g && (a || l) && /* @__PURE__ */ k(n.Separator, {}),
366
- a && /* @__PURE__ */ A(n.Item, {
367
- onClick: () => j(u),
368
- children: [/* @__PURE__ */ k(S, {}), N ? "Unfreeze column" : "Freeze column"]
368
+ f && (a || s) && /* @__PURE__ */ N(n.Separator, {}),
369
+ a && /* @__PURE__ */ P(n.Item, {
370
+ onClick: () => O(l),
371
+ children: [/* @__PURE__ */ N(T, {}), A ? "Unfreeze column" : "Freeze column"]
369
372
  }),
370
- l && /* @__PURE__ */ A(n.Item, {
371
- onClick: () => T(u),
372
- children: [/* @__PURE__ */ k(v, {}), "Hide column"]
373
+ s && /* @__PURE__ */ P(n.Item, {
374
+ onClick: () => w(l),
375
+ children: [/* @__PURE__ */ N(b, {}), "Hide column"]
373
376
  })
374
377
  ]
375
- })] }), t[3] = r, t[4] = i, t[5] = C, t[6] = a, t[7] = o, t[8] = T, t[9] = l, t[10] = u, t[11] = P, t[12] = N, t[13] = h, t[14] = E, t[15] = D?.direction, t[16] = g, t[17] = y, t[18] = x, t[19] = j, t[20] = F, t[21] = I, t[22] = L, t[23] = R, t[24] = z, t[25] = B, t[26] = V, t[27] = H, t[28] = U;
378
+ })] }), t[3] = r, t[4] = i, t[5] = x, t[6] = a, t[7] = o, t[8] = w, t[9] = s, t[10] = l, t[11] = j, t[12] = A, t[13] = d, t[14] = E, t[15] = D?.direction, t[16] = f, t[17] = _, t[18] = v, t[19] = O, t[20] = F, t[21] = I, t[22] = L, t[23] = R, t[24] = z, t[25] = B, t[26] = V, t[27] = H, t[28] = U;
376
379
  } else F = t[20], I = t[21], L = t[22], R = t[23], z = t[24], B = t[25], V = t[26], H = t[27], U = t[28];
377
380
  let W;
378
- t[31] !== I || t[32] !== L || t[33] !== R || t[34] !== z ? (W = /* @__PURE__ */ A("span", {
381
+ t[31] !== I || t[32] !== L || t[33] !== R || t[34] !== z ? (W = /* @__PURE__ */ P("span", {
379
382
  className: I,
380
383
  children: [
381
384
  L,
@@ -383,325 +386,509 @@ function fe(e) {
383
386
  z
384
387
  ]
385
388
  }), t[31] = I, t[32] = L, t[33] = R, t[34] = z, t[35] = W) : W = t[35];
386
- let ee;
387
- return t[36] !== F || t[37] !== W || t[38] !== B || t[39] !== V || t[40] !== H || t[41] !== U ? (ee = /* @__PURE__ */ k(F, {
389
+ let G;
390
+ return t[36] !== F || t[37] !== W || t[38] !== B || t[39] !== V || t[40] !== H || t[41] !== U ? (G = /* @__PURE__ */ N(F, {
388
391
  align: B,
389
392
  className: V,
390
393
  sticky: H,
391
394
  style: U,
392
395
  children: W
393
- }), t[36] = F, t[37] = W, t[38] = B, t[39] = V, t[40] = H, t[41] = U, t[42] = ee) : ee = t[42], ee;
396
+ }), t[36] = F, t[37] = W, t[38] = B, t[39] = V, t[40] = H, t[41] = U, t[42] = G) : G = t[42], G;
394
397
  }
395
- function pe(e) {
396
- let t = d(6), { children: n, className: r } = e, { density: i } = G(), a;
397
- t[0] !== r || t[1] !== i ? (a = c({ density: i }).toolbar({ class: r }), t[0] = r, t[1] = i, t[2] = a) : a = t[2];
398
+ function he(e) {
399
+ let t = p(6), { children: n, className: r } = e, { density: i } = Y(), a;
400
+ t[0] !== r || t[1] !== i ? (a = u({ density: i }).toolbar({ class: r }), t[0] = r, t[1] = i, t[2] = a) : a = t[2];
398
401
  let o;
399
- return t[3] !== n || t[4] !== a ? (o = /* @__PURE__ */ k("div", {
402
+ return t[3] !== n || t[4] !== a ? (o = /* @__PURE__ */ N("div", {
400
403
  className: a,
401
404
  "data-ox-slot": "toolbar",
402
405
  children: n
403
406
  }), t[3] = n, t[4] = a, t[5] = o) : o = t[5], o;
404
407
  }
405
- function me(e) {
406
- let t = d(5), { children: n, className: r } = e, i;
407
- t[0] === r ? i = t[1] : (i = c({}).toolbarGroup({ class: r }), t[0] = r, t[1] = i);
408
+ function Q(e) {
409
+ let t = p(5), { children: n, className: r } = e, i;
410
+ t[0] === r ? i = t[1] : (i = u({}).toolbarGroup({ class: r }), t[0] = r, t[1] = i);
408
411
  let a;
409
- return t[2] !== n || t[3] !== i ? (a = /* @__PURE__ */ k("div", {
412
+ return t[2] !== n || t[3] !== i ? (a = /* @__PURE__ */ N("div", {
410
413
  className: i,
411
414
  "data-ox-slot": "toolbar-group",
412
415
  children: n
413
416
  }), t[2] = n, t[3] = i, t[4] = a) : a = t[4], a;
414
417
  }
415
- function he() {
416
- let e = d(1), t;
417
- return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ k("span", {
418
+ function ge() {
419
+ let e = p(1), t;
420
+ return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ N("span", {
418
421
  "aria-hidden": "true",
419
- className: c({}).divider(),
422
+ className: u({}).divider(),
420
423
  "data-ox-slot": "toolbar-divider"
421
424
  }), e[0] = t) : t = e[0], t;
422
425
  }
423
- function J(e) {
424
- let t = d(5), { children: n, className: r } = e, i;
425
- t[0] === r ? i = t[1] : (i = c({}).filterChips({ class: r }), t[0] = r, t[1] = i);
426
- let a;
427
- return t[2] !== n || t[3] !== i ? (a = /* @__PURE__ */ k("div", {
426
+ function _e(e) {
427
+ let t = p(18), { children: n, className: r, rowClassName: i, slot: a, trailing: o } = e, s = u({}), c;
428
+ t[0] === n ? c = t[1] : (c = E.toArray(n), t[0] = n, t[1] = c);
429
+ let l = c.length > 0, d;
430
+ t[2] !== n || t[3] !== o ? (d = {
431
+ children: n,
432
+ trailing: o
433
+ }, t[2] = n, t[3] = o, t[4] = d) : d = t[4];
434
+ let [f, m] = j(d);
435
+ l && (n !== f.children || o !== f.trailing) && m({
436
+ children: n,
437
+ trailing: o
438
+ });
439
+ let h = s.collapse({ class: r }), g = l ? void 0 : !0, _ = !l, v = s.collapseClip(), y = l ? n : f.children, b = l ? o : f.trailing, x;
440
+ t[5] !== i || t[6] !== y || t[7] !== b ? (x = /* @__PURE__ */ P("div", {
428
441
  className: i,
429
- "data-ox-slot": "filter-chips",
430
- children: n
431
- }), t[2] = n, t[3] = i, t[4] = a) : a = t[4], a;
432
- }
433
- function Y(e) {
434
- let t = d(11), { children: n, fallback: r } = e, { clearSelection: i, selectedCount: a, selectedRows: o } = G();
435
- if (a === 0) {
436
- let e;
437
- return t[0] === r ? e = t[1] : (e = r == null ? null : /* @__PURE__ */ k(O, { children: r }), t[0] = r, t[1] = e), e;
438
- }
439
- let s;
440
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (s = c({}).selectionActions(), t[2] = s) : s = t[2];
441
- let l = o, u;
442
- t[3] !== n || t[4] !== i || t[5] !== a || t[6] !== l ? (u = n({
443
- clearSelection: i,
444
- selectedCount: a,
445
- selectedRows: l
446
- }), t[3] = n, t[4] = i, t[5] = a, t[6] = l, t[7] = u) : u = t[7];
447
- let f;
448
- return t[8] !== s || t[9] !== u ? (f = /* @__PURE__ */ k("div", {
449
- className: s,
450
- "data-ox-slot": "selection-actions",
451
- children: u
452
- }), t[8] = s, t[9] = u, t[10] = f) : f = t[10], f;
442
+ children: [y, b]
443
+ }), t[5] = i, t[6] = y, t[7] = b, t[8] = x) : x = t[8];
444
+ let S;
445
+ t[9] !== v || t[10] !== x ? (S = /* @__PURE__ */ N("div", {
446
+ className: v,
447
+ children: x
448
+ }), t[9] = v, t[10] = x, t[11] = S) : S = t[11];
449
+ let C;
450
+ return t[12] !== a || t[13] !== S || t[14] !== h || t[15] !== g || t[16] !== _ ? (C = /* @__PURE__ */ N("div", {
451
+ className: h,
452
+ "data-collapsed": g,
453
+ "data-ox-slot": a,
454
+ inert: _,
455
+ children: S
456
+ }), t[12] = a, t[13] = S, t[14] = h, t[15] = g, t[16] = _, t[17] = C) : C = t[17], C;
453
457
  }
454
- function X(e) {
455
- let n = d(46), { className: r, layout: i, nextLabel: a, previousLabel: o } = e, s = i === void 0 ? "end" : i, l = a === void 0 ? "Next page" : a, u = o === void 0 ? "Previous page" : o, { page: f, pageCount: p, pageSize: m, rowCount: _, setPage: v } = G(), y, b, x, S, C, w;
456
- if (n[0] !== r || n[1] !== s || n[2] !== l || n[3] !== f || n[4] !== p || n[5] !== m || n[6] !== u || n[7] !== _ || n[8] !== v) {
457
- let e = c({ paginationLayout: s }), i = f > 1, a = p == null ? !0 : f < p, o = _ === 0 ? 0 : (f - 1) * m + 1, d = _ == null ? f * m : Math.min(f * m, _), T;
458
- n[15] !== d || n[16] !== o ? (T = /* @__PURE__ */ A("span", {
459
- className: "font-medium text-fg",
460
- children: [
461
- o,
462
- "–",
463
- d
464
- ]
465
- }), n[15] = d, n[16] = o, n[17] = T) : T = n[17];
466
- let E = /* @__PURE__ */ A("span", {
467
- className: e.pagerSummary({ class: s === "split" ? "justify-self-center" : "" }),
468
- children: [T, _ == null ? null : ` of ${_}`]
469
- }), D = !i, j;
470
- n[18] !== f || n[19] !== v ? (j = () => v(f - 1), n[18] = f, n[19] = v, n[20] = j) : j = n[20];
471
- let M;
472
- n[21] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ k(h, {}), n[21] = M) : M = n[21];
473
- let N;
474
- n[22] !== u || n[23] !== D || n[24] !== j ? (N = /* @__PURE__ */ k(t, {
475
- "aria-label": u,
476
- disabled: D,
477
- isIconOnly: !0,
458
+ function ve(e) {
459
+ let n = p(20), { children: r, className: i, clearLabel: a, onClearAll: o } = e, s = a === void 0 ? "Clear all" : a, c, l, d, f;
460
+ if (n[0] !== r || n[1] !== i || n[2] !== s || n[3] !== o) {
461
+ let e = u({}), a;
462
+ n[8] === r ? a = n[9] : (a = E.toArray(r), n[8] = r, n[9] = a);
463
+ let p = a.length, m;
464
+ n[10] !== p || n[11] !== s || n[12] !== o ? (m = o == null || p < 2 ? void 0 : /* @__PURE__ */ N(t, {
478
465
  variant: "ghost",
479
- onClick: j,
480
- children: M
481
- }), n[22] = u, n[23] = D, n[24] = j, n[25] = N) : N = n[25];
482
- let P = N, F = !a, I;
483
- n[26] !== f || n[27] !== v ? (I = () => v(f + 1), n[26] = f, n[27] = v, n[28] = I) : I = n[28];
484
- let L;
485
- n[29] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ k(g, {}), n[29] = L) : L = n[29];
486
- let R;
487
- n[30] !== l || n[31] !== F || n[32] !== I ? (R = /* @__PURE__ */ k(t, {
488
- "aria-label": l,
489
- disabled: F,
466
+ onClick: o,
467
+ children: s
468
+ }), n[10] = p, n[11] = s, n[12] = o, n[13] = m) : m = n[13], l = m, c = _e, d = i, f = e.filterChipsRow(), n[0] = r, n[1] = i, n[2] = s, n[3] = o, n[4] = c, n[5] = l, n[6] = d, n[7] = f;
469
+ } else c = n[4], l = n[5], d = n[6], f = n[7];
470
+ let m;
471
+ return n[14] !== c || n[15] !== r || n[16] !== l || n[17] !== d || n[18] !== f ? (m = /* @__PURE__ */ N(c, {
472
+ className: d,
473
+ rowClassName: f,
474
+ slot: "filter-chips",
475
+ trailing: l,
476
+ children: r
477
+ }), n[14] = c, n[15] = r, n[16] = l, n[17] = d, n[18] = f, n[19] = m) : m = n[19], m;
478
+ }
479
+ function ye(e) {
480
+ let n = p(30), { className: i, groups: o, trigger: s, triggerLabel: c } = e, l, d, f, m, h, g, _;
481
+ if (n[0] !== i || n[1] !== o || n[2] !== s || n[3] !== c) {
482
+ let e = u({});
483
+ d = a;
484
+ let p;
485
+ n[11] !== s || n[12] !== c ? (p = s ?? /* @__PURE__ */ N(t, {
486
+ "aria-label": c ?? "Filter",
490
487
  isIconOnly: !0,
491
488
  variant: "ghost",
492
- onClick: I,
493
- children: L
494
- }), n[30] = l, n[31] = F, n[32] = I, n[33] = R) : R = n[33];
495
- let z = R;
496
- y = e.pager({ class: r }), b = s, x = "pagination", S = s === "end" && /* @__PURE__ */ A(O, { children: [E, /* @__PURE__ */ A("span", {
497
- className: e.pagerNav(),
498
- children: [P, z]
499
- })] }), n[34] !== s || n[35] !== z || n[36] !== P || n[37] !== E ? (C = s === "center" && /* @__PURE__ */ A(O, { children: [
500
- P,
501
- E,
502
- z
503
- ] }), n[34] = s, n[35] = z, n[36] = P, n[37] = E, n[38] = C) : C = n[38], w = s === "split" && /* @__PURE__ */ A(O, { children: [
504
- /* @__PURE__ */ k("span", {
505
- className: e.pagerNav({ class: "justify-self-start" }),
506
- children: P
489
+ children: /* @__PURE__ */ N(x, {})
490
+ }), n[11] = s, n[12] = c, n[13] = p) : p = n[13], n[14] === p ? _ = n[15] : (_ = /* @__PURE__ */ N(a.Trigger, { children: p }), n[14] = p, n[15] = _), l = a.Content, h = "end", n[16] === i ? g = n[17] : (g = X("w-56 p-1.5", i), n[16] = i, n[17] = g), f = "filter-menu", m = o.map((t, n) => /* @__PURE__ */ P(D, { children: [
491
+ n > 0 && /* @__PURE__ */ N("div", { className: e.configSeparator() }),
492
+ /* @__PURE__ */ N("div", {
493
+ className: e.configTitle(),
494
+ children: t.label
507
495
  }),
508
- E,
509
- /* @__PURE__ */ k("span", {
510
- className: e.pagerNav({ class: "justify-self-end" }),
511
- children: z
512
- })
513
- ] }), n[0] = r, n[1] = s, n[2] = l, n[3] = f, n[4] = p, n[5] = m, n[6] = u, n[7] = _, n[8] = v, n[9] = y, n[10] = b, n[11] = x, n[12] = S, n[13] = C, n[14] = w;
514
- } else y = n[9], b = n[10], x = n[11], S = n[12], C = n[13], w = n[14];
515
- let T;
516
- return n[39] !== y || n[40] !== b || n[41] !== x || n[42] !== S || n[43] !== C || n[44] !== w ? (T = /* @__PURE__ */ A("div", {
517
- className: y,
518
- "data-layout": b,
519
- "data-ox-slot": x,
496
+ t.options.map((n) => /* @__PURE__ */ P("label", {
497
+ className: e.filterMenuItem(),
498
+ children: [/* @__PURE__ */ N(r, {
499
+ checked: t.selected.has(n.value),
500
+ onCheckedChange: () => t.onToggle(n.value)
501
+ }), /* @__PURE__ */ N("span", {
502
+ className: e.configLabel(),
503
+ children: n.label
504
+ })]
505
+ }, n.value))
506
+ ] }, t.id ?? n)), n[0] = i, n[1] = o, n[2] = s, n[3] = c, n[4] = l, n[5] = d, n[6] = f, n[7] = m, n[8] = h, n[9] = g, n[10] = _;
507
+ } else l = n[4], d = n[5], f = n[6], m = n[7], h = n[8], g = n[9], _ = n[10];
508
+ let v;
509
+ n[18] !== f || n[19] !== m ? (v = /* @__PURE__ */ N("div", {
510
+ "data-ox-slot": f,
511
+ children: m
512
+ }), n[18] = f, n[19] = m, n[20] = v) : v = n[20];
513
+ let y;
514
+ n[21] !== l || n[22] !== h || n[23] !== g || n[24] !== v ? (y = /* @__PURE__ */ N(l, {
515
+ align: h,
516
+ className: g,
517
+ children: v
518
+ }), n[21] = l, n[22] = h, n[23] = g, n[24] = v, n[25] = y) : y = n[25];
519
+ let b;
520
+ return n[26] !== d || n[27] !== _ || n[28] !== y ? (b = /* @__PURE__ */ P(d, { children: [_, y] }), n[26] = d, n[27] = _, n[28] = y, n[29] = b) : b = n[29], b;
521
+ }
522
+ function be(e) {
523
+ let t = p(18), { className: n, rows: r, toolbar: i } = e, a = r === void 0 ? 6 : r, s = i === void 0 ? !0 : i, c, l, d, f, m;
524
+ if (t[0] !== n || t[1] !== s) {
525
+ let e = u({});
526
+ l = "true", d = e.skeleton({ class: n }), f = "data-table-skeleton", m = s && /* @__PURE__ */ P("div", {
527
+ className: e.skeletonToolbar(),
528
+ children: [/* @__PURE__ */ N(o, { className: "h-8 w-72 rounded-control" }), /* @__PURE__ */ N(o, { className: "h-3.5 w-24 rounded-sm" })]
529
+ }), c = e.skeletonBody(), t[0] = n, t[1] = s, t[2] = c, t[3] = l, t[4] = d, t[5] = f, t[6] = m;
530
+ } else c = t[2], l = t[3], d = t[4], f = t[5], m = t[6];
531
+ let h;
532
+ t[7] === a ? h = t[8] : (h = Array.from({ length: a }, xe), t[7] = a, t[8] = h);
533
+ let g;
534
+ t[9] !== c || t[10] !== h ? (g = /* @__PURE__ */ N("div", {
535
+ className: c,
536
+ children: h
537
+ }), t[9] = c, t[10] = h, t[11] = g) : g = t[11];
538
+ let _;
539
+ return t[12] !== l || t[13] !== d || t[14] !== f || t[15] !== m || t[16] !== g ? (_ = /* @__PURE__ */ P("div", {
540
+ "aria-hidden": l,
541
+ className: d,
542
+ "data-ox-slot": f,
543
+ children: [m, g]
544
+ }), t[12] = l, t[13] = d, t[14] = f, t[15] = m, t[16] = g, t[17] = _) : _ = t[17], _;
545
+ }
546
+ function xe(e, t) {
547
+ return /* @__PURE__ */ N(o, { className: "h-9.5 w-full rounded-sm" }, t);
548
+ }
549
+ function Se(e) {
550
+ let t = p(11), { children: n, count: r, fallback: i } = e, { clearSelection: a, selectedCount: o, selectedRows: s } = Y(), c = r ?? o;
551
+ if (c === 0) {
552
+ let e;
553
+ return t[0] === i ? e = t[1] : (e = i == null ? null : /* @__PURE__ */ N(M, { children: i }), t[0] = i, t[1] = e), e;
554
+ }
555
+ let l;
556
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (l = u({}).selectionActions(), t[2] = l) : l = t[2];
557
+ let d = s, f;
558
+ t[3] !== n || t[4] !== a || t[5] !== c || t[6] !== d ? (f = n({
559
+ clearSelection: a,
560
+ selectedCount: c,
561
+ selectedRows: d
562
+ }), t[3] = n, t[4] = a, t[5] = c, t[6] = d, t[7] = f) : f = t[7];
563
+ let m;
564
+ return t[8] !== l || t[9] !== f ? (m = /* @__PURE__ */ N("div", {
565
+ className: l,
566
+ "data-ox-slot": "selection-actions",
567
+ children: f
568
+ }), t[8] = l, t[9] = f, t[10] = m) : m = t[10], m;
569
+ }
570
+ function Ce(e) {
571
+ let n = p(90), { className: r, layout: a, nextLabel: o, previousLabel: s, summary: c, variant: d } = e, f = a === void 0 ? "end" : a, m = o === void 0 ? "Next page" : o, h = s === void 0 ? "Previous page" : s, g = d === void 0 ? "simple" : d, { page: y, pageCount: b, pageSize: x, rowCount: S, setPage: C } = Y(), w = b ?? 1, T;
572
+ n[0] !== y || n[1] !== w ? (T = {
573
+ total: w,
574
+ page: y
575
+ }, n[0] = y, n[1] = w, n[2] = T) : T = n[2];
576
+ let { currentPage: E, isFirst: D, isLast: O, nextPage: k, previousPage: A, range: j } = l(T), F = g === "numbered" && b != null, I = F && f === "split" ? "end" : f, L, R, z, B, V, H, U;
577
+ if (n[3] !== r || n[4] !== E || n[5] !== D || n[6] !== O || n[7] !== F || n[8] !== m || n[9] !== k || n[10] !== y || n[11] !== b || n[12] !== x || n[13] !== h || n[14] !== A || n[15] !== j || n[16] !== I || n[17] !== S || n[18] !== C || n[19] !== c) {
578
+ B = Symbol.for("react.early_return_sentinel");
579
+ bb0: {
580
+ let e = u({ paginationLayout: I }), a = y > 1, o = b == null ? !0 : y < b, s = S === 0 ? 0 : (y - 1) * x + 1, l = S == null ? y * x : Math.min(y * x, S), d;
581
+ n[27] !== l || n[28] !== S || n[29] !== s || n[30] !== c ? (d = c ?? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("span", {
582
+ className: "font-medium text-fg",
583
+ children: [
584
+ s,
585
+ "–",
586
+ l
587
+ ]
588
+ }), S == null ? null : ` of ${S}`] }), n[27] = l, n[28] = S, n[29] = s, n[30] = c, n[31] = d) : d = n[31];
589
+ let f = /* @__PURE__ */ N("span", {
590
+ className: e.pagerSummary({ class: I === "split" ? "justify-self-center" : "" }),
591
+ children: d
592
+ });
593
+ if (F) {
594
+ if (b <= 1) {
595
+ B = /* @__PURE__ */ N("div", {
596
+ className: e.pager({ class: r }),
597
+ "data-layout": I,
598
+ "data-ox-slot": "pagination",
599
+ children: f
600
+ });
601
+ break bb0;
602
+ }
603
+ let t;
604
+ n[32] !== A || n[33] !== C ? (t = () => C(A), n[32] = A, n[33] = C, n[34] = t) : t = n[34];
605
+ let a;
606
+ n[35] !== D || n[36] !== h || n[37] !== t ? (a = /* @__PURE__ */ N(i.Previous, {
607
+ "aria-label": h,
608
+ disabled: D,
609
+ onClick: t
610
+ }), n[35] = D, n[36] = h, n[37] = t, n[38] = a) : a = n[38];
611
+ let o;
612
+ if (n[39] !== E || n[40] !== j || n[41] !== C) {
613
+ let e;
614
+ n[43] !== E || n[44] !== C ? (e = (e, t) => e === "ellipsis" ? /* @__PURE__ */ N(i.Ellipsis, {}, `ellipsis-${String(t)}`) : /* @__PURE__ */ N(i.Item, {
615
+ current: e === E,
616
+ onClick: () => C(e),
617
+ children: e
618
+ }, e), n[43] = E, n[44] = C, n[45] = e) : e = n[45], o = j.map(e), n[39] = E, n[40] = j, n[41] = C, n[42] = o;
619
+ } else o = n[42];
620
+ let s;
621
+ n[46] !== k || n[47] !== C ? (s = () => C(k), n[46] = k, n[47] = C, n[48] = s) : s = n[48];
622
+ let c;
623
+ n[49] !== O || n[50] !== m || n[51] !== s ? (c = /* @__PURE__ */ N(i.Next, {
624
+ "aria-label": m,
625
+ disabled: O,
626
+ onClick: s
627
+ }), n[49] = O, n[50] = m, n[51] = s, n[52] = c) : c = n[52];
628
+ let l;
629
+ n[53] !== b || n[54] !== a || n[55] !== o || n[56] !== c ? (l = /* @__PURE__ */ P(i, {
630
+ total: b,
631
+ children: [
632
+ a,
633
+ o,
634
+ c
635
+ ]
636
+ }), n[53] = b, n[54] = a, n[55] = o, n[56] = c, n[57] = l) : l = n[57];
637
+ let u = l, d;
638
+ n[58] !== u || n[59] !== I || n[60] !== f ? (d = I === "center" ? /* @__PURE__ */ P(M, { children: [u, f] }) : /* @__PURE__ */ P(M, { children: [f, u] }), n[58] = u, n[59] = I, n[60] = f, n[61] = d) : d = n[61], B = /* @__PURE__ */ N("div", {
639
+ className: e.pager({ class: r }),
640
+ "data-layout": I,
641
+ "data-ox-slot": "pagination",
642
+ children: d
643
+ });
644
+ break bb0;
645
+ }
646
+ let p = !a, g;
647
+ n[62] !== y || n[63] !== C ? (g = () => C(y - 1), n[62] = y, n[63] = C, n[64] = g) : g = n[64];
648
+ let w;
649
+ n[65] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ N(_, {}), n[65] = w) : w = n[65];
650
+ let T;
651
+ n[66] !== h || n[67] !== p || n[68] !== g ? (T = /* @__PURE__ */ N(t, {
652
+ "aria-label": h,
653
+ disabled: p,
654
+ isIconOnly: !0,
655
+ variant: "ghost",
656
+ onClick: g,
657
+ children: w
658
+ }), n[66] = h, n[67] = p, n[68] = g, n[69] = T) : T = n[69];
659
+ let W = T, G = !o, K;
660
+ n[70] !== y || n[71] !== C ? (K = () => C(y + 1), n[70] = y, n[71] = C, n[72] = K) : K = n[72];
661
+ let ee;
662
+ n[73] === Symbol.for("react.memo_cache_sentinel") ? (ee = /* @__PURE__ */ N(v, {}), n[73] = ee) : ee = n[73];
663
+ let q;
664
+ n[74] !== m || n[75] !== G || n[76] !== K ? (q = /* @__PURE__ */ N(t, {
665
+ "aria-label": m,
666
+ disabled: G,
667
+ isIconOnly: !0,
668
+ variant: "ghost",
669
+ onClick: K,
670
+ children: ee
671
+ }), n[74] = m, n[75] = G, n[76] = K, n[77] = q) : q = n[77];
672
+ let J = q;
673
+ V = e.pager({ class: r }), H = I, U = "pagination", L = I === "end" && /* @__PURE__ */ P(M, { children: [f, /* @__PURE__ */ P("span", {
674
+ className: e.pagerNav(),
675
+ children: [W, J]
676
+ })] }), n[78] !== J || n[79] !== W || n[80] !== I || n[81] !== f ? (R = I === "center" && /* @__PURE__ */ P(M, { children: [
677
+ W,
678
+ f,
679
+ J
680
+ ] }), n[78] = J, n[79] = W, n[80] = I, n[81] = f, n[82] = R) : R = n[82], z = I === "split" && /* @__PURE__ */ P(M, { children: [
681
+ /* @__PURE__ */ N("span", {
682
+ className: e.pagerNav({ class: "justify-self-start" }),
683
+ children: W
684
+ }),
685
+ f,
686
+ /* @__PURE__ */ N("span", {
687
+ className: e.pagerNav({ class: "justify-self-end" }),
688
+ children: J
689
+ })
690
+ ] });
691
+ }
692
+ n[3] = r, n[4] = E, n[5] = D, n[6] = O, n[7] = F, n[8] = m, n[9] = k, n[10] = y, n[11] = b, n[12] = x, n[13] = h, n[14] = A, n[15] = j, n[16] = I, n[17] = S, n[18] = C, n[19] = c, n[20] = L, n[21] = R, n[22] = z, n[23] = B, n[24] = V, n[25] = H, n[26] = U;
693
+ } else L = n[20], R = n[21], z = n[22], B = n[23], V = n[24], H = n[25], U = n[26];
694
+ if (B !== Symbol.for("react.early_return_sentinel")) return B;
695
+ let W;
696
+ return n[83] !== L || n[84] !== R || n[85] !== z || n[86] !== V || n[87] !== H || n[88] !== U ? (W = /* @__PURE__ */ P("div", {
697
+ className: V,
698
+ "data-layout": H,
699
+ "data-ox-slot": U,
520
700
  children: [
521
- S,
522
- C,
523
- w
701
+ L,
702
+ R,
703
+ z
524
704
  ]
525
- }), n[39] = y, n[40] = b, n[41] = x, n[42] = S, n[43] = C, n[44] = w, n[45] = T) : T = n[45], T;
705
+ }), n[83] = L, n[84] = R, n[85] = z, n[86] = V, n[87] = H, n[88] = U, n[89] = W) : W = n[89], W;
526
706
  }
527
- function Z(e) {
528
- let t = d(6), { children: n, className: r } = e, { density: i } = G(), a;
529
- t[0] !== r || t[1] !== i ? (a = c({ density: i }).footerBar({ class: r }), t[0] = r, t[1] = i, t[2] = a) : a = t[2];
707
+ function we(e) {
708
+ let t = p(6), { children: n, className: r } = e, { density: i } = Y(), a;
709
+ t[0] !== r || t[1] !== i ? (a = u({ density: i }).footerBar({ class: r }), t[0] = r, t[1] = i, t[2] = a) : a = t[2];
530
710
  let o;
531
- return t[3] !== n || t[4] !== a ? (o = /* @__PURE__ */ k("div", {
711
+ return t[3] !== n || t[4] !== a ? (o = /* @__PURE__ */ N("div", {
532
712
  className: a,
533
713
  "data-ox-slot": "data-table-footer",
534
714
  children: n
535
715
  }), t[3] = n, t[4] = a, t[5] = o) : o = t[5], o;
536
716
  }
537
- function ge(e) {
538
- let t = d(27), { column: n, draftVisible: i, onToggleVisible: a } = e, o = c({}), s;
539
- t[0] !== n.id || t[1] !== n.locked ? (s = {
717
+ function Te(e) {
718
+ let t = p(29), { column: n, draftVisible: i, onToggleVisible: a } = e, o = u({}), s = k(), c = n.locked || !n.hideable, l;
719
+ t[0] !== n.id || t[1] !== n.locked ? (l = {
540
720
  id: n.id,
541
721
  disabled: n.locked
542
- }, t[0] = n.id, t[1] = n.locked, t[2] = s) : s = t[2];
543
- let { attributes: l, isDragging: u, listeners: f, setNodeRef: p, transform: m, transition: h } = z(s), g;
544
- t[3] === m ? g = t[4] : (g = V.Transform.toString(m), t[3] = m, t[4] = g);
545
- let _ = u ? .6 : void 0, v;
546
- t[5] !== g || t[6] !== _ || t[7] !== h ? (v = {
547
- transform: g,
548
- transition: h,
549
- opacity: _
550
- }, t[5] = g, t[6] = _, t[7] = h, t[8] = v) : v = t[8];
551
- let b = v, x = o.configItem(), S = n.locked ? /* @__PURE__ */ k("span", {
722
+ }, t[0] = n.id, t[1] = n.locked, t[2] = l) : l = t[2];
723
+ let { attributes: d, isDragging: f, listeners: m, setNodeRef: h, transform: g, transition: _ } = U(l), v;
724
+ t[3] === g ? v = t[4] : (v = G.Transform.toString(g), t[3] = g, t[4] = v);
725
+ let y = f ? .6 : void 0, b;
726
+ t[5] !== v || t[6] !== y || t[7] !== _ ? (b = {
727
+ transform: v,
728
+ transition: _,
729
+ opacity: y
730
+ }, t[5] = v, t[6] = y, t[7] = _, t[8] = b) : b = t[8];
731
+ let x = b, C = o.configItem(), w = c || void 0, T = n.locked ? /* @__PURE__ */ N("span", {
552
732
  "aria-hidden": "true",
553
733
  className: o.configHandleLocked(),
554
- children: /* @__PURE__ */ k(y, { className: "size-4" })
555
- }) : /* @__PURE__ */ k("button", {
734
+ children: /* @__PURE__ */ N(S, { className: "size-4" })
735
+ }) : /* @__PURE__ */ N("button", {
556
736
  "aria-label": "Drag to reorder",
557
737
  className: o.configHandle(),
558
738
  type: "button",
559
- ...l,
560
- ...f,
561
- children: /* @__PURE__ */ k(y, { className: "size-4" })
562
- }), C = `Toggle ${typeof n.header == "string" ? n.header : n.id}`, w = n.locked ? !0 : i, T = n.locked || !n.hideable, E;
563
- t[9] !== n.id || t[10] !== a ? (E = () => a(n.id), t[9] = n.id, t[10] = a, t[11] = E) : E = t[11];
564
- let D;
565
- t[12] !== E || t[13] !== C || t[14] !== w || t[15] !== T ? (D = /* @__PURE__ */ k(r, {
566
- "aria-label": C,
567
- checked: w,
568
- disabled: T,
569
- onCheckedChange: E
570
- }), t[12] = E, t[13] = C, t[14] = w, t[15] = T, t[16] = D) : D = t[16];
571
- let O = o.configLabel(), j;
572
- t[17] !== n.header || t[18] !== O ? (j = /* @__PURE__ */ k("span", {
573
- className: O,
739
+ ...d,
740
+ ...m,
741
+ children: /* @__PURE__ */ N(S, { className: "size-4" })
742
+ }), E = n.locked ? !0 : i, D;
743
+ t[9] !== n.id || t[10] !== a ? (D = () => a(n.id), t[9] = n.id, t[10] = a, t[11] = D) : D = t[11];
744
+ let O;
745
+ t[12] !== c || t[13] !== s || t[14] !== E || t[15] !== D ? (O = /* @__PURE__ */ N(r, {
746
+ id: s,
747
+ checked: E,
748
+ disabled: c,
749
+ onCheckedChange: D
750
+ }), t[12] = c, t[13] = s, t[14] = E, t[15] = D, t[16] = O) : O = t[16];
751
+ let A = X(o.configLabel(), c ? "cursor-not-allowed opacity-50" : "cursor-pointer select-none"), j;
752
+ t[17] !== n.header || t[18] !== s || t[19] !== A ? (j = /* @__PURE__ */ N("label", {
753
+ className: A,
754
+ htmlFor: s,
574
755
  children: n.header
575
- }), t[17] = n.header, t[18] = O, t[19] = j) : j = t[19];
756
+ }), t[17] = n.header, t[18] = s, t[19] = A, t[20] = j) : j = t[20];
576
757
  let M;
577
- return t[20] !== p || t[21] !== b || t[22] !== D || t[23] !== j || t[24] !== x || t[25] !== S ? (M = /* @__PURE__ */ A("div", {
578
- className: x,
579
- ref: p,
580
- style: b,
758
+ return t[21] !== h || t[22] !== x || t[23] !== O || t[24] !== j || t[25] !== C || t[26] !== w || t[27] !== T ? (M = /* @__PURE__ */ P("div", {
759
+ className: C,
760
+ "data-disabled": w,
761
+ ref: h,
762
+ style: x,
581
763
  children: [
582
- S,
583
- D,
764
+ T,
765
+ O,
584
766
  j
585
767
  ]
586
- }), t[20] = p, t[21] = b, t[22] = D, t[23] = j, t[24] = x, t[25] = S, t[26] = M) : M = t[26], M;
768
+ }), t[21] = h, t[22] = x, t[23] = O, t[24] = j, t[25] = C, t[26] = w, t[27] = T, t[28] = M) : M = t[28], M;
587
769
  }
588
- function _e(e) {
589
- let n = d(46), { applyLabel: r, cancelLabel: a, className: o, title: s, trigger: l } = e, f = r === void 0 ? "Apply" : r, p = a === void 0 ? "Cancel" : a, m = s === void 0 ? "Configure table" : s, { columnVisibility: h, orderedColumns: g, setColumnOrder: _, setColumnVisibility: v } = G(), y = c({}), [b, S] = D(!1), C;
590
- n[0] === g ? C = n[1] : (C = () => g.map(xe), n[0] = g, n[1] = C);
591
- let [w, T] = D(C), E;
592
- n[2] === h ? E = n[3] : (E = () => h, n[2] = h, n[3] = E);
593
- let [O, z] = D(E), V;
594
- n[4] === g ? V = n[5] : (V = new Map(g.map(be)), n[4] = g, n[5] = V);
595
- let U = V, W;
596
- n[6] !== h || n[7] !== g || n[8] !== S ? (W = (e) => {
597
- e && (T(g.map(ye)), z(h)), S(e);
598
- }, n[6] = h, n[7] = g, n[8] = S, n[9] = W) : W = n[9];
599
- let ee = W, te;
600
- n[10] === Symbol.for("react.memo_cache_sentinel") ? (te = { activationConstraint: { distance: 4 } }, n[10] = te) : te = n[10];
601
- let ne;
602
- n[11] === Symbol.for("react.memo_cache_sentinel") ? (ne = { coordinateGetter: R }, n[11] = ne) : ne = n[11];
603
- let re = I(F(N, te), F(M, ne)), ie;
604
- n[12] === Symbol.for("react.memo_cache_sentinel") ? (ie = (e) => {
770
+ function $(e) {
771
+ let n = p(48), { applyLabel: r, cancelLabel: i, className: o, title: s, trigger: c } = e, l = r === void 0 ? "Apply" : r, d = i === void 0 ? "Cancel" : i, m = s === void 0 ? "Configure table" : s, { columnVisibility: h, orderedColumns: g, setColumnOrder: _, setColumnVisibility: v } = Y(), y;
772
+ n[0] === g ? y = n[1] : (y = g.filter(Ae), n[0] = g, n[1] = y);
773
+ let b = y, x = u({}), [S, C] = j(!1), T;
774
+ n[2] === b ? T = n[3] : (T = () => b.map(ke), n[2] = b, n[3] = T);
775
+ let [E, D] = j(T), O;
776
+ n[4] === h ? O = n[5] : (O = () => h, n[4] = h, n[5] = O);
777
+ let [k, A] = j(O), M;
778
+ n[6] === b ? M = n[7] : (M = new Map(b.map(Oe)), n[6] = b, n[7] = M);
779
+ let U = M, G;
780
+ n[8] !== h || n[9] !== b || n[10] !== C ? (G = (e) => {
781
+ e && (D(b.map(De)), A(h)), C(e);
782
+ }, n[8] = h, n[9] = b, n[10] = C, n[11] = G) : G = n[11];
783
+ let ee = G, q;
784
+ n[12] === Symbol.for("react.memo_cache_sentinel") ? (q = { activationConstraint: { distance: 4 } }, n[12] = q) : q = n[12];
785
+ let J;
786
+ n[13] === Symbol.for("react.memo_cache_sentinel") ? (J = { coordinateGetter: H }, n[13] = J) : J = n[13];
787
+ let te = B(z(L, q), z(I, J)), ne;
788
+ n[14] === Symbol.for("react.memo_cache_sentinel") ? (ne = (e) => {
605
789
  let { active: t, over: n } = e;
606
- T((e) => u(e, String(t.id), n == null ? null : String(n.id)));
607
- }, n[12] = ie) : ie = n[12];
608
- let q = ie, ae;
609
- n[13] === Symbol.for("react.memo_cache_sentinel") ? (ae = (e) => {
610
- z((t) => ({
790
+ D((e) => f(e, String(t.id), n == null ? null : String(n.id)));
791
+ }, n[14] = ne) : ne = n[14];
792
+ let re = ne, Z;
793
+ n[15] === Symbol.for("react.memo_cache_sentinel") ? (Z = (e) => {
794
+ A((t) => ({
611
795
  ...t,
612
796
  [e]: t[e] === !1
613
797
  }));
614
- }, n[13] = ae) : ae = n[13];
798
+ }, n[15] = Z) : Z = n[15];
799
+ let ie = Z, ae;
800
+ n[16] !== b || n[17] !== E || n[18] !== k || n[19] !== _ || n[20] !== v || n[21] !== C ? (ae = () => {
801
+ let e = b.map(Ee), t = new Set(e);
802
+ _(E.filter((e) => t.has(e))), v(K(k, e)), C(!1);
803
+ }, n[16] = b, n[17] = E, n[18] = k, n[19] = _, n[20] = v, n[21] = C, n[22] = ae) : ae = n[22];
615
804
  let oe = ae, se;
616
- n[14] !== w || n[15] !== O || n[16] !== g || n[17] !== _ || n[18] !== v || n[19] !== S ? (se = () => {
617
- let e = g.map(ve), t = new Set(e);
618
- _(w.filter((e) => t.has(e))), v(H(O, e)), S(!1);
619
- }, n[14] = w, n[15] = O, n[16] = g, n[17] = _, n[18] = v, n[19] = S, n[20] = se) : se = n[20];
620
- let ce = se, le;
621
- n[21] === l ? le = n[22] : (le = l ?? /* @__PURE__ */ k(t, {
805
+ n[23] === c ? se = n[24] : (se = c ?? /* @__PURE__ */ N(t, {
622
806
  "aria-label": "Configure table",
623
807
  isIconOnly: !0,
624
808
  variant: "ghost",
625
- children: /* @__PURE__ */ k(x, {})
626
- }), n[21] = l, n[22] = le);
627
- let ue;
628
- n[23] === le ? ue = n[24] : (ue = /* @__PURE__ */ k(i.Trigger, { children: le }), n[23] = le, n[24] = ue);
629
- let de;
630
- n[25] === o ? de = n[26] : (de = K("p-1.5", o), n[25] = o, n[26] = de);
631
- let fe = y.configPanel(), pe = y.configList(), me;
632
- if (n[27] !== w || n[28] !== O || n[29] !== U) {
809
+ children: /* @__PURE__ */ N(w, {})
810
+ }), n[23] = c, n[24] = se);
811
+ let ce;
812
+ n[25] === se ? ce = n[26] : (ce = /* @__PURE__ */ N(a.Trigger, { children: se }), n[25] = se, n[26] = ce);
813
+ let le;
814
+ n[27] === o ? le = n[28] : (le = X("p-1.5", o), n[27] = o, n[28] = le);
815
+ let ue = x.configPanel(), de = x.configList(), fe;
816
+ if (n[29] !== E || n[30] !== k || n[31] !== U) {
633
817
  let e;
634
- n[31] !== O || n[32] !== U ? (e = (e) => {
818
+ n[33] !== k || n[34] !== U ? (e = (e) => {
635
819
  let t = U.get(e);
636
- return t == null ? null : /* @__PURE__ */ k(ge, {
820
+ return t == null ? null : /* @__PURE__ */ N(Te, {
637
821
  column: t,
638
- draftVisible: O[e] !== !1,
639
- onToggleVisible: oe
822
+ draftVisible: k[e] !== !1,
823
+ onToggleVisible: ie
640
824
  }, e);
641
- }, n[31] = O, n[32] = U, n[33] = e) : e = n[33], me = w.map(e), n[27] = w, n[28] = O, n[29] = U, n[30] = me;
642
- } else me = n[30];
643
- let he = y.configActions(), J;
644
- n[34] === S ? J = n[35] : (J = () => S(!1), n[34] = S, n[35] = J);
645
- let Y;
646
- n[36] !== p || n[37] !== J ? (Y = /* @__PURE__ */ k(t, {
825
+ }, n[33] = k, n[34] = U, n[35] = e) : e = n[35], fe = E.map(e), n[29] = E, n[30] = k, n[31] = U, n[32] = fe;
826
+ } else fe = n[32];
827
+ let pe = x.configActions(), me;
828
+ n[36] === C ? me = n[37] : (me = () => C(!1), n[36] = C, n[37] = me);
829
+ let he;
830
+ n[38] !== d || n[39] !== me ? (he = /* @__PURE__ */ N(t, {
647
831
  variant: "outline",
648
- onClick: J,
649
- children: p
650
- }), n[36] = p, n[37] = J, n[38] = Y) : Y = n[38];
651
- let X;
652
- n[39] !== ce || n[40] !== f ? (X = /* @__PURE__ */ k(t, {
653
- onClick: ce,
654
- children: f
655
- }), n[39] = ce, n[40] = f, n[41] = X) : X = n[41];
656
- let Z;
657
- return n[42] !== he || n[43] !== Y || n[44] !== X ? (Z = /* @__PURE__ */ A("div", {
658
- className: he,
659
- children: [Y, X]
660
- }), n[42] = he, n[43] = Y, n[44] = X, n[45] = Z) : Z = n[45], /* @__PURE__ */ A(i, {
661
- open: b,
832
+ onClick: me,
833
+ children: d
834
+ }), n[38] = d, n[39] = me, n[40] = he) : he = n[40];
835
+ let Q;
836
+ n[41] !== oe || n[42] !== l ? (Q = /* @__PURE__ */ N(t, {
837
+ onClick: oe,
838
+ children: l
839
+ }), n[41] = oe, n[42] = l, n[43] = Q) : Q = n[43];
840
+ let ge;
841
+ return n[44] !== pe || n[45] !== he || n[46] !== Q ? (ge = /* @__PURE__ */ P("div", {
842
+ className: pe,
843
+ children: [he, Q]
844
+ }), n[44] = pe, n[45] = he, n[46] = Q, n[47] = ge) : ge = n[47], /* @__PURE__ */ P(a, {
845
+ open: S,
662
846
  onOpenChange: ee,
663
- children: [ue, /* @__PURE__ */ k(i.Content, {
847
+ children: [ce, /* @__PURE__ */ N(a.Content, {
664
848
  align: "start",
665
- className: de,
666
- children: /* @__PURE__ */ A("div", {
667
- className: fe,
849
+ className: le,
850
+ children: /* @__PURE__ */ P("div", {
851
+ className: ue,
668
852
  children: [
669
- /* @__PURE__ */ k("div", {
670
- className: y.configTitle(),
853
+ /* @__PURE__ */ N("div", {
854
+ className: x.configTitle(),
671
855
  children: m
672
856
  }),
673
- /* @__PURE__ */ k("div", { className: y.configSeparator() }),
674
- /* @__PURE__ */ k(j, {
675
- collisionDetection: P,
676
- sensors: re,
677
- onDragEnd: q,
678
- children: /* @__PURE__ */ k(L, {
679
- items: w,
680
- strategy: B,
681
- children: /* @__PURE__ */ k("div", {
682
- className: pe,
683
- children: me
857
+ /* @__PURE__ */ N("div", { className: x.configSeparator() }),
858
+ /* @__PURE__ */ N(F, {
859
+ collisionDetection: R,
860
+ sensors: te,
861
+ onDragEnd: re,
862
+ children: /* @__PURE__ */ N(V, {
863
+ items: E,
864
+ strategy: W,
865
+ children: /* @__PURE__ */ N("div", {
866
+ className: de,
867
+ children: fe
684
868
  })
685
869
  })
686
870
  }),
687
- /* @__PURE__ */ k("div", { className: y.configSeparator() }),
688
- Z
871
+ /* @__PURE__ */ N("div", { className: x.configSeparator() }),
872
+ ge
689
873
  ]
690
874
  })
691
875
  })]
692
876
  });
693
877
  }
694
- function ve(e) {
878
+ function Ee(e) {
695
879
  return e.id;
696
880
  }
697
- function ye(e) {
881
+ function De(e) {
698
882
  return e.id;
699
883
  }
700
- function be(e) {
884
+ function Oe(e) {
701
885
  return [e.id, e];
702
886
  }
703
- function xe(e) {
887
+ function ke(e) {
704
888
  return e.id;
705
889
  }
890
+ function Ae(e) {
891
+ return !e.system;
892
+ }
706
893
  //#endregion
707
- export { _e as OxDataTableColumnConfig, he as OxDataTableDivider, J as OxDataTableFilterChips, Z as OxDataTableFooter, X as OxDataTablePagination, q as OxDataTableRoot, Y as OxDataTableSelectionActions, pe as OxDataTableToolbar, me as OxDataTableToolbarGroup };
894
+ export { $ as OxDataTableColumnConfig, ge as OxDataTableDivider, ve as OxDataTableFilterChips, ye as OxDataTableFilterMenu, we as OxDataTableFooter, Ce as OxDataTablePagination, ie as OxDataTableRoot, Se as OxDataTableSelectionActions, be as OxDataTableSkeleton, he as OxDataTableToolbar, Q as OxDataTableToolbarGroup };