laif-ds 0.1.64 → 0.1.65

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.
@@ -6,14 +6,14 @@ import { useVirtualizer as Ae } from "../../../../node_modules/@tanstack/react-v
6
6
  import { TableSkeleton as Pe } from "../../table-skeleton.js";
7
7
  import { TruncatedText as E } from "./truncated-text.js";
8
8
  import { useDataCrossTable as He } from "./data-cross-table-context.js";
9
- import { cn as I } from "../../../../lib/utils.js";
9
+ import { cn as j } from "../../../../lib/utils.js";
10
10
  import { Button as C } from "../../button.js";
11
11
  import { Icon as _ } from "../../icon.js";
12
12
  import { Popover as Be, PopoverTrigger as Fe, PopoverContent as Oe } from "../../popover.js";
13
13
  import { TableRow as q, TableCell as ae, Table as We, TableHeader as Ue, TableHead as Xe, TableBody as Ye } from "../../table.js";
14
14
  import { getSortedRowModel as _e, getCoreRowModel as qe } from "../../../../node_modules/@tanstack/table-core/build/lib/index.js";
15
15
  function ut({
16
- crossTableData: j,
16
+ crossTableData: I,
17
17
  filterable: b = !1,
18
18
  loading: ce = !1,
19
19
  emptyComponent: de,
@@ -30,7 +30,7 @@ function ut({
30
30
  rowSortAsc: pe = !0
31
31
  }) {
32
32
  var ee, te;
33
- const [he, ge] = f([]), p = j.headerTop, m = j.headerLeft, v = j.data, [w, L] = f(
33
+ const [he, ge] = f([]), p = I.headerTop, m = I.headerLeft, v = I.data, [w, L] = f(
34
34
  (u == null ? void 0 : u.id) ?? null
35
35
  ), [$, A] = f(pe);
36
36
  let c = null;
@@ -87,7 +87,7 @@ function ut({
87
87
  T(t.target.value);
88
88
  },
89
89
  []
90
- ), Ie = (t) => t && typeof t == "object" && "value" in t ? t.value : t, h = Y(() => {
90
+ ), je = (t) => t && typeof t == "object" && "value" in t ? t.value : t, h = Y(() => {
91
91
  if (!w || !m.find((l) => l.id === w)) return p;
92
92
  const e = m.findIndex(
93
93
  (l) => l.id === w
@@ -95,7 +95,7 @@ function ut({
95
95
  if (e === -1) return p;
96
96
  const i = p.map((l, s) => {
97
97
  var g;
98
- const o = ((g = v[e]) == null ? void 0 : g[s]) ?? null, a = Ie(o);
98
+ const o = ((g = v[e]) == null ? void 0 : g[s]) ?? null, a = je(o);
99
99
  return { header: l, value: a };
100
100
  });
101
101
  return i.sort((l, s) => {
@@ -104,7 +104,7 @@ function ut({
104
104
  const o = String(l.value ?? ""), a = String(s.value ?? "");
105
105
  return $ ? o.localeCompare(a) : a.localeCompare(o);
106
106
  }), i.map((l) => l.header);
107
- }, [p, m, v, w, $]), je = Y(() => {
107
+ }, [p, m, v, w, $]), Ie = Y(() => {
108
108
  const t = [
109
109
  {
110
110
  id: "cross-header",
@@ -166,7 +166,7 @@ function ut({
166
166
  },
167
167
  cell: (i) => {
168
168
  const l = i.getValue();
169
- return l ? l.render ? l.render(l.fromId, l.toId, l.id) : /* @__PURE__ */ n("div", { className: "h-full w-full min-w-0 truncate", children: l.value }) : null;
169
+ return l ? l.render ? l.render(l.fromId, l.toId, l.id) : /* @__PURE__ */ n("div", { className: "flex h-full w-full min-w-0 items-center justify-center truncate", children: l.value }) : null;
170
170
  }
171
171
  });
172
172
  }), t;
@@ -187,7 +187,7 @@ function ut({
187
187
  }), i;
188
188
  }), [m, h, v, p]), F = $e({
189
189
  data: De,
190
- columns: je,
190
+ columns: Ie,
191
191
  state: { sorting: he },
192
192
  onSortingChange: ge,
193
193
  getCoreRowModel: qe(),
@@ -222,7 +222,7 @@ function ut({
222
222
  overscan: 5,
223
223
  measureElement: typeof window < "u" ? (t) => t.getBoundingClientRect().height : void 0
224
224
  });
225
- return /* @__PURE__ */ d("div", { className: `${I("w-[900px]", D || "")}`, children: [
225
+ return /* @__PURE__ */ d("div", { className: `${j("w-[900px]", D || "")}`, children: [
226
226
  /* @__PURE__ */ n(
227
227
  "div",
228
228
  {
@@ -286,7 +286,7 @@ function ut({
286
286
  return /* @__PURE__ */ n(
287
287
  ae,
288
288
  {
289
- className: I(
289
+ className: j(
290
290
  "border-d-border text-center",
291
291
  s ? "sticky left-0 z-10" : "border-r",
292
292
  g && N ? "cursor-pointer" : "pointer-events-none cursor-default"
@@ -345,7 +345,7 @@ function ut({
345
345
  /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1", children: /* @__PURE__ */ n(
346
346
  "div",
347
347
  {
348
- className: I(
348
+ className: j(
349
349
  "h-full min-h-full w-full min-w-full truncate text-center",
350
350
  g ? "text-d-muted-foreground" : "text-d-muted"
351
351
  ),
@@ -357,7 +357,7 @@ function ut({
357
357
  {
358
358
  name: g ? "Pencil" : "PencilOff",
359
359
  size: "sm",
360
- className: I(
360
+ className: j(
361
361
  "h-3 w-3",
362
362
  g ? "text-d-muted-foreground" : "text-d-muted"
363
363
  )
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "laif-ds",
3
3
  "private": false,
4
- "version": "0.1.64",
4
+ "version": "0.1.65",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",