@krosoft/react 0.0.162 → 0.0.164
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/{AppActions-DCaejx-3.js → AppActions-DCYt9I0e.js} +1 -1
- package/dist/{AppSubTitle-BNd5_q0i.js → AppSubTitle-DhioA5bv.js} +1 -1
- package/dist/{AppVerticalTabs-NZ02HPGP.js → AppVerticalTabs-DujFNh9f.js} +2 -2
- package/dist/{ConfirmationDialog-Dy_6PcOr.js → ConfirmationDialog-CCZPbD4x.js} +2 -2
- package/dist/DataTable-CQ2LlJS7.js +506 -0
- package/dist/{GenericForm-Bb4E2Wxd.js → GenericForm-EohJXOt8.js} +4 -4
- package/dist/{ImageInput-CJ419eqw.js → ImageInput-Bbxr8vpu.js} +1 -1
- package/dist/{KpiCardsLayout-CK1TEUc1.js → KpiCardsLayout-DBqGhp0I.js} +3 -3
- package/dist/{MetricCard-D-qPl6zh.js → MetricCard-rL1mIA58.js} +1 -1
- package/dist/{MultiSelect-BPffv2am.js → MultiSelect-B72dsN-1.js} +1 -1
- package/dist/{SearchInput-bwnVKhhE.js → SearchInput-rRYNQ8fq.js} +1 -1
- package/dist/{SkeletonCards-qHukR79N.js → SkeletonCards-BgsWWMun.js} +1 -1
- package/dist/{TableFilter-BjAYRNV9.js → TableFilter-BfWYeTv_.js} +3 -3
- package/dist/components/core/cards/index.js +2 -2
- package/dist/components/core/dialogs/index.js +2 -2
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.js +14 -14
- package/dist/components/core/inputs/index.js +3 -3
- package/dist/components/core/layouts/index.js +3 -3
- package/dist/components/core/table/DataTable.d.ts +1 -1
- 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/TableBody.d.ts +1 -1
- package/dist/components/core/table/TableBody.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/core/tabs/index.js +1 -1
- package/dist/components/index.js +15 -15
- package/dist/components/ui/index.js +2 -2
- package/dist/{toaster-Du2OlHAd.js → toaster-DTcdwmkK.js} +1 -1
- package/dist/{toggle-group-BASGy2mQ.js → toggle-group-DY9wl0HW.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,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { ay as u, aM as t, aA as c, aH as g, aC as d } from "./toggle-group-
|
|
2
|
+
import { ay as u, aM as t, aA as c, aH as g, aC as d } from "./toggle-group-DY9wl0HW.js";
|
|
3
3
|
import "./alert-B78CiTYe.js";
|
|
4
4
|
import "@radix-ui/react-aspect-ratio";
|
|
5
5
|
import { B as p } from "./tooltip-BWyFpIxo.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as l } from "react-i18next";
|
|
3
|
-
import { A as m } from "./AppActions-
|
|
3
|
+
import { A as m } from "./AppActions-DCYt9I0e.js";
|
|
4
4
|
function f({ titleKey: s, actions: t, className: o }) {
|
|
5
5
|
const { t: r } = l();
|
|
6
6
|
return /* @__PURE__ */ i("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4", children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { J as N, N as g, K as v, bN as y, bP as T, bQ as b, bO as w, bA as S } from "./toggle-group-
|
|
3
|
-
import { A as C } from "./AppActions-
|
|
2
|
+
import { J as N, N as g, K as v, bN as y, bP as T, bQ as b, bO as w, bA as S } from "./toggle-group-DY9wl0HW.js";
|
|
3
|
+
import { A as C } from "./AppActions-DCYt9I0e.js";
|
|
4
4
|
import { A } from "./AppTitle-uboDuil4.js";
|
|
5
5
|
import { useTranslation as x } from "react-i18next";
|
|
6
6
|
import { useSearchParams as f } from "react-router-dom";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as M } from "react/jsx-runtime";
|
|
2
|
-
import { D as q, b as B, P as R, e as W, h as X, c as $, m as J, p as Q, s as F, t as U, q as j, r as V, o as Y } from "./toggle-group-
|
|
2
|
+
import { D as q, b as B, P as R, e as W, h as X, c as $, m as J, p as Q, s as F, t as U, q as j, r as V, o as Y } from "./toggle-group-DY9wl0HW.js";
|
|
3
3
|
import { A as Z, a as _ } from "./alert-B78CiTYe.js";
|
|
4
4
|
import "@radix-ui/react-aspect-ratio";
|
|
5
5
|
import { B as v } from "./tooltip-BWyFpIxo.js";
|
|
@@ -14,7 +14,7 @@ import "next-themes";
|
|
|
14
14
|
import "sonner";
|
|
15
15
|
import { useState as w, useEffect as ee } from "react";
|
|
16
16
|
import { useTranslation as O } from "react-i18next";
|
|
17
|
-
import { G as le } from "./GenericForm-
|
|
17
|
+
import { G as le } from "./GenericForm-EohJXOt8.js";
|
|
18
18
|
import { E as ie } from "./ErrorAlert-DH1onuyt.js";
|
|
19
19
|
function re({ open: t, onOpenChange: c, config: l, isLoading: u, error: s, children: p }) {
|
|
20
20
|
const { t: i } = O(), { title: b, description: m, icon: f, maxWidth: g = "sm:max-w-xl", actions: n } = l;
|
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { u as ae } from "./useDataTable-CxcA5S-s.js";
|
|
3
|
+
import { ay as P, aM as $, aA as W, aC as se, $ as B, az as ie } from "./toggle-group-DY9wl0HW.js";
|
|
4
|
+
import "./alert-B78CiTYe.js";
|
|
5
|
+
import "@radix-ui/react-aspect-ratio";
|
|
6
|
+
import { B as y } from "./tooltip-BWyFpIxo.js";
|
|
7
|
+
import "@radix-ui/react-collapsible";
|
|
8
|
+
import "./sheet-Gop1cIaU.js";
|
|
9
|
+
import { MoreVerticalIcon as ne, Loader2Icon as le, GripVerticalIcon as de, ArrowUpIcon as oe, ArrowDownIcon as ce, ArrowUpDownIcon as me, ChevronLeftIcon as he, ChevronRightIcon as ge, SettingsIcon as ue } from "lucide-react";
|
|
10
|
+
import "react-resizable-panels";
|
|
11
|
+
import "clsx";
|
|
12
|
+
import "tailwind-merge";
|
|
13
|
+
import "./select-MWzbMBAS.js";
|
|
14
|
+
import "next-themes";
|
|
15
|
+
import "sonner";
|
|
16
|
+
import "react";
|
|
17
|
+
const L = [5, 10, 30, 50, 100], pe = L[1];
|
|
18
|
+
function fe({ actions: d, row: a }) {
|
|
19
|
+
const o = d.filter((r) => r.visible === void 0 || r.visible(a));
|
|
20
|
+
if (o.length === 0)
|
|
21
|
+
return null;
|
|
22
|
+
const i = o.filter((r) => r.overflow !== !0), m = o.filter((r) => r.overflow === !0);
|
|
23
|
+
return /* @__PURE__ */ t("div", { className: "flex items-center justify-center gap-1", children: [
|
|
24
|
+
i.map((r, h) => {
|
|
25
|
+
var c;
|
|
26
|
+
const g = r.icon;
|
|
27
|
+
return /* @__PURE__ */ t(
|
|
28
|
+
y,
|
|
29
|
+
{
|
|
30
|
+
variant: r.variant ?? "ghost",
|
|
31
|
+
size: "sm",
|
|
32
|
+
disabled: ((c = r.disabled) == null ? void 0 : c.call(r, a)) ?? !1,
|
|
33
|
+
className: `h-7 px-2 text-muted-foreground hover:text-foreground ${r.className ?? ""}`,
|
|
34
|
+
onClick: (n) => {
|
|
35
|
+
n.stopPropagation(), r.onClick(a);
|
|
36
|
+
},
|
|
37
|
+
children: [
|
|
38
|
+
g !== void 0 && /* @__PURE__ */ e(g, { className: "size-3.5" }),
|
|
39
|
+
r.label
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
h
|
|
43
|
+
);
|
|
44
|
+
}),
|
|
45
|
+
m.length > 0 && /* @__PURE__ */ t(P, { children: [
|
|
46
|
+
/* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(y, { variant: "ghost", size: "icon", className: "h-7 w-7 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ e(ne, { className: "size-3.5" }) }) }),
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
W,
|
|
49
|
+
{
|
|
50
|
+
align: "end",
|
|
51
|
+
onClick: (r) => {
|
|
52
|
+
r.stopPropagation();
|
|
53
|
+
},
|
|
54
|
+
children: m.map((r, h) => {
|
|
55
|
+
var c;
|
|
56
|
+
const g = r.icon;
|
|
57
|
+
return /* @__PURE__ */ t(
|
|
58
|
+
se,
|
|
59
|
+
{
|
|
60
|
+
disabled: ((c = r.disabled) == null ? void 0 : c.call(r, a)) ?? !1,
|
|
61
|
+
onClick: () => {
|
|
62
|
+
r.onClick(a);
|
|
63
|
+
},
|
|
64
|
+
className: r.className,
|
|
65
|
+
children: [
|
|
66
|
+
g !== void 0 && /* @__PURE__ */ e("span", { className: "mr-2 size-4 flex items-center justify-center", children: /* @__PURE__ */ e(g, { className: "size-4" }) }),
|
|
67
|
+
r.label
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
h
|
|
71
|
+
);
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] })
|
|
76
|
+
] });
|
|
77
|
+
}
|
|
78
|
+
function xe({
|
|
79
|
+
isLoading: d,
|
|
80
|
+
colSpanCount: a,
|
|
81
|
+
noDataMessage: o,
|
|
82
|
+
paginatedData: i,
|
|
83
|
+
getRowId: m,
|
|
84
|
+
onRowClick: r,
|
|
85
|
+
hasBulkActions: h,
|
|
86
|
+
selectedRows: g,
|
|
87
|
+
toggleRowSelection: c,
|
|
88
|
+
visibleColumnsArray: n,
|
|
89
|
+
columnWidths: N,
|
|
90
|
+
hasActions: z,
|
|
91
|
+
actions: v,
|
|
92
|
+
columns: w,
|
|
93
|
+
bordered: k = !1
|
|
94
|
+
}) {
|
|
95
|
+
const D = (u, p) => {
|
|
96
|
+
const s = w.find((b) => b.key === p);
|
|
97
|
+
if ((s == null ? void 0 : s.renderCell) !== void 0)
|
|
98
|
+
return s.renderCell(u);
|
|
99
|
+
const x = u[p];
|
|
100
|
+
return /* @__PURE__ */ e("span", { className: "text-sm truncate", children: x != null ? String(x) : "-" });
|
|
101
|
+
};
|
|
102
|
+
return d ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: a, className: "py-8 text-center", children: /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center gap-2 text-muted-foreground", children: [
|
|
103
|
+
/* @__PURE__ */ e(le, { className: "h-6 w-6 animate-spin text-primary" }),
|
|
104
|
+
/* @__PURE__ */ e("span", { className: "text-sm", children: "Chargement..." })
|
|
105
|
+
] }) }) }) }) : i.length === 0 ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: a, className: "py-8 text-center text-sm text-muted-foreground", children: o }) }) }) : /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: i.map((u) => {
|
|
106
|
+
const p = m(u);
|
|
107
|
+
return /* @__PURE__ */ t(
|
|
108
|
+
"tr",
|
|
109
|
+
{
|
|
110
|
+
className: `group hover:bg-muted/50 dark:hover:bg-gray-900/50 transition-colors ${r !== void 0 ? "cursor-pointer" : ""}`,
|
|
111
|
+
onClick: (s) => r == null ? void 0 : r(u, s),
|
|
112
|
+
children: [
|
|
113
|
+
h ? /* @__PURE__ */ e(
|
|
114
|
+
"td",
|
|
115
|
+
{
|
|
116
|
+
className: "p-1 text-center align-middle",
|
|
117
|
+
style: { width: "32px", minWidth: "32px", maxWidth: "32px" },
|
|
118
|
+
onClick: (s) => {
|
|
119
|
+
s.stopPropagation();
|
|
120
|
+
},
|
|
121
|
+
children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
122
|
+
B,
|
|
123
|
+
{
|
|
124
|
+
checked: g.includes(p),
|
|
125
|
+
onCheckedChange: () => {
|
|
126
|
+
c(p);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
) })
|
|
130
|
+
}
|
|
131
|
+
) : null,
|
|
132
|
+
n.map((s, x) => {
|
|
133
|
+
const b = x === n.length - 1;
|
|
134
|
+
return /* @__PURE__ */ e(
|
|
135
|
+
"td",
|
|
136
|
+
{
|
|
137
|
+
className: `px-2 py-2 relative ${k && !b ? "border-r border-gray-100 dark:border-gray-800" : ""} ${s.className ?? ""}`,
|
|
138
|
+
style: { width: N[s.key] },
|
|
139
|
+
children: /* @__PURE__ */ e("div", { className: "w-full h-full", children: D(u, s.key) })
|
|
140
|
+
},
|
|
141
|
+
s.key
|
|
142
|
+
);
|
|
143
|
+
}),
|
|
144
|
+
z ? /* @__PURE__ */ e(
|
|
145
|
+
"td",
|
|
146
|
+
{
|
|
147
|
+
className: "p-1 text-center align-middle whitespace-nowrap",
|
|
148
|
+
style: { minWidth: "32px" },
|
|
149
|
+
onClick: (s) => {
|
|
150
|
+
s.stopPropagation();
|
|
151
|
+
},
|
|
152
|
+
children: v !== void 0 && v.length > 0 ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(fe, { actions: v, row: u }) }) : null
|
|
153
|
+
}
|
|
154
|
+
) : null
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
p
|
|
158
|
+
);
|
|
159
|
+
}) });
|
|
160
|
+
}
|
|
161
|
+
function ve({ selectedRows: d, setSelectedRows: a, bulkActions: o }) {
|
|
162
|
+
return /* @__PURE__ */ t("div", { className: "bg-muted/60 dark:bg-gray-900/60 border border-border px-3 py-1.5 flex items-center justify-between rounded-lg", children: [
|
|
163
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-4", children: [
|
|
164
|
+
/* @__PURE__ */ t("span", { className: "text-sm font-medium text-primary ml-1", children: [
|
|
165
|
+
d.length,
|
|
166
|
+
" sélectionné(s)"
|
|
167
|
+
] }),
|
|
168
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: o.map((i, m) => {
|
|
169
|
+
const r = i.icon;
|
|
170
|
+
return /* @__PURE__ */ t(
|
|
171
|
+
y,
|
|
172
|
+
{
|
|
173
|
+
variant: "outline",
|
|
174
|
+
size: "sm",
|
|
175
|
+
onClick: () => {
|
|
176
|
+
i.onClick(d, () => {
|
|
177
|
+
a([]);
|
|
178
|
+
});
|
|
179
|
+
},
|
|
180
|
+
className: `h-7 bg-background shadow-sm text-xs px-2.5 ${i.variant === "destructive" ? "text-destructive border-destructive/30 hover:bg-destructive/10 hover:text-destructive" : "text-foreground"}`,
|
|
181
|
+
children: [
|
|
182
|
+
r !== void 0 && /* @__PURE__ */ e("span", { className: "mr-1.5 flex items-center justify-center", children: /* @__PURE__ */ e(r, { className: "h-3.5 w-3.5" }) }),
|
|
183
|
+
i.label
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
m
|
|
187
|
+
);
|
|
188
|
+
}) })
|
|
189
|
+
] }),
|
|
190
|
+
/* @__PURE__ */ e(
|
|
191
|
+
y,
|
|
192
|
+
{
|
|
193
|
+
variant: "ghost",
|
|
194
|
+
size: "sm",
|
|
195
|
+
onClick: () => {
|
|
196
|
+
a([]);
|
|
197
|
+
},
|
|
198
|
+
className: "text-xs text-muted-foreground hover:text-foreground h-7 px-2",
|
|
199
|
+
children: "Désélectionner"
|
|
200
|
+
}
|
|
201
|
+
)
|
|
202
|
+
] });
|
|
203
|
+
}
|
|
204
|
+
function be({
|
|
205
|
+
hasBulkActions: d,
|
|
206
|
+
selectedRows: a,
|
|
207
|
+
totalItems: o,
|
|
208
|
+
toggleSelectAll: i,
|
|
209
|
+
visibleColumnsArray: m,
|
|
210
|
+
draggableColumns: r,
|
|
211
|
+
resizableColumns: h,
|
|
212
|
+
columnWidths: g,
|
|
213
|
+
sortColumn: c,
|
|
214
|
+
sortDirection: n,
|
|
215
|
+
handleSort: N,
|
|
216
|
+
handleDragStart: z,
|
|
217
|
+
handleDragOver: v,
|
|
218
|
+
handleDrop: w,
|
|
219
|
+
handleMouseDown: k,
|
|
220
|
+
hasActions: D,
|
|
221
|
+
settingsNode: u,
|
|
222
|
+
bordered: p = !1
|
|
223
|
+
}) {
|
|
224
|
+
let s = !1;
|
|
225
|
+
a.length === o && o > 0 ? s = !0 : a.length > 0 && (s = "indeterminate");
|
|
226
|
+
const x = (l) => l.sortable !== !0 ? null : c === l.key ? n === "asc" ? /* @__PURE__ */ e(oe, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(ce, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(me, { className: "size-3.5 text-muted-foreground/50 group-hover:text-muted-foreground transition-colors" }), b = (l, I) => {
|
|
227
|
+
const S = I !== !1, C = l.sortable === !0;
|
|
228
|
+
return /* @__PURE__ */ t(
|
|
229
|
+
"th",
|
|
230
|
+
{
|
|
231
|
+
className: [
|
|
232
|
+
"px-2 py-2 text-left text-sm font-medium text-gray-900 dark:text-gray-100 relative group",
|
|
233
|
+
p ? "border-r border-gray-200 dark:border-gray-800" : "",
|
|
234
|
+
C ? "cursor-pointer select-none" : "",
|
|
235
|
+
l.className ?? ""
|
|
236
|
+
].filter(Boolean).join(" "),
|
|
237
|
+
style: { width: g[l.key] },
|
|
238
|
+
draggable: S,
|
|
239
|
+
onClick: () => {
|
|
240
|
+
N(l.key);
|
|
241
|
+
},
|
|
242
|
+
onDragStart: (f) => {
|
|
243
|
+
S ? z(f, l.key) : f.preventDefault();
|
|
244
|
+
},
|
|
245
|
+
onDragOver: (f) => {
|
|
246
|
+
v(f, l.key);
|
|
247
|
+
},
|
|
248
|
+
onDrop: (f) => {
|
|
249
|
+
w(f, l.key);
|
|
250
|
+
},
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between pr-2", children: [
|
|
253
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: [
|
|
254
|
+
S ? /* @__PURE__ */ e(de, { className: "size-4 text-gray-400 cursor-grab dark:text-gray-300 shrink-0" }) : null,
|
|
255
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: l.label })
|
|
256
|
+
] }),
|
|
257
|
+
/* @__PURE__ */ e("div", { className: "ml-1 shrink-0", children: x(l) })
|
|
258
|
+
] }),
|
|
259
|
+
h ? /* @__PURE__ */ e(
|
|
260
|
+
"div",
|
|
261
|
+
{
|
|
262
|
+
className: "absolute right-0 top-0 bottom-0 w-2 cursor-col-resize hover:bg-blue-500 opacity-0 group-hover:opacity-50 transition-opacity",
|
|
263
|
+
onMouseDown: (f) => {
|
|
264
|
+
k(f, l.key);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
) : null
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
l.key
|
|
271
|
+
);
|
|
272
|
+
};
|
|
273
|
+
return /* @__PURE__ */ e("thead", { className: "bg-muted/50 dark:bg-gray-900/50 border-b border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ t("tr", { children: [
|
|
274
|
+
d ? /* @__PURE__ */ e("th", { className: "p-1 flex-shrink-0 text-center align-middle", style: { width: "32px", minWidth: "32px", maxWidth: "32px" }, children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(B, { checked: s, onCheckedChange: i }) }) }) : null,
|
|
275
|
+
m.map((l) => b(l, r)),
|
|
276
|
+
D || u !== void 0 ? /* @__PURE__ */ e("th", { className: "p-1 text-center align-middle", style: { minWidth: "32px" }, children: u }) : null
|
|
277
|
+
] }) });
|
|
278
|
+
}
|
|
279
|
+
function ye({
|
|
280
|
+
totalItems: d,
|
|
281
|
+
startIndex: a,
|
|
282
|
+
endIndex: o,
|
|
283
|
+
pageSize: i,
|
|
284
|
+
setPageSize: m,
|
|
285
|
+
currentPage: r,
|
|
286
|
+
setCurrentPage: h,
|
|
287
|
+
pageSizeOptions: g,
|
|
288
|
+
totalPages: c
|
|
289
|
+
}) {
|
|
290
|
+
return /* @__PURE__ */ t("div", { className: "px-4 py-2 border-t border-gray-200 dark:border-gray-800 flex items-center justify-between bg-muted/50 dark:bg-gray-900/50 flex-wrap gap-2", children: [
|
|
291
|
+
/* @__PURE__ */ t("div", { className: "text-sm text-muted-foreground", children: [
|
|
292
|
+
d === 0 ? "0" : `${String(a + 1)} - ${String(o)}`,
|
|
293
|
+
" sur ",
|
|
294
|
+
d
|
|
295
|
+
] }),
|
|
296
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-4", children: [
|
|
297
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
298
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Lignes par page :" }),
|
|
299
|
+
/* @__PURE__ */ e(
|
|
300
|
+
"select",
|
|
301
|
+
{
|
|
302
|
+
value: i,
|
|
303
|
+
onChange: (n) => {
|
|
304
|
+
m(Number(n.target.value)), h(1);
|
|
305
|
+
},
|
|
306
|
+
className: "border border-input bg-background rounded px-2 py-1 text-sm text-foreground",
|
|
307
|
+
children: g.map((n) => /* @__PURE__ */ e("option", { value: n, children: n }, n))
|
|
308
|
+
}
|
|
309
|
+
)
|
|
310
|
+
] }),
|
|
311
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
312
|
+
/* @__PURE__ */ e(
|
|
313
|
+
y,
|
|
314
|
+
{
|
|
315
|
+
variant: "outline",
|
|
316
|
+
size: "sm",
|
|
317
|
+
className: "h-8 w-8 p-0",
|
|
318
|
+
onClick: () => {
|
|
319
|
+
h((n) => Math.max(1, n - 1));
|
|
320
|
+
},
|
|
321
|
+
disabled: r === 1,
|
|
322
|
+
children: /* @__PURE__ */ e(he, { className: "size-4" })
|
|
323
|
+
}
|
|
324
|
+
),
|
|
325
|
+
/* @__PURE__ */ t("span", { className: "text-sm text-muted-foreground", children: [
|
|
326
|
+
"Page ",
|
|
327
|
+
r,
|
|
328
|
+
" sur ",
|
|
329
|
+
c
|
|
330
|
+
] }),
|
|
331
|
+
/* @__PURE__ */ e(
|
|
332
|
+
y,
|
|
333
|
+
{
|
|
334
|
+
variant: "outline",
|
|
335
|
+
size: "sm",
|
|
336
|
+
className: "h-8 w-8 p-0",
|
|
337
|
+
onClick: () => {
|
|
338
|
+
h((n) => Math.min(c, n + 1));
|
|
339
|
+
},
|
|
340
|
+
disabled: r === c,
|
|
341
|
+
children: /* @__PURE__ */ e(ge, { className: "size-4" })
|
|
342
|
+
}
|
|
343
|
+
)
|
|
344
|
+
] })
|
|
345
|
+
] })
|
|
346
|
+
] });
|
|
347
|
+
}
|
|
348
|
+
function Ne({ columns: d, visibleColumns: a, toggleColumnVisibility: o }) {
|
|
349
|
+
return /* @__PURE__ */ t(P, { children: [
|
|
350
|
+
/* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(y, { variant: "outline", size: "sm", className: "size-7 p-0 bg-white hover:bg-gray-100 dark:bg-gray-900 shadow-sm border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ e(ue, { className: "size-3.5 text-gray-600 dark:text-gray-300" }) }) }),
|
|
351
|
+
/* @__PURE__ */ e(W, { align: "end", className: "w-56", children: d.map((i) => /* @__PURE__ */ e(
|
|
352
|
+
ie,
|
|
353
|
+
{
|
|
354
|
+
checked: a.has(i.key),
|
|
355
|
+
onCheckedChange: () => {
|
|
356
|
+
o(i.key);
|
|
357
|
+
},
|
|
358
|
+
children: i.label
|
|
359
|
+
},
|
|
360
|
+
i.key
|
|
361
|
+
)) })
|
|
362
|
+
] });
|
|
363
|
+
}
|
|
364
|
+
function He({
|
|
365
|
+
data: d,
|
|
366
|
+
columns: a,
|
|
367
|
+
getRowId: o,
|
|
368
|
+
onRowClick: i,
|
|
369
|
+
actions: m,
|
|
370
|
+
bulkActions: r,
|
|
371
|
+
draggableColumns: h = !1,
|
|
372
|
+
resizableColumns: g = !1,
|
|
373
|
+
columnVisibility: c = !1,
|
|
374
|
+
isLoading: n = !1,
|
|
375
|
+
bordered: N = !1,
|
|
376
|
+
noDataMessage: z = "Aucun résultat",
|
|
377
|
+
defaultPageSize: v = pe,
|
|
378
|
+
pageSizeOptions: w = L,
|
|
379
|
+
totalRows: k,
|
|
380
|
+
currentPage: D,
|
|
381
|
+
pageSize: u,
|
|
382
|
+
onPageChange: p,
|
|
383
|
+
onPageSizeChange: s,
|
|
384
|
+
sortColumn: x,
|
|
385
|
+
sortDirection: b,
|
|
386
|
+
onSortChange: l
|
|
387
|
+
}) {
|
|
388
|
+
const {
|
|
389
|
+
sortColumn: I,
|
|
390
|
+
sortDirection: S,
|
|
391
|
+
selectedRows: C,
|
|
392
|
+
setSelectedRows: f,
|
|
393
|
+
visibleColumns: H,
|
|
394
|
+
columnWidths: j,
|
|
395
|
+
safeCurrentPage: O,
|
|
396
|
+
totalPages: U,
|
|
397
|
+
startIndex: V,
|
|
398
|
+
endIndex: G,
|
|
399
|
+
tableRef: q,
|
|
400
|
+
hasActions: A,
|
|
401
|
+
hasBulkActions: M,
|
|
402
|
+
visibleColumnsArray: T,
|
|
403
|
+
colSpanCount: E,
|
|
404
|
+
paginatedData: F,
|
|
405
|
+
handleSort: J,
|
|
406
|
+
handleMouseDown: Q,
|
|
407
|
+
handleDragStart: X,
|
|
408
|
+
handleDragOver: Y,
|
|
409
|
+
handleDrop: Z,
|
|
410
|
+
toggleColumnVisibility: _,
|
|
411
|
+
toggleRowSelection: K,
|
|
412
|
+
toggleSelectAll: R,
|
|
413
|
+
pageSize: ee,
|
|
414
|
+
setPageSize: re,
|
|
415
|
+
setCurrentPage: te
|
|
416
|
+
} = ae({
|
|
417
|
+
data: d,
|
|
418
|
+
columns: a,
|
|
419
|
+
getRowId: o,
|
|
420
|
+
defaultPageSize: v,
|
|
421
|
+
actions: m,
|
|
422
|
+
bulkActions: r,
|
|
423
|
+
columnVisibility: c,
|
|
424
|
+
totalRows: k,
|
|
425
|
+
currentPage: D,
|
|
426
|
+
pageSize: u,
|
|
427
|
+
onPageChange: p,
|
|
428
|
+
onPageSizeChange: s,
|
|
429
|
+
sortColumn: x,
|
|
430
|
+
sortDirection: b,
|
|
431
|
+
onSortChange: l
|
|
432
|
+
});
|
|
433
|
+
return /* @__PURE__ */ t("div", { className: "space-y-4", children: [
|
|
434
|
+
C.length > 0 && r !== void 0 && r.length > 0 && /* @__PURE__ */ e(ve, { selectedRows: C, setSelectedRows: f, bulkActions: r }),
|
|
435
|
+
/* @__PURE__ */ t("div", { className: "w-full bg-card dark:bg-gray-950 rounded-md border border-gray-200 dark:border-gray-800 overflow-hidden", children: [
|
|
436
|
+
/* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ t("table", { ref: q, className: "w-full", children: [
|
|
437
|
+
/* @__PURE__ */ e(
|
|
438
|
+
be,
|
|
439
|
+
{
|
|
440
|
+
hasBulkActions: M,
|
|
441
|
+
selectedRows: C,
|
|
442
|
+
totalItems: d.length,
|
|
443
|
+
toggleSelectAll: R,
|
|
444
|
+
visibleColumnsArray: T,
|
|
445
|
+
draggableColumns: h,
|
|
446
|
+
resizableColumns: g,
|
|
447
|
+
columnWidths: j,
|
|
448
|
+
sortColumn: I,
|
|
449
|
+
sortDirection: S,
|
|
450
|
+
handleSort: J,
|
|
451
|
+
handleDragStart: X,
|
|
452
|
+
handleDragOver: Y,
|
|
453
|
+
handleDrop: Z,
|
|
454
|
+
handleMouseDown: Q,
|
|
455
|
+
hasActions: A,
|
|
456
|
+
bordered: N,
|
|
457
|
+
settingsNode: c ? /* @__PURE__ */ e(Ne, { columns: a, visibleColumns: H, toggleColumnVisibility: _ }) : void 0
|
|
458
|
+
}
|
|
459
|
+
),
|
|
460
|
+
/* @__PURE__ */ e(
|
|
461
|
+
xe,
|
|
462
|
+
{
|
|
463
|
+
bordered: N,
|
|
464
|
+
isLoading: n,
|
|
465
|
+
colSpanCount: E,
|
|
466
|
+
noDataMessage: z,
|
|
467
|
+
paginatedData: F,
|
|
468
|
+
getRowId: o,
|
|
469
|
+
onRowClick: i,
|
|
470
|
+
hasBulkActions: M,
|
|
471
|
+
selectedRows: C,
|
|
472
|
+
toggleRowSelection: K,
|
|
473
|
+
visibleColumnsArray: T,
|
|
474
|
+
columnWidths: j,
|
|
475
|
+
hasActions: A || c,
|
|
476
|
+
actions: m,
|
|
477
|
+
columns: a
|
|
478
|
+
}
|
|
479
|
+
)
|
|
480
|
+
] }) }),
|
|
481
|
+
/* @__PURE__ */ e(
|
|
482
|
+
ye,
|
|
483
|
+
{
|
|
484
|
+
totalItems: k ?? d.length,
|
|
485
|
+
startIndex: V,
|
|
486
|
+
endIndex: G,
|
|
487
|
+
pageSize: ee,
|
|
488
|
+
setPageSize: re,
|
|
489
|
+
currentPage: O,
|
|
490
|
+
setCurrentPage: te,
|
|
491
|
+
pageSizeOptions: w,
|
|
492
|
+
totalPages: U
|
|
493
|
+
}
|
|
494
|
+
)
|
|
495
|
+
] })
|
|
496
|
+
] });
|
|
497
|
+
}
|
|
498
|
+
export {
|
|
499
|
+
He as D,
|
|
500
|
+
fe as T,
|
|
501
|
+
xe as a,
|
|
502
|
+
ve as b,
|
|
503
|
+
be as c,
|
|
504
|
+
ye as d,
|
|
505
|
+
Ne as e
|
|
506
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { I as J } from "./ImageInput-
|
|
3
|
-
import { A as V } from "./AppSubTitle-
|
|
4
|
-
import { M as Q } from "./MultiSelect-
|
|
5
|
-
import { aN as W, aQ as $, aR as q, aS as D, aO as A, aT as L, J as X, N as Y, K as F, bR as ee, $ as te } from "./toggle-group-
|
|
2
|
+
import { I as J } from "./ImageInput-Bbxr8vpu.js";
|
|
3
|
+
import { A as V } from "./AppSubTitle-DhioA5bv.js";
|
|
4
|
+
import { M as Q } from "./MultiSelect-B72dsN-1.js";
|
|
5
|
+
import { aN as W, aQ as $, aR as q, aS as D, aO as A, aT as L, J as X, N as Y, K as F, bR as ee, $ as te } from "./toggle-group-DY9wl0HW.js";
|
|
6
6
|
import "./alert-B78CiTYe.js";
|
|
7
7
|
import "@radix-ui/react-aspect-ratio";
|
|
8
8
|
import { B as M } from "./tooltip-BWyFpIxo.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "./toggle-group-
|
|
2
|
+
import "./toggle-group-DY9wl0HW.js";
|
|
3
3
|
import "./alert-B78CiTYe.js";
|
|
4
4
|
import "@radix-ui/react-aspect-ratio";
|
|
5
5
|
import { B as l } from "./tooltip-BWyFpIxo.js";
|
|
@@ -13,12 +13,12 @@ import "./select-MWzbMBAS.js";
|
|
|
13
13
|
import "next-themes";
|
|
14
14
|
import "sonner";
|
|
15
15
|
import "react";
|
|
16
|
-
import { A as f } from "./AppActions-
|
|
16
|
+
import { A as f } from "./AppActions-DCYt9I0e.js";
|
|
17
17
|
import { A as u } from "./AppTitle-uboDuil4.js";
|
|
18
18
|
import { u as d } from "./useDocumentTitle-WNwdPz-I.js";
|
|
19
19
|
import { useTranslation as x } from "react-i18next";
|
|
20
20
|
import "@krosoft/core/helpers";
|
|
21
|
-
import { b as g, a as h } from "./SkeletonCards-
|
|
21
|
+
import { b as g, a as h } from "./SkeletonCards-BgsWWMun.js";
|
|
22
22
|
import { E as A } from "./ErrorState-vU8d4CwD.js";
|
|
23
23
|
function M({
|
|
24
24
|
icon: e,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { J as l, N as h, O as m, K as g } from "./toggle-group-
|
|
2
|
+
import { J as l, N as h, O as m, K as g } from "./toggle-group-DY9wl0HW.js";
|
|
3
3
|
import { c as b } from "./tailwind.helper-B6yFEsav.js";
|
|
4
4
|
import { useTranslation as p } from "react-i18next";
|
|
5
5
|
const k = ({ titleKey: t, icon: s, className: n, children: a }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as k, useRef as w, useMemo as N, useEffect as y } from "react";
|
|
3
|
-
import { $ as C } from "./toggle-group-
|
|
3
|
+
import { $ as C } from "./toggle-group-DY9wl0HW.js";
|
|
4
4
|
import "./alert-B78CiTYe.js";
|
|
5
5
|
import "@radix-ui/react-aspect-ratio";
|
|
6
6
|
import "./tooltip-BWyFpIxo.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as w from "react";
|
|
3
3
|
import { useState as k, useRef as C, useEffect as z, useMemo as S } from "react";
|
|
4
|
-
import { I, bv as O, bx as T, bw as j } from "./toggle-group-
|
|
4
|
+
import { I, bv as O, bx as T, bw as j } from "./toggle-group-DY9wl0HW.js";
|
|
5
5
|
import "./alert-B78CiTYe.js";
|
|
6
6
|
import "@radix-ui/react-aspect-ratio";
|
|
7
7
|
import { B as g } from "./tooltip-BWyFpIxo.js";
|
|
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as e, Fragment as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { formatNumber as g } from "@krosoft/core/helpers";
|
|
3
3
|
import { useTranslation as b } from "react-i18next";
|
|
4
4
|
import { c as m } from "./tailwind.helper-B6yFEsav.js";
|
|
5
|
-
import { J as c, N as p, O as v, K as N } from "./toggle-group-
|
|
5
|
+
import { J as c, N as p, O as v, K as N } from "./toggle-group-DY9wl0HW.js";
|
|
6
6
|
import "./alert-B78CiTYe.js";
|
|
7
7
|
import "@radix-ui/react-aspect-ratio";
|
|
8
8
|
import "./tooltip-BWyFpIxo.js";
|
|
@@ -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
|
-
import { a as D, D as O, b as j, S as M } from "./SearchInput-
|
|
4
|
-
import { B as k, a$ as I, bv as z, bx as R, bw as B, $ as C } from "./toggle-group-
|
|
3
|
+
import { a as D, D as O, b as j, S as M } from "./SearchInput-rRYNQ8fq.js";
|
|
4
|
+
import { B as k, a$ as I, bv as z, bx as R, bw as B, $ as C } from "./toggle-group-DY9wl0HW.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";
|
|
@@ -15,7 +15,7 @@ import { S as W, h as Y, i as Z, a as q, c as ee } from "./select-MWzbMBAS.js";
|
|
|
15
15
|
import "next-themes";
|
|
16
16
|
import "sonner";
|
|
17
17
|
import { c as re } from "./tailwind.helper-B6yFEsav.js";
|
|
18
|
-
import { M as te } from "./MultiSelect-
|
|
18
|
+
import { M as te } from "./MultiSelect-B72dsN-1.js";
|
|
19
19
|
const L = (a, n, c = {}) => {
|
|
20
20
|
if (n instanceof Date)
|
|
21
21
|
return n.toLocaleDateString("fr-FR");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as s, M as d } from "../../../MetricCard-
|
|
2
|
-
import { K as o, a as C, S as t, b as p } from "../../../SkeletonCards-
|
|
1
|
+
import { D as s, M as d } from "../../../MetricCard-rL1mIA58.js";
|
|
2
|
+
import { K as o, a as C, S as t, b as p } from "../../../SkeletonCards-BgsWWMun.js";
|
|
3
3
|
export {
|
|
4
4
|
s as DashboardCard,
|
|
5
5
|
o as KpiCard,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as i, C as s, F as g } from "../../../ConfirmationDialog-
|
|
2
|
-
import { D as r, a as D, b as e, c as t, d as n, e as p, f, g as m, h as C, i as F, P } from "../../../toggle-group-
|
|
1
|
+
import { A as i, C as s, F as g } from "../../../ConfirmationDialog-CCZPbD4x.js";
|
|
2
|
+
import { D as r, a as D, b as e, c as t, d as n, e as p, f, g as m, h as C, i as F, P } from "../../../toggle-group-DY9wl0HW.js";
|
|
3
3
|
export {
|
|
4
4
|
i as AppDialog,
|
|
5
5
|
s as ConfirmationDialog,
|