laif-ds 0.2.61 → 0.2.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +1,45 @@
1
1
  "use client";
2
- import { jsxs as f, jsx as n } from "react/jsx-runtime";
2
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
3
3
  import { useState as k } from "react";
4
4
  import { Button as b } from "../../../button.js";
5
5
  import { Icon as C } from "../../../icon.js";
6
- import { Popover as R, PopoverTrigger as H, PopoverContent as K } from "../../../popover.js";
6
+ import { Popover as H, PopoverTrigger as _, PopoverContent as $ } from "../../../popover.js";
7
7
  import { getIconFromColumnType as z } from "../data-table.service.js";
8
- function U({
9
- table: m,
10
- visibleColumns: L,
11
- hiddenColumns: Y,
8
+ function W({
9
+ table: u,
10
+ visibleColumns: Y,
11
+ hiddenColumns: B,
12
12
  i18n: x
13
13
  }) {
14
- const [c, u] = k({ section: null, position: -1, itemId: null }), [O, T] = k(!1), d = (e) => e?.id ?? e?.columnDef?.id ?? e?.columnDef?.accessorKey ?? "", D = (e) => d(e) === "data-table-integrated-checkbox-column" || e?.columnDef?.enableHiding === !1, V = () => {
15
- const e = m?.getState?.().columnOrder || [];
16
- return e && e.length > 0 ? [...e] : (m?.getAllLeafColumns?.() || []).map((i) => i.id);
17
- }, P = (e, t) => {
14
+ const [c, m] = k({ section: null, position: -1, itemId: null }), [O, T] = k(!1), d = (e) => e.id, V = (e) => {
15
+ const t = e.columnDef.meta?.headerLabel;
16
+ if (t) return String(t);
17
+ const i = e.columnDef.header;
18
+ return typeof i == "string" ? i : d(e);
19
+ }, D = (e) => d(e) === "data-table-integrated-checkbox-column" || e.columnDef.enableHiding === !1, P = () => {
20
+ const e = u?.getState?.().columnOrder || [];
21
+ return e && e.length > 0 ? [...e] : (u?.getAllLeafColumns?.() || []).map((i) => i.id);
22
+ }, j = (e, t) => {
18
23
  e.dataTransfer.setData("text/column-id", t), e.dataTransfer.effectAllowed = "move", T(!0);
19
- }, j = () => {
20
- T(!1), u({ section: null, position: -1, itemId: null });
21
- }, A = (e) => {
24
+ }, A = () => {
25
+ T(!1), m({ section: null, position: -1, itemId: null });
26
+ }, E = (e) => {
22
27
  const t = e.currentTarget, i = Array.from(t.querySelectorAll("[data-column-item]")), o = e.clientY;
23
- for (let r = 0; r < i.length; r++) {
24
- const a = i[r].getBoundingClientRect(), l = a.top + a.height / 2;
28
+ for (let n = 0; n < i.length; n++) {
29
+ const a = i[n].getBoundingClientRect(), l = a.top + a.height / 2;
25
30
  if (o < l)
26
- return r;
31
+ return n;
27
32
  }
28
33
  return i.length;
29
34
  }, w = (e, t, i) => {
30
- const o = m?.getColumn?.(e);
35
+ const o = u?.getColumn?.(e);
31
36
  if (!o || D(o))
32
37
  return;
33
- const r = o.getIsVisible(), s = t === "visible" ? g : N;
38
+ const n = o.getIsVisible(), s = t === "visible" ? g : N;
34
39
  if (t === "visible" && i === 0)
35
40
  return;
36
- (t === "visible" && !r || t === "hidden" && r) && o.toggleVisibility(t === "visible");
37
- const a = V(), l = s.map(d), p = a.indexOf(e);
41
+ (t === "visible" && !n || t === "hidden" && n) && o.toggleVisibility(t === "visible");
42
+ const a = P(), l = s.map(d), p = a.indexOf(e);
38
43
  if (p === -1) return;
39
44
  const h = [...a];
40
45
  h.splice(p, 1);
@@ -46,19 +51,19 @@ function U({
46
51
  const I = l[l.length - 1];
47
52
  I && (v = h.indexOf(I) + 1);
48
53
  }
49
- h.splice(v, 0, e), m.setColumnOrder(h);
54
+ h.splice(v, 0, e), u.setColumnOrder(h);
50
55
  }, S = (e, t, i, o) => {
51
56
  e.preventDefault(), e.stopPropagation(), e.dataTransfer.dropEffect = "move";
52
- const r = e.currentTarget.getBoundingClientRect(), s = e.clientY, a = r.top + r.height / 2, l = s < a ? o : o + 1;
53
- u({
57
+ const n = e.currentTarget.getBoundingClientRect(), s = e.clientY, a = n.top + n.height / 2, l = s < a ? o : o + 1;
58
+ m({
54
59
  section: t,
55
60
  position: l,
56
61
  itemId: i
57
62
  });
58
- }, E = (e) => (t) => {
63
+ }, L = (e) => (t) => {
59
64
  t.preventDefault(), t.dataTransfer.dropEffect = "move";
60
- const i = A(t);
61
- u({
65
+ const i = E(t);
66
+ m({
62
67
  section: e,
63
68
  position: e === "visible" && i === 0 ? 1 : i,
64
69
  itemId: null
@@ -67,20 +72,20 @@ function U({
67
72
  t.preventDefault(), t.stopPropagation();
68
73
  const i = t.dataTransfer.getData("text/column-id");
69
74
  if (!i) return;
70
- const o = c.position !== -1 ? c.position : A(t);
71
- w(i, e, e === "visible" && o === 0 ? 1 : o), u({ section: null, position: -1, itemId: null });
72
- }, B = V(), F = (m?.getAllLeafColumns?.() || []).map(
75
+ const o = c.position !== -1 ? c.position : E(t);
76
+ w(i, e, e === "visible" && o === 0 ? 1 : o), m({ section: null, position: -1, itemId: null });
77
+ }, F = P(), G = (u?.getAllLeafColumns?.() || []).map(
73
78
  (e) => e.id
74
- ), G = new Map(
75
- F.map((e, t) => [e, t])
79
+ ), R = new Map(
80
+ G.map((e, t) => [e, t])
76
81
  ), y = (e) => {
77
- const t = B.indexOf(e);
82
+ const t = F.indexOf(e);
78
83
  if (t !== -1) return t;
79
- const i = G.get(e);
84
+ const i = R.get(e);
80
85
  return i !== void 0 ? i : Number.MAX_SAFE_INTEGER;
81
- }, g = [...L].filter((e) => !D(e)).sort((e, t) => y(d(e)) - y(d(t))), N = [...Y].filter((e) => !D(e)).sort((e, t) => y(d(e)) - y(d(t)));
82
- return /* @__PURE__ */ f(R, { children: [
83
- /* @__PURE__ */ n(H, { asChild: !0, children: /* @__PURE__ */ n(
86
+ }, g = [...Y].filter((e) => !D(e)).sort((e, t) => y(d(e)) - y(d(t))), N = [...B].filter((e) => !D(e)).sort((e, t) => y(d(e)) - y(d(t)));
87
+ return /* @__PURE__ */ f(H, { children: [
88
+ /* @__PURE__ */ r(_, { asChild: !0, children: /* @__PURE__ */ r(
84
89
  b,
85
90
  {
86
91
  className: "h-6 w-6",
@@ -89,28 +94,28 @@ function U({
89
94
  variant: "ghost"
90
95
  }
91
96
  ) }),
92
- /* @__PURE__ */ f(K, { className: "flex flex-col gap-2 px-3 py-2", align: "end", children: [
97
+ /* @__PURE__ */ f($, { className: "flex flex-col gap-2 px-3 py-2", align: "end", children: [
93
98
  g.length > 0 && /* @__PURE__ */ f(
94
99
  "div",
95
100
  {
96
101
  className: "flex max-h-[250px] flex-col",
97
- onDragOver: E("visible"),
102
+ onDragOver: L("visible"),
98
103
  onDrop: M("visible"),
99
104
  children: [
100
105
  /* @__PURE__ */ f("div", { className: "flex flex-row items-center justify-between gap-2", children: [
101
- /* @__PURE__ */ n("div", { className: "text-d-foreground text-sm", children: x.columnVisibility.visibleColumns }),
102
- /* @__PURE__ */ n(
106
+ /* @__PURE__ */ r("div", { className: "text-d-foreground text-sm", children: x.columnVisibility.visibleColumns }),
107
+ /* @__PURE__ */ r(
103
108
  b,
104
109
  {
105
110
  variant: "ghost",
106
111
  size: "sm",
107
112
  className: "text-xs",
108
113
  onClick: () => {
109
- m.setColumnVisibility(() => {
114
+ u.setColumnVisibility(() => {
110
115
  const e = [...g, ...N], t = d(g[0] ?? e[0]);
111
116
  return e.reduce(
112
- (o, r) => {
113
- const s = d(r);
117
+ (o, n) => {
118
+ const s = d(n);
114
119
  return s && (o[s] = s === t), o;
115
120
  },
116
121
  {}
@@ -121,23 +126,23 @@ function U({
121
126
  }
122
127
  )
123
128
  ] }),
124
- /* @__PURE__ */ n("div", { className: "border-d-border flex min-h-0 flex-1 flex-col overflow-y-auto border-b", children: g.map((e, t) => {
125
- const i = d(e), o = t === 0, r = D(e), s = c.section === "visible" && c.position === t && t > 0, a = c.section === "visible" && c.position === t + 1;
129
+ /* @__PURE__ */ r("div", { className: "border-d-border flex min-h-0 flex-1 flex-col overflow-y-auto border-b", children: g.map((e, t) => {
130
+ const i = d(e), o = t === 0, n = D(e), s = c.section === "visible" && c.position === t && t > 0, a = c.section === "visible" && c.position === t + 1;
126
131
  return /* @__PURE__ */ f("div", { className: "relative", children: [
127
- s && /* @__PURE__ */ n("div", { className: "bg-d-primary absolute -top-1 right-0 left-0 z-10 h-0.5 rounded-full" }),
128
- /* @__PURE__ */ n(
132
+ s && /* @__PURE__ */ r("div", { className: "bg-d-primary absolute -top-1 right-0 left-0 z-10 h-0.5 rounded-full" }),
133
+ /* @__PURE__ */ r(
129
134
  "div",
130
135
  {
131
136
  "data-column-item": !0,
132
- draggable: !o && !r,
137
+ draggable: !o && !n,
133
138
  onDragStart: (l) => {
134
- if (o || r) {
139
+ if (o || n) {
135
140
  l.preventDefault();
136
141
  return;
137
142
  }
138
- P(l, i);
143
+ j(l, i);
139
144
  },
140
- onDragEnd: j,
145
+ onDragEnd: A,
141
146
  onDragOver: (l) => {
142
147
  if (t === 0) {
143
148
  l.dataTransfer.dropEffect = "none";
@@ -152,25 +157,25 @@ function U({
152
157
  p,
153
158
  "visible",
154
159
  Math.max(1, t)
155
- ), u({
160
+ ), m({
156
161
  section: null,
157
162
  position: -1,
158
163
  itemId: null
159
164
  });
160
165
  },
161
- className: `rounded transition-all duration-150 ${o || r ? "cursor-not-allowed opacity-60" : O && c.itemId === i ? "scale-95 opacity-50" : "hover:bg-d-foreground/5"}`,
162
- children: /* @__PURE__ */ n(
166
+ className: `rounded transition-all duration-150 ${o || n ? "cursor-not-allowed opacity-60" : O && c.itemId === i ? "scale-95 opacity-50" : "hover:bg-d-foreground/5"}`,
167
+ children: /* @__PURE__ */ r(
163
168
  b,
164
169
  {
165
170
  variant: "ghost",
166
171
  className: "w-full cursor-grab justify-start",
167
172
  iconLeft: "GripVertical",
168
173
  onClick: () => {
169
- r || e.toggleVisibility();
174
+ n || e.toggleVisibility();
170
175
  },
171
- disabled: i === d(g[0]) || r,
176
+ disabled: i === d(g[0]) || n,
172
177
  children: /* @__PURE__ */ f("div", { className: "flex w-full flex-row items-center justify-between gap-1", children: [
173
- /* @__PURE__ */ n(
178
+ /* @__PURE__ */ r(
174
179
  C,
175
180
  {
176
181
  name: z(
@@ -179,15 +184,15 @@ function U({
179
184
  className: "h-4 w-4"
180
185
  }
181
186
  ),
182
- /* @__PURE__ */ n("div", { className: "flex flex-1", children: e.columnDef.header?.toString() }),
183
- /* @__PURE__ */ n(C, { name: "Eye" })
187
+ /* @__PURE__ */ r("div", { className: "flex flex-1", children: V(e) }),
188
+ /* @__PURE__ */ r(C, { name: "Eye" })
184
189
  ] })
185
190
  },
186
191
  i
187
192
  )
188
193
  }
189
194
  ),
190
- a && /* @__PURE__ */ n("div", { className: "bg-d-primary absolute right-0 -bottom-1 left-0 z-10 h-0.5 rounded-full" })
195
+ a && /* @__PURE__ */ r("div", { className: "bg-d-primary absolute right-0 -bottom-1 left-0 z-10 h-0.5 rounded-full" })
191
196
  ] }, i);
192
197
  }) })
193
198
  ]
@@ -197,45 +202,45 @@ function U({
197
202
  "div",
198
203
  {
199
204
  className: "flex max-h-[250px] flex-col",
200
- onDragOver: E("hidden"),
205
+ onDragOver: L("hidden"),
201
206
  onDrop: M("hidden"),
202
207
  children: [
203
208
  /* @__PURE__ */ f("div", { className: "flex flex-row items-center justify-between gap-2", children: [
204
- /* @__PURE__ */ n("div", { className: "text-d-foreground text-sm", children: x.columnVisibility.hiddenColumns }),
205
- /* @__PURE__ */ n(
209
+ /* @__PURE__ */ r("div", { className: "text-d-foreground text-sm", children: x.columnVisibility.hiddenColumns }),
210
+ /* @__PURE__ */ r(
206
211
  b,
207
212
  {
208
213
  variant: "ghost",
209
214
  size: "sm",
210
215
  className: "text-xs",
211
- onClick: () => m.setColumnVisibility({}),
216
+ onClick: () => u.setColumnVisibility({}),
212
217
  children: x.columnVisibility.showAll
213
218
  }
214
219
  )
215
220
  ] }),
216
- /* @__PURE__ */ n("div", { className: "border-d-border flex min-h-0 flex-1 flex-col overflow-y-auto border-b", children: N.map((e, t) => {
217
- const i = d(e), o = c.section === "hidden" && c.position === t, r = c.section === "hidden" && c.position === t + 1;
221
+ /* @__PURE__ */ r("div", { className: "border-d-border flex min-h-0 flex-1 flex-col overflow-y-auto border-b", children: N.map((e, t) => {
222
+ const i = d(e), o = c.section === "hidden" && c.position === t, n = c.section === "hidden" && c.position === t + 1;
218
223
  return /* @__PURE__ */ f("div", { className: "relative", children: [
219
- o && /* @__PURE__ */ n("div", { className: "bg-d-primary absolute -top-1 right-0 left-0 z-10 h-0.5 rounded-full" }),
220
- /* @__PURE__ */ n(
224
+ o && /* @__PURE__ */ r("div", { className: "bg-d-primary absolute -top-1 right-0 left-0 z-10 h-0.5 rounded-full" }),
225
+ /* @__PURE__ */ r(
221
226
  "div",
222
227
  {
223
228
  "data-column-item": !0,
224
229
  draggable: !0,
225
- onDragStart: (s) => P(s, i),
226
- onDragEnd: j,
230
+ onDragStart: (s) => j(s, i),
231
+ onDragEnd: A,
227
232
  onDragOver: (s) => S(s, "hidden", i, t),
228
233
  onDrop: (s) => {
229
234
  s.preventDefault(), s.stopPropagation();
230
235
  const a = s.dataTransfer.getData("text/column-id");
231
- a && a !== i && w(a, "hidden", t), u({
236
+ a && a !== i && w(a, "hidden", t), m({
232
237
  section: null,
233
238
  position: -1,
234
239
  itemId: null
235
240
  });
236
241
  },
237
242
  className: `rounded transition-all duration-150 ${O && c.itemId === i ? "scale-95 opacity-50" : "hover:bg-d-foreground/5"}`,
238
- children: /* @__PURE__ */ n(
243
+ children: /* @__PURE__ */ r(
239
244
  b,
240
245
  {
241
246
  variant: "ghost",
@@ -243,7 +248,7 @@ function U({
243
248
  iconLeft: "GripVertical",
244
249
  onClick: () => e.toggleVisibility(),
245
250
  children: /* @__PURE__ */ f("div", { className: "flex w-full flex-row items-center justify-between gap-1", children: [
246
- /* @__PURE__ */ n(
251
+ /* @__PURE__ */ r(
247
252
  C,
248
253
  {
249
254
  name: z(
@@ -252,15 +257,15 @@ function U({
252
257
  className: "h-4 w-4"
253
258
  }
254
259
  ),
255
- /* @__PURE__ */ n("div", { className: "flex flex-1", children: e.columnDef.header?.toString() }),
256
- /* @__PURE__ */ n(C, { name: "EyeOff" })
260
+ /* @__PURE__ */ r("div", { className: "flex flex-1", children: V(e) }),
261
+ /* @__PURE__ */ r(C, { name: "EyeOff" })
257
262
  ] })
258
263
  },
259
264
  i
260
265
  )
261
266
  }
262
267
  ),
263
- r && /* @__PURE__ */ n("div", { className: "bg-d-primary absolute right-0 -bottom-1 left-0 z-10 h-0.5 rounded-full" })
268
+ n && /* @__PURE__ */ r("div", { className: "bg-d-primary absolute right-0 -bottom-1 left-0 z-10 h-0.5 rounded-full" })
264
269
  ] }, i);
265
270
  }) })
266
271
  ]
@@ -270,5 +275,5 @@ function U({
270
275
  ] });
271
276
  }
272
277
  export {
273
- U as DataTableColumnVisibility
278
+ W as DataTableColumnVisibility
274
279
  };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsxs as p, Fragment as A, jsx as o } from "react/jsx-runtime";
3
3
  import { useState as q, useEffect as $ } from "react";
4
- import { Badge as y } from "../../../badge.js";
4
+ import { Badge as f } from "../../../badge.js";
5
5
  import { Button as N } from "../../../button.js";
6
- import { Icon as f } from "../../../icon.js";
6
+ import { Icon as y } from "../../../icon.js";
7
7
  import { Input as E } from "../../../input.js";
8
- import { Popover as S, PopoverTrigger as _, PopoverContent as D } from "../../../popover.js";
8
+ import { Popover as S, PopoverTrigger as D, PopoverContent as _ } from "../../../popover.js";
9
9
  import { getIconFromColumnType as M } from "../data-table.service.js";
10
10
  import { DataTableAdvancedFilterComponent as R } from "./data-table-advanced-filter.js";
11
11
  import { DataTableStringFilter as z, DataTableNumberFilter as H, DataTableBooleanFilter as J, DataTableDateFilter as K, DataTableDateTimeFilter as Q, DataTableListSingleSelectFilter as U, DataTableListMultiSelectFilter as V } from "./data-table-simple-filters.js";
@@ -99,18 +99,18 @@ function se({
99
99
  b
100
100
  ]), /* @__PURE__ */ p(A, { children: [
101
101
  m && /* @__PURE__ */ p(S, { children: [
102
- /* @__PURE__ */ o(_, { asChild: !0, children: /* @__PURE__ */ p(
103
- y,
102
+ /* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ p(
103
+ f,
104
104
  {
105
105
  className: "hover:border-d-border cursor-pointer hover:border",
106
106
  variant: "default",
107
107
  children: [
108
- /* @__PURE__ */ o(f, { name: "ListFilter" }),
108
+ /* @__PURE__ */ o(y, { name: "ListFilter" }),
109
109
  s.filters.advancedFilter
110
110
  ]
111
111
  }
112
112
  ) }),
113
- /* @__PURE__ */ o(D, { className: "w-[800px]", align: "start", children: /* @__PURE__ */ o(
113
+ /* @__PURE__ */ o(_, { className: "w-[800px]", align: "start", children: /* @__PURE__ */ o(
114
114
  R,
115
115
  {
116
116
  columns: h,
@@ -134,18 +134,18 @@ function se({
134
134
  });
135
135
  },
136
136
  children: [
137
- /* @__PURE__ */ o(_, { asChild: !0, children: /* @__PURE__ */ p(
138
- y,
137
+ /* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ p(
138
+ f,
139
139
  {
140
140
  variant: (e.value === void 0 || e.value === "") && !(e.operator === "eq_null" || e.operator === "n_eq_null" || e.operator === "checked" || e.operator === "unchecked") ? "ghost" : "default",
141
141
  className: `hover:border-d-border flex cursor-pointer items-center gap-1 hover:border ${c && "border-d-foreground border"}`,
142
142
  children: [
143
- /* @__PURE__ */ o(f, { name: "Filter" }),
143
+ /* @__PURE__ */ o(y, { name: "Filter" }),
144
144
  e.columnLabel || s.filters.value
145
145
  ]
146
146
  }
147
147
  ) }),
148
- /* @__PURE__ */ p(D, { align: "start", children: [
148
+ /* @__PURE__ */ p(_, { align: "start", children: [
149
149
  e.columnType === "string" && /* @__PURE__ */ o(
150
150
  z,
151
151
  {
@@ -229,18 +229,18 @@ function se({
229
229
  });
230
230
  },
231
231
  children: [
232
- /* @__PURE__ */ o(_, { asChild: !0, children: /* @__PURE__ */ p(
233
- y,
232
+ /* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ p(
233
+ f,
234
234
  {
235
235
  variant: "ghost",
236
236
  className: `hover:border-d-border flex cursor-pointer items-center gap-1 hover:border ${j && "border-d-foreground border"}`,
237
237
  children: [
238
- /* @__PURE__ */ o(f, { name: "FunnelPlus" }),
238
+ /* @__PURE__ */ o(y, { name: "FunnelPlus" }),
239
239
  s.filters.addFilter
240
240
  ]
241
241
  }
242
242
  ) }),
243
- /* @__PURE__ */ p(D, { className: "p-2", align: "start", children: [
243
+ /* @__PURE__ */ p(_, { className: "p-2", align: "start", children: [
244
244
  /* @__PURE__ */ o(
245
245
  E,
246
246
  {
@@ -260,7 +260,7 @@ function se({
260
260
  e.column.columnDef.meta?.type
261
261
  ),
262
262
  onClick: () => G(e),
263
- children: e.column.columnDef.header?.toString()
263
+ children: e.column.columnDef.meta?.headerLabel || (typeof e.column.columnDef.header == "string" ? e.column.columnDef.header : "") || e.column.id
264
264
  }
265
265
  ) }, e.id)) }),
266
266
  /* @__PURE__ */ o("div", { className: "border-d-border mb-1 w-full border-b" }),
@@ -2,12 +2,12 @@
2
2
  import { jsxs as a, jsx as l } from "react/jsx-runtime";
3
3
  import { AppSelect as h } from "../../../app-select.js";
4
4
  import { Badge as S } from "../../../badge.js";
5
- import { Button as f } from "../../../button.js";
5
+ import { Button as g } from "../../../button.js";
6
6
  import { Icon as z } from "../../../icon.js";
7
- import { Popover as C, PopoverTrigger as k, PopoverContent as A } from "../../../popover.js";
8
- function T({
7
+ import { Popover as C, PopoverTrigger as D, PopoverContent as L } from "../../../popover.js";
8
+ function B({
9
9
  table: c,
10
- sortedColumns: g = [],
10
+ sortedColumns: f = [],
11
11
  sortableColumns: d,
12
12
  i18n: o,
13
13
  maxSortedColumns: m = 3
@@ -33,10 +33,10 @@ function T({
33
33
  c.setSorting(t);
34
34
  };
35
35
  return /* @__PURE__ */ a(C, { children: [
36
- /* @__PURE__ */ l(k, { asChild: !0, children: /* @__PURE__ */ a(
36
+ /* @__PURE__ */ l(D, { asChild: !0, children: /* @__PURE__ */ a(
37
37
  S,
38
38
  {
39
- variant: g.length > 0 ? "default" : "ghost",
39
+ variant: f.length > 0 ? "default" : "ghost",
40
40
  className: "hover:border-d-border cursor-pointer hover:border",
41
41
  children: [
42
42
  /* @__PURE__ */ l(z, { name: "ArrowUpDown" }),
@@ -44,14 +44,14 @@ function T({
44
44
  ]
45
45
  }
46
46
  ) }),
47
- /* @__PURE__ */ a(A, { className: "flex w-[400px] flex-col gap-2", align: "start", children: [
47
+ /* @__PURE__ */ a(L, { className: "flex w-[400px] flex-col gap-2", align: "start", children: [
48
48
  /* @__PURE__ */ l("div", { className: "text-d-foreground text-md font-semibold", children: o.sorting.sorting }),
49
- g.length > 0 && /* @__PURE__ */ a("div", { className: "flex flex-col gap-2", children: [
49
+ f.length > 0 && /* @__PURE__ */ a("div", { className: "flex flex-col gap-2", children: [
50
50
  /* @__PURE__ */ a("div", { className: "flex w-full flex-row gap-1 pr-9 text-sm", children: [
51
51
  /* @__PURE__ */ l("div", { className: "flex flex-1", children: o.sorting.column }),
52
52
  /* @__PURE__ */ l("div", { className: "flex flex-1", children: o.sorting.order })
53
53
  ] }),
54
- g.map((n, t) => /* @__PURE__ */ a("div", { className: "flex w-full flex-row items-end gap-1", children: [
54
+ f.map((n, t) => /* @__PURE__ */ a("div", { className: "flex w-full flex-row items-end gap-1", children: [
55
55
  /* @__PURE__ */ l(
56
56
  h,
57
57
  {
@@ -62,7 +62,7 @@ function T({
62
62
  return s === n?.column.id || !p.has(s);
63
63
  }).map((e) => ({
64
64
  value: e.column.id,
65
- label: e.column.columnDef.header?.toString() || e.column.id
65
+ label: e.column.columnDef.meta?.headerLabel || (typeof e.column.columnDef.header == "string" ? e.column.columnDef.header : "") || e.column.id
66
66
  })),
67
67
  value: n?.column.id,
68
68
  onValueChange: (e) => {
@@ -86,7 +86,7 @@ function T({
86
86
  }
87
87
  ),
88
88
  /* @__PURE__ */ l(
89
- f,
89
+ g,
90
90
  {
91
91
  variant: "ghost-destructive",
92
92
  size: "sm",
@@ -98,7 +98,7 @@ function T({
98
98
  ] }),
99
99
  /* @__PURE__ */ a("div", { className: "flex w-full gap-2", children: [
100
100
  /* @__PURE__ */ l(
101
- f,
101
+ g,
102
102
  {
103
103
  className: "flex flex-1",
104
104
  variant: "ghost-destructive",
@@ -109,7 +109,7 @@ function T({
109
109
  }
110
110
  ),
111
111
  /* @__PURE__ */ l(
112
- f,
112
+ g,
113
113
  {
114
114
  className: "flex flex-1",
115
115
  variant: "ghost",
@@ -124,5 +124,5 @@ function T({
124
124
  ] });
125
125
  }
126
126
  export {
127
- T as DataTableSortingComponent
127
+ B as DataTableSortingComponent
128
128
  };