@ledgerhq/lumen-ui-react 0.1.3 → 0.1.5
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.
- package/dist/_virtual/dynamic-import-helper.js +1 -8
- package/dist/lib/Components/BaseInput/BaseInput.js +72 -75
- package/dist/lib/Components/ContentBanner/ContentBanner.js +1 -1
- package/dist/lib/Components/DataTable/DataTable.js +108 -108
- package/dist/lib/Components/Menu/Menu.js +50 -51
- package/dist/lib/Components/SideBar/SideBar.js +62 -62
- package/dist/lib/Components/Table/Table.js +50 -50
- package/dist/lib/Components/Table/utils/useThrottledScrollBottom.js +20 -21
- package/dist/lib/Components/Tile/Tile.js +48 -48
- package/dist/lib/Components/TileButton/TileButton.js +24 -24
- package/dist/node_modules/react-i18next/dist/es/context.js +9 -12
- package/dist/package.json +1 -1
- package/dist/utils/useControllableState/useControllableState.js +17 -18
- package/package.json +1 -1
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
const l = (r, n, t) => {
|
|
2
2
|
const e = r[n];
|
|
3
3
|
return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((i, o) => {
|
|
4
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
5
|
-
o.bind(
|
|
6
|
-
null,
|
|
7
|
-
new Error(
|
|
8
|
-
"Unknown variable dynamic import: " + n + (n.split("/").length !== t ? ". Note that variables only represent file names one level deep." : "")
|
|
9
|
-
)
|
|
10
|
-
)
|
|
11
|
-
);
|
|
4
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + n + (n.split("/").length !== t ? ". Note that variables only represent file names one level deep." : ""))));
|
|
12
5
|
});
|
|
13
6
|
};
|
|
14
7
|
export {
|
|
@@ -1,150 +1,147 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { cn as a } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
-
import
|
|
4
|
-
import { useCommonTranslation as
|
|
5
|
-
import { InteractiveIcon as
|
|
6
|
-
import { DeleteCircleFill as
|
|
7
|
-
const
|
|
3
|
+
import c from "react";
|
|
4
|
+
import { useCommonTranslation as O } from "../../../i18n/useCommonTranslation.js";
|
|
5
|
+
import { InteractiveIcon as $ } from "../InteractiveIcon/InteractiveIcon.js";
|
|
6
|
+
import { DeleteCircleFill as x } from "../../Symbols/Icons/DeleteCircleFill.js";
|
|
7
|
+
const q = a(
|
|
8
8
|
"group relative flex h-48 w-full cursor-text items-center gap-8 rounded-sm bg-muted px-16 transition-colors",
|
|
9
9
|
"focus-within:ring-2 focus-within:ring-active hover:bg-muted-hover",
|
|
10
10
|
"has-disabled:cursor-not-allowed has-disabled:bg-disabled has-disabled:text-disabled",
|
|
11
11
|
"has-invalid:border-error has-invalid:ring-1 has-invalid:ring-error",
|
|
12
12
|
'has-[input[aria-invalid="true"]]:border-error has-[input[aria-invalid="true"]]:ring-1 has-[input[aria-invalid="true"]]:ring-error'
|
|
13
|
-
),
|
|
13
|
+
), H = a(
|
|
14
14
|
"peer w-full flex-1 bg-muted body-1 text-base caret-active outline-hidden transition-colors",
|
|
15
15
|
"group-hover:bg-muted-hover group-disabled:bg-disabled",
|
|
16
16
|
"group-has-disabled:cursor-not-allowed group-has-disabled:bg-disabled group-has-disabled:text-disabled",
|
|
17
17
|
"placeholder:text-muted group-has-disabled:placeholder:text-disabled",
|
|
18
18
|
"[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
19
19
|
"truncate"
|
|
20
|
-
),
|
|
20
|
+
), K = a(
|
|
21
21
|
"pointer-events-none absolute top-6 left-16 origin-left body-4 text-muted transition-all duration-300",
|
|
22
22
|
"peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-placeholder-shown:body-2",
|
|
23
23
|
"group-has-disabled:text-disabled",
|
|
24
24
|
"peer-focus:top-6 peer-focus:translate-y-0 peer-focus:body-4",
|
|
25
25
|
"w-[calc(100%-var(--size-56))] truncate"
|
|
26
|
-
),
|
|
27
|
-
ref:
|
|
28
|
-
className:
|
|
29
|
-
containerClassName:
|
|
30
|
-
inputClassName:
|
|
31
|
-
labelClassName:
|
|
32
|
-
label:
|
|
33
|
-
id:
|
|
34
|
-
disabled:
|
|
35
|
-
errorMessage:
|
|
36
|
-
suffix:
|
|
37
|
-
prefix:
|
|
38
|
-
onClear:
|
|
39
|
-
hideClearButton:
|
|
40
|
-
"aria-invalid":
|
|
41
|
-
onChange:
|
|
42
|
-
...
|
|
26
|
+
), P = ({
|
|
27
|
+
ref: y,
|
|
28
|
+
className: I,
|
|
29
|
+
containerClassName: C,
|
|
30
|
+
inputClassName: S,
|
|
31
|
+
labelClassName: N,
|
|
32
|
+
label: d,
|
|
33
|
+
id: k,
|
|
34
|
+
disabled: h,
|
|
35
|
+
errorMessage: o,
|
|
36
|
+
suffix: R,
|
|
37
|
+
prefix: E,
|
|
38
|
+
onClear: j,
|
|
39
|
+
hideClearButton: z = !1,
|
|
40
|
+
"aria-invalid": b,
|
|
41
|
+
onChange: m,
|
|
42
|
+
...i
|
|
43
43
|
}) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
), V = d.useCallback(
|
|
44
|
+
const { t: B } = O(), n = c.useRef(null), D = c.useId(), u = k || `input-${D}`, F = b || (o ? !0 : void 0), s = i.value !== void 0, [L, v] = c.useState(
|
|
45
|
+
i.defaultValue?.toString() || ""
|
|
46
|
+
), T = c.useCallback(
|
|
48
47
|
(t) => {
|
|
49
|
-
|
|
48
|
+
s || v(t.target.value), m?.(t);
|
|
50
49
|
},
|
|
51
|
-
[
|
|
52
|
-
),
|
|
53
|
-
var e;
|
|
50
|
+
[s, m]
|
|
51
|
+
), f = (s ? !!i.value && i.value.toString().length > 0 : L.length > 0) && !h && !z, g = `${u}-error`, V = () => {
|
|
54
52
|
if (!n.current) return;
|
|
55
|
-
|
|
53
|
+
Object.getOwnPropertyDescriptor(
|
|
56
54
|
window.HTMLInputElement.prototype,
|
|
57
55
|
"value"
|
|
58
|
-
))
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
n.current.dispatchEvent(s), n.current.focus(), p == null || p();
|
|
56
|
+
)?.set?.call(n.current, ""), s || v("");
|
|
57
|
+
const l = new Event("input", { bubbles: !0 });
|
|
58
|
+
n.current.dispatchEvent(l), n.current.focus(), j?.();
|
|
62
59
|
};
|
|
63
|
-
function
|
|
64
|
-
return (
|
|
60
|
+
function A(...t) {
|
|
61
|
+
return (l) => {
|
|
65
62
|
t.forEach((e) => {
|
|
66
|
-
e && (typeof e == "function" ? e(
|
|
63
|
+
e && (typeof e == "function" ? e(l) : e.current = l);
|
|
67
64
|
});
|
|
68
65
|
};
|
|
69
66
|
}
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ p("div", { className: I, children: [
|
|
68
|
+
/* @__PURE__ */ p(
|
|
72
69
|
"div",
|
|
73
70
|
{
|
|
74
|
-
className: a(
|
|
71
|
+
className: a(q, C),
|
|
75
72
|
onPointerDown: (t) => {
|
|
76
73
|
if (t.target.closest("input, button, a")) return;
|
|
77
74
|
const e = n.current;
|
|
78
75
|
if (!e) return;
|
|
79
|
-
const
|
|
76
|
+
const w = e.value.length > 0 ? e.value.length : 0;
|
|
80
77
|
window.requestAnimationFrame(() => {
|
|
81
78
|
try {
|
|
82
|
-
e.setSelectionRange(
|
|
79
|
+
e.setSelectionRange(w, w);
|
|
83
80
|
} catch {
|
|
84
81
|
}
|
|
85
82
|
e.focus();
|
|
86
83
|
});
|
|
87
84
|
},
|
|
88
85
|
children: [
|
|
89
|
-
|
|
86
|
+
E,
|
|
90
87
|
/* @__PURE__ */ r(
|
|
91
88
|
"input",
|
|
92
89
|
{
|
|
93
|
-
ref:
|
|
94
|
-
id:
|
|
95
|
-
disabled:
|
|
90
|
+
ref: A(y, n),
|
|
91
|
+
id: u,
|
|
92
|
+
disabled: h,
|
|
96
93
|
placeholder: " ",
|
|
97
|
-
"aria-invalid":
|
|
98
|
-
"aria-describedby":
|
|
94
|
+
"aria-invalid": F,
|
|
95
|
+
"aria-describedby": o ? g : void 0,
|
|
99
96
|
className: a(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
H,
|
|
98
|
+
d && "pt-12 body-2",
|
|
99
|
+
S
|
|
103
100
|
),
|
|
104
|
-
onChange:
|
|
105
|
-
...
|
|
101
|
+
onChange: T,
|
|
102
|
+
...i
|
|
106
103
|
}
|
|
107
104
|
),
|
|
108
|
-
|
|
105
|
+
d && /* @__PURE__ */ r(
|
|
109
106
|
"label",
|
|
110
107
|
{
|
|
111
|
-
htmlFor:
|
|
108
|
+
htmlFor: u,
|
|
112
109
|
className: a(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
K,
|
|
111
|
+
o && "text-error",
|
|
112
|
+
N
|
|
116
113
|
),
|
|
117
|
-
children:
|
|
114
|
+
children: d
|
|
118
115
|
}
|
|
119
116
|
),
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
f && /* @__PURE__ */ r(
|
|
118
|
+
$,
|
|
122
119
|
{
|
|
123
120
|
iconType: "filled",
|
|
124
|
-
onClick:
|
|
125
|
-
"aria-label":
|
|
126
|
-
children: /* @__PURE__ */ r(
|
|
121
|
+
onClick: V,
|
|
122
|
+
"aria-label": B("components.baseInput.clearInputAriaLabel"),
|
|
123
|
+
children: /* @__PURE__ */ r(x, { size: 20 })
|
|
127
124
|
}
|
|
128
125
|
),
|
|
129
|
-
!
|
|
126
|
+
!f && R
|
|
130
127
|
]
|
|
131
128
|
}
|
|
132
129
|
),
|
|
133
|
-
|
|
130
|
+
o && /* @__PURE__ */ p(
|
|
134
131
|
"div",
|
|
135
132
|
{
|
|
136
|
-
id:
|
|
133
|
+
id: g,
|
|
137
134
|
className: "mt-8 flex items-center gap-2 body-3 text-error",
|
|
138
135
|
role: "alert",
|
|
139
136
|
children: [
|
|
140
|
-
/* @__PURE__ */ r(
|
|
141
|
-
/* @__PURE__ */ r("span", { children:
|
|
137
|
+
/* @__PURE__ */ r(x, { size: 16, className: "shrink-0 text-error" }),
|
|
138
|
+
/* @__PURE__ */ r("span", { children: o })
|
|
142
139
|
]
|
|
143
140
|
}
|
|
144
141
|
)
|
|
145
142
|
] });
|
|
146
143
|
};
|
|
147
|
-
|
|
144
|
+
P.displayName = "BaseInput";
|
|
148
145
|
export {
|
|
149
|
-
|
|
146
|
+
P as BaseInput
|
|
150
147
|
};
|
|
@@ -1,188 +1,188 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createSafeContext as
|
|
3
|
-
import { flexRender as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { TableRoot as
|
|
1
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { createSafeContext as y, cn as C } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { flexRender as m } from "@tanstack/react-table";
|
|
4
|
+
import { useCallback as x, Fragment as N } from "react";
|
|
5
|
+
import { TableRoot as B, Table as S, TableLoadingRow as k, TableHeader as H, TableHeaderRow as G, TableHeaderCell as v, TableSortButton as q, TableBody as T, TableGroupHeaderRow as I, TableRow as F, TableCell as M } from "../Table/Table.js";
|
|
6
6
|
import { SearchInput as j } from "../SearchInput/SearchInput.js";
|
|
7
|
-
const [P, d] =
|
|
8
|
-
table:
|
|
7
|
+
const [P, d] = y("DataTableContext"), V = ({
|
|
8
|
+
table: n,
|
|
9
9
|
appearance: r = "no-background",
|
|
10
|
-
paginationMode:
|
|
11
|
-
loading:
|
|
12
|
-
onScrollBottom:
|
|
13
|
-
onRowClick:
|
|
14
|
-
groupBy:
|
|
15
|
-
renderGroupHeader:
|
|
16
|
-
hideHeader:
|
|
17
|
-
children:
|
|
18
|
-
className:
|
|
10
|
+
paginationMode: o = "none",
|
|
11
|
+
loading: e = !1,
|
|
12
|
+
onScrollBottom: a,
|
|
13
|
+
onRowClick: t,
|
|
14
|
+
groupBy: c,
|
|
15
|
+
renderGroupHeader: i,
|
|
16
|
+
hideHeader: s = !1,
|
|
17
|
+
children: h,
|
|
18
|
+
className: f,
|
|
19
19
|
ref: w,
|
|
20
20
|
...R
|
|
21
|
-
}) => /* @__PURE__ */
|
|
21
|
+
}) => /* @__PURE__ */ l(
|
|
22
22
|
P,
|
|
23
23
|
{
|
|
24
24
|
value: {
|
|
25
|
-
hideHeader:
|
|
26
|
-
paginationMode:
|
|
27
|
-
table:
|
|
25
|
+
hideHeader: s,
|
|
26
|
+
paginationMode: o,
|
|
27
|
+
table: n,
|
|
28
28
|
appearance: r,
|
|
29
|
-
loading:
|
|
30
|
-
onScrollBottom:
|
|
31
|
-
onRowClick:
|
|
32
|
-
groupBy:
|
|
33
|
-
renderGroupHeader:
|
|
29
|
+
loading: e,
|
|
30
|
+
onScrollBottom: a,
|
|
31
|
+
onRowClick: t,
|
|
32
|
+
groupBy: c,
|
|
33
|
+
renderGroupHeader: i
|
|
34
34
|
},
|
|
35
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ l("div", { ref: w, className: C("flex flex-col", f), ...R, children: h })
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
38
|
V.displayName = "DataTableRoot";
|
|
39
39
|
const p = ({
|
|
40
|
-
className:
|
|
40
|
+
className: n,
|
|
41
41
|
ref: r,
|
|
42
|
-
...
|
|
42
|
+
...o
|
|
43
43
|
}) => {
|
|
44
|
-
const { table:
|
|
44
|
+
const { table: e } = d({
|
|
45
45
|
consumerName: "DataTableHeader",
|
|
46
46
|
contextRequired: !0
|
|
47
47
|
});
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
const
|
|
50
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ l(H, { ref: r, className: n, ...o, children: e.getHeaderGroups().map((a) => /* @__PURE__ */ l(G, { children: a.headers.map((t) => {
|
|
49
|
+
const c = t.column.columnDef.meta;
|
|
50
|
+
return /* @__PURE__ */ l(
|
|
51
51
|
v,
|
|
52
52
|
{
|
|
53
|
-
align:
|
|
54
|
-
hideBelow:
|
|
55
|
-
className:
|
|
56
|
-
trailingContent:
|
|
57
|
-
children:
|
|
53
|
+
align: c?.align,
|
|
54
|
+
hideBelow: c?.hideBelow,
|
|
55
|
+
className: c?.className,
|
|
56
|
+
trailingContent: c?.headerTrailingContent,
|
|
57
|
+
children: t.isPlaceholder ? null : t.column.getCanSort() ? /* @__PURE__ */ l(
|
|
58
58
|
q,
|
|
59
59
|
{
|
|
60
|
-
sortDirection:
|
|
61
|
-
onClick:
|
|
62
|
-
align:
|
|
63
|
-
children:
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
sortDirection: t.column.getIsSorted() || void 0,
|
|
61
|
+
onClick: t.column.getToggleSortingHandler(),
|
|
62
|
+
align: c?.align,
|
|
63
|
+
children: m(
|
|
64
|
+
t.column.columnDef.header,
|
|
65
|
+
t.getContext()
|
|
66
66
|
)
|
|
67
67
|
}
|
|
68
|
-
) :
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
) : m(
|
|
69
|
+
t.column.columnDef.header,
|
|
70
|
+
t.getContext()
|
|
71
71
|
)
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
t.id
|
|
74
74
|
);
|
|
75
|
-
}) },
|
|
75
|
+
}) }, a.id)) });
|
|
76
76
|
};
|
|
77
77
|
p.displayName = "DataTableHeader";
|
|
78
|
-
const J = ({ className:
|
|
78
|
+
const J = ({ className: n, ref: r, ...o }) => {
|
|
79
79
|
const {
|
|
80
|
-
appearance:
|
|
81
|
-
paginationMode:
|
|
82
|
-
hideHeader:
|
|
83
|
-
loading:
|
|
84
|
-
onScrollBottom:
|
|
85
|
-
groupBy:
|
|
80
|
+
appearance: e,
|
|
81
|
+
paginationMode: a,
|
|
82
|
+
hideHeader: t,
|
|
83
|
+
loading: c,
|
|
84
|
+
onScrollBottom: i,
|
|
85
|
+
groupBy: s
|
|
86
86
|
} = d({
|
|
87
87
|
consumerName: "DataTable",
|
|
88
88
|
contextRequired: !0
|
|
89
89
|
});
|
|
90
90
|
return /* @__PURE__ */ u(
|
|
91
|
-
|
|
91
|
+
B,
|
|
92
92
|
{
|
|
93
93
|
ref: r,
|
|
94
|
-
appearance:
|
|
95
|
-
loading:
|
|
96
|
-
onScrollBottom:
|
|
97
|
-
className:
|
|
98
|
-
...
|
|
94
|
+
appearance: e,
|
|
95
|
+
loading: c,
|
|
96
|
+
onScrollBottom: i,
|
|
97
|
+
className: n,
|
|
98
|
+
...o,
|
|
99
99
|
children: [
|
|
100
100
|
/* @__PURE__ */ u(S, { children: [
|
|
101
|
-
!
|
|
102
|
-
|
|
101
|
+
!t && /* @__PURE__ */ l(p, {}),
|
|
102
|
+
s ? /* @__PURE__ */ l(D, {}) : /* @__PURE__ */ l(g, {})
|
|
103
103
|
] }),
|
|
104
|
-
|
|
104
|
+
a === "infinite-scroll" && /* @__PURE__ */ l(k, {})
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
108
|
};
|
|
109
109
|
J.displayName = "DataTable";
|
|
110
|
-
const
|
|
111
|
-
const { table:
|
|
110
|
+
const g = ({ className: n, ref: r, ...o }) => {
|
|
111
|
+
const { table: e } = d({
|
|
112
112
|
consumerName: "DataTableBody",
|
|
113
113
|
contextRequired: !0
|
|
114
114
|
});
|
|
115
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ l(T, { ref: r, className: n, ...o, children: e.getRowModel().rows.map((a) => /* @__PURE__ */ l(b, { row: a }, a.id)) });
|
|
116
116
|
};
|
|
117
|
-
|
|
118
|
-
const K = (
|
|
119
|
-
const
|
|
120
|
-
let
|
|
121
|
-
for (const
|
|
122
|
-
const
|
|
123
|
-
(!
|
|
117
|
+
g.displayName = "DataTableBody";
|
|
118
|
+
const K = (n, r) => {
|
|
119
|
+
const o = [];
|
|
120
|
+
let e = null;
|
|
121
|
+
for (const a of n) {
|
|
122
|
+
const t = r(a);
|
|
123
|
+
(!e || e.key !== t) && (e = { key: t, rows: [], count: 0 }, o.push(e)), e.rows.push(a), e.count++;
|
|
124
124
|
}
|
|
125
|
-
return
|
|
126
|
-
},
|
|
127
|
-
className:
|
|
125
|
+
return o;
|
|
126
|
+
}, D = ({
|
|
127
|
+
className: n,
|
|
128
128
|
ref: r,
|
|
129
|
-
...
|
|
129
|
+
...o
|
|
130
130
|
}) => {
|
|
131
|
-
const { table:
|
|
131
|
+
const { table: e, groupBy: a, renderGroupHeader: t } = d({
|
|
132
132
|
consumerName: "DataTableGroupedBody",
|
|
133
133
|
contextRequired: !0
|
|
134
|
-
}),
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
|
|
138
|
-
] },
|
|
134
|
+
}), c = K(e.getRowModel().rows, a);
|
|
135
|
+
return /* @__PURE__ */ l(T, { ref: r, className: n, ...o, children: c.map((i) => /* @__PURE__ */ u(N, { children: [
|
|
136
|
+
/* @__PURE__ */ l(I, { colSpan: i.rows[0].getVisibleCells().length, children: t ? t({ row: i.rows[0], count: i.count }) : i.key }),
|
|
137
|
+
i.rows.map((s) => /* @__PURE__ */ l(b, { row: s }, s.id))
|
|
138
|
+
] }, i.key)) });
|
|
139
139
|
};
|
|
140
|
-
|
|
141
|
-
const
|
|
140
|
+
D.displayName = "DataTableGroupedBody";
|
|
141
|
+
const b = ({ row: n }) => {
|
|
142
142
|
const { onRowClick: r } = d({
|
|
143
143
|
consumerName: "DataTableRow",
|
|
144
144
|
contextRequired: !0
|
|
145
|
-
}),
|
|
146
|
-
return /* @__PURE__ */
|
|
145
|
+
}), o = !!r;
|
|
146
|
+
return /* @__PURE__ */ l(
|
|
147
147
|
F,
|
|
148
148
|
{
|
|
149
|
-
clickable:
|
|
150
|
-
onClick:
|
|
151
|
-
children:
|
|
152
|
-
const
|
|
153
|
-
return /* @__PURE__ */
|
|
149
|
+
clickable: o,
|
|
150
|
+
onClick: o ? () => r?.(n) : void 0,
|
|
151
|
+
children: n.getVisibleCells().map((e) => {
|
|
152
|
+
const a = e.column.columnDef.meta;
|
|
153
|
+
return /* @__PURE__ */ l(
|
|
154
154
|
M,
|
|
155
155
|
{
|
|
156
|
-
align:
|
|
157
|
-
hideBelow:
|
|
158
|
-
className:
|
|
159
|
-
children:
|
|
156
|
+
align: a?.align,
|
|
157
|
+
hideBelow: a?.hideBelow,
|
|
158
|
+
className: a?.className,
|
|
159
|
+
children: m(e.column.columnDef.cell, e.getContext())
|
|
160
160
|
},
|
|
161
|
-
|
|
161
|
+
e.id
|
|
162
162
|
);
|
|
163
163
|
})
|
|
164
164
|
}
|
|
165
165
|
);
|
|
166
166
|
};
|
|
167
|
-
|
|
167
|
+
b.displayName = "DataTableRow";
|
|
168
168
|
const L = ({
|
|
169
|
-
onChange:
|
|
169
|
+
onChange: n,
|
|
170
170
|
...r
|
|
171
171
|
}) => {
|
|
172
|
-
const { table:
|
|
172
|
+
const { table: o } = d({
|
|
173
173
|
consumerName: "DataTableGlobalSearchInput",
|
|
174
174
|
contextRequired: !0
|
|
175
|
-
}),
|
|
176
|
-
(
|
|
177
|
-
|
|
175
|
+
}), e = x(
|
|
176
|
+
(a) => {
|
|
177
|
+
o.setGlobalFilter(a.target.value), n?.(a);
|
|
178
178
|
},
|
|
179
|
-
[
|
|
179
|
+
[o, n]
|
|
180
180
|
);
|
|
181
|
-
return /* @__PURE__ */
|
|
181
|
+
return /* @__PURE__ */ l(
|
|
182
182
|
j,
|
|
183
183
|
{
|
|
184
|
-
value:
|
|
185
|
-
onChange:
|
|
184
|
+
value: o.getState().globalFilter ?? "",
|
|
185
|
+
onChange: e,
|
|
186
186
|
...r
|
|
187
187
|
}
|
|
188
188
|
);
|