@krosoft/react 0.0.161 → 0.0.163
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/DataTable-CSupYrnN.js +506 -0
- package/dist/{TableFilter-mQSKN8O8.js → TableFilter-BjAYRNV9.js} +64 -63
- package/dist/components/core/filters/SearchableFilterPill.d.ts +1 -0
- package/dist/components/core/filters/SearchableFilterPill.d.ts.map +1 -1
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/index.js +2 -2
- package/dist/components/core/table/DataTable.d.ts.map +1 -1
- package/dist/components/core/table/TableActions.d.ts +1 -1
- package/dist/components/core/table/TableActions.d.ts.map +1 -1
- package/dist/components/core/table/TableHeader.d.ts.map +1 -1
- package/dist/components/core/table/index.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/types/ColumnDef.d.ts +1 -0
- package/dist/types/ColumnDef.d.ts.map +1 -1
- package/dist/types/RowAction.d.ts +4 -0
- package/dist/types/RowAction.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/DataTable-DJM7KWWK.js +0 -476
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as F, useEffect as $, useMemo as A } from "react";
|
|
3
3
|
import { a as D, D as O, b as j, S as M } from "./SearchInput-bwnVKhhE.js";
|
|
4
|
-
import { B as k, a$ as I, bv as
|
|
4
|
+
import { B as k, a$ as I, bv as z, bx as R, bw as B, $ as C } from "./toggle-group-BASGy2mQ.js";
|
|
5
5
|
import "./alert-B78CiTYe.js";
|
|
6
6
|
import "@radix-ui/react-aspect-ratio";
|
|
7
7
|
import { B as w } from "./tooltip-BWyFpIxo.js";
|
|
@@ -16,14 +16,14 @@ import "next-themes";
|
|
|
16
16
|
import "sonner";
|
|
17
17
|
import { c as re } from "./tailwind.helper-B6yFEsav.js";
|
|
18
18
|
import { M as te } from "./MultiSelect-BPffv2am.js";
|
|
19
|
-
const L = (
|
|
19
|
+
const L = (a, n, c = {}) => {
|
|
20
20
|
if (n instanceof Date)
|
|
21
21
|
return n.toLocaleDateString("fr-FR");
|
|
22
|
-
const i = String(n), d = c[`${
|
|
23
|
-
return d !== void 0 ? d :
|
|
22
|
+
const i = String(n), d = c[`${a}_${i}`];
|
|
23
|
+
return d !== void 0 ? d : a.includes("ok") || n === "true" || n === "false" ? n === "true" ? "Oui" : "Non" : i;
|
|
24
24
|
};
|
|
25
|
-
function le({ filters:
|
|
26
|
-
const o = Object.entries(
|
|
25
|
+
function le({ filters: a, onRemoveFilter: n, onClearAll: c, filterLabels: i = {}, optionLabels: d = {} }) {
|
|
26
|
+
const o = Object.entries(a).filter(([h, m]) => !(m == null || m === "" || Array.isArray(m) && m.length === 0));
|
|
27
27
|
return o.length === 0 ? null : /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-2 mb-4", children: [
|
|
28
28
|
/* @__PURE__ */ r("span", { className: "text-sm text-gray-600 font-medium", children: "Filtres actifs :" }),
|
|
29
29
|
o.flatMap(([h, m]) => {
|
|
@@ -76,18 +76,18 @@ function le({ filters: l, onRemoveFilter: n, onClearAll: c, filterLabels: i = {}
|
|
|
76
76
|
] });
|
|
77
77
|
}
|
|
78
78
|
const ae = ({
|
|
79
|
-
field:
|
|
79
|
+
field: a,
|
|
80
80
|
value: n,
|
|
81
81
|
onChange: c,
|
|
82
82
|
onToggleMultiSelect: i
|
|
83
83
|
}) => {
|
|
84
84
|
var d;
|
|
85
|
-
switch (
|
|
85
|
+
switch (a.type) {
|
|
86
86
|
case "text":
|
|
87
87
|
return /* @__PURE__ */ r(
|
|
88
88
|
P,
|
|
89
89
|
{
|
|
90
|
-
placeholder:
|
|
90
|
+
placeholder: a.placeholder,
|
|
91
91
|
value: n ?? "",
|
|
92
92
|
onChange: (o) => {
|
|
93
93
|
c(o.target.value);
|
|
@@ -99,55 +99,55 @@ const ae = ({
|
|
|
99
99
|
P,
|
|
100
100
|
{
|
|
101
101
|
type: "number",
|
|
102
|
-
placeholder:
|
|
102
|
+
placeholder: a.placeholder,
|
|
103
103
|
value: n ?? "",
|
|
104
104
|
onChange: (o) => {
|
|
105
105
|
c(o.target.value);
|
|
106
106
|
},
|
|
107
|
-
min:
|
|
108
|
-
max:
|
|
107
|
+
min: a.min,
|
|
108
|
+
max: a.max
|
|
109
109
|
}
|
|
110
110
|
);
|
|
111
111
|
case "select":
|
|
112
|
-
return
|
|
112
|
+
return a.searchable === !0 ? /* @__PURE__ */ r(
|
|
113
113
|
j,
|
|
114
114
|
{
|
|
115
|
-
options:
|
|
115
|
+
options: a.options ?? [],
|
|
116
116
|
value: n,
|
|
117
117
|
onChange: c,
|
|
118
|
-
placeholder:
|
|
119
|
-
searchPlaceholder:
|
|
118
|
+
placeholder: a.placeholder,
|
|
119
|
+
searchPlaceholder: a.searchPlaceholder
|
|
120
120
|
}
|
|
121
121
|
) : /* @__PURE__ */ u(W, { value: n ?? "", onValueChange: c, children: [
|
|
122
|
-
/* @__PURE__ */ r(Y, { className: re((n === void 0 || n === "") && "text-muted-foreground"), children: /* @__PURE__ */ r(Z, { placeholder:
|
|
123
|
-
/* @__PURE__ */ r(q, { children: (d =
|
|
122
|
+
/* @__PURE__ */ r(Y, { className: re((n === void 0 || n === "") && "text-muted-foreground"), children: /* @__PURE__ */ r(Z, { placeholder: a.placeholder }) }),
|
|
123
|
+
/* @__PURE__ */ r(q, { children: (d = a.options) == null ? void 0 : d.map((o) => /* @__PURE__ */ r(ee, { value: o.value, children: o.label }, o.value)) })
|
|
124
124
|
] });
|
|
125
125
|
case "date":
|
|
126
|
-
return /* @__PURE__ */ r(O, { date: n, onDateChange: c, placeholder:
|
|
126
|
+
return /* @__PURE__ */ r(O, { date: n, onDateChange: c, placeholder: a.placeholder ?? "Sélectionner une date" });
|
|
127
127
|
case "date-range":
|
|
128
|
-
return /* @__PURE__ */ r(D, { value: n, onChange: c, placeholder:
|
|
128
|
+
return /* @__PURE__ */ r(D, { value: n, onChange: c, placeholder: a.placeholder });
|
|
129
129
|
case "multi-select":
|
|
130
130
|
return /* @__PURE__ */ r(
|
|
131
131
|
te,
|
|
132
132
|
{
|
|
133
|
-
options:
|
|
133
|
+
options: a.options ?? [],
|
|
134
134
|
selected: n ?? [],
|
|
135
135
|
onToggle: i,
|
|
136
136
|
onClear: () => {
|
|
137
137
|
c([]);
|
|
138
138
|
},
|
|
139
139
|
onSelectAll: c,
|
|
140
|
-
placeholder:
|
|
141
|
-
searchable:
|
|
142
|
-
searchPlaceholder:
|
|
140
|
+
placeholder: a.placeholder,
|
|
141
|
+
searchable: a.searchable,
|
|
142
|
+
searchPlaceholder: a.searchPlaceholder
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
default:
|
|
146
146
|
return null;
|
|
147
147
|
}
|
|
148
|
-
}, se = (
|
|
148
|
+
}, se = (a) => !(a == null || a === "" || Array.isArray(a) && a.length === 0);
|
|
149
149
|
function ne({
|
|
150
|
-
sections:
|
|
150
|
+
sections: a,
|
|
151
151
|
filters: n,
|
|
152
152
|
onFiltersChange: c,
|
|
153
153
|
buttonText: i = "Plus de filtres",
|
|
@@ -157,19 +157,19 @@ function ne({
|
|
|
157
157
|
$(() => {
|
|
158
158
|
b(n);
|
|
159
159
|
}, [n, o]);
|
|
160
|
-
const g = (
|
|
161
|
-
b((t) => ({ ...t, [
|
|
162
|
-
}, x = (
|
|
163
|
-
const t = m[
|
|
164
|
-
g(
|
|
160
|
+
const g = (l, e) => {
|
|
161
|
+
b((t) => ({ ...t, [l]: e }));
|
|
162
|
+
}, x = (l, e) => {
|
|
163
|
+
const t = m[l], s = Array.isArray(t) ? t : [], f = s.includes(e) ? s.filter((N) => N !== e) : [...s, e];
|
|
164
|
+
g(l, f);
|
|
165
165
|
}, p = () => {
|
|
166
166
|
c(m), h(!1);
|
|
167
167
|
}, y = () => {
|
|
168
168
|
b({}), c({}), h(!1);
|
|
169
169
|
}, v = A(() => {
|
|
170
|
-
const
|
|
171
|
-
return Object.entries(n).filter(([e, t]) =>
|
|
172
|
-
}, [
|
|
170
|
+
const l = new Set(a.flatMap((e) => e.filters.map((t) => t.key)));
|
|
171
|
+
return Object.entries(n).filter(([e, t]) => l.has(e) && se(t)).length;
|
|
172
|
+
}, [a, n]);
|
|
173
173
|
return /* @__PURE__ */ u(Q, { open: o, onOpenChange: h, children: [
|
|
174
174
|
/* @__PURE__ */ r(V, { asChild: !0, children: /* @__PURE__ */ u(w, { variant: "outline", className: "gap-2", children: [
|
|
175
175
|
/* @__PURE__ */ r(J, { className: "size-4 shrink-0" }),
|
|
@@ -178,9 +178,9 @@ function ne({
|
|
|
178
178
|
] }) }),
|
|
179
179
|
/* @__PURE__ */ u(_, { side: "right", className: "w-[400px] sm:w-[500px] flex flex-col p-0", children: [
|
|
180
180
|
/* @__PURE__ */ r(H, { className: "p-6 pb-0", children: /* @__PURE__ */ r(X, { children: d }) }),
|
|
181
|
-
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto p-6 pt-6", children: /* @__PURE__ */ r("div", { className: "space-y-6", children:
|
|
182
|
-
/* @__PURE__ */ r("h3", { className: "font-semibold text-sm text-gray-900 dark:text-gray-100 border-b pb-2", children:
|
|
183
|
-
|
|
181
|
+
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto p-6 pt-6", children: /* @__PURE__ */ r("div", { className: "space-y-6", children: a.map((l, e) => /* @__PURE__ */ u("div", { className: "space-y-4", children: [
|
|
182
|
+
/* @__PURE__ */ r("h3", { className: "font-semibold text-sm text-gray-900 dark:text-gray-100 border-b pb-2", children: l.title }),
|
|
183
|
+
l.filters.map((t) => /* @__PURE__ */ u("div", { className: "space-y-2", children: [
|
|
184
184
|
/* @__PURE__ */ r(I, { htmlFor: t.key, children: t.label }),
|
|
185
185
|
/* @__PURE__ */ r(
|
|
186
186
|
ae,
|
|
@@ -205,7 +205,7 @@ function ne({
|
|
|
205
205
|
] });
|
|
206
206
|
}
|
|
207
207
|
function ce({
|
|
208
|
-
label:
|
|
208
|
+
label: a,
|
|
209
209
|
options: n,
|
|
210
210
|
selected: c,
|
|
211
211
|
onToggle: i,
|
|
@@ -214,37 +214,37 @@ function ce({
|
|
|
214
214
|
searchable: h = !1,
|
|
215
215
|
searchPlaceholder: m = "Rechercher..."
|
|
216
216
|
}) {
|
|
217
|
-
const [b, g] = F(""), x = c.length > 0, p = A(() => b === "" ? n : n.filter((
|
|
217
|
+
const [b, g] = F(""), x = c.length > 0, p = A(() => b === "" ? n : n.filter((l) => l.label.toLowerCase().includes(b.toLowerCase())), [n, b]), y = A(() => p.length === 0 ? !1 : p.every((l) => c.includes(l.value)), [p, c]), v = () => {
|
|
218
218
|
if (y)
|
|
219
219
|
if (o !== void 0) {
|
|
220
|
-
const
|
|
220
|
+
const l = p.map((t) => t.value), e = c.filter((t) => !l.includes(t));
|
|
221
221
|
o(e);
|
|
222
|
-
} else d !== void 0 ? d() : c.forEach((
|
|
223
|
-
i(
|
|
222
|
+
} else d !== void 0 ? d() : c.forEach((l) => {
|
|
223
|
+
i(l);
|
|
224
224
|
});
|
|
225
225
|
else if (o !== void 0) {
|
|
226
|
-
const
|
|
226
|
+
const l = [...c];
|
|
227
227
|
p.forEach((e) => {
|
|
228
|
-
|
|
229
|
-
}), o(
|
|
228
|
+
l.includes(e.value) || l.push(e.value);
|
|
229
|
+
}), o(l);
|
|
230
230
|
} else
|
|
231
|
-
p.forEach((
|
|
232
|
-
c.includes(
|
|
231
|
+
p.forEach((l) => {
|
|
232
|
+
c.includes(l.value) || i(l.value);
|
|
233
233
|
});
|
|
234
234
|
};
|
|
235
235
|
return /* @__PURE__ */ u(
|
|
236
|
-
|
|
236
|
+
z,
|
|
237
237
|
{
|
|
238
238
|
onOpenChange: () => {
|
|
239
239
|
g("");
|
|
240
240
|
},
|
|
241
241
|
children: [
|
|
242
|
-
/* @__PURE__ */ r(
|
|
242
|
+
/* @__PURE__ */ r(R, { asChild: !0, children: /* @__PURE__ */ u(
|
|
243
243
|
"button",
|
|
244
244
|
{
|
|
245
245
|
className: `inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm transition-colors whitespace-nowrap ${x ? "border-primary bg-primary/10 text-primary font-medium" : "border-border bg-card text-card-foreground hover:bg-muted"}`,
|
|
246
246
|
children: [
|
|
247
|
-
|
|
247
|
+
a,
|
|
248
248
|
c.length > 0 && /* @__PURE__ */ r("span", { className: "flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary px-1 text-[10px] font-bold text-primary-foreground", children: c.length }),
|
|
249
249
|
/* @__PURE__ */ r(K, { className: "size-3.5 opacity-60" })
|
|
250
250
|
]
|
|
@@ -259,8 +259,8 @@ function ce({
|
|
|
259
259
|
className: "w-full rounded-md bg-muted/50 py-1.5 pl-7 pr-2 text-sm text-foreground placeholder:text-muted-foreground outline-none focus:ring-1 focus:ring-ring",
|
|
260
260
|
placeholder: m,
|
|
261
261
|
value: b,
|
|
262
|
-
onChange: (
|
|
263
|
-
g(
|
|
262
|
+
onChange: (l) => {
|
|
263
|
+
g(l.target.value);
|
|
264
264
|
},
|
|
265
265
|
autoFocus: !0
|
|
266
266
|
}
|
|
@@ -272,25 +272,26 @@ function ce({
|
|
|
272
272
|
"Tout sélectionner"
|
|
273
273
|
] }),
|
|
274
274
|
p.length === 0 && /* @__PURE__ */ r("p", { className: "px-2 py-3 text-center text-xs text-muted-foreground", children: "Aucun résultat" }),
|
|
275
|
-
p.map((
|
|
275
|
+
p.map((l) => /* @__PURE__ */ u("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
|
|
276
276
|
/* @__PURE__ */ r(
|
|
277
277
|
C,
|
|
278
278
|
{
|
|
279
|
-
checked: c.includes(
|
|
279
|
+
checked: c.includes(l.value),
|
|
280
280
|
onCheckedChange: () => {
|
|
281
|
-
i(
|
|
281
|
+
i(l.value);
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
),
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
l.color && /* @__PURE__ */ r("span", { className: "size-2.5 shrink-0 rounded-full", style: { backgroundColor: l.color } }),
|
|
286
|
+
l.label
|
|
287
|
+
] }, l.value))
|
|
287
288
|
] }),
|
|
288
289
|
c.length > 0 && /* @__PURE__ */ r("div", { className: "border-t border-border p-1.5", children: /* @__PURE__ */ r(
|
|
289
290
|
"button",
|
|
290
291
|
{
|
|
291
292
|
onClick: () => {
|
|
292
|
-
d !== void 0 ? d() : c.forEach((
|
|
293
|
-
i(
|
|
293
|
+
d !== void 0 ? d() : c.forEach((l) => {
|
|
294
|
+
i(l);
|
|
294
295
|
});
|
|
295
296
|
},
|
|
296
297
|
className: "w-full rounded-md px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted transition-colors text-center",
|
|
@@ -303,7 +304,7 @@ function ce({
|
|
|
303
304
|
);
|
|
304
305
|
}
|
|
305
306
|
function ke({
|
|
306
|
-
searchQuery:
|
|
307
|
+
searchQuery: a,
|
|
307
308
|
onSearchChange: n,
|
|
308
309
|
searchPlaceholder: c = "Rechercher...",
|
|
309
310
|
filters: i,
|
|
@@ -343,7 +344,7 @@ function ke({
|
|
|
343
344
|
e[s.key] = s.badgeLabel ?? s.label;
|
|
344
345
|
});
|
|
345
346
|
}), e;
|
|
346
|
-
}, [o]),
|
|
347
|
+
}, [o]), l = A(() => {
|
|
347
348
|
const e = {};
|
|
348
349
|
return o.forEach((t) => {
|
|
349
350
|
t.filters.forEach((s) => {
|
|
@@ -359,7 +360,7 @@ function ke({
|
|
|
359
360
|
n !== void 0 ? /* @__PURE__ */ r(
|
|
360
361
|
M,
|
|
361
362
|
{
|
|
362
|
-
searchQuery:
|
|
363
|
+
searchQuery: a,
|
|
363
364
|
onSearch: n,
|
|
364
365
|
onClear: () => {
|
|
365
366
|
n("");
|
|
@@ -397,7 +398,7 @@ function ke({
|
|
|
397
398
|
onRemoveFilter: p,
|
|
398
399
|
onClearAll: x,
|
|
399
400
|
filterLabels: v,
|
|
400
|
-
optionLabels:
|
|
401
|
+
optionLabels: l
|
|
401
402
|
}
|
|
402
403
|
)
|
|
403
404
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchableFilterPill.d.ts","sourceRoot":"","sources":["../../../../src/components/core/filters/SearchableFilterPill.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchableFilterPill.d.ts","sourceRoot":"","sources":["../../../../src/components/core/filters/SearchableFilterPill.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,EAAE,EACrD,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,WAAW,EACX,UAAkB,EAClB,iBAAmC,GACpC,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,CAAC,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,KAAK,CAAC,YAAY,CA6HrB"}
|
|
@@ -2,7 +2,7 @@ import { D as r, M as o } from "../../MetricCard-D-qPl6zh.js";
|
|
|
2
2
|
import { K as t, a as i, S as l, b as p } from "../../SkeletonCards-qHukR79N.js";
|
|
3
3
|
import { A as m, C as d, F as g } from "../../ConfirmationDialog-Dy_6PcOr.js";
|
|
4
4
|
import { D as A, a as D, b as T, c as n, d as c, e as x, f as S, g as C, h as F, i as P, P as h } from "../../toggle-group-BASGy2mQ.js";
|
|
5
|
-
import { A as k, a as H, F as I, S as K, T as v } from "../../TableFilter-
|
|
5
|
+
import { A as k, a as H, F as I, S as K, T as v } from "../../TableFilter-BjAYRNV9.js";
|
|
6
6
|
import { G as M } from "../../GenericForm-Bb4E2Wxd.js";
|
|
7
7
|
import { I as L } from "../../ImageInput-CJ419eqw.js";
|
|
8
8
|
import { D as G, a as N, S as O, b as R } from "../../SearchInput-bwnVKhhE.js";
|
|
@@ -15,7 +15,7 @@ import { S as _, a as $, b as aa, T as ea } from "../../Topbar-DMyjbOTI.js";
|
|
|
15
15
|
import { E as oa } from "../../ErrorAlert-DH1onuyt.js";
|
|
16
16
|
import { E as ta } from "../../ErrorState-vU8d4CwD.js";
|
|
17
17
|
import { L as la } from "../../LoadingState-BN0YaPSs.js";
|
|
18
|
-
import { D as ba, T as ma, a as da, b as ga, c as fa, d as Aa, e as Da } from "../../DataTable-
|
|
18
|
+
import { D as ba, T as ma, a as da, b as ga, c as fa, d as Aa, e as Da } from "../../DataTable-CSupYrnN.js";
|
|
19
19
|
import { A as na, a as ca, b as xa, c as Sa } from "../../AppVerticalTabs-NZ02HPGP.js";
|
|
20
20
|
import { T as Fa } from "../../ThemeSelector-CQ3fSDJ2.js";
|
|
21
21
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/DataTable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/DataTable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMvE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEvE,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAG3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAG9C,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,KAAK,IAAI,CAAC;CAC3E;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAC3B,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,EACX,gBAAwB,EACxB,gBAAwB,EACxB,gBAAwB,EACxB,SAAiB,EACjB,QAAgB,EAChB,aAAgC,EAChC,eAAmC,EACnC,eAA2C,EAC3C,SAAS,EACT,WAAW,EACX,QAAQ,EAAE,kBAAkB,EAC5B,YAAY,EACZ,gBAAgB,EAChB,UAAU,EAAE,oBAAoB,EAChC,aAAa,EAAE,uBAAuB,EACtC,YAAY,GACb,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkHvC"}
|
|
@@ -4,5 +4,5 @@ export interface TableActionsProps<T> {
|
|
|
4
4
|
actions: RowAction<T>[];
|
|
5
5
|
row: T;
|
|
6
6
|
}
|
|
7
|
-
export declare function TableActions<T>({ actions, row }: TableActionsProps<T>): React.JSX.Element;
|
|
7
|
+
export declare function TableActions<T>({ actions, row }: TableActionsProps<T>): React.JSX.Element | null;
|
|
8
8
|
//# sourceMappingURL=TableActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableActions.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/TableActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,GAAG,EAAE,CAAC,CAAC;CACR;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"TableActions.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/TableActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,GAAG,EAAE,CAAC,CAAC;CACR;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAqEhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mBAAmB,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,KAAK,GAAG,MAAM,CAAC;IAC9B,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,cAAc,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,UAAU,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAC7B,cAAc,EACd,YAAY,EACZ,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,eAAe,EACf,UAAU,EACV,YAAY,EACZ,QAAgB,GACjB,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mBAAmB,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,KAAK,GAAG,MAAM,CAAC;IAC9B,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,cAAc,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,UAAU,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAC7B,cAAc,EACd,YAAY,EACZ,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,eAAe,EACf,UAAU,EACV,YAAY,EACZ,QAAgB,GACjB,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwFzC"}
|
package/dist/components/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { D as o, M as r } from "../MetricCard-D-qPl6zh.js";
|
|
|
2
2
|
import { K as t, a as n, S as i, b as l } from "../SkeletonCards-qHukR79N.js";
|
|
3
3
|
import { A as p, C as u, F as g } from "../ConfirmationDialog-Dy_6PcOr.js";
|
|
4
4
|
import { A as m, j as C, k as S, l as T, m as c, n as D, o as M, p as x, q as A, r as I, s as P, t as h, u as f, v as w, w as v, x as F, B as L, y as B, z as G, C as H, E as R, F as k, G as N, H as y, I as E, J as O, K as V, L as K, M as z, N as U, O as j, Q as q, R as J, S as Q, T as W, U as X, V as Y, W as Z, X as _, Y as $, Z as aa, _ as ea, $ as oa, a0 as ra, a1 as sa, a2 as ta, a3 as na, a4 as ia, a5 as la, a6 as ba, a7 as pa, a8 as ua, a9 as ga, aa as da, ab as ma, ac as Ca, ad as Sa, ae as Ta, af as ca, ag as Da, ah as Ma, ai as xa, aj as Aa, ak as Ia, al as Pa, am as ha, an as fa, D as wa, a as va, b as Fa, c as La, d as Ba, e as Ga, f as Ha, g as Ra, h as ka, i as Na, ao as ya, ap as Ea, aq as Oa, ar as Va, as as Ka, at as za, au as Ua, av as ja, aw as qa, ax as Ja, ay as Qa, az as Wa, aA as Xa, aB as Ya, aC as Za, aD as _a, aE as $a, aF as ae, aG as ee, aH as oe, aI as re, aJ as se, aK as te, aL as ne, aM as ie, aN as le, aO as be, aP as pe, aQ as ue, aR as ge, aS as de, aT as me, aU as Ce, aV as Se, aW as Te, aX as ce, aY as De, aZ as Me, a_ as xe, a$ as Ae, b0 as Ie, b1 as Pe, b2 as he, b3 as fe, b4 as we, b5 as ve, b6 as Fe, b7 as Le, b8 as Be, b9 as Ge, ba as He, bb as Re, bc as ke, bd as Ne, be as ye, bf as Ee, bg as Oe, bh as Ve, bi as Ke, bj as ze, bk as Ue, bl as je, bm as qe, bn as Je, bo as Qe, bp as We, bq as Xe, br as Ye, bs as Ze, bt as _e, bu as $e, bv as ao, bw as eo, bx as oo, P as ro, by as so, bz as to, bA as no, bB as io, bC as lo, bD as bo, bE as po, bF as uo, bG as go, bH as mo, bI as Co, bJ as So, bK as To, bL as co, bM as Do, bN as Mo, bO as xo, bP as Ao, bQ as Io, bR as Po, bS as ho, bT as fo, bU as wo, bV as vo, bW as Fo, bX as Lo, bY as Bo, bZ as Go, b_ as Ho, b$ as Ro, c0 as ko, c1 as No, c2 as yo, c3 as Eo } from "../toggle-group-BASGy2mQ.js";
|
|
5
|
-
import { A as Vo, a as Ko, F as zo, S as Uo, T as jo } from "../TableFilter-
|
|
5
|
+
import { A as Vo, a as Ko, F as zo, S as Uo, T as jo } from "../TableFilter-BjAYRNV9.js";
|
|
6
6
|
import { G as Jo } from "../GenericForm-Bb4E2Wxd.js";
|
|
7
7
|
import { I as Wo } from "../ImageInput-CJ419eqw.js";
|
|
8
8
|
import { D as Yo, a as Zo, S as _o, b as $o } from "../SearchInput-bwnVKhhE.js";
|
|
@@ -15,7 +15,7 @@ import { S as gr, a as dr, b as mr, T as Cr } from "../Topbar-DMyjbOTI.js";
|
|
|
15
15
|
import { E as Tr } from "../ErrorAlert-DH1onuyt.js";
|
|
16
16
|
import { E as Dr } from "../ErrorState-vU8d4CwD.js";
|
|
17
17
|
import { L as xr } from "../LoadingState-BN0YaPSs.js";
|
|
18
|
-
import { D as Ir, T as Pr, a as hr, b as fr, c as wr, d as vr, e as Fr } from "../DataTable-
|
|
18
|
+
import { D as Ir, T as Pr, a as hr, b as fr, c as wr, d as vr, e as Fr } from "../DataTable-CSupYrnN.js";
|
|
19
19
|
import { A as Br, a as Gr, b as Hr, c as Rr } from "../AppVerticalTabs-NZ02HPGP.js";
|
|
20
20
|
import { T as Nr } from "../ThemeSelector-CQ3fSDJ2.js";
|
|
21
21
|
import { A as Er, a as Or, b as Vr } from "../alert-B78CiTYe.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnDef.d.ts","sourceRoot":"","sources":["../../src/types/ColumnDef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAEzC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACzE"}
|
|
1
|
+
{"version":3,"file":"ColumnDef.d.ts","sourceRoot":"","sources":["../../src/types/ColumnDef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAEzC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACzE"}
|
|
@@ -4,5 +4,9 @@ export interface RowAction<T> {
|
|
|
4
4
|
icon?: React.ElementType;
|
|
5
5
|
onClick: (row: T) => void;
|
|
6
6
|
className?: string;
|
|
7
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
8
|
+
visible?: (row: T) => boolean;
|
|
9
|
+
disabled?: (row: T) => boolean;
|
|
10
|
+
overflow?: boolean;
|
|
7
11
|
}
|
|
8
12
|
//# sourceMappingURL=RowAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowAction.d.ts","sourceRoot":"","sources":["../../src/types/RowAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"RowAction.d.ts","sourceRoot":"","sources":["../../src/types/RowAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;IAEjF,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC;IAE9B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC;IAE/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|