@kareemelbalshe/any-table 1.0.1 → 1.0.3
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/adapters/index.d.ts +1 -0
- package/dist/adapters/legacyActionsAdapter.d.ts +20 -0
- package/dist/components/TableEmptyState.d.ts +1 -0
- package/dist/components/TableToolbar.d.ts +16 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useAnyTableSelection.d.ts +15 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1029 -899
- package/dist/index.js.map +1 -1
- package/dist/renderers/DefaultRenderers.d.ts +12 -0
- package/dist/style.css +1 -1
- package/dist/theme/defaultTheme.d.ts +3 -3
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/presets.d.ts +3 -0
- package/dist/types/column.types.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
function
|
|
4
|
-
if (e == null) return
|
|
1
|
+
import { jsx as o, jsxs as y, Fragment as me } from "react/jsx-runtime";
|
|
2
|
+
import Ke, { useMemo as B, useState as A, useEffect as ne, useCallback as N, useRef as Tt, useImperativeHandle as Pt, createContext as Et, useContext as Ve } from "react";
|
|
3
|
+
function S(e, t, n = void 0) {
|
|
4
|
+
if (e == null) return n;
|
|
5
5
|
if (!t || typeof t != "string") return e;
|
|
6
6
|
if (t in e && e[t] !== void 0)
|
|
7
7
|
return e[t];
|
|
@@ -10,90 +10,90 @@ function P(e, t, s = void 0) {
|
|
|
10
10
|
for (let i = 0; i < l.length; i++) {
|
|
11
11
|
const g = l[i];
|
|
12
12
|
if (r == null)
|
|
13
|
-
return
|
|
13
|
+
return n;
|
|
14
14
|
r = r[g];
|
|
15
15
|
}
|
|
16
|
-
return r !== void 0 ? r :
|
|
16
|
+
return r !== void 0 ? r : n;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function $t(e) {
|
|
19
19
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function re(e) {
|
|
22
22
|
if (!e || typeof e != "string") return "";
|
|
23
23
|
let t = e.replace(/[._\-]+/g, " ");
|
|
24
|
-
return t = t.replace(/([a-z])([A-Z])/g, "$1 $2"), t.split(" ").filter(Boolean).map((
|
|
25
|
-
const
|
|
26
|
-
return
|
|
24
|
+
return t = t.replace(/([a-z])([A-Z])/g, "$1 $2"), t.split(" ").filter(Boolean).map((n) => {
|
|
25
|
+
const s = n.toLowerCase();
|
|
26
|
+
return n.length <= 3 && n === n.toUpperCase() ? n : s.charAt(0).toUpperCase() + s.slice(1);
|
|
27
27
|
}).join(" ");
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
29
|
+
const Bt = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".bmp", ".avif"], Dt = ["image", "avatar", "photo", "logo", "picture", "thumbnail", "banner", "img", "icon"], Mt = ["price", "spend", "cost", "amount", "total", "fee", "rate", "salary", "balance", "deposit", "commission", "charge"], _t = ["status", "state", "phase", "condition"];
|
|
30
|
+
function ae(e, t) {
|
|
31
|
+
const n = e.toLowerCase();
|
|
32
|
+
if (Dt.some((r) => n.includes(r)))
|
|
33
33
|
return "image";
|
|
34
|
-
if (
|
|
34
|
+
if (Mt.some((r) => n.includes(r)))
|
|
35
35
|
return "currency";
|
|
36
|
-
if (
|
|
36
|
+
if (_t.some((r) => n.includes(r)))
|
|
37
37
|
return "status";
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
38
|
+
const s = t.filter((r) => r != null && r !== "");
|
|
39
|
+
if (s.length === 0)
|
|
40
40
|
return "string";
|
|
41
|
-
const l =
|
|
42
|
-
if (typeof l == "boolean" ||
|
|
41
|
+
const l = s[0];
|
|
42
|
+
if (typeof l == "boolean" || n.startsWith("is") || n.startsWith("has"))
|
|
43
43
|
return "boolean";
|
|
44
44
|
if (Array.isArray(l))
|
|
45
45
|
return "array";
|
|
46
46
|
if (typeof l == "object")
|
|
47
|
-
return l.url && typeof l.url == "string" &&
|
|
47
|
+
return l.url && typeof l.url == "string" && Fe(l.url) ? "image" : "object";
|
|
48
48
|
if (typeof l == "number")
|
|
49
49
|
return "number";
|
|
50
50
|
if (typeof l == "string") {
|
|
51
51
|
const r = l.trim();
|
|
52
|
-
if (
|
|
52
|
+
if (Fe(r))
|
|
53
53
|
return "image";
|
|
54
|
-
if ((
|
|
54
|
+
if ((jt(r) || n.includes("date") || n.includes("at") || n.includes("time")) && !isNaN(Date.parse(r)))
|
|
55
55
|
return r.includes("T") || r.includes(":") ? "datetime" : "date";
|
|
56
56
|
if (r.includes("@") && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r))
|
|
57
57
|
return "email";
|
|
58
58
|
if (r.startsWith("http://") || r.startsWith("https://"))
|
|
59
59
|
return "url";
|
|
60
|
-
if (
|
|
60
|
+
if (n.includes("phone") || n.includes("mobile") || n.includes("tel"))
|
|
61
61
|
return "phone";
|
|
62
62
|
}
|
|
63
63
|
return "string";
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Fe(e) {
|
|
66
66
|
if (!e || typeof e != "string") return !1;
|
|
67
67
|
if (e.startsWith("data:image/")) return !0;
|
|
68
68
|
const t = e.toLowerCase().split("?")[0];
|
|
69
|
-
return
|
|
69
|
+
return Bt.some((n) => t.endsWith(n));
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function jt(e) {
|
|
72
72
|
return !e || typeof e != "string" || e.length < 10 ? !1 : /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/.test(e);
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
function
|
|
74
|
+
const Wt = ["__v", "password", "token", "refreshToken", "secret", "hash", "salt"];
|
|
75
|
+
function zt(e, t = Wt, n = 2) {
|
|
76
76
|
if (!e || !e.length)
|
|
77
77
|
return [];
|
|
78
|
-
const
|
|
78
|
+
const s = /* @__PURE__ */ new Map(), l = e.slice(0, 10);
|
|
79
79
|
for (const r of l)
|
|
80
|
-
!r || typeof r != "object" ||
|
|
81
|
-
return Array.from(
|
|
80
|
+
!r || typeof r != "object" || Ge(r, "", s, l, t, 0, n);
|
|
81
|
+
return Array.from(s.values());
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Ge(e, t, n, s, l, r, i) {
|
|
84
84
|
if (!(!e || typeof e != "object" || r > i))
|
|
85
85
|
for (const g of Object.keys(e)) {
|
|
86
86
|
if (l.includes(g)) continue;
|
|
87
87
|
const c = t ? `${t}.${g}` : g, d = e[g];
|
|
88
|
-
if (
|
|
89
|
-
|
|
88
|
+
if ($t(d) && !Ft(d) && r < i) {
|
|
89
|
+
Ge(d, c, n, s, l, r + 1, i);
|
|
90
90
|
continue;
|
|
91
91
|
}
|
|
92
|
-
if (!
|
|
93
|
-
const a =
|
|
94
|
-
|
|
92
|
+
if (!n.has(c)) {
|
|
93
|
+
const a = s.map((m) => S(m, c)), u = ae(c, a);
|
|
94
|
+
n.set(c, {
|
|
95
95
|
key: c,
|
|
96
|
-
title:
|
|
96
|
+
title: re(c),
|
|
97
97
|
type: u,
|
|
98
98
|
sortable: !0,
|
|
99
99
|
searchable: !0,
|
|
@@ -102,13 +102,13 @@ function et(e, t, s, o, l, r, i) {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function Ft(e, t) {
|
|
106
106
|
return "en" in e && "ar" in e && Object.keys(e).length <= 3 ? !1 : "url" in e && typeof e.url == "string" || "coordinates" in e || "lat" in e && "lng" in e;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
const { data: t = [], columns:
|
|
108
|
+
function Lt(e) {
|
|
109
|
+
const { data: t = [], columns: n, autoColumns: s = !0, thead: l, headerData: r } = e;
|
|
110
110
|
return r && Array.isArray(r) && r.length > 0 ? r.map((i, g) => {
|
|
111
|
-
const c = l && l[g] ? l[g] :
|
|
111
|
+
const c = l && l[g] ? l[g] : re(i), d = t.map((u) => u?.[i]), a = ae(i, d);
|
|
112
112
|
return {
|
|
113
113
|
key: i,
|
|
114
114
|
title: c,
|
|
@@ -117,19 +117,19 @@ function Ut(e) {
|
|
|
117
117
|
searchable: !0,
|
|
118
118
|
align: a === "number" || a === "currency" ? "right" : "left"
|
|
119
119
|
};
|
|
120
|
-
}) :
|
|
120
|
+
}) : n && Array.isArray(n) && n.length > 0 ? n.map((i) => {
|
|
121
121
|
if (typeof i == "string") {
|
|
122
|
-
const a = t.map((m) => m?.[i]), u =
|
|
122
|
+
const a = t.map((m) => m?.[i]), u = ae(i, a);
|
|
123
123
|
return {
|
|
124
124
|
key: i,
|
|
125
|
-
title:
|
|
125
|
+
title: re(i),
|
|
126
126
|
type: u,
|
|
127
127
|
sortable: !0,
|
|
128
128
|
searchable: !0,
|
|
129
129
|
align: u === "number" || u === "currency" ? "right" : "left"
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
const g = String(i.key), c = i.title !== void 0 ? i.title :
|
|
132
|
+
const g = String(i.key), c = i.title !== void 0 ? i.title : re(g), d = i.type || ae(g, t.map((a) => a?.[g]));
|
|
133
133
|
return {
|
|
134
134
|
...i,
|
|
135
135
|
title: c,
|
|
@@ -138,15 +138,72 @@ function Ut(e) {
|
|
|
138
138
|
searchable: i.searchable !== void 0 ? i.searchable : !0,
|
|
139
139
|
align: i.align || (d === "number" || d === "currency" ? "right" : "left")
|
|
140
140
|
};
|
|
141
|
-
}) :
|
|
141
|
+
}) : s && t && t.length > 0 ? zt(t) : [];
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Ht(e) {
|
|
144
|
+
const {
|
|
145
|
+
explicitActions: t,
|
|
146
|
+
buttons: n,
|
|
147
|
+
block: s,
|
|
148
|
+
handleBlock: l,
|
|
149
|
+
view: r,
|
|
150
|
+
linkView: i,
|
|
151
|
+
viewHandler: g,
|
|
152
|
+
edit: c,
|
|
153
|
+
linkEdit: d,
|
|
154
|
+
editHandler: a,
|
|
155
|
+
del: u,
|
|
156
|
+
handleDelete: m
|
|
157
|
+
} = e, f = [...t || []];
|
|
158
|
+
return n && Array.isArray(n) && n.forEach((b, h) => {
|
|
159
|
+
f.push({
|
|
160
|
+
id: `legacy-btn-${h}`,
|
|
161
|
+
label: b.label,
|
|
162
|
+
icon: b.icon,
|
|
163
|
+
className: b.className,
|
|
164
|
+
show: b.show,
|
|
165
|
+
hide: b.hide,
|
|
166
|
+
onClick: (k) => b.onClick(k)
|
|
167
|
+
});
|
|
168
|
+
}), s && l && f.push({
|
|
169
|
+
id: "legacy-block",
|
|
170
|
+
label: (b) => b.isBanned || !b.isActive ? "Unblock" : "Block",
|
|
171
|
+
variant: (b) => b.isBanned || !b.isActive ? "success" : "danger",
|
|
172
|
+
onClick: (b) => l(b?._id || b?.id)
|
|
173
|
+
}), r && (g || i) && f.push({
|
|
174
|
+
id: "legacy-view",
|
|
175
|
+
label: "View",
|
|
176
|
+
variant: "primary",
|
|
177
|
+
onClick: (b) => {
|
|
178
|
+
const h = b?._id || b?.id;
|
|
179
|
+
g ? g(h) : i && typeof window < "u" && (window.location.href = `${i}/${h}`);
|
|
180
|
+
}
|
|
181
|
+
}), c && (a || d) && f.push({
|
|
182
|
+
id: "legacy-edit",
|
|
183
|
+
label: "Edit",
|
|
184
|
+
variant: "info",
|
|
185
|
+
onClick: (b) => {
|
|
186
|
+
const h = b?._id || b?.id;
|
|
187
|
+
a ? a(h) : d && typeof window < "u" && (window.location.href = `${d}/${h}`);
|
|
188
|
+
}
|
|
189
|
+
}), u && m && f.push({
|
|
190
|
+
id: "legacy-del",
|
|
191
|
+
label: "Delete",
|
|
192
|
+
variant: "danger",
|
|
193
|
+
confirmation: {
|
|
194
|
+
title: "Delete Item",
|
|
195
|
+
message: "Are you sure you want to delete this record?"
|
|
196
|
+
},
|
|
197
|
+
onClick: (b) => m(b?._id || b?.id)
|
|
198
|
+
}), f;
|
|
199
|
+
}
|
|
200
|
+
function Ot({
|
|
144
201
|
config: e,
|
|
145
202
|
onSearchChange: t
|
|
146
203
|
}) {
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
if (!
|
|
204
|
+
const n = B(() => typeof e == "object" && e !== null ? e : { enabled: !!e }, [e]), s = n.enabled !== !1 && !!e, l = n.debounce ?? 350, [r, i] = A(""), [g, c] = A(""), [d, a] = A(!1);
|
|
205
|
+
ne(() => {
|
|
206
|
+
if (!s) return;
|
|
150
207
|
if (r === "") {
|
|
151
208
|
c(""), a(!1), t?.("");
|
|
152
209
|
return;
|
|
@@ -158,33 +215,33 @@ function Kt({
|
|
|
158
215
|
return () => {
|
|
159
216
|
clearTimeout(f);
|
|
160
217
|
};
|
|
161
|
-
}, [r, l,
|
|
162
|
-
const u =
|
|
218
|
+
}, [r, l, s, t]);
|
|
219
|
+
const u = N((f) => {
|
|
163
220
|
i(f);
|
|
164
|
-
}, []), m =
|
|
221
|
+
}, []), m = N(() => {
|
|
165
222
|
i(""), c(""), a(!1), t?.("");
|
|
166
223
|
}, [t]);
|
|
167
224
|
return {
|
|
168
|
-
enabled:
|
|
225
|
+
enabled: s,
|
|
169
226
|
search: r,
|
|
170
227
|
debouncedSearch: g,
|
|
171
228
|
isDebouncing: d,
|
|
172
229
|
setSearch: u,
|
|
173
230
|
clearSearch: m,
|
|
174
|
-
searchConfig:
|
|
231
|
+
searchConfig: n
|
|
175
232
|
};
|
|
176
233
|
}
|
|
177
|
-
function
|
|
234
|
+
function Rt({
|
|
178
235
|
config: e,
|
|
179
236
|
onSortChange: t
|
|
180
237
|
}) {
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
), [g, c] =
|
|
184
|
-
|
|
185
|
-
), d =
|
|
238
|
+
const n = B(() => typeof e == "object" && e !== null ? e : { enabled: !!e }, [e]), s = n.enabled !== !1 && !!e, l = n.allowUnsort ?? !0, [r, i] = A(
|
|
239
|
+
n.defaultSortBy || null
|
|
240
|
+
), [g, c] = A(
|
|
241
|
+
n.defaultSortOrder || null
|
|
242
|
+
), d = N(
|
|
186
243
|
(m) => {
|
|
187
|
-
if (
|
|
244
|
+
if (s) {
|
|
188
245
|
if (r !== m) {
|
|
189
246
|
i(m), c("asc"), t?.(m, "asc");
|
|
190
247
|
return;
|
|
@@ -192,63 +249,63 @@ function It({
|
|
|
192
249
|
g === "asc" ? (c("desc"), t?.(m, "desc")) : g === "desc" && l ? (i(null), c(null), t?.(null, null)) : (c("asc"), t?.(m, "asc"));
|
|
193
250
|
}
|
|
194
251
|
},
|
|
195
|
-
[
|
|
196
|
-
), a =
|
|
252
|
+
[s, r, g, l, t]
|
|
253
|
+
), a = N(
|
|
197
254
|
(m, f) => {
|
|
198
255
|
i(m), c(f), t?.(m, f);
|
|
199
256
|
},
|
|
200
257
|
[t]
|
|
201
|
-
), u =
|
|
258
|
+
), u = N(() => {
|
|
202
259
|
i(null), c(null), t?.(null, null);
|
|
203
260
|
}, [t]);
|
|
204
261
|
return {
|
|
205
|
-
enabled:
|
|
262
|
+
enabled: s,
|
|
206
263
|
sortBy: r,
|
|
207
264
|
sortOrder: g,
|
|
208
265
|
toggleSort: d,
|
|
209
266
|
setSorting: a,
|
|
210
267
|
resetSorting: u,
|
|
211
|
-
sortingConfig:
|
|
268
|
+
sortingConfig: n
|
|
212
269
|
};
|
|
213
270
|
}
|
|
214
|
-
function
|
|
271
|
+
function Ut({
|
|
215
272
|
config: e,
|
|
216
273
|
totalRecords: t,
|
|
217
|
-
onPageChange:
|
|
274
|
+
onPageChange: n
|
|
218
275
|
}) {
|
|
219
|
-
const
|
|
220
|
-
(
|
|
221
|
-
const
|
|
222
|
-
d(
|
|
276
|
+
const s = B(() => typeof e == "object" && e !== null ? e : { enabled: !!e }, [e]), l = s.enabled !== !1 && !!e, r = s.defaultPage || 1, i = s.defaultPageSize || 10, g = s.pageSizeOptions || [5, 10, 20, 50, 100], [c, d] = A(r), [a, u] = A(i), m = Math.max(1, Math.ceil(t / Math.max(1, a))), f = N(
|
|
277
|
+
(w) => {
|
|
278
|
+
const x = Math.max(1, Math.min(w, m));
|
|
279
|
+
d(x), n?.(x, a);
|
|
223
280
|
},
|
|
224
|
-
[m, a,
|
|
225
|
-
), b =
|
|
226
|
-
(
|
|
227
|
-
u(
|
|
281
|
+
[m, a, n]
|
|
282
|
+
), b = N(
|
|
283
|
+
(w) => {
|
|
284
|
+
u(w), d(1), n?.(1, w);
|
|
228
285
|
},
|
|
229
|
-
[
|
|
230
|
-
),
|
|
286
|
+
[n]
|
|
287
|
+
), h = N(() => {
|
|
231
288
|
c < m && f(c + 1);
|
|
232
|
-
}, [c, m, f]),
|
|
289
|
+
}, [c, m, f]), k = N(() => {
|
|
233
290
|
c > 1 && f(c - 1);
|
|
234
|
-
}, [c, f]),
|
|
235
|
-
d(1), u(i),
|
|
236
|
-
}, [i,
|
|
237
|
-
(
|
|
238
|
-
const
|
|
291
|
+
}, [c, f]), T = N(() => {
|
|
292
|
+
d(1), u(i), n?.(1, i);
|
|
293
|
+
}, [i, n]), $ = N(
|
|
294
|
+
(w = 5) => {
|
|
295
|
+
const x = Math.max(
|
|
239
296
|
1,
|
|
240
|
-
Math.min(c - Math.floor(
|
|
241
|
-
),
|
|
242
|
-
for (let
|
|
243
|
-
|
|
244
|
-
return
|
|
297
|
+
Math.min(c - Math.floor(w / 2), m - w + 1)
|
|
298
|
+
), M = Math.min(m, x + w - 1), z = [];
|
|
299
|
+
for (let W = x; W <= M; W++)
|
|
300
|
+
z.push(W);
|
|
301
|
+
return z;
|
|
245
302
|
},
|
|
246
303
|
[c, m]
|
|
247
|
-
),
|
|
248
|
-
(
|
|
249
|
-
if (!l) return
|
|
250
|
-
const
|
|
251
|
-
return
|
|
304
|
+
), p = N(
|
|
305
|
+
(w) => {
|
|
306
|
+
if (!l) return w;
|
|
307
|
+
const x = (c - 1) * a;
|
|
308
|
+
return w.slice(x, x + a);
|
|
252
309
|
},
|
|
253
310
|
[l, c, a]
|
|
254
311
|
);
|
|
@@ -263,15 +320,15 @@ function Gt({
|
|
|
263
320
|
hasPrevPage: c > 1,
|
|
264
321
|
setPage: f,
|
|
265
322
|
setPageSize: b,
|
|
266
|
-
nextPage:
|
|
267
|
-
prevPage:
|
|
268
|
-
resetPagination:
|
|
269
|
-
getPageWindow:
|
|
270
|
-
sliceData:
|
|
271
|
-
paginationConfig:
|
|
323
|
+
nextPage: h,
|
|
324
|
+
prevPage: k,
|
|
325
|
+
resetPagination: T,
|
|
326
|
+
getPageWindow: $,
|
|
327
|
+
sliceData: p,
|
|
328
|
+
paginationConfig: s
|
|
272
329
|
};
|
|
273
330
|
}
|
|
274
|
-
const
|
|
331
|
+
const It = [
|
|
275
332
|
"total",
|
|
276
333
|
"totalCount",
|
|
277
334
|
"count",
|
|
@@ -287,7 +344,7 @@ const Vt = [
|
|
|
287
344
|
"pageInfo.total",
|
|
288
345
|
"pageInfo.totalCount",
|
|
289
346
|
"paging.total"
|
|
290
|
-
],
|
|
347
|
+
], Kt = [
|
|
291
348
|
"page",
|
|
292
349
|
"currentPage",
|
|
293
350
|
"pageNumber",
|
|
@@ -297,7 +354,7 @@ const Vt = [
|
|
|
297
354
|
"pagination.page",
|
|
298
355
|
"pagination.currentPage",
|
|
299
356
|
"pageInfo.page"
|
|
300
|
-
],
|
|
357
|
+
], Vt = [
|
|
301
358
|
"pageSize",
|
|
302
359
|
"limit",
|
|
303
360
|
"perPage",
|
|
@@ -308,7 +365,7 @@ const Vt = [
|
|
|
308
365
|
"pagination.pageSize",
|
|
309
366
|
"pagination.limit",
|
|
310
367
|
"pagination.perPage"
|
|
311
|
-
],
|
|
368
|
+
], Gt = [
|
|
312
369
|
"totalPages",
|
|
313
370
|
"pageCount",
|
|
314
371
|
"lastPage",
|
|
@@ -319,26 +376,26 @@ const Vt = [
|
|
|
319
376
|
"pagination.totalPages",
|
|
320
377
|
"pagination.lastPage"
|
|
321
378
|
];
|
|
322
|
-
function
|
|
379
|
+
function G(e, t, n = 1, s = 10, l) {
|
|
323
380
|
if (!e || typeof e != "object") {
|
|
324
381
|
const d = l !== void 0 ? l : 0;
|
|
325
382
|
return {
|
|
326
|
-
page:
|
|
327
|
-
pageSize:
|
|
383
|
+
page: n,
|
|
384
|
+
pageSize: s,
|
|
328
385
|
total: d,
|
|
329
|
-
totalPages: Math.max(1, Math.ceil(d / Math.max(1,
|
|
386
|
+
totalPages: Math.max(1, Math.ceil(d / Math.max(1, s))),
|
|
330
387
|
hasNextPage: !1,
|
|
331
388
|
hasPrevPage: !1
|
|
332
389
|
};
|
|
333
390
|
}
|
|
334
391
|
let r;
|
|
335
392
|
if (t?.totalPath) {
|
|
336
|
-
const d =
|
|
393
|
+
const d = S(e, t.totalPath);
|
|
337
394
|
typeof d == "number" ? r = d : typeof d == "string" && !isNaN(Number(d)) && (r = Number(d));
|
|
338
395
|
}
|
|
339
396
|
if (r === void 0)
|
|
340
|
-
for (const d of
|
|
341
|
-
const a =
|
|
397
|
+
for (const d of It) {
|
|
398
|
+
const a = S(e, d);
|
|
342
399
|
if (typeof a == "number" && !isNaN(a)) {
|
|
343
400
|
r = a;
|
|
344
401
|
break;
|
|
@@ -351,12 +408,12 @@ function Q(e, t, s = 1, o = 10, l) {
|
|
|
351
408
|
r === void 0 && (r = l !== void 0 ? l : 0);
|
|
352
409
|
let i;
|
|
353
410
|
if (t?.pagePath) {
|
|
354
|
-
const d =
|
|
411
|
+
const d = S(e, t.pagePath);
|
|
355
412
|
typeof d == "number" ? i = d : typeof d == "string" && !isNaN(Number(d)) && (i = Number(d));
|
|
356
413
|
}
|
|
357
414
|
if (i === void 0)
|
|
358
|
-
for (const d of
|
|
359
|
-
const a =
|
|
415
|
+
for (const d of Kt) {
|
|
416
|
+
const a = S(e, d);
|
|
360
417
|
if (typeof a == "number" && !isNaN(a)) {
|
|
361
418
|
i = a;
|
|
362
419
|
break;
|
|
@@ -366,15 +423,15 @@ function Q(e, t, s = 1, o = 10, l) {
|
|
|
366
423
|
break;
|
|
367
424
|
}
|
|
368
425
|
}
|
|
369
|
-
i === void 0 && (i =
|
|
426
|
+
i === void 0 && (i = n);
|
|
370
427
|
let g;
|
|
371
428
|
if (t?.pageSizePath) {
|
|
372
|
-
const d =
|
|
429
|
+
const d = S(e, t.pageSizePath);
|
|
373
430
|
typeof d == "number" ? g = d : typeof d == "string" && !isNaN(Number(d)) && (g = Number(d));
|
|
374
431
|
}
|
|
375
432
|
if (g === void 0)
|
|
376
|
-
for (const d of
|
|
377
|
-
const a =
|
|
433
|
+
for (const d of Vt) {
|
|
434
|
+
const a = S(e, d);
|
|
378
435
|
if (typeof a == "number" && !isNaN(a)) {
|
|
379
436
|
g = a;
|
|
380
437
|
break;
|
|
@@ -384,15 +441,15 @@ function Q(e, t, s = 1, o = 10, l) {
|
|
|
384
441
|
break;
|
|
385
442
|
}
|
|
386
443
|
}
|
|
387
|
-
g === void 0 && (g =
|
|
444
|
+
g === void 0 && (g = s);
|
|
388
445
|
let c;
|
|
389
446
|
if (t?.totalPagesPath) {
|
|
390
|
-
const d =
|
|
447
|
+
const d = S(e, t.totalPagesPath);
|
|
391
448
|
typeof d == "number" ? c = d : typeof d == "string" && !isNaN(Number(d)) && (c = Number(d));
|
|
392
449
|
}
|
|
393
450
|
if (c === void 0)
|
|
394
|
-
for (const d of
|
|
395
|
-
const a =
|
|
451
|
+
for (const d of Gt) {
|
|
452
|
+
const a = S(e, d);
|
|
396
453
|
if (typeof a == "number" && !isNaN(a)) {
|
|
397
454
|
c = a;
|
|
398
455
|
break;
|
|
@@ -407,7 +464,7 @@ function Q(e, t, s = 1, o = 10, l) {
|
|
|
407
464
|
hasPrevPage: i > 1
|
|
408
465
|
};
|
|
409
466
|
}
|
|
410
|
-
const
|
|
467
|
+
const Yt = [
|
|
411
468
|
"data",
|
|
412
469
|
"items",
|
|
413
470
|
"results",
|
|
@@ -428,23 +485,23 @@ const qt = [
|
|
|
428
485
|
"subscriptions",
|
|
429
486
|
"deadLetters.items"
|
|
430
487
|
];
|
|
431
|
-
function
|
|
432
|
-
const
|
|
488
|
+
function Zt(e, t, n) {
|
|
489
|
+
const s = n?.page || 1, l = n?.pageSize || 10;
|
|
433
490
|
if (t?.transformResponse && typeof t.transformResponse == "function") {
|
|
434
491
|
const r = t.transformResponse(e);
|
|
435
492
|
if (Array.isArray(r))
|
|
436
493
|
return {
|
|
437
494
|
data: r,
|
|
438
|
-
meta:
|
|
495
|
+
meta: G(e, t.response, s, l, r.length),
|
|
439
496
|
raw: e
|
|
440
497
|
};
|
|
441
498
|
if (r && typeof r == "object") {
|
|
442
499
|
const i = Array.isArray(r.data) ? r.data : [], g = r.meta ? {
|
|
443
500
|
total: r.meta.total !== void 0 ? r.meta.total : i.length,
|
|
444
|
-
page: r.meta.page !== void 0 ? r.meta.page :
|
|
501
|
+
page: r.meta.page !== void 0 ? r.meta.page : s,
|
|
445
502
|
pageSize: r.meta.pageSize !== void 0 ? r.meta.pageSize : l,
|
|
446
503
|
totalPages: r.meta.totalPages !== void 0 ? r.meta.totalPages : Math.max(1, Math.ceil((r.meta.total || i.length) / (r.meta.pageSize || l)))
|
|
447
|
-
} :
|
|
504
|
+
} : G(e, t.response, s, l, i.length);
|
|
448
505
|
return { data: i, meta: g, raw: e };
|
|
449
506
|
}
|
|
450
507
|
}
|
|
@@ -453,23 +510,23 @@ function Xt(e, t, s) {
|
|
|
453
510
|
data: e,
|
|
454
511
|
meta: {
|
|
455
512
|
total: e.length,
|
|
456
|
-
page:
|
|
513
|
+
page: s,
|
|
457
514
|
pageSize: l,
|
|
458
515
|
totalPages: Math.max(1, Math.ceil(e.length / l)),
|
|
459
|
-
hasNextPage:
|
|
460
|
-
hasPrevPage:
|
|
516
|
+
hasNextPage: s * l < e.length,
|
|
517
|
+
hasPrevPage: s > 1
|
|
461
518
|
},
|
|
462
519
|
raw: e
|
|
463
520
|
};
|
|
464
521
|
if (t?.response?.dataPath) {
|
|
465
|
-
const r =
|
|
522
|
+
const r = S(e, t.response.dataPath), i = Array.isArray(r) ? r : [], g = G(e, t.response, s, l, i.length);
|
|
466
523
|
return { data: i, meta: g, raw: e };
|
|
467
524
|
}
|
|
468
525
|
if (e && typeof e == "object") {
|
|
469
|
-
for (const r of
|
|
470
|
-
const i =
|
|
526
|
+
for (const r of Yt) {
|
|
527
|
+
const i = S(e, r);
|
|
471
528
|
if (Array.isArray(i)) {
|
|
472
|
-
const g =
|
|
529
|
+
const g = G(e, t?.response, s, l, i.length);
|
|
473
530
|
return {
|
|
474
531
|
data: i,
|
|
475
532
|
meta: g,
|
|
@@ -479,7 +536,7 @@ function Xt(e, t, s) {
|
|
|
479
536
|
}
|
|
480
537
|
for (const r in e)
|
|
481
538
|
if (Array.isArray(e[r])) {
|
|
482
|
-
const i =
|
|
539
|
+
const i = G(e, t?.response, s, l, e[r].length);
|
|
483
540
|
return {
|
|
484
541
|
data: e[r],
|
|
485
542
|
meta: i,
|
|
@@ -507,7 +564,7 @@ function Xt(e, t, s) {
|
|
|
507
564
|
data: [],
|
|
508
565
|
meta: {
|
|
509
566
|
total: 0,
|
|
510
|
-
page:
|
|
567
|
+
page: s,
|
|
511
568
|
pageSize: l,
|
|
512
569
|
totalPages: 1,
|
|
513
570
|
hasNextPage: !1,
|
|
@@ -516,54 +573,54 @@ function Xt(e, t, s) {
|
|
|
516
573
|
raw: e
|
|
517
574
|
};
|
|
518
575
|
}
|
|
519
|
-
function
|
|
576
|
+
function Jt(e, t, n, s) {
|
|
520
577
|
if (!e || !e.length) return [];
|
|
521
578
|
if (!t || typeof t != "string" || !t.trim()) return e;
|
|
522
579
|
const l = t.trim().toLowerCase();
|
|
523
|
-
if (
|
|
524
|
-
return e.filter((i) =>
|
|
580
|
+
if (s && typeof s == "function")
|
|
581
|
+
return e.filter((i) => s(i, l));
|
|
525
582
|
const r = l.split(/\s+/).filter(Boolean);
|
|
526
583
|
return e.filter((i) => {
|
|
527
584
|
if (!i || typeof i != "object") return !1;
|
|
528
585
|
const g = [];
|
|
529
|
-
if (
|
|
530
|
-
for (const d of
|
|
531
|
-
const a =
|
|
586
|
+
if (n && n.length > 0)
|
|
587
|
+
for (const d of n) {
|
|
588
|
+
const a = S(i, d);
|
|
532
589
|
a != null && (typeof a == "object" ? g.push(JSON.stringify(a).toLowerCase()) : g.push(String(a).toLowerCase()));
|
|
533
590
|
}
|
|
534
591
|
else
|
|
535
|
-
|
|
592
|
+
ue(i, g);
|
|
536
593
|
const c = g.join(" ");
|
|
537
594
|
return r.every((d) => c.includes(d));
|
|
538
595
|
});
|
|
539
596
|
}
|
|
540
|
-
function
|
|
541
|
-
if (!(
|
|
597
|
+
function ue(e, t, n = 0) {
|
|
598
|
+
if (!(n > 4 || e === null || e === void 0)) {
|
|
542
599
|
if (typeof e != "object") {
|
|
543
600
|
t.push(String(e).toLowerCase());
|
|
544
601
|
return;
|
|
545
602
|
}
|
|
546
603
|
if (Array.isArray(e)) {
|
|
547
|
-
for (const
|
|
548
|
-
|
|
604
|
+
for (const s of e)
|
|
605
|
+
ue(s, t, n + 1);
|
|
549
606
|
return;
|
|
550
607
|
}
|
|
551
|
-
for (const
|
|
552
|
-
if (Object.prototype.hasOwnProperty.call(e,
|
|
553
|
-
if (
|
|
554
|
-
|
|
608
|
+
for (const s in e)
|
|
609
|
+
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
610
|
+
if (s.startsWith("__") || s.toLowerCase().includes("password")) continue;
|
|
611
|
+
ue(e[s], t, n + 1);
|
|
555
612
|
}
|
|
556
613
|
}
|
|
557
614
|
}
|
|
558
|
-
function
|
|
559
|
-
if (!e || !e.length || !t || !
|
|
615
|
+
function qt(e, t, n, s) {
|
|
616
|
+
if (!e || !e.length || !t || !n)
|
|
560
617
|
return e;
|
|
561
618
|
const l = [...e];
|
|
562
|
-
return
|
|
563
|
-
const g =
|
|
564
|
-
return
|
|
619
|
+
return s && typeof s == "function" ? (l.sort((r, i) => {
|
|
620
|
+
const g = s(r, i);
|
|
621
|
+
return n === "desc" ? -g : g;
|
|
565
622
|
}), l) : (l.sort((r, i) => {
|
|
566
|
-
const g =
|
|
623
|
+
const g = S(r, t), c = S(i, t);
|
|
567
624
|
if (g == null)
|
|
568
625
|
return c == null ? 0 : 1;
|
|
569
626
|
if (c == null)
|
|
@@ -575,7 +632,7 @@ function er(e, t, s, o) {
|
|
|
575
632
|
d = g === c ? 0 : g ? -1 : 1;
|
|
576
633
|
else if (g instanceof Date && c instanceof Date)
|
|
577
634
|
d = g.getTime() - c.getTime();
|
|
578
|
-
else if (typeof g == "string" && typeof c == "string" &&
|
|
635
|
+
else if (typeof g == "string" && typeof c == "string" && Le(g) && Le(c))
|
|
579
636
|
d = new Date(g).getTime() - new Date(c).getTime();
|
|
580
637
|
else {
|
|
581
638
|
const a = String(g), u = String(c);
|
|
@@ -584,72 +641,72 @@ function er(e, t, s, o) {
|
|
|
584
641
|
sensitivity: "base"
|
|
585
642
|
});
|
|
586
643
|
}
|
|
587
|
-
return
|
|
644
|
+
return n === "desc" ? -d : d;
|
|
588
645
|
}), l);
|
|
589
646
|
}
|
|
590
|
-
function
|
|
647
|
+
function Le(e) {
|
|
591
648
|
return e.length < 10 ? !1 : /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/.test(e);
|
|
592
649
|
}
|
|
593
|
-
function
|
|
650
|
+
function Xt({
|
|
594
651
|
data: e,
|
|
595
652
|
api: t,
|
|
596
|
-
columns:
|
|
597
|
-
searchQuery:
|
|
653
|
+
columns: n,
|
|
654
|
+
searchQuery: s,
|
|
598
655
|
sortBy: l,
|
|
599
656
|
sortOrder: r,
|
|
600
657
|
page: i,
|
|
601
658
|
pageSize: g,
|
|
602
659
|
manualLoading: c
|
|
603
660
|
}) {
|
|
604
|
-
const d = !!(t && typeof t.fetcher == "function"), a = d && t?.mode !== "client", [u, m] =
|
|
661
|
+
const d = !!(t && typeof t.fetcher == "function"), a = d && t?.mode !== "client", [u, m] = A([]), [f, b] = A(0), [h, k] = A(!1), [T, $] = A(null), [p, w] = A(0), x = Tt(null), M = N(async () => {
|
|
605
662
|
if (!d || !t?.fetcher) return;
|
|
606
|
-
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
[
|
|
611
|
-
[
|
|
663
|
+
x.current && x.current.abort();
|
|
664
|
+
const D = new AbortController();
|
|
665
|
+
x.current = D, k(!0), $(null);
|
|
666
|
+
const _ = t.paramNames || {}, F = _.pageParam || "page", Z = _.pageSizeParam || "limit", O = _.searchParam || "q", R = _.sortByParam || "sortBy", L = _.sortOrderParam || "sortOrder", U = {
|
|
667
|
+
[F]: i,
|
|
668
|
+
[Z]: g,
|
|
612
669
|
page: i,
|
|
613
670
|
pageSize: g,
|
|
614
|
-
...
|
|
615
|
-
...l ? { [
|
|
616
|
-
...r ? { [
|
|
671
|
+
...s ? { [O]: s, search: s, q: s } : {},
|
|
672
|
+
...l ? { [R]: l, sortBy: l } : {},
|
|
673
|
+
...r ? { [L]: r, sortOrder: r } : {},
|
|
617
674
|
...t.params || {}
|
|
618
675
|
};
|
|
619
676
|
try {
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
const
|
|
623
|
-
|
|
677
|
+
const P = await t.fetcher(U, D.signal);
|
|
678
|
+
if (D.signal.aborted) return;
|
|
679
|
+
const H = Zt(
|
|
680
|
+
P,
|
|
624
681
|
t,
|
|
625
|
-
|
|
682
|
+
U
|
|
626
683
|
);
|
|
627
|
-
m(
|
|
628
|
-
} catch (
|
|
629
|
-
if (
|
|
684
|
+
m(H.data), b(H.meta.total), t.onSuccess?.(H);
|
|
685
|
+
} catch (P) {
|
|
686
|
+
if (P?.name === "AbortError" || P?.name === "CanceledError")
|
|
630
687
|
return;
|
|
631
|
-
|
|
688
|
+
$(P), t.onError?.(P);
|
|
632
689
|
} finally {
|
|
633
|
-
|
|
690
|
+
D.signal.aborted || k(!1);
|
|
634
691
|
}
|
|
635
|
-
}, [d, t, i, g,
|
|
636
|
-
|
|
637
|
-
d &&
|
|
638
|
-
}, [
|
|
639
|
-
|
|
692
|
+
}, [d, t, i, g, s, l, r]);
|
|
693
|
+
ne(() => {
|
|
694
|
+
d && M();
|
|
695
|
+
}, [M, p]), ne(() => () => {
|
|
696
|
+
x.current && x.current.abort();
|
|
640
697
|
}, []);
|
|
641
|
-
const
|
|
642
|
-
d &&
|
|
643
|
-
}, [d]), { displayRows:
|
|
698
|
+
const z = N(async () => {
|
|
699
|
+
d && w((D) => D + 1);
|
|
700
|
+
}, [d]), { displayRows: W, finalTotal: oe } = B(() => {
|
|
644
701
|
if (a)
|
|
645
702
|
return {
|
|
646
703
|
displayRows: u,
|
|
647
704
|
finalTotal: f
|
|
648
705
|
};
|
|
649
|
-
const
|
|
706
|
+
const D = d ? u : e || [], _ = n.filter((P) => P.searchable !== !1).map((P) => P.key), F = Jt(D, s, _), O = n.find((P) => P.key === l)?.comparator, R = qt(F, l, r, O), L = (i - 1) * g;
|
|
650
707
|
return {
|
|
651
|
-
displayRows:
|
|
652
|
-
finalTotal:
|
|
708
|
+
displayRows: R.slice(L, L + g),
|
|
709
|
+
finalTotal: F.length
|
|
653
710
|
};
|
|
654
711
|
}, [
|
|
655
712
|
a,
|
|
@@ -657,28 +714,28 @@ function tr({
|
|
|
657
714
|
u,
|
|
658
715
|
e,
|
|
659
716
|
f,
|
|
717
|
+
n,
|
|
660
718
|
s,
|
|
661
|
-
o,
|
|
662
719
|
l,
|
|
663
720
|
r,
|
|
664
721
|
i,
|
|
665
722
|
g
|
|
666
723
|
]);
|
|
667
724
|
return {
|
|
668
|
-
rows:
|
|
669
|
-
totalRecords:
|
|
670
|
-
loading: c !== void 0 ? c :
|
|
671
|
-
error:
|
|
672
|
-
refresh:
|
|
725
|
+
rows: W,
|
|
726
|
+
totalRecords: oe,
|
|
727
|
+
loading: c !== void 0 ? c : h,
|
|
728
|
+
error: T,
|
|
729
|
+
refresh: z,
|
|
673
730
|
isServerMode: a,
|
|
674
731
|
rawRemoteData: u
|
|
675
732
|
};
|
|
676
733
|
}
|
|
677
|
-
function
|
|
734
|
+
function Qt({
|
|
678
735
|
tableRef: e,
|
|
679
736
|
refresh: t,
|
|
680
|
-
resetPagination:
|
|
681
|
-
resetSearch:
|
|
737
|
+
resetPagination: n,
|
|
738
|
+
resetSearch: s,
|
|
682
739
|
resetSorting: l,
|
|
683
740
|
setPage: r,
|
|
684
741
|
setPageSize: i,
|
|
@@ -688,16 +745,16 @@ function rr({
|
|
|
688
745
|
clearSelection: a,
|
|
689
746
|
getState: u
|
|
690
747
|
}) {
|
|
691
|
-
|
|
748
|
+
Pt(
|
|
692
749
|
e,
|
|
693
750
|
() => ({
|
|
694
751
|
refresh: t,
|
|
695
752
|
reset: () => {
|
|
696
|
-
|
|
753
|
+
n(), s(), l(), a();
|
|
697
754
|
},
|
|
698
|
-
resetSearch:
|
|
755
|
+
resetSearch: s,
|
|
699
756
|
resetSorting: l,
|
|
700
|
-
resetPagination:
|
|
757
|
+
resetPagination: n,
|
|
701
758
|
setPage: r,
|
|
702
759
|
setPageSize: i,
|
|
703
760
|
setSearch: g,
|
|
@@ -708,8 +765,8 @@ function rr({
|
|
|
708
765
|
}),
|
|
709
766
|
[
|
|
710
767
|
t,
|
|
768
|
+
n,
|
|
711
769
|
s,
|
|
712
|
-
o,
|
|
713
770
|
l,
|
|
714
771
|
r,
|
|
715
772
|
i,
|
|
@@ -721,7 +778,46 @@ function rr({
|
|
|
721
778
|
]
|
|
722
779
|
);
|
|
723
780
|
}
|
|
724
|
-
|
|
781
|
+
function er({
|
|
782
|
+
rows: e,
|
|
783
|
+
rowKeyResolver: t,
|
|
784
|
+
onSelectionChange: n
|
|
785
|
+
}) {
|
|
786
|
+
const [s, l] = A(/* @__PURE__ */ new Set()), r = N(
|
|
787
|
+
(u, m) => {
|
|
788
|
+
l((f) => {
|
|
789
|
+
const b = new Set(f);
|
|
790
|
+
b.has(u) ? b.delete(u) : b.add(u);
|
|
791
|
+
const h = e.filter((k, T) => b.has(t(k, T)));
|
|
792
|
+
return n?.(h, Array.from(b)), b;
|
|
793
|
+
});
|
|
794
|
+
},
|
|
795
|
+
[e, t, n]
|
|
796
|
+
), i = N(() => {
|
|
797
|
+
if (s.size === e.length && e.length > 0)
|
|
798
|
+
l(/* @__PURE__ */ new Set()), n?.([], []);
|
|
799
|
+
else {
|
|
800
|
+
const u = new Set(e.map((m, f) => t(m, f)));
|
|
801
|
+
l(u), n?.(e, Array.from(u));
|
|
802
|
+
}
|
|
803
|
+
}, [e, s.size, t, n]), g = N(() => {
|
|
804
|
+
l(/* @__PURE__ */ new Set()), n?.([], []);
|
|
805
|
+
}, [n]), c = e.length > 0 && s.size === e.length, d = s.size > 0 && s.size < e.length, a = B(
|
|
806
|
+
() => e.filter((u, m) => s.has(t(u, m))),
|
|
807
|
+
[e, s, t]
|
|
808
|
+
);
|
|
809
|
+
return {
|
|
810
|
+
selectedKeys: s,
|
|
811
|
+
setSelectedKeys: l,
|
|
812
|
+
selectedRows: a,
|
|
813
|
+
onToggleSelectRow: r,
|
|
814
|
+
handleToggleSelectAll: i,
|
|
815
|
+
clearSelection: g,
|
|
816
|
+
allSelected: c,
|
|
817
|
+
isIndeterminate: d
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
const Ye = {
|
|
725
821
|
primary: "#2667EC",
|
|
726
822
|
primaryHover: "#1E54C6",
|
|
727
823
|
primaryLight: "#397FF6",
|
|
@@ -740,56 +836,36 @@ const tt = {
|
|
|
740
836
|
inputBg: "#1E293B",
|
|
741
837
|
rowHover: "rgba(38, 103, 236, 0.04)",
|
|
742
838
|
rowSelected: "rgba(38, 103, 236, 0.08)"
|
|
743
|
-
},
|
|
744
|
-
mode: "auto",
|
|
745
|
-
colors: tt,
|
|
746
|
-
borderRadius: "1rem",
|
|
747
|
-
fontFamily: "'Alexandria', system-ui, -apple-system, sans-serif",
|
|
748
|
-
density: "normal",
|
|
749
|
-
classes: {
|
|
750
|
-
container: "w-full flex flex-col gap-4 font-sans text-gray-900 dark:text-gray-100",
|
|
751
|
-
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-slate-900 shadow-sm transition-colors",
|
|
752
|
-
table: "w-full border-collapse text-left text-sm",
|
|
753
|
-
thead: "bg-gray-50/80 dark:bg-slate-800/80 backdrop-blur-md border-b border-gray-200 dark:border-gray-800 text-gray-700 dark:text-gray-300 font-bold uppercase tracking-wider text-xs",
|
|
754
|
-
th: "py-3.5 px-4 font-bold select-none whitespace-nowrap",
|
|
755
|
-
tbody: "divide-y divide-gray-100 dark:divide-gray-800/60 bg-white dark:bg-slate-900",
|
|
756
|
-
tr: "transition-colors duration-150 hover:bg-gray-50/60 dark:hover:bg-slate-800/40",
|
|
757
|
-
td: "py-3 px-4 text-sm text-gray-700 dark:text-gray-300 align-middle",
|
|
758
|
-
searchContainer: "w-full sm:max-w-md relative flex items-center",
|
|
759
|
-
searchInput: "w-full pl-10 pr-10 py-2.5 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-800 text-sm font-medium text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary transition-all",
|
|
760
|
-
paginationContainer: "w-full flex flex-wrap items-center justify-between gap-4 pt-2 text-sm text-gray-600 dark:text-gray-400",
|
|
761
|
-
paginationButton: "h-9 min-w-[36px] px-3 flex items-center justify-center rounded-xl font-bold text-sm transition-all duration-150 bg-gray-100 dark:bg-slate-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-slate-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
762
|
-
paginationButtonActive: "bg-primary text-white hover:bg-primary-soft shadow-md shadow-primary/30",
|
|
763
|
-
paginationSelect: "h-9 px-3 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-800 text-sm font-medium text-gray-700 dark:text-gray-300 focus:outline-none focus:border-primary cursor-pointer"
|
|
764
|
-
}
|
|
765
|
-
}, Ve = {
|
|
839
|
+
}, He = {
|
|
766
840
|
default: {
|
|
767
|
-
colors:
|
|
841
|
+
colors: Ye,
|
|
768
842
|
borderRadius: "1rem",
|
|
769
|
-
density: "normal"
|
|
843
|
+
density: "normal",
|
|
844
|
+
classes: {
|
|
845
|
+
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-slate-900 shadow-sm transition-colors",
|
|
846
|
+
thead: "bg-gray-50/90 dark:bg-slate-800/90 backdrop-blur-md border-b border-gray-200 dark:border-gray-800 text-gray-700 dark:text-gray-300 font-bold uppercase text-xs tracking-wider",
|
|
847
|
+
tbody: "divide-y divide-gray-100 dark:divide-gray-800/60 bg-white dark:bg-slate-900",
|
|
848
|
+
tr: "transition-colors duration-150 hover:bg-blue-50/50 dark:hover:bg-blue-950/20",
|
|
849
|
+
searchInput: "w-full pl-10 pr-10 py-2.5 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-800 text-sm font-medium text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary transition-all",
|
|
850
|
+
paginationButtonActive: "bg-primary text-white hover:bg-primary-soft shadow-md shadow-primary/30 font-bold"
|
|
851
|
+
}
|
|
770
852
|
},
|
|
771
853
|
midnight: {
|
|
772
|
-
mode: "dark",
|
|
773
854
|
colors: {
|
|
774
855
|
primary: "#6366F1",
|
|
775
856
|
primaryHover: "#4F46E5",
|
|
776
857
|
primaryLight: "#818CF8",
|
|
777
|
-
card: "#090D16",
|
|
778
|
-
cardSecondary: "#111827",
|
|
779
|
-
border: "#1E293B",
|
|
780
|
-
textPrimary: "#F8FAFC",
|
|
781
|
-
textSecondary: "#94A3B8",
|
|
782
858
|
rowHover: "rgba(99, 102, 241, 0.08)",
|
|
783
|
-
rowSelected: "rgba(99, 102, 241, 0.16)"
|
|
784
|
-
theadBg: "#0F172A",
|
|
785
|
-
theadText: "#C7D2FE"
|
|
859
|
+
rowSelected: "rgba(99, 102, 241, 0.16)"
|
|
786
860
|
},
|
|
787
861
|
borderRadius: "1.25rem",
|
|
788
862
|
classes: {
|
|
789
|
-
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-indigo-
|
|
790
|
-
thead: "bg-[#
|
|
791
|
-
|
|
792
|
-
|
|
863
|
+
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-indigo-200 dark:border-indigo-900/70 bg-white dark:bg-[#090d1a] shadow-xl shadow-indigo-500/5 dark:shadow-indigo-950/40 transition-colors",
|
|
864
|
+
thead: "bg-indigo-50/90 dark:bg-[#0f172a] backdrop-blur-md border-b border-indigo-200 dark:border-indigo-900/80 text-indigo-900 dark:text-indigo-200 font-bold uppercase text-xs tracking-wider",
|
|
865
|
+
tbody: "divide-y divide-indigo-100 dark:divide-indigo-950/60 bg-white dark:bg-[#090d1a]",
|
|
866
|
+
tr: "transition-colors duration-150 hover:bg-indigo-50/70 dark:hover:bg-indigo-950/30",
|
|
867
|
+
searchInput: "w-full pl-10 pr-10 py-2.5 rounded-xl border border-indigo-200 dark:border-indigo-900/60 bg-white dark:bg-[#111728] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-indigo-300/40 focus:outline-none focus:ring-2 focus:ring-indigo-500/40 focus:border-indigo-500 transition-all",
|
|
868
|
+
paginationButtonActive: "bg-indigo-600 text-white shadow-lg shadow-indigo-600/30 font-bold"
|
|
793
869
|
}
|
|
794
870
|
},
|
|
795
871
|
emerald: {
|
|
@@ -797,18 +873,17 @@ const tt = {
|
|
|
797
873
|
primary: "#10B981",
|
|
798
874
|
primaryHover: "#059669",
|
|
799
875
|
primaryLight: "#34D399",
|
|
800
|
-
border: "#10B98125",
|
|
801
876
|
rowHover: "rgba(16, 185, 129, 0.06)",
|
|
802
|
-
rowSelected: "rgba(16, 185, 129, 0.12)"
|
|
803
|
-
theadBg: "rgba(16, 185, 129, 0.08)",
|
|
804
|
-
theadText: "#065F46"
|
|
877
|
+
rowSelected: "rgba(16, 185, 129, 0.12)"
|
|
805
878
|
},
|
|
806
879
|
borderRadius: "1rem",
|
|
807
880
|
classes: {
|
|
808
|
-
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-emerald-
|
|
809
|
-
thead: "bg-emerald-
|
|
810
|
-
|
|
811
|
-
|
|
881
|
+
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-emerald-300/60 dark:border-emerald-900/60 bg-white dark:bg-[#06140e] shadow-lg shadow-emerald-500/5 dark:shadow-emerald-950/30 transition-colors",
|
|
882
|
+
thead: "bg-emerald-50/90 dark:bg-emerald-950/60 backdrop-blur-md border-b border-emerald-200 dark:border-emerald-900/60 text-emerald-900 dark:text-emerald-200 font-bold uppercase text-xs tracking-wider",
|
|
883
|
+
tbody: "divide-y divide-emerald-100 dark:divide-emerald-950/60 bg-white dark:bg-[#06140e]",
|
|
884
|
+
tr: "transition-colors duration-150 hover:bg-emerald-50/70 dark:hover:bg-emerald-950/30",
|
|
885
|
+
searchInput: "w-full pl-10 pr-10 py-2.5 rounded-xl border border-emerald-300/60 dark:border-emerald-800/60 bg-white dark:bg-[#0c1c14] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-emerald-300/40 focus:outline-none focus:ring-2 focus:ring-emerald-500/40 focus:border-emerald-500 transition-all",
|
|
886
|
+
paginationButtonActive: "bg-emerald-600 text-white shadow-md shadow-emerald-600/30 font-bold"
|
|
812
887
|
}
|
|
813
888
|
},
|
|
814
889
|
ocean: {
|
|
@@ -818,16 +893,16 @@ const tt = {
|
|
|
818
893
|
primaryLight: "#38BDF8",
|
|
819
894
|
secondary: "#06B6D4",
|
|
820
895
|
rowHover: "rgba(14, 165, 233, 0.06)",
|
|
821
|
-
rowSelected: "rgba(14, 165, 233, 0.12)"
|
|
822
|
-
theadBg: "rgba(14, 165, 233, 0.08)",
|
|
823
|
-
theadText: "#0369A1"
|
|
896
|
+
rowSelected: "rgba(14, 165, 233, 0.12)"
|
|
824
897
|
},
|
|
825
898
|
borderRadius: "1rem",
|
|
826
899
|
classes: {
|
|
827
|
-
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-sky-
|
|
828
|
-
thead: "bg-sky-
|
|
829
|
-
|
|
830
|
-
|
|
900
|
+
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-sky-300/60 dark:border-sky-900/60 bg-white dark:bg-[#07131d] shadow-lg shadow-sky-500/5 dark:shadow-sky-950/30 transition-colors",
|
|
901
|
+
thead: "bg-sky-50/90 dark:bg-sky-950/60 backdrop-blur-md border-b border-sky-200 dark:border-sky-900/60 text-sky-900 dark:text-sky-200 font-bold uppercase text-xs tracking-wider",
|
|
902
|
+
tbody: "divide-y divide-sky-100 dark:divide-sky-950/60 bg-white dark:bg-[#07131d]",
|
|
903
|
+
tr: "transition-colors duration-150 hover:bg-sky-50/70 dark:hover:bg-sky-950/30",
|
|
904
|
+
searchInput: "w-full pl-10 pr-10 py-2.5 rounded-xl border border-sky-300/60 dark:border-sky-800/60 bg-white dark:bg-[#0d1d2b] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-sky-300/40 focus:outline-none focus:ring-2 focus:ring-sky-500/40 focus:border-sky-500 transition-all",
|
|
905
|
+
paginationButtonActive: "bg-sky-500 text-white shadow-md shadow-sky-500/30 font-bold"
|
|
831
906
|
}
|
|
832
907
|
},
|
|
833
908
|
luxury: {
|
|
@@ -836,15 +911,15 @@ const tt = {
|
|
|
836
911
|
primaryHover: "#B45309",
|
|
837
912
|
primaryLight: "#F59E0B",
|
|
838
913
|
rowHover: "rgba(245, 158, 11, 0.06)",
|
|
839
|
-
rowSelected: "rgba(245, 158, 11, 0.14)"
|
|
840
|
-
theadBg: "rgba(245, 158, 11, 0.08)",
|
|
841
|
-
theadText: "#78350F"
|
|
914
|
+
rowSelected: "rgba(245, 158, 11, 0.14)"
|
|
842
915
|
},
|
|
843
916
|
borderRadius: "1.25rem",
|
|
844
917
|
classes: {
|
|
845
|
-
tableWrapper: "w-full overflow-x-auto rounded-3xl border border-amber-
|
|
846
|
-
thead: "bg-amber-
|
|
847
|
-
|
|
918
|
+
tableWrapper: "w-full overflow-x-auto rounded-3xl border border-amber-300/80 dark:border-amber-700/60 bg-white dark:bg-[#14100a] shadow-xl shadow-amber-500/10 transition-colors",
|
|
919
|
+
thead: "bg-amber-50/95 dark:bg-amber-950/80 backdrop-blur-md border-b border-amber-300/80 dark:border-amber-800/60 text-amber-950 dark:text-amber-200 font-black uppercase text-xs tracking-wider",
|
|
920
|
+
tbody: "divide-y divide-amber-100 dark:divide-amber-950/60 bg-white dark:bg-[#14100a]",
|
|
921
|
+
tr: "transition-colors duration-150 hover:bg-amber-50/80 dark:hover:bg-amber-950/40",
|
|
922
|
+
searchInput: "w-full pl-10 pr-10 py-2.5 rounded-xl border border-amber-300/80 dark:border-amber-700/60 bg-white dark:bg-[#1c160e] text-gray-900 dark:text-amber-100 placeholder:text-gray-400 dark:placeholder:text-amber-400/40 focus:outline-none focus:ring-2 focus:ring-amber-500/40 focus:border-amber-500 transition-all",
|
|
848
923
|
paginationButtonActive: "bg-gradient-to-r from-amber-500 to-yellow-500 text-white shadow-md shadow-amber-500/30 font-black"
|
|
849
924
|
}
|
|
850
925
|
},
|
|
@@ -854,16 +929,16 @@ const tt = {
|
|
|
854
929
|
primaryHover: "#E11D48",
|
|
855
930
|
primaryLight: "#FB7185",
|
|
856
931
|
rowHover: "rgba(244, 63, 94, 0.06)",
|
|
857
|
-
rowSelected: "rgba(244, 63, 94, 0.12)"
|
|
858
|
-
theadBg: "rgba(244, 63, 94, 0.08)",
|
|
859
|
-
theadText: "#881337"
|
|
932
|
+
rowSelected: "rgba(244, 63, 94, 0.12)"
|
|
860
933
|
},
|
|
861
934
|
borderRadius: "1rem",
|
|
862
935
|
classes: {
|
|
863
|
-
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-rose-
|
|
864
|
-
thead: "bg-rose-
|
|
865
|
-
|
|
866
|
-
|
|
936
|
+
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-rose-300/60 dark:border-rose-900/60 bg-white dark:bg-[#15070c] shadow-lg shadow-rose-500/5 dark:shadow-rose-950/30 transition-colors",
|
|
937
|
+
thead: "bg-rose-50/90 dark:bg-rose-950/60 backdrop-blur-md border-b border-rose-200 dark:border-rose-900/60 text-rose-900 dark:text-rose-200 font-bold uppercase text-xs tracking-wider",
|
|
938
|
+
tbody: "divide-y divide-rose-100 dark:divide-rose-950/60 bg-white dark:bg-[#15070c]",
|
|
939
|
+
tr: "transition-colors duration-150 hover:bg-rose-50/70 dark:hover:bg-rose-950/30",
|
|
940
|
+
searchInput: "w-full pl-10 pr-10 py-2.5 rounded-xl border border-rose-300/60 dark:border-rose-800/60 bg-white dark:bg-[#1f0b13] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-rose-300/40 focus:outline-none focus:ring-2 focus:ring-rose-500/40 focus:border-rose-500 transition-all",
|
|
941
|
+
paginationButtonActive: "bg-rose-500 text-white shadow-md shadow-rose-500/30 font-bold"
|
|
867
942
|
}
|
|
868
943
|
},
|
|
869
944
|
minimal: {
|
|
@@ -887,19 +962,43 @@ const tt = {
|
|
|
887
962
|
borderRadius: "0.375rem",
|
|
888
963
|
density: "compact",
|
|
889
964
|
classes: {
|
|
890
|
-
tableWrapper: "w-full overflow-x-auto rounded-md border border-
|
|
891
|
-
thead: "bg-
|
|
892
|
-
|
|
893
|
-
|
|
965
|
+
tableWrapper: "w-full overflow-x-auto rounded-md border border-slate-300 dark:border-slate-700 bg-white dark:bg-slate-900 shadow-sm transition-colors",
|
|
966
|
+
thead: "bg-slate-100 dark:bg-slate-800 border-b border-slate-300 dark:border-slate-700 text-slate-800 dark:text-slate-200 font-bold uppercase text-xs tracking-wider",
|
|
967
|
+
tbody: "divide-y divide-slate-200 dark:divide-slate-800 bg-white dark:bg-slate-900",
|
|
968
|
+
tr: "transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/60",
|
|
969
|
+
searchInput: "w-full pl-9 pr-8 py-1.5 rounded border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 text-xs",
|
|
970
|
+
paginationButtonActive: "bg-blue-800 text-white font-bold"
|
|
894
971
|
}
|
|
895
972
|
}
|
|
896
|
-
},
|
|
973
|
+
}, Ze = {
|
|
974
|
+
mode: "auto",
|
|
975
|
+
colors: Ye,
|
|
976
|
+
borderRadius: "1rem",
|
|
977
|
+
fontFamily: "'Alexandria', system-ui, -apple-system, sans-serif",
|
|
978
|
+
density: "normal",
|
|
979
|
+
classes: {
|
|
980
|
+
container: "w-full flex flex-col gap-4 font-sans text-gray-900 dark:text-gray-100",
|
|
981
|
+
tableWrapper: "w-full overflow-x-auto rounded-2xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-slate-900 shadow-sm transition-colors",
|
|
982
|
+
table: "w-full border-collapse text-left text-sm",
|
|
983
|
+
thead: "bg-gray-50/80 dark:bg-slate-800/80 backdrop-blur-md border-b border-gray-200 dark:border-gray-800 text-gray-700 dark:text-gray-300 font-bold uppercase tracking-wider text-xs",
|
|
984
|
+
th: "py-3.5 px-4 font-bold select-none whitespace-nowrap",
|
|
985
|
+
tbody: "divide-y divide-gray-100 dark:divide-gray-800/60 bg-white dark:bg-slate-900",
|
|
986
|
+
tr: "transition-colors duration-150 hover:bg-gray-50/60 dark:hover:bg-slate-800/40",
|
|
987
|
+
td: "py-3 px-4 text-sm text-gray-700 dark:text-gray-300 align-middle",
|
|
988
|
+
searchContainer: "w-full sm:max-w-md relative flex items-center",
|
|
989
|
+
searchInput: "w-full pl-10 pr-10 py-2.5 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-800 text-sm font-medium text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary transition-all",
|
|
990
|
+
paginationContainer: "w-full flex flex-wrap items-center justify-between gap-4 pt-2 text-sm text-gray-600 dark:text-gray-400",
|
|
991
|
+
paginationButton: "h-9 min-w-[36px] px-3 flex items-center justify-center rounded-xl font-bold text-sm transition-all duration-150 bg-gray-100 dark:bg-slate-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-slate-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
992
|
+
paginationButtonActive: "bg-primary text-white hover:bg-primary-soft shadow-md shadow-primary/30",
|
|
993
|
+
paginationSelect: "h-9 px-3 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-800 text-sm font-medium text-gray-700 dark:text-gray-300 focus:outline-none focus:border-primary cursor-pointer"
|
|
994
|
+
}
|
|
995
|
+
}, fe = Et(Ze), tr = ({
|
|
897
996
|
theme: e,
|
|
898
997
|
preset: t,
|
|
899
|
-
children:
|
|
998
|
+
children: n
|
|
900
999
|
}) => {
|
|
901
|
-
const
|
|
902
|
-
const r =
|
|
1000
|
+
const s = Ve(fe), l = B(() => {
|
|
1001
|
+
const r = s || Ze, i = t && He[t] ? He[t] : {};
|
|
903
1002
|
return {
|
|
904
1003
|
...r,
|
|
905
1004
|
...i,
|
|
@@ -915,22 +1014,22 @@ const tt = {
|
|
|
915
1014
|
...e?.classes || {}
|
|
916
1015
|
}
|
|
917
1016
|
};
|
|
918
|
-
}, [
|
|
919
|
-
return /* @__PURE__ */
|
|
1017
|
+
}, [s, t, e]);
|
|
1018
|
+
return /* @__PURE__ */ o(fe.Provider, { value: l, children: n });
|
|
920
1019
|
};
|
|
921
|
-
function
|
|
922
|
-
return
|
|
1020
|
+
function Y() {
|
|
1021
|
+
return Ve(fe);
|
|
923
1022
|
}
|
|
924
|
-
const
|
|
1023
|
+
const rr = ({
|
|
925
1024
|
value: e,
|
|
926
1025
|
onChange: t,
|
|
927
|
-
onClear:
|
|
928
|
-
isDebouncing:
|
|
1026
|
+
onClear: n,
|
|
1027
|
+
isDebouncing: s = !1,
|
|
929
1028
|
placeholder: l = "Search records..."
|
|
930
1029
|
}) => {
|
|
931
|
-
const r =
|
|
932
|
-
return /* @__PURE__ */
|
|
933
|
-
/* @__PURE__ */
|
|
1030
|
+
const r = Y();
|
|
1031
|
+
return /* @__PURE__ */ y("div", { className: r.classes?.searchContainer || "w-full sm:max-w-md relative flex items-center", children: [
|
|
1032
|
+
/* @__PURE__ */ o("span", { className: "absolute left-3.5 text-gray-400 dark:text-gray-500 pointer-events-none flex items-center", children: /* @__PURE__ */ o(
|
|
934
1033
|
"svg",
|
|
935
1034
|
{
|
|
936
1035
|
className: "w-4 h-4",
|
|
@@ -938,7 +1037,7 @@ const nr = ({
|
|
|
938
1037
|
stroke: "currentColor",
|
|
939
1038
|
viewBox: "0 0 24 24",
|
|
940
1039
|
xmlns: "http://www.w3.org/2000/svg",
|
|
941
|
-
children: /* @__PURE__ */
|
|
1040
|
+
children: /* @__PURE__ */ o(
|
|
942
1041
|
"path",
|
|
943
1042
|
{
|
|
944
1043
|
strokeLinecap: "round",
|
|
@@ -949,7 +1048,7 @@ const nr = ({
|
|
|
949
1048
|
)
|
|
950
1049
|
}
|
|
951
1050
|
) }),
|
|
952
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ o(
|
|
953
1052
|
"input",
|
|
954
1053
|
{
|
|
955
1054
|
type: "text",
|
|
@@ -959,16 +1058,16 @@ const nr = ({
|
|
|
959
1058
|
className: r.classes?.searchInput || "w-full pl-10 pr-10 py-2.5 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-800 text-sm font-medium text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary transition-all"
|
|
960
1059
|
}
|
|
961
1060
|
),
|
|
962
|
-
/* @__PURE__ */
|
|
963
|
-
|
|
964
|
-
e && /* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ y("div", { className: "absolute right-3 flex items-center gap-1.5", children: [
|
|
1062
|
+
s && /* @__PURE__ */ o("span", { className: "w-3.5 h-3.5 border-2 border-primary border-t-transparent rounded-full animate-spin" }),
|
|
1063
|
+
e && /* @__PURE__ */ o(
|
|
965
1064
|
"button",
|
|
966
1065
|
{
|
|
967
1066
|
type: "button",
|
|
968
|
-
onClick:
|
|
1067
|
+
onClick: n,
|
|
969
1068
|
className: "p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 rounded-full hover:bg-gray-100 dark:hover:bg-slate-700 transition-colors",
|
|
970
1069
|
title: "Clear search",
|
|
971
|
-
children: /* @__PURE__ */
|
|
1070
|
+
children: /* @__PURE__ */ o(
|
|
972
1071
|
"svg",
|
|
973
1072
|
{
|
|
974
1073
|
className: "w-3.5 h-3.5",
|
|
@@ -976,18 +1075,66 @@ const nr = ({
|
|
|
976
1075
|
stroke: "currentColor",
|
|
977
1076
|
viewBox: "0 0 24 24",
|
|
978
1077
|
xmlns: "http://www.w3.org/2000/svg",
|
|
979
|
-
children: /* @__PURE__ */
|
|
1078
|
+
children: /* @__PURE__ */ o("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })
|
|
980
1079
|
}
|
|
981
1080
|
)
|
|
982
1081
|
}
|
|
983
1082
|
)
|
|
984
1083
|
] })
|
|
985
1084
|
] });
|
|
986
|
-
},
|
|
1085
|
+
}, ar = ({
|
|
1086
|
+
displayTitle: e,
|
|
1087
|
+
subtitle: t,
|
|
1088
|
+
isSearchEnabled: n,
|
|
1089
|
+
searchQuery: s = "",
|
|
1090
|
+
setSearch: l,
|
|
1091
|
+
clearSearch: r,
|
|
1092
|
+
isDebouncing: i = !1,
|
|
1093
|
+
searchPlaceholder: g,
|
|
1094
|
+
headerActions: c,
|
|
1095
|
+
add: d,
|
|
1096
|
+
linkAdd: a,
|
|
1097
|
+
addHandler: u
|
|
1098
|
+
}) => !(e || t || n || c || d) ? null : /* @__PURE__ */ y("div", { className: "w-full flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-1", children: [
|
|
1099
|
+
(e || t) && /* @__PURE__ */ y("div", { className: "flex flex-col", children: [
|
|
1100
|
+
e && /* @__PURE__ */ o("h3", { className: "text-lg font-bold tracking-tight text-gray-900 dark:text-white flex items-center gap-2", children: e }),
|
|
1101
|
+
t && /* @__PURE__ */ o("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-0.5", children: t })
|
|
1102
|
+
] }),
|
|
1103
|
+
/* @__PURE__ */ y("div", { className: "flex flex-wrap items-center gap-3 w-full sm:w-auto justify-start sm:justify-end ml-auto", children: [
|
|
1104
|
+
n && l && r && /* @__PURE__ */ o(
|
|
1105
|
+
rr,
|
|
1106
|
+
{
|
|
1107
|
+
value: s,
|
|
1108
|
+
onChange: l,
|
|
1109
|
+
onClear: r,
|
|
1110
|
+
isDebouncing: i,
|
|
1111
|
+
placeholder: g
|
|
1112
|
+
}
|
|
1113
|
+
),
|
|
1114
|
+
c,
|
|
1115
|
+
d && /* @__PURE__ */ y(
|
|
1116
|
+
"button",
|
|
1117
|
+
{
|
|
1118
|
+
type: "button",
|
|
1119
|
+
onClick: () => {
|
|
1120
|
+
u ? u() : a && typeof window < "u" && (window.location.href = a);
|
|
1121
|
+
},
|
|
1122
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-primary text-white text-xs sm:text-sm font-bold hover:bg-primary-soft transition-all shadow-sm shadow-primary/20 active:scale-95 whitespace-nowrap",
|
|
1123
|
+
children: [
|
|
1124
|
+
/* @__PURE__ */ o("span", { children: "+" }),
|
|
1125
|
+
/* @__PURE__ */ y("span", { children: [
|
|
1126
|
+
"Add ",
|
|
1127
|
+
e || "Record"
|
|
1128
|
+
] })
|
|
1129
|
+
]
|
|
1130
|
+
}
|
|
1131
|
+
)
|
|
1132
|
+
] })
|
|
1133
|
+
] }), nr = ({
|
|
987
1134
|
columns: e,
|
|
988
1135
|
hasActions: t,
|
|
989
|
-
actionsTitle:
|
|
990
|
-
actionsWidth:
|
|
1136
|
+
actionsTitle: n = "Actions",
|
|
1137
|
+
actionsWidth: s,
|
|
991
1138
|
sortBy: l,
|
|
992
1139
|
sortOrder: r,
|
|
993
1140
|
onSort: i,
|
|
@@ -997,14 +1144,14 @@ const nr = ({
|
|
|
997
1144
|
onToggleSelectAll: a,
|
|
998
1145
|
headerClassName: u = ""
|
|
999
1146
|
}) => {
|
|
1000
|
-
const m =
|
|
1001
|
-
return m.colors?.theadBg && (f.backgroundColor = m.colors.theadBg), m.colors?.theadText && (f.color = m.colors.theadText), /* @__PURE__ */
|
|
1147
|
+
const m = Y(), f = {};
|
|
1148
|
+
return m.colors?.theadBg && (f.backgroundColor = m.colors.theadBg), m.colors?.theadText && (f.color = m.colors.theadText), /* @__PURE__ */ o(
|
|
1002
1149
|
"thead",
|
|
1003
1150
|
{
|
|
1004
1151
|
style: f,
|
|
1005
1152
|
className: `${m.classes?.thead || "bg-gray-50/80 dark:bg-slate-800/80 border-b border-gray-200 dark:border-gray-800"} ${u}`,
|
|
1006
|
-
children: /* @__PURE__ */
|
|
1007
|
-
g && /* @__PURE__ */
|
|
1153
|
+
children: /* @__PURE__ */ y("tr", { children: [
|
|
1154
|
+
g && /* @__PURE__ */ o("th", { className: "w-10 px-4 py-3 text-center align-middle", children: /* @__PURE__ */ o(
|
|
1008
1155
|
"input",
|
|
1009
1156
|
{
|
|
1010
1157
|
type: "checkbox",
|
|
@@ -1017,8 +1164,8 @@ const nr = ({
|
|
|
1017
1164
|
}
|
|
1018
1165
|
) }),
|
|
1019
1166
|
e.map((b) => {
|
|
1020
|
-
const
|
|
1021
|
-
return /* @__PURE__ */
|
|
1167
|
+
const h = l === b.key, k = b.sortable !== !1 && !!i, T = b.align === "center" ? "text-center" : b.align === "right" ? "text-right" : "text-left";
|
|
1168
|
+
return /* @__PURE__ */ o(
|
|
1022
1169
|
"th",
|
|
1023
1170
|
{
|
|
1024
1171
|
style: {
|
|
@@ -1026,19 +1173,19 @@ const nr = ({
|
|
|
1026
1173
|
minWidth: b.minWidth,
|
|
1027
1174
|
maxWidth: b.maxWidth
|
|
1028
1175
|
},
|
|
1029
|
-
onClick: () =>
|
|
1030
|
-
className: `${m.classes?.th || "py-3.5 px-4 font-bold select-none whitespace-nowrap text-xs uppercase tracking-wider"} ${
|
|
1031
|
-
children: /* @__PURE__ */
|
|
1176
|
+
onClick: () => k && i?.(String(b.key)),
|
|
1177
|
+
className: `${m.classes?.th || "py-3.5 px-4 font-bold select-none whitespace-nowrap text-xs uppercase tracking-wider"} ${T} ${b.headerClassName || ""} ${k ? "cursor-pointer hover:text-primary transition-colors group" : ""}`,
|
|
1178
|
+
children: /* @__PURE__ */ y(
|
|
1032
1179
|
"div",
|
|
1033
1180
|
{
|
|
1034
1181
|
className: `inline-flex items-center gap-1.5 ${b.align === "center" ? "justify-center" : b.align === "right" ? "justify-end" : "justify-start"}`,
|
|
1035
1182
|
children: [
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
|
|
1183
|
+
/* @__PURE__ */ o("span", { children: b.title }),
|
|
1184
|
+
k && /* @__PURE__ */ o(
|
|
1038
1185
|
"span",
|
|
1039
1186
|
{
|
|
1040
|
-
className: `inline-flex flex-col text-[10px] transition-transform ${
|
|
1041
|
-
children:
|
|
1187
|
+
className: `inline-flex flex-col text-[10px] transition-transform ${h ? "text-primary scale-110" : "text-gray-400 opacity-40 group-hover:opacity-100"}`,
|
|
1188
|
+
children: h ? r === "asc" ? "▲" : "▼" : /* @__PURE__ */ o("span", { className: "text-[9px] leading-none opacity-50", children: "▲▼" })
|
|
1042
1189
|
}
|
|
1043
1190
|
)
|
|
1044
1191
|
]
|
|
@@ -1048,75 +1195,75 @@ const nr = ({
|
|
|
1048
1195
|
String(b.key)
|
|
1049
1196
|
);
|
|
1050
1197
|
}),
|
|
1051
|
-
t && /* @__PURE__ */
|
|
1198
|
+
t && /* @__PURE__ */ o(
|
|
1052
1199
|
"th",
|
|
1053
1200
|
{
|
|
1054
|
-
style: { width:
|
|
1201
|
+
style: { width: s || "auto" },
|
|
1055
1202
|
className: `${m.classes?.th || "py-3.5 px-4 font-bold select-none whitespace-nowrap text-xs uppercase tracking-wider"} text-right pr-6`,
|
|
1056
|
-
children:
|
|
1203
|
+
children: n
|
|
1057
1204
|
}
|
|
1058
1205
|
)
|
|
1059
1206
|
] })
|
|
1060
1207
|
}
|
|
1061
1208
|
);
|
|
1062
|
-
},
|
|
1209
|
+
}, E = () => /* @__PURE__ */ o("span", { className: "text-gray-400 dark:text-gray-500 font-mono text-sm", children: "—" }), Je = ({ value: e }) => {
|
|
1063
1210
|
if (e == null || e === "")
|
|
1064
|
-
return /* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ o(E, {});
|
|
1065
1212
|
const t = String(e);
|
|
1066
|
-
return /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ o("span", { className: "truncate block max-w-xs font-normal text-sm", title: t, children: t });
|
|
1067
1214
|
}, or = ({ value: e }) => {
|
|
1068
1215
|
if (e == null || isNaN(Number(e)))
|
|
1069
|
-
return /* @__PURE__ */
|
|
1216
|
+
return /* @__PURE__ */ o(E, {});
|
|
1070
1217
|
const t = Number(e);
|
|
1071
|
-
return /* @__PURE__ */
|
|
1072
|
-
},
|
|
1218
|
+
return /* @__PURE__ */ o("span", { className: "font-mono text-sm font-medium", children: t.toLocaleString() });
|
|
1219
|
+
}, sr = ({ value: e }) => {
|
|
1073
1220
|
if (e == null)
|
|
1074
|
-
return /* @__PURE__ */
|
|
1221
|
+
return /* @__PURE__ */ o(E, {});
|
|
1075
1222
|
const t = !!e;
|
|
1076
|
-
return /* @__PURE__ */
|
|
1223
|
+
return /* @__PURE__ */ y(
|
|
1077
1224
|
"span",
|
|
1078
1225
|
{
|
|
1079
1226
|
className: `inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-semibold tracking-wide ${t ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border border-emerald-500/20" : "bg-rose-500/10 text-rose-600 dark:text-rose-400 border border-rose-500/20"}`,
|
|
1080
1227
|
children: [
|
|
1081
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ o("span", { className: `w-1.5 h-1.5 rounded-full ${t ? "bg-emerald-500" : "bg-rose-500"}` }),
|
|
1082
1229
|
t ? "Yes" : "No"
|
|
1083
1230
|
]
|
|
1084
1231
|
}
|
|
1085
1232
|
);
|
|
1086
|
-
},
|
|
1233
|
+
}, Oe = ({
|
|
1087
1234
|
value: e,
|
|
1088
1235
|
isDateTime: t = !1
|
|
1089
1236
|
}) => {
|
|
1090
|
-
if (!e) return /* @__PURE__ */
|
|
1091
|
-
const
|
|
1092
|
-
return isNaN(
|
|
1093
|
-
|
|
1094
|
-
t && /* @__PURE__ */
|
|
1237
|
+
if (!e) return /* @__PURE__ */ o(E, {});
|
|
1238
|
+
const n = e instanceof Date ? e : new Date(e);
|
|
1239
|
+
return isNaN(n.getTime()) ? /* @__PURE__ */ o(Je, { value: e, column: { key: "" } }) : /* @__PURE__ */ y("span", { className: "whitespace-nowrap text-xs sm:text-sm font-medium text-gray-700 dark:text-gray-300", children: [
|
|
1240
|
+
n.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" }),
|
|
1241
|
+
t && /* @__PURE__ */ o("span", { className: "text-xs text-gray-400 dark:text-gray-500 ml-1.5", children: n.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit" }) })
|
|
1095
1242
|
] });
|
|
1096
|
-
},
|
|
1243
|
+
}, ir = ({ value: e, column: t }) => {
|
|
1097
1244
|
if (e == null || isNaN(Number(e)))
|
|
1098
|
-
return /* @__PURE__ */
|
|
1099
|
-
const
|
|
1100
|
-
return /* @__PURE__ */
|
|
1101
|
-
|
|
1245
|
+
return /* @__PURE__ */ o(E, {});
|
|
1246
|
+
const n = Number(e), s = t.currency || "EGP";
|
|
1247
|
+
return /* @__PURE__ */ y("span", { className: "font-mono text-sm font-bold text-gray-900 dark:text-white", children: [
|
|
1248
|
+
n.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 }),
|
|
1102
1249
|
" ",
|
|
1103
|
-
/* @__PURE__ */
|
|
1250
|
+
/* @__PURE__ */ o("span", { className: "text-xs font-normal text-gray-500 dark:text-gray-400", children: s })
|
|
1104
1251
|
] });
|
|
1105
|
-
},
|
|
1252
|
+
}, Re = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E", lr = ({ value: e }) => {
|
|
1106
1253
|
let t = "";
|
|
1107
|
-
return typeof e == "string" ? t = e : Array.isArray(e) && e.length > 0 ? t = typeof e[0] == "string" ? e[0] : e[0]?.url || "" : e && typeof e == "object" && (t = e.url || ""), t || (t =
|
|
1254
|
+
return typeof e == "string" ? t = e : Array.isArray(e) && e.length > 0 ? t = typeof e[0] == "string" ? e[0] : e[0]?.url || "" : e && typeof e == "object" && (t = e.url || ""), t || (t = Re), /* @__PURE__ */ o("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ o(
|
|
1108
1255
|
"img",
|
|
1109
1256
|
{
|
|
1110
1257
|
src: t,
|
|
1111
1258
|
alt: "Thumbnail",
|
|
1112
1259
|
className: "w-10 h-10 rounded-full object-cover border border-gray-200 dark:border-gray-700 bg-gray-100 dark:bg-gray-800 shadow-sm",
|
|
1113
1260
|
loading: "lazy",
|
|
1114
|
-
onError: (
|
|
1115
|
-
|
|
1261
|
+
onError: (n) => {
|
|
1262
|
+
n.target.src = Re;
|
|
1116
1263
|
}
|
|
1117
1264
|
}
|
|
1118
1265
|
) });
|
|
1119
|
-
},
|
|
1266
|
+
}, dr = {
|
|
1120
1267
|
active: { bg: "bg-emerald-500/10 border-emerald-500/20", text: "text-emerald-600 dark:text-emerald-400", dot: "bg-emerald-500" },
|
|
1121
1268
|
delivered: { bg: "bg-emerald-500/10 border-emerald-500/20", text: "text-emerald-600 dark:text-emerald-400", dot: "bg-emerald-500" },
|
|
1122
1269
|
completed: { bg: "bg-emerald-500/10 border-emerald-500/20", text: "text-emerald-600 dark:text-emerald-400", dot: "bg-emerald-500" },
|
|
@@ -1132,56 +1279,56 @@ const nr = ({
|
|
|
1132
1279
|
cancelled: { bg: "bg-rose-500/10 border-rose-500/20", text: "text-rose-600 dark:text-rose-400", dot: "bg-rose-500" },
|
|
1133
1280
|
offline: { bg: "bg-gray-500/10 border-gray-500/20", text: "text-gray-600 dark:text-gray-400", dot: "bg-gray-500" },
|
|
1134
1281
|
closed: { bg: "bg-gray-500/10 border-gray-500/20", text: "text-gray-600 dark:text-gray-400", dot: "bg-gray-500" }
|
|
1135
|
-
},
|
|
1282
|
+
}, cr = ({ value: e, column: t }) => {
|
|
1136
1283
|
if (e == null || e === "")
|
|
1137
|
-
return /* @__PURE__ */
|
|
1138
|
-
const
|
|
1139
|
-
if (t.statusMap && t.statusMap[
|
|
1140
|
-
const r = t.statusMap[
|
|
1141
|
-
return /* @__PURE__ */
|
|
1284
|
+
return /* @__PURE__ */ o(E, {});
|
|
1285
|
+
const n = String(e), s = n.toLowerCase();
|
|
1286
|
+
if (t.statusMap && t.statusMap[n]) {
|
|
1287
|
+
const r = t.statusMap[n];
|
|
1288
|
+
return /* @__PURE__ */ y(
|
|
1142
1289
|
"span",
|
|
1143
1290
|
{
|
|
1144
1291
|
className: "inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-bold uppercase tracking-wider border",
|
|
1145
1292
|
style: { color: r.color, backgroundColor: r.bg },
|
|
1146
1293
|
children: [
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
r.label ||
|
|
1294
|
+
/* @__PURE__ */ o("span", { className: "w-1.5 h-1.5 rounded-full", style: { backgroundColor: r.color } }),
|
|
1295
|
+
r.label || n
|
|
1149
1296
|
]
|
|
1150
1297
|
}
|
|
1151
1298
|
);
|
|
1152
1299
|
}
|
|
1153
|
-
const l =
|
|
1300
|
+
const l = dr[s] || {
|
|
1154
1301
|
bg: "bg-gray-500/10 border-gray-500/20",
|
|
1155
1302
|
text: "text-gray-700 dark:text-gray-300",
|
|
1156
1303
|
dot: "bg-gray-400"
|
|
1157
1304
|
};
|
|
1158
|
-
return /* @__PURE__ */
|
|
1305
|
+
return /* @__PURE__ */ y(
|
|
1159
1306
|
"span",
|
|
1160
1307
|
{
|
|
1161
1308
|
className: `inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-bold uppercase tracking-wider border ${l.bg} ${l.text}`,
|
|
1162
1309
|
children: [
|
|
1163
|
-
/* @__PURE__ */
|
|
1164
|
-
|
|
1310
|
+
/* @__PURE__ */ o("span", { className: `w-1.5 h-1.5 rounded-full ${l.dot}` }),
|
|
1311
|
+
n
|
|
1165
1312
|
]
|
|
1166
1313
|
}
|
|
1167
1314
|
);
|
|
1168
|
-
},
|
|
1169
|
-
e.slice(0, 3).map((t,
|
|
1315
|
+
}, gr = ({ value: e }) => !Array.isArray(e) || e.length === 0 ? /* @__PURE__ */ o(E, {}) : /* @__PURE__ */ y("div", { className: "flex flex-wrap gap-1 items-center", children: [
|
|
1316
|
+
e.slice(0, 3).map((t, n) => /* @__PURE__ */ o(
|
|
1170
1317
|
"span",
|
|
1171
1318
|
{
|
|
1172
1319
|
className: "inline-block px-2 py-0.5 text-xs rounded bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-200 dark:border-gray-700",
|
|
1173
1320
|
children: typeof t == "object" ? JSON.stringify(t) : String(t)
|
|
1174
1321
|
},
|
|
1175
|
-
|
|
1322
|
+
n
|
|
1176
1323
|
)),
|
|
1177
|
-
e.length > 3 && /* @__PURE__ */
|
|
1324
|
+
e.length > 3 && /* @__PURE__ */ y("span", { className: "text-xs text-gray-400 font-medium", children: [
|
|
1178
1325
|
"+",
|
|
1179
1326
|
e.length - 3
|
|
1180
1327
|
] })
|
|
1181
|
-
] }),
|
|
1182
|
-
if (!e) return /* @__PURE__ */
|
|
1328
|
+
] }), br = ({ value: e }) => !e || typeof e != "object" ? /* @__PURE__ */ o(E, {}) : "en" in e || "ar" in e ? /* @__PURE__ */ o("span", { className: "font-medium text-sm", children: e.en || e.ar || "" }) : /* @__PURE__ */ o("span", { className: "font-mono text-xs text-gray-500 dark:text-gray-400 truncate block max-w-xs", title: JSON.stringify(e), children: JSON.stringify(e) }), mr = ({ value: e }) => {
|
|
1329
|
+
if (!e) return /* @__PURE__ */ o(E, {});
|
|
1183
1330
|
const t = String(e);
|
|
1184
|
-
return /* @__PURE__ */
|
|
1331
|
+
return /* @__PURE__ */ y(
|
|
1185
1332
|
"a",
|
|
1186
1333
|
{
|
|
1187
1334
|
href: t,
|
|
@@ -1189,15 +1336,15 @@ const nr = ({
|
|
|
1189
1336
|
rel: "noopener noreferrer",
|
|
1190
1337
|
className: "text-primary hover:underline text-sm font-medium inline-flex items-center gap-1",
|
|
1191
1338
|
children: [
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ o("span", { className: "truncate max-w-[150px]", children: t }),
|
|
1340
|
+
/* @__PURE__ */ o("span", { className: "text-xs", children: "↗" })
|
|
1194
1341
|
]
|
|
1195
1342
|
}
|
|
1196
1343
|
);
|
|
1197
|
-
},
|
|
1198
|
-
if (!e) return /* @__PURE__ */
|
|
1344
|
+
}, ur = ({ value: e }) => {
|
|
1345
|
+
if (!e) return /* @__PURE__ */ o(E, {});
|
|
1199
1346
|
const t = String(e);
|
|
1200
|
-
return /* @__PURE__ */
|
|
1347
|
+
return /* @__PURE__ */ o(
|
|
1201
1348
|
"a",
|
|
1202
1349
|
{
|
|
1203
1350
|
href: `mailto:${t}`,
|
|
@@ -1205,10 +1352,10 @@ const nr = ({
|
|
|
1205
1352
|
children: t
|
|
1206
1353
|
}
|
|
1207
1354
|
);
|
|
1208
|
-
},
|
|
1209
|
-
if (!e) return /* @__PURE__ */
|
|
1355
|
+
}, fr = ({ value: e }) => {
|
|
1356
|
+
if (!e) return /* @__PURE__ */ o(E, {});
|
|
1210
1357
|
const t = String(e);
|
|
1211
|
-
return /* @__PURE__ */
|
|
1358
|
+
return /* @__PURE__ */ o(
|
|
1212
1359
|
"a",
|
|
1213
1360
|
{
|
|
1214
1361
|
href: `tel:${t}`,
|
|
@@ -1216,78 +1363,115 @@ const nr = ({
|
|
|
1216
1363
|
children: t
|
|
1217
1364
|
}
|
|
1218
1365
|
);
|
|
1219
|
-
},
|
|
1220
|
-
|
|
1366
|
+
}, yr = ({ value: e }) => {
|
|
1367
|
+
if (e == null || isNaN(Number(e)))
|
|
1368
|
+
return /* @__PURE__ */ o(E, {});
|
|
1369
|
+
const t = Math.min(100, Math.max(0, Math.round(Number(e)))), n = t >= 80 ? "bg-emerald-500" : t >= 50 ? "bg-blue-500" : t >= 30 ? "bg-amber-500" : "bg-rose-500";
|
|
1370
|
+
return /* @__PURE__ */ y("div", { className: "flex items-center gap-2.5 min-w-[120px]", children: [
|
|
1371
|
+
/* @__PURE__ */ o("div", { className: "flex-1 h-2 rounded-full bg-gray-200 dark:bg-slate-700 overflow-hidden", children: /* @__PURE__ */ o(
|
|
1372
|
+
"div",
|
|
1373
|
+
{
|
|
1374
|
+
className: `h-full rounded-full ${n} transition-all duration-500`,
|
|
1375
|
+
style: { width: `${t}%` }
|
|
1376
|
+
}
|
|
1377
|
+
) }),
|
|
1378
|
+
/* @__PURE__ */ y("span", { className: "font-mono text-xs font-bold text-gray-700 dark:text-gray-300 w-9 text-right", children: [
|
|
1379
|
+
t,
|
|
1380
|
+
"%"
|
|
1381
|
+
] })
|
|
1382
|
+
] });
|
|
1383
|
+
}, hr = ({ value: e }) => {
|
|
1384
|
+
if (e == null || isNaN(Number(e)))
|
|
1385
|
+
return /* @__PURE__ */ o(E, {});
|
|
1386
|
+
const t = Number(e);
|
|
1387
|
+
return /* @__PURE__ */ y("div", { className: "inline-flex items-center gap-1.5 font-medium text-xs text-amber-500", children: [
|
|
1388
|
+
/* @__PURE__ */ o("span", { className: "text-sm", children: "★" }),
|
|
1389
|
+
/* @__PURE__ */ o("span", { className: "font-bold text-gray-900 dark:text-gray-100", children: t.toFixed(1) }),
|
|
1390
|
+
/* @__PURE__ */ o("span", { className: "text-gray-400 dark:text-gray-500 text-[10px]", children: "/ 5" })
|
|
1391
|
+
] });
|
|
1392
|
+
}, pr = ({ value: e }) => {
|
|
1393
|
+
if (e == null || e === "")
|
|
1394
|
+
return /* @__PURE__ */ o(E, {});
|
|
1395
|
+
const t = String(e);
|
|
1396
|
+
return /* @__PURE__ */ o("span", { className: "inline-flex items-center px-2.5 py-0.5 rounded-lg text-xs font-bold bg-primary/10 text-primary border border-primary/20", children: t });
|
|
1397
|
+
}, xr = ({ row: e, column: t, rowIndex: n }) => {
|
|
1398
|
+
const s = S(e, t.key);
|
|
1221
1399
|
if (t.render && typeof t.render == "function")
|
|
1222
|
-
return /* @__PURE__ */
|
|
1400
|
+
return /* @__PURE__ */ o(me, { children: t.render(s, e, n) });
|
|
1223
1401
|
if (t.formatter && typeof t.formatter == "function")
|
|
1224
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ o(me, { children: t.formatter(s, e, n) });
|
|
1225
1403
|
switch (t.type) {
|
|
1226
1404
|
case "boolean":
|
|
1227
|
-
return /* @__PURE__ */
|
|
1405
|
+
return /* @__PURE__ */ o(sr, { value: s, column: t });
|
|
1228
1406
|
case "number":
|
|
1229
|
-
return /* @__PURE__ */
|
|
1407
|
+
return /* @__PURE__ */ o(or, { value: s, column: t });
|
|
1230
1408
|
case "currency":
|
|
1231
|
-
return /* @__PURE__ */
|
|
1409
|
+
return /* @__PURE__ */ o(ir, { value: s, column: t });
|
|
1232
1410
|
case "date":
|
|
1233
|
-
return /* @__PURE__ */
|
|
1411
|
+
return /* @__PURE__ */ o(Oe, { value: s, column: t, isDateTime: !1 });
|
|
1234
1412
|
case "datetime":
|
|
1235
|
-
return /* @__PURE__ */
|
|
1413
|
+
return /* @__PURE__ */ o(Oe, { value: s, column: t, isDateTime: !0 });
|
|
1236
1414
|
case "image":
|
|
1237
|
-
return /* @__PURE__ */
|
|
1415
|
+
return /* @__PURE__ */ o(lr, { value: s, column: t });
|
|
1238
1416
|
case "status":
|
|
1239
|
-
return /* @__PURE__ */
|
|
1417
|
+
return /* @__PURE__ */ o(cr, { value: s, column: t });
|
|
1418
|
+
case "progress":
|
|
1419
|
+
return /* @__PURE__ */ o(yr, { value: s, column: t });
|
|
1420
|
+
case "rating":
|
|
1421
|
+
return /* @__PURE__ */ o(hr, { value: s, column: t });
|
|
1422
|
+
case "badge":
|
|
1423
|
+
return /* @__PURE__ */ o(pr, { value: s, column: t });
|
|
1240
1424
|
case "array":
|
|
1241
|
-
return /* @__PURE__ */
|
|
1425
|
+
return /* @__PURE__ */ o(gr, { value: s, column: t });
|
|
1242
1426
|
case "object":
|
|
1243
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ o(br, { value: s, column: t });
|
|
1244
1428
|
case "url":
|
|
1245
|
-
return /* @__PURE__ */
|
|
1429
|
+
return /* @__PURE__ */ o(mr, { value: s, column: t });
|
|
1246
1430
|
case "email":
|
|
1247
|
-
return /* @__PURE__ */
|
|
1431
|
+
return /* @__PURE__ */ o(ur, { value: s, column: t });
|
|
1248
1432
|
case "phone":
|
|
1249
|
-
return /* @__PURE__ */
|
|
1433
|
+
return /* @__PURE__ */ o(fr, { value: s, column: t });
|
|
1250
1434
|
default:
|
|
1251
|
-
return /* @__PURE__ */
|
|
1435
|
+
return /* @__PURE__ */ o(Je, { value: s, column: t });
|
|
1252
1436
|
}
|
|
1253
|
-
},
|
|
1437
|
+
}, kr = ({
|
|
1254
1438
|
isOpen: e,
|
|
1255
1439
|
title: t,
|
|
1256
|
-
message:
|
|
1257
|
-
confirmText:
|
|
1440
|
+
message: n,
|
|
1441
|
+
confirmText: s = "Confirm",
|
|
1258
1442
|
cancelText: l = "Cancel",
|
|
1259
1443
|
type: r = "danger",
|
|
1260
1444
|
onClose: i,
|
|
1261
1445
|
onConfirm: g,
|
|
1262
1446
|
isLoading: c = !1
|
|
1263
|
-
}) => (
|
|
1447
|
+
}) => (ne(() => {
|
|
1264
1448
|
const d = (a) => {
|
|
1265
1449
|
a.key === "Escape" && i();
|
|
1266
1450
|
};
|
|
1267
1451
|
return e && window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
1268
|
-
}, [e, i]), e ? /* @__PURE__ */
|
|
1452
|
+
}, [e, i]), e ? /* @__PURE__ */ o(
|
|
1269
1453
|
"div",
|
|
1270
1454
|
{
|
|
1271
1455
|
className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm any-table-fade-in",
|
|
1272
1456
|
onClick: i,
|
|
1273
|
-
children: /* @__PURE__ */
|
|
1457
|
+
children: /* @__PURE__ */ y(
|
|
1274
1458
|
"div",
|
|
1275
1459
|
{
|
|
1276
1460
|
className: "bg-white dark:bg-slate-900 border border-gray-200 dark:border-gray-800 w-full max-w-md rounded-2xl p-6 shadow-2xl transform transition-all text-center",
|
|
1277
1461
|
onClick: (d) => d.stopPropagation(),
|
|
1278
1462
|
role: "dialog",
|
|
1279
1463
|
children: [
|
|
1280
|
-
/* @__PURE__ */
|
|
1464
|
+
/* @__PURE__ */ o(
|
|
1281
1465
|
"div",
|
|
1282
1466
|
{
|
|
1283
1467
|
className: `mx-auto mb-4 w-14 h-14 rounded-full flex items-center justify-center text-2xl ${r === "danger" ? "bg-rose-500/10 text-rose-500" : r === "warning" ? "bg-amber-500/10 text-amber-500" : "bg-blue-500/10 text-blue-500"}`,
|
|
1284
1468
|
children: r === "danger" ? "⚠️" : r === "warning" ? "⚡" : "ℹ️"
|
|
1285
1469
|
}
|
|
1286
1470
|
),
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
-
/* @__PURE__ */
|
|
1289
|
-
/* @__PURE__ */
|
|
1290
|
-
/* @__PURE__ */
|
|
1471
|
+
/* @__PURE__ */ o("h3", { className: "text-xl font-black text-gray-900 dark:text-white mb-2", children: t }),
|
|
1472
|
+
/* @__PURE__ */ o("p", { className: "text-sm text-gray-600 dark:text-gray-400 mb-6 leading-relaxed", children: n }),
|
|
1473
|
+
/* @__PURE__ */ y("div", { className: "flex items-center justify-center gap-3", children: [
|
|
1474
|
+
/* @__PURE__ */ o(
|
|
1291
1475
|
"button",
|
|
1292
1476
|
{
|
|
1293
1477
|
type: "button",
|
|
@@ -1297,14 +1481,14 @@ const nr = ({
|
|
|
1297
1481
|
children: l
|
|
1298
1482
|
}
|
|
1299
1483
|
),
|
|
1300
|
-
/* @__PURE__ */
|
|
1484
|
+
/* @__PURE__ */ o(
|
|
1301
1485
|
"button",
|
|
1302
1486
|
{
|
|
1303
1487
|
type: "button",
|
|
1304
1488
|
disabled: c,
|
|
1305
1489
|
onClick: g,
|
|
1306
1490
|
className: `w-full py-2.5 px-4 rounded-xl font-bold text-sm text-white transition-all shadow-md active:scale-95 disabled:opacity-50 ${r === "danger" ? "bg-rose-600 hover:bg-rose-700 shadow-rose-600/30" : "bg-primary hover:bg-primary-soft shadow-primary/30"}`,
|
|
1307
|
-
children: c ? "Processing..." :
|
|
1491
|
+
children: c ? "Processing..." : s
|
|
1308
1492
|
}
|
|
1309
1493
|
)
|
|
1310
1494
|
] })
|
|
@@ -1313,33 +1497,33 @@ const nr = ({
|
|
|
1313
1497
|
)
|
|
1314
1498
|
}
|
|
1315
1499
|
) : null);
|
|
1316
|
-
function
|
|
1500
|
+
function qe(e, t) {
|
|
1317
1501
|
if (!e) return null;
|
|
1318
|
-
if (
|
|
1502
|
+
if (Ke.isValidElement(e))
|
|
1319
1503
|
return e;
|
|
1320
1504
|
if (typeof e == "function") {
|
|
1321
1505
|
if (e.prototype && e.prototype.isReactComponent)
|
|
1322
|
-
return /* @__PURE__ */
|
|
1323
|
-
const
|
|
1324
|
-
if (/^[A-Z]/.test(
|
|
1325
|
-
return /* @__PURE__ */
|
|
1506
|
+
return /* @__PURE__ */ o(e, { className: "w-4 h-4 shrink-0" });
|
|
1507
|
+
const n = e.displayName || e.name || "";
|
|
1508
|
+
if (/^[A-Z]/.test(n))
|
|
1509
|
+
return /* @__PURE__ */ o(e, { className: "w-4 h-4 shrink-0" });
|
|
1326
1510
|
try {
|
|
1327
1511
|
const l = e(t);
|
|
1328
|
-
return
|
|
1512
|
+
return qe(l, t);
|
|
1329
1513
|
} catch {
|
|
1330
|
-
return /* @__PURE__ */
|
|
1514
|
+
return /* @__PURE__ */ o(e, { className: "w-4 h-4 shrink-0" });
|
|
1331
1515
|
}
|
|
1332
1516
|
}
|
|
1333
|
-
return typeof e == "object" && e !== null && (e.$$typeof || e.render) ? /* @__PURE__ */
|
|
1517
|
+
return typeof e == "object" && e !== null && (e.$$typeof || e.render) ? /* @__PURE__ */ o(e, { className: "w-4 h-4 shrink-0" }) : typeof e == "string" ? e.startsWith("http://") || e.startsWith("https://") || e.startsWith("/") || e.startsWith("./") || e.startsWith("data:image/") || /\.(png|jpe?g|svg|webp|gif|ico)$/i.test(e) ? /* @__PURE__ */ o(
|
|
1334
1518
|
"img",
|
|
1335
1519
|
{
|
|
1336
1520
|
src: e,
|
|
1337
1521
|
alt: "action-icon",
|
|
1338
1522
|
className: "w-4 h-4 object-contain shrink-0 inline-block"
|
|
1339
1523
|
}
|
|
1340
|
-
) : /* @__PURE__ */
|
|
1524
|
+
) : /* @__PURE__ */ o("span", { className: "inline-flex items-center justify-center leading-none text-base", children: e }) : e;
|
|
1341
1525
|
}
|
|
1342
|
-
const
|
|
1526
|
+
const Ue = {
|
|
1343
1527
|
primary: "bg-primary text-white hover:bg-primary-soft shadow-sm shadow-primary/20",
|
|
1344
1528
|
secondary: "bg-emerald-600 text-white hover:bg-emerald-700 shadow-sm shadow-emerald-600/20",
|
|
1345
1529
|
success: "bg-emerald-500 text-white hover:bg-emerald-600 shadow-sm shadow-emerald-500/20",
|
|
@@ -1348,8 +1532,8 @@ const Je = {
|
|
|
1348
1532
|
info: "bg-sky-500 text-white hover:bg-sky-600 shadow-sm shadow-sky-500/20",
|
|
1349
1533
|
neutral: "bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-700 border border-gray-200 dark:border-gray-700",
|
|
1350
1534
|
ghost: "bg-transparent text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-white"
|
|
1351
|
-
},
|
|
1352
|
-
const [
|
|
1535
|
+
}, wr = ({ row: e, actions: t, context: n }) => {
|
|
1536
|
+
const [s, l] = A(null), [r, i] = A({});
|
|
1353
1537
|
if (!t || !t.length)
|
|
1354
1538
|
return null;
|
|
1355
1539
|
const g = async (a) => {
|
|
@@ -1373,7 +1557,7 @@ const Je = {
|
|
|
1373
1557
|
if (a.type === "button" || !a.type) {
|
|
1374
1558
|
i((u) => ({ ...u, [a.id]: !0 }));
|
|
1375
1559
|
try {
|
|
1376
|
-
await a.onClick(e,
|
|
1560
|
+
await a.onClick(e, n);
|
|
1377
1561
|
} finally {
|
|
1378
1562
|
i((u) => ({ ...u, [a.id]: !1 }));
|
|
1379
1563
|
}
|
|
@@ -1382,44 +1566,44 @@ const Je = {
|
|
|
1382
1566
|
const m = !u;
|
|
1383
1567
|
i((f) => ({ ...f, [a.id]: !0 }));
|
|
1384
1568
|
try {
|
|
1385
|
-
await a.onChange(e, m,
|
|
1569
|
+
await a.onChange(e, m, n);
|
|
1386
1570
|
} finally {
|
|
1387
1571
|
i((f) => ({ ...f, [a.id]: !1 }));
|
|
1388
1572
|
}
|
|
1389
1573
|
};
|
|
1390
|
-
return /* @__PURE__ */
|
|
1391
|
-
/* @__PURE__ */
|
|
1574
|
+
return /* @__PURE__ */ y(me, { children: [
|
|
1575
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-end gap-2 pr-2", children: t.map((a) => {
|
|
1392
1576
|
if (typeof a.hide == "function" && a.hide(e) || typeof a.show == "function" && !a.show(e)) return null;
|
|
1393
|
-
const u = typeof a.disabled == "function" ? a.disabled(e) : !!a.disabled, m = r[a.id] || (typeof a.loading == "function" ? a.loading(e) : !!a.loading), f = typeof a.label == "function" ? a.label(e) : a.label, b =
|
|
1577
|
+
const u = typeof a.disabled == "function" ? a.disabled(e) : !!a.disabled, m = r[a.id] || (typeof a.loading == "function" ? a.loading(e) : !!a.loading), f = typeof a.label == "function" ? a.label(e) : a.label, b = qe(a.icon, e), h = typeof a.tooltip == "function" ? a.tooltip(e) : a.tooltip, k = typeof a.className == "function" ? a.className(e) : a.className || "";
|
|
1394
1578
|
if (a.type === "custom" && a.render)
|
|
1395
|
-
return /* @__PURE__ */
|
|
1579
|
+
return /* @__PURE__ */ o(Ke.Fragment, { children: a.render(e, n) }, a.id);
|
|
1396
1580
|
if (a.type === "switch") {
|
|
1397
|
-
const
|
|
1398
|
-
return /* @__PURE__ */
|
|
1581
|
+
const w = a, x = w.checked(e);
|
|
1582
|
+
return /* @__PURE__ */ y(
|
|
1399
1583
|
"div",
|
|
1400
1584
|
{
|
|
1401
1585
|
className: "flex items-center gap-2",
|
|
1402
|
-
title:
|
|
1586
|
+
title: h || f,
|
|
1403
1587
|
children: [
|
|
1404
|
-
f && /* @__PURE__ */
|
|
1588
|
+
f && /* @__PURE__ */ y("span", { className: "text-xs font-semibold text-gray-500", children: [
|
|
1405
1589
|
f,
|
|
1406
1590
|
":"
|
|
1407
1591
|
] }),
|
|
1408
|
-
/* @__PURE__ */
|
|
1592
|
+
/* @__PURE__ */ o(
|
|
1409
1593
|
"button",
|
|
1410
1594
|
{
|
|
1411
1595
|
type: "button",
|
|
1412
1596
|
role: "switch",
|
|
1413
|
-
"aria-checked":
|
|
1597
|
+
"aria-checked": x,
|
|
1414
1598
|
disabled: u || m,
|
|
1415
|
-
onClick: () => d(
|
|
1416
|
-
className: `relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${
|
|
1417
|
-
children: /* @__PURE__ */
|
|
1599
|
+
onClick: () => d(w, x),
|
|
1600
|
+
className: `relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${x ? "bg-emerald-500" : "bg-gray-300 dark:bg-gray-700"} ${k}`,
|
|
1601
|
+
children: /* @__PURE__ */ o(
|
|
1418
1602
|
"span",
|
|
1419
1603
|
{
|
|
1420
1604
|
"aria-hidden": "true",
|
|
1421
|
-
className: `pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out flex items-center justify-center ${
|
|
1422
|
-
children: m && /* @__PURE__ */
|
|
1605
|
+
className: `pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out flex items-center justify-center ${x ? "translate-x-5" : "translate-x-0"}`,
|
|
1606
|
+
children: m && /* @__PURE__ */ o("span", { className: "w-2.5 h-2.5 border-2 border-primary border-t-transparent rounded-full animate-spin" })
|
|
1423
1607
|
}
|
|
1424
1608
|
)
|
|
1425
1609
|
}
|
|
@@ -1429,43 +1613,43 @@ const Je = {
|
|
|
1429
1613
|
a.id
|
|
1430
1614
|
);
|
|
1431
1615
|
}
|
|
1432
|
-
const
|
|
1433
|
-
return /* @__PURE__ */
|
|
1616
|
+
const T = typeof a.variant == "function" ? a.variant(e) : a.variant || "neutral", $ = Ue[T] || Ue.neutral, p = !f && b ? "p-2 min-w-[2rem]" : "px-3 py-1.5";
|
|
1617
|
+
return /* @__PURE__ */ y(
|
|
1434
1618
|
"button",
|
|
1435
1619
|
{
|
|
1436
1620
|
type: "button",
|
|
1437
1621
|
disabled: u || m,
|
|
1438
1622
|
onClick: () => g(a),
|
|
1439
|
-
title:
|
|
1623
|
+
title: h,
|
|
1440
1624
|
style: a.color ? { backgroundColor: a.color, color: "#ffffff" } : void 0,
|
|
1441
|
-
className: `inline-flex items-center justify-center gap-1.5 ${
|
|
1625
|
+
className: `inline-flex items-center justify-center gap-1.5 ${p} rounded-xl text-xs font-bold transition-all duration-200 active:scale-95 disabled:cursor-not-allowed disabled:opacity-50 disabled:active:scale-100 ${$} ${k}`,
|
|
1442
1626
|
children: [
|
|
1443
|
-
m ? /* @__PURE__ */
|
|
1444
|
-
f && /* @__PURE__ */
|
|
1627
|
+
m ? /* @__PURE__ */ o("span", { className: "w-3.5 h-3.5 border-2 border-current border-t-transparent rounded-full animate-spin" }) : b && /* @__PURE__ */ o("span", { className: "text-sm flex items-center justify-center shrink-0", children: b }),
|
|
1628
|
+
f && /* @__PURE__ */ o("span", { children: f })
|
|
1445
1629
|
]
|
|
1446
1630
|
},
|
|
1447
1631
|
a.id
|
|
1448
1632
|
);
|
|
1449
1633
|
}) }),
|
|
1450
|
-
|
|
1451
|
-
|
|
1634
|
+
s && /* @__PURE__ */ o(
|
|
1635
|
+
kr,
|
|
1452
1636
|
{
|
|
1453
|
-
isOpen:
|
|
1454
|
-
title:
|
|
1455
|
-
message:
|
|
1456
|
-
confirmText:
|
|
1457
|
-
cancelText:
|
|
1458
|
-
type:
|
|
1637
|
+
isOpen: s.isOpen,
|
|
1638
|
+
title: s.title,
|
|
1639
|
+
message: s.message,
|
|
1640
|
+
confirmText: s.confirmText,
|
|
1641
|
+
cancelText: s.cancelText,
|
|
1642
|
+
type: s.type,
|
|
1459
1643
|
onClose: () => l(null),
|
|
1460
|
-
onConfirm:
|
|
1644
|
+
onConfirm: s.onConfirm
|
|
1461
1645
|
}
|
|
1462
1646
|
)
|
|
1463
1647
|
] });
|
|
1464
|
-
},
|
|
1648
|
+
}, vr = ({
|
|
1465
1649
|
rows: e,
|
|
1466
1650
|
columns: t,
|
|
1467
|
-
actions:
|
|
1468
|
-
actionContext:
|
|
1651
|
+
actions: n,
|
|
1652
|
+
actionContext: s,
|
|
1469
1653
|
rowKeyResolver: l,
|
|
1470
1654
|
selectable: r,
|
|
1471
1655
|
selectedKeys: i,
|
|
@@ -1475,72 +1659,72 @@ const Je = {
|
|
|
1475
1659
|
hoverable: a = !0,
|
|
1476
1660
|
rowClassName: u
|
|
1477
1661
|
}) => {
|
|
1478
|
-
const m =
|
|
1479
|
-
return /* @__PURE__ */
|
|
1480
|
-
const
|
|
1481
|
-
return /* @__PURE__ */
|
|
1662
|
+
const m = Y(), f = !!(n && n.length > 0);
|
|
1663
|
+
return /* @__PURE__ */ o("tbody", { className: m.classes?.tbody || "divide-y divide-gray-100 dark:divide-gray-800/60 bg-white dark:bg-slate-900", children: e.map((b, h) => {
|
|
1664
|
+
const k = l(b, h), T = i?.has(k), $ = typeof u == "function" ? u(b, h) : u || "";
|
|
1665
|
+
return /* @__PURE__ */ y(
|
|
1482
1666
|
"tr",
|
|
1483
1667
|
{
|
|
1484
|
-
onClick: (
|
|
1485
|
-
className: `${m.classes?.tr || "transition-colors duration-150"} ${d &&
|
|
1668
|
+
onClick: (p) => c?.(b, h, p),
|
|
1669
|
+
className: `${m.classes?.tr || "transition-colors duration-150"} ${d && h % 2 === 1 ? "bg-gray-50/40 dark:bg-slate-800/20" : ""} ${a ? "hover:bg-gray-50/70 dark:hover:bg-slate-800/50" : ""} ${T ? "bg-primary/5 dark:bg-primary/10" : ""} ${c ? "cursor-pointer" : ""} ${$}`,
|
|
1486
1670
|
children: [
|
|
1487
|
-
r && /* @__PURE__ */
|
|
1671
|
+
r && /* @__PURE__ */ o(
|
|
1488
1672
|
"td",
|
|
1489
1673
|
{
|
|
1490
1674
|
className: "w-10 px-4 py-3 text-center align-middle",
|
|
1491
|
-
onClick: (
|
|
1492
|
-
children: /* @__PURE__ */
|
|
1675
|
+
onClick: (p) => p.stopPropagation(),
|
|
1676
|
+
children: /* @__PURE__ */ o(
|
|
1493
1677
|
"input",
|
|
1494
1678
|
{
|
|
1495
1679
|
type: "checkbox",
|
|
1496
|
-
checked:
|
|
1497
|
-
onChange: () => g?.(
|
|
1680
|
+
checked: T,
|
|
1681
|
+
onChange: () => g?.(k, b),
|
|
1498
1682
|
className: "w-4 h-4 rounded border-gray-300 dark:border-gray-600 text-primary focus:ring-primary/30 cursor-pointer"
|
|
1499
1683
|
}
|
|
1500
1684
|
)
|
|
1501
1685
|
}
|
|
1502
1686
|
),
|
|
1503
|
-
t.map((
|
|
1504
|
-
const
|
|
1505
|
-
return /* @__PURE__ */
|
|
1687
|
+
t.map((p) => {
|
|
1688
|
+
const w = p.align === "center" ? "text-center" : p.align === "right" ? "text-right" : "text-left", x = typeof p.className == "function" ? p.className(b?.[p.key], b, h) : p.className || "";
|
|
1689
|
+
return /* @__PURE__ */ o(
|
|
1506
1690
|
"td",
|
|
1507
1691
|
{
|
|
1508
1692
|
style: {
|
|
1509
|
-
width:
|
|
1510
|
-
minWidth:
|
|
1511
|
-
maxWidth:
|
|
1693
|
+
width: p.width,
|
|
1694
|
+
minWidth: p.minWidth,
|
|
1695
|
+
maxWidth: p.maxWidth
|
|
1512
1696
|
},
|
|
1513
|
-
className: `${m.classes?.td || "py-3 px-4 text-sm align-middle"} ${
|
|
1514
|
-
children: /* @__PURE__ */
|
|
1697
|
+
className: `${m.classes?.td || "py-3 px-4 text-sm align-middle"} ${w} ${x}`,
|
|
1698
|
+
children: /* @__PURE__ */ o(xr, { row: b, column: p, rowIndex: h })
|
|
1515
1699
|
},
|
|
1516
|
-
String(
|
|
1700
|
+
String(p.key)
|
|
1517
1701
|
);
|
|
1518
1702
|
}),
|
|
1519
|
-
f && /* @__PURE__ */
|
|
1703
|
+
f && /* @__PURE__ */ o(
|
|
1520
1704
|
"td",
|
|
1521
1705
|
{
|
|
1522
1706
|
className: `${m.classes?.td || "py-3 px-4 text-sm align-middle"} text-right`,
|
|
1523
|
-
onClick: (
|
|
1524
|
-
children: /* @__PURE__ */
|
|
1525
|
-
|
|
1707
|
+
onClick: (p) => p.stopPropagation(),
|
|
1708
|
+
children: /* @__PURE__ */ o(
|
|
1709
|
+
wr,
|
|
1526
1710
|
{
|
|
1527
1711
|
row: b,
|
|
1528
|
-
actions:
|
|
1529
|
-
context:
|
|
1712
|
+
actions: n || [],
|
|
1713
|
+
context: s
|
|
1530
1714
|
}
|
|
1531
1715
|
)
|
|
1532
1716
|
}
|
|
1533
1717
|
)
|
|
1534
1718
|
]
|
|
1535
1719
|
},
|
|
1536
|
-
String(
|
|
1720
|
+
String(k)
|
|
1537
1721
|
);
|
|
1538
1722
|
}) });
|
|
1539
|
-
},
|
|
1723
|
+
}, Nr = ({
|
|
1540
1724
|
page: e,
|
|
1541
1725
|
pageSize: t,
|
|
1542
|
-
totalRecords:
|
|
1543
|
-
totalPages:
|
|
1726
|
+
totalRecords: n,
|
|
1727
|
+
totalPages: s,
|
|
1544
1728
|
pageSizeOptions: l = [5, 10, 20, 50, 100],
|
|
1545
1729
|
onPageChange: r,
|
|
1546
1730
|
onPageSizeChange: i,
|
|
@@ -1548,38 +1732,38 @@ const Je = {
|
|
|
1548
1732
|
showTotalCount: c = !0,
|
|
1549
1733
|
pageWindow: d
|
|
1550
1734
|
}) => {
|
|
1551
|
-
const a =
|
|
1552
|
-
return /* @__PURE__ */
|
|
1735
|
+
const a = Y(), u = Math.min((e - 1) * t + 1, n), m = Math.min(e * t, n);
|
|
1736
|
+
return /* @__PURE__ */ y(
|
|
1553
1737
|
"div",
|
|
1554
1738
|
{
|
|
1555
1739
|
className: a.classes?.paginationContainer || "w-full flex flex-wrap items-center justify-between gap-4 pt-4 text-sm text-gray-600 dark:text-gray-400",
|
|
1556
1740
|
children: [
|
|
1557
|
-
/* @__PURE__ */
|
|
1558
|
-
c &&
|
|
1741
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-3", children: [
|
|
1742
|
+
c && n > 0 ? /* @__PURE__ */ y("span", { className: "text-xs sm:text-sm font-medium", children: [
|
|
1559
1743
|
"Showing ",
|
|
1560
|
-
/* @__PURE__ */
|
|
1744
|
+
/* @__PURE__ */ o("strong", { className: "text-gray-900 dark:text-white font-bold", children: u }),
|
|
1561
1745
|
" to",
|
|
1562
1746
|
" ",
|
|
1563
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ o("strong", { className: "text-gray-900 dark:text-white font-bold", children: m }),
|
|
1564
1748
|
" of",
|
|
1565
1749
|
" ",
|
|
1566
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ o("strong", { className: "text-gray-900 dark:text-white font-bold", children: n.toLocaleString() }),
|
|
1567
1751
|
" results"
|
|
1568
|
-
] }) : /* @__PURE__ */
|
|
1752
|
+
] }) : /* @__PURE__ */ y("span", { className: "text-xs sm:text-sm font-medium", children: [
|
|
1569
1753
|
"Page ",
|
|
1570
1754
|
e,
|
|
1571
1755
|
" of ",
|
|
1572
|
-
|
|
1756
|
+
s
|
|
1573
1757
|
] }),
|
|
1574
|
-
g && /* @__PURE__ */
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
/* @__PURE__ */
|
|
1758
|
+
g && /* @__PURE__ */ y("div", { className: "flex items-center gap-2 ml-2", children: [
|
|
1759
|
+
/* @__PURE__ */ o("span", { className: "text-xs text-gray-500 hidden sm:inline", children: "Rows:" }),
|
|
1760
|
+
/* @__PURE__ */ o(
|
|
1577
1761
|
"select",
|
|
1578
1762
|
{
|
|
1579
1763
|
value: t,
|
|
1580
1764
|
onChange: (f) => i(Number(f.target.value)),
|
|
1581
1765
|
className: a.classes?.paginationSelect || "h-8 px-2.5 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-800 text-xs font-semibold text-gray-800 dark:text-gray-200 focus:outline-none focus:border-primary cursor-pointer",
|
|
1582
|
-
children: l.map((f) => /* @__PURE__ */
|
|
1766
|
+
children: l.map((f) => /* @__PURE__ */ y("option", { value: f, className: "bg-white dark:bg-slate-800 text-gray-900 dark:text-white", children: [
|
|
1583
1767
|
f,
|
|
1584
1768
|
" / page"
|
|
1585
1769
|
] }, f))
|
|
@@ -1587,8 +1771,8 @@ const Je = {
|
|
|
1587
1771
|
)
|
|
1588
1772
|
] })
|
|
1589
1773
|
] }),
|
|
1590
|
-
/* @__PURE__ */
|
|
1591
|
-
/* @__PURE__ */
|
|
1774
|
+
/* @__PURE__ */ y("div", { className: "flex items-center gap-1.5 ml-auto", children: [
|
|
1775
|
+
/* @__PURE__ */ o(
|
|
1592
1776
|
"button",
|
|
1593
1777
|
{
|
|
1594
1778
|
type: "button",
|
|
@@ -1601,7 +1785,7 @@ const Je = {
|
|
|
1601
1785
|
),
|
|
1602
1786
|
d.map((f) => {
|
|
1603
1787
|
const b = f === e;
|
|
1604
|
-
return /* @__PURE__ */
|
|
1788
|
+
return /* @__PURE__ */ o(
|
|
1605
1789
|
"button",
|
|
1606
1790
|
{
|
|
1607
1791
|
type: "button",
|
|
@@ -1612,11 +1796,11 @@ const Je = {
|
|
|
1612
1796
|
f
|
|
1613
1797
|
);
|
|
1614
1798
|
}),
|
|
1615
|
-
/* @__PURE__ */
|
|
1799
|
+
/* @__PURE__ */ o(
|
|
1616
1800
|
"button",
|
|
1617
1801
|
{
|
|
1618
1802
|
type: "button",
|
|
1619
|
-
disabled: e >=
|
|
1803
|
+
disabled: e >= s,
|
|
1620
1804
|
onClick: () => r(e + 1),
|
|
1621
1805
|
"aria-label": "Next Page",
|
|
1622
1806
|
className: `${a.classes?.paginationButton || "h-8 min-w-[32px] px-2.5 flex items-center justify-center rounded-xl font-bold text-xs bg-gray-100 dark:bg-slate-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-slate-700 disabled:opacity-40"}`,
|
|
@@ -1627,12 +1811,12 @@ const Je = {
|
|
|
1627
1811
|
]
|
|
1628
1812
|
}
|
|
1629
1813
|
);
|
|
1630
|
-
},
|
|
1814
|
+
}, Ar = ({
|
|
1631
1815
|
columnsCount: e = 5,
|
|
1632
1816
|
rowsCount: t = 5,
|
|
1633
|
-
hasActions:
|
|
1634
|
-
}) => /* @__PURE__ */
|
|
1635
|
-
Array.from({ length: e }).map((r, i) => /* @__PURE__ */
|
|
1817
|
+
hasActions: n = !0
|
|
1818
|
+
}) => /* @__PURE__ */ o("tbody", { className: "divide-y divide-gray-100 dark:divide-gray-800/60 bg-white dark:bg-slate-900", children: Array.from({ length: t }).map((s, l) => /* @__PURE__ */ y("tr", { className: "any-table-pulse", children: [
|
|
1819
|
+
Array.from({ length: e }).map((r, i) => /* @__PURE__ */ o("td", { className: "py-4 px-4 align-middle", children: /* @__PURE__ */ o(
|
|
1636
1820
|
"div",
|
|
1637
1821
|
{
|
|
1638
1822
|
className: "h-4 bg-gray-200 dark:bg-slate-700/60 rounded-md",
|
|
@@ -1641,53 +1825,57 @@ const Je = {
|
|
|
1641
1825
|
}
|
|
1642
1826
|
}
|
|
1643
1827
|
) }, i)),
|
|
1644
|
-
|
|
1645
|
-
/* @__PURE__ */
|
|
1646
|
-
/* @__PURE__ */
|
|
1828
|
+
n && /* @__PURE__ */ o("td", { className: "py-4 px-4 text-right align-middle pr-6", children: /* @__PURE__ */ y("div", { className: "inline-flex gap-2 justify-end", children: [
|
|
1829
|
+
/* @__PURE__ */ o("div", { className: "w-14 h-7 bg-gray-200 dark:bg-slate-700/60 rounded-xl" }),
|
|
1830
|
+
/* @__PURE__ */ o("div", { className: "w-14 h-7 bg-gray-200 dark:bg-slate-700/60 rounded-xl" })
|
|
1647
1831
|
] }) })
|
|
1648
|
-
] }, l)) }),
|
|
1832
|
+
] }, l)) }), Cr = ({
|
|
1649
1833
|
title: e,
|
|
1650
1834
|
description: t,
|
|
1651
|
-
isSearchActive:
|
|
1652
|
-
onClearSearch:
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
/* @__PURE__ */
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
"
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1835
|
+
isSearchActive: n = !1,
|
|
1836
|
+
onClearSearch: s,
|
|
1837
|
+
colSpan: l
|
|
1838
|
+
}) => {
|
|
1839
|
+
const g = /* @__PURE__ */ y("div", { className: "w-full py-16 px-6 flex flex-col items-center justify-center text-center any-table-fade-in", children: [
|
|
1840
|
+
/* @__PURE__ */ o("div", { className: "w-16 h-16 mb-4 rounded-2xl bg-gray-100 dark:bg-slate-800 text-gray-400 dark:text-gray-500 flex items-center justify-center text-3xl shadow-inner", children: n ? "🔍" : "📂" }),
|
|
1841
|
+
/* @__PURE__ */ o("h3", { className: "text-lg font-bold text-gray-800 dark:text-gray-200 mb-1", children: e || (n ? "No matching records found" : "No data available") }),
|
|
1842
|
+
/* @__PURE__ */ o("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-sm mb-5 leading-relaxed", children: t || (n ? "Try adjusting your search criteria or clear the search filter." : "There are currently no records to display.") }),
|
|
1843
|
+
n && s && /* @__PURE__ */ o(
|
|
1844
|
+
"button",
|
|
1845
|
+
{
|
|
1846
|
+
type: "button",
|
|
1847
|
+
onClick: s,
|
|
1848
|
+
className: "px-4 py-2 rounded-xl bg-primary text-white text-xs font-bold hover:bg-primary-soft transition-all shadow-sm shadow-primary/20 active:scale-95",
|
|
1849
|
+
children: "Clear Search Filter"
|
|
1850
|
+
}
|
|
1851
|
+
)
|
|
1852
|
+
] });
|
|
1853
|
+
return l !== void 0 ? /* @__PURE__ */ o("tbody", { children: /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: l, className: "p-0", children: g }) }) }) : g;
|
|
1854
|
+
}, Sr = ({ error: e, onRetry: t }) => {
|
|
1855
|
+
const n = typeof e == "string" ? e : e?.message || e?.response?.data?.message || "Failed to load table data.";
|
|
1856
|
+
return /* @__PURE__ */ y("div", { className: "w-full py-14 px-6 flex flex-col items-center justify-center text-center any-table-fade-in", children: [
|
|
1857
|
+
/* @__PURE__ */ o("div", { className: "w-14 h-14 mb-4 rounded-2xl bg-rose-500/10 text-rose-500 flex items-center justify-center text-2xl border border-rose-500/20", children: "⚠️" }),
|
|
1858
|
+
/* @__PURE__ */ o("h3", { className: "text-lg font-bold text-gray-800 dark:text-gray-200 mb-1", children: "Unable to load data" }),
|
|
1859
|
+
/* @__PURE__ */ o("p", { className: "text-xs sm:text-sm text-rose-600 dark:text-rose-400 font-medium max-w-md mb-5 leading-relaxed bg-rose-500/5 px-3 py-1.5 rounded-lg border border-rose-500/10", children: n }),
|
|
1860
|
+
t && /* @__PURE__ */ y(
|
|
1673
1861
|
"button",
|
|
1674
1862
|
{
|
|
1675
1863
|
type: "button",
|
|
1676
1864
|
onClick: t,
|
|
1677
1865
|
className: "inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-gray-900 dark:bg-white text-white dark:text-gray-900 text-xs font-bold hover:bg-gray-800 dark:hover:bg-gray-100 transition-all shadow-md active:scale-95",
|
|
1678
1866
|
children: [
|
|
1679
|
-
/* @__PURE__ */
|
|
1680
|
-
/* @__PURE__ */
|
|
1867
|
+
/* @__PURE__ */ o("span", { children: "🔄" }),
|
|
1868
|
+
/* @__PURE__ */ o("span", { children: "Retry Request" })
|
|
1681
1869
|
]
|
|
1682
1870
|
}
|
|
1683
1871
|
)
|
|
1684
1872
|
] });
|
|
1685
1873
|
};
|
|
1686
|
-
function
|
|
1874
|
+
function Ie(e) {
|
|
1687
1875
|
const {
|
|
1688
1876
|
data: t,
|
|
1689
|
-
api:
|
|
1690
|
-
columns:
|
|
1877
|
+
api: n,
|
|
1878
|
+
columns: s,
|
|
1691
1879
|
autoColumns: l = !0,
|
|
1692
1880
|
rowKey: r,
|
|
1693
1881
|
title: i,
|
|
@@ -1699,342 +1887,278 @@ function qe(e) {
|
|
|
1699
1887
|
sorting: m = !0,
|
|
1700
1888
|
pagination: f = !0,
|
|
1701
1889
|
selectable: b = !1,
|
|
1702
|
-
onSelectionChange:
|
|
1703
|
-
onRowClick:
|
|
1704
|
-
loading:
|
|
1705
|
-
loadingComponent:
|
|
1706
|
-
emptyComponent:
|
|
1707
|
-
emptyTitle:
|
|
1708
|
-
emptyDescription:
|
|
1709
|
-
errorComponent:
|
|
1710
|
-
className:
|
|
1711
|
-
tableClassName:
|
|
1712
|
-
headerClassName:
|
|
1713
|
-
rowClassName:
|
|
1714
|
-
headerActions:
|
|
1715
|
-
showHeader:
|
|
1716
|
-
bordered:
|
|
1717
|
-
striped:
|
|
1718
|
-
hoverable:
|
|
1719
|
-
compact:
|
|
1720
|
-
stickyHeader:
|
|
1721
|
-
tableRef:
|
|
1890
|
+
onSelectionChange: h,
|
|
1891
|
+
onRowClick: k,
|
|
1892
|
+
loading: T,
|
|
1893
|
+
loadingComponent: $,
|
|
1894
|
+
emptyComponent: p,
|
|
1895
|
+
emptyTitle: w,
|
|
1896
|
+
emptyDescription: x,
|
|
1897
|
+
errorComponent: M,
|
|
1898
|
+
className: z = "",
|
|
1899
|
+
tableClassName: W = "",
|
|
1900
|
+
headerClassName: oe = "",
|
|
1901
|
+
rowClassName: D,
|
|
1902
|
+
headerActions: _,
|
|
1903
|
+
showHeader: F = !0,
|
|
1904
|
+
bordered: Z = !0,
|
|
1905
|
+
striped: O = !1,
|
|
1906
|
+
hoverable: R = !0,
|
|
1907
|
+
compact: L = !1,
|
|
1908
|
+
stickyHeader: U = !1,
|
|
1909
|
+
tableRef: P,
|
|
1722
1910
|
// Legacy Wasel Props
|
|
1723
|
-
thead:
|
|
1724
|
-
headerData:
|
|
1725
|
-
tbodys:
|
|
1726
|
-
titleHeader:
|
|
1727
|
-
add:
|
|
1728
|
-
linkAdd:
|
|
1729
|
-
addHandler:
|
|
1730
|
-
view:
|
|
1731
|
-
linkView:
|
|
1732
|
-
viewHandler:
|
|
1733
|
-
edit:
|
|
1734
|
-
linkEdit:
|
|
1735
|
-
editHandler:
|
|
1736
|
-
del:
|
|
1737
|
-
handleDelete:
|
|
1738
|
-
block:
|
|
1739
|
-
handleBlock:
|
|
1740
|
-
buttons:
|
|
1741
|
-
} = e,
|
|
1742
|
-
data:
|
|
1743
|
-
columns:
|
|
1911
|
+
thead: H,
|
|
1912
|
+
headerData: ye,
|
|
1913
|
+
tbodys: he,
|
|
1914
|
+
titleHeader: Xe,
|
|
1915
|
+
add: Qe,
|
|
1916
|
+
linkAdd: et,
|
|
1917
|
+
addHandler: tt,
|
|
1918
|
+
view: pe,
|
|
1919
|
+
linkView: xe,
|
|
1920
|
+
viewHandler: ke,
|
|
1921
|
+
edit: we,
|
|
1922
|
+
linkEdit: ve,
|
|
1923
|
+
editHandler: Ne,
|
|
1924
|
+
del: Ae,
|
|
1925
|
+
handleDelete: Ce,
|
|
1926
|
+
block: Se,
|
|
1927
|
+
handleBlock: Te,
|
|
1928
|
+
buttons: Pe
|
|
1929
|
+
} = e, v = Y(), J = B(() => t || he || void 0, [t, he]), I = B(() => Lt({
|
|
1930
|
+
data: J,
|
|
1931
|
+
columns: s,
|
|
1744
1932
|
autoColumns: l,
|
|
1745
|
-
thead:
|
|
1746
|
-
headerData:
|
|
1747
|
-
}).filter((
|
|
1748
|
-
(
|
|
1933
|
+
thead: H,
|
|
1934
|
+
headerData: ye
|
|
1935
|
+
}).filter((j) => typeof j.hidden == "function" ? !j.hidden({ data: J || [] }) : !j.hidden), [J, s, l, H, ye]), Ee = N(
|
|
1936
|
+
(C, j) => {
|
|
1749
1937
|
if (typeof r == "function")
|
|
1750
|
-
return r(
|
|
1938
|
+
return r(C, j);
|
|
1751
1939
|
if (typeof r == "string") {
|
|
1752
|
-
const
|
|
1753
|
-
if (
|
|
1940
|
+
const be = S(C, r);
|
|
1941
|
+
if (be != null) return be;
|
|
1754
1942
|
}
|
|
1755
|
-
const
|
|
1756
|
-
return
|
|
1943
|
+
const ge = C?._id ?? C?.id ?? C?.key;
|
|
1944
|
+
return ge ?? j;
|
|
1757
1945
|
},
|
|
1758
1946
|
[r]
|
|
1759
1947
|
), {
|
|
1760
|
-
enabled:
|
|
1761
|
-
search:
|
|
1762
|
-
debouncedSearch:
|
|
1763
|
-
isDebouncing:
|
|
1764
|
-
setSearch:
|
|
1765
|
-
clearSearch:
|
|
1766
|
-
searchConfig:
|
|
1767
|
-
} =
|
|
1768
|
-
enabled:
|
|
1769
|
-
sortBy:
|
|
1770
|
-
sortOrder:
|
|
1771
|
-
toggleSort:
|
|
1772
|
-
setSorting:
|
|
1773
|
-
resetSorting:
|
|
1774
|
-
} =
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
je,
|
|
1821
|
-
pe,
|
|
1822
|
-
Fe,
|
|
1823
|
-
re,
|
|
1824
|
-
ae,
|
|
1825
|
-
Me,
|
|
1826
|
-
ne,
|
|
1827
|
-
se,
|
|
1828
|
-
_e,
|
|
1829
|
-
he
|
|
1830
|
-
]), [mt, ut] = S(1), [ft, bt] = S(10), {
|
|
1831
|
-
rows: T,
|
|
1832
|
-
totalRecords: ve,
|
|
1833
|
-
loading: le,
|
|
1834
|
-
error: J,
|
|
1835
|
-
refresh: q,
|
|
1836
|
-
isServerMode: yt
|
|
1837
|
-
} = tr({
|
|
1838
|
-
data: ie,
|
|
1839
|
-
api: s,
|
|
1840
|
-
columns: G,
|
|
1841
|
-
searchQuery: Le,
|
|
1842
|
-
sortBy: ke,
|
|
1843
|
-
sortOrder: we,
|
|
1844
|
-
page: mt,
|
|
1845
|
-
pageSize: ft,
|
|
1846
|
-
manualLoading: $
|
|
1948
|
+
enabled: rt,
|
|
1949
|
+
search: $e,
|
|
1950
|
+
debouncedSearch: at,
|
|
1951
|
+
isDebouncing: nt,
|
|
1952
|
+
setSearch: Be,
|
|
1953
|
+
clearSearch: De,
|
|
1954
|
+
searchConfig: ot
|
|
1955
|
+
} = Ot({ config: u }), {
|
|
1956
|
+
enabled: st,
|
|
1957
|
+
sortBy: se,
|
|
1958
|
+
sortOrder: ie,
|
|
1959
|
+
toggleSort: it,
|
|
1960
|
+
setSorting: lt,
|
|
1961
|
+
resetSorting: dt
|
|
1962
|
+
} = Rt({ config: m }), Me = B(
|
|
1963
|
+
() => Ht({
|
|
1964
|
+
explicitActions: c,
|
|
1965
|
+
buttons: Pe,
|
|
1966
|
+
block: Se,
|
|
1967
|
+
handleBlock: Te,
|
|
1968
|
+
view: pe,
|
|
1969
|
+
linkView: xe,
|
|
1970
|
+
viewHandler: ke,
|
|
1971
|
+
edit: we,
|
|
1972
|
+
linkEdit: ve,
|
|
1973
|
+
editHandler: Ne,
|
|
1974
|
+
del: Ae,
|
|
1975
|
+
handleDelete: Ce
|
|
1976
|
+
}),
|
|
1977
|
+
[
|
|
1978
|
+
c,
|
|
1979
|
+
Pe,
|
|
1980
|
+
Se,
|
|
1981
|
+
Te,
|
|
1982
|
+
pe,
|
|
1983
|
+
xe,
|
|
1984
|
+
ke,
|
|
1985
|
+
we,
|
|
1986
|
+
ve,
|
|
1987
|
+
Ne,
|
|
1988
|
+
Ae,
|
|
1989
|
+
Ce
|
|
1990
|
+
]
|
|
1991
|
+
), [ct, gt] = A(1), [bt, mt] = A(10), {
|
|
1992
|
+
rows: K,
|
|
1993
|
+
totalRecords: le,
|
|
1994
|
+
loading: q,
|
|
1995
|
+
error: X,
|
|
1996
|
+
refresh: V,
|
|
1997
|
+
isServerMode: ut
|
|
1998
|
+
} = Xt({
|
|
1999
|
+
data: J,
|
|
2000
|
+
api: n,
|
|
2001
|
+
columns: I,
|
|
2002
|
+
searchQuery: at,
|
|
2003
|
+
sortBy: se,
|
|
2004
|
+
sortOrder: ie,
|
|
2005
|
+
page: ct,
|
|
2006
|
+
pageSize: bt,
|
|
2007
|
+
manualLoading: T
|
|
1847
2008
|
}), {
|
|
1848
|
-
enabled:
|
|
1849
|
-
page:
|
|
1850
|
-
pageSize:
|
|
1851
|
-
totalPages:
|
|
1852
|
-
pageSizeOptions:
|
|
1853
|
-
setPage:
|
|
1854
|
-
setPageSize:
|
|
1855
|
-
resetPagination:
|
|
1856
|
-
getPageWindow:
|
|
1857
|
-
paginationConfig:
|
|
1858
|
-
} =
|
|
2009
|
+
enabled: ft,
|
|
2010
|
+
page: Q,
|
|
2011
|
+
pageSize: de,
|
|
2012
|
+
totalPages: _e,
|
|
2013
|
+
pageSizeOptions: yt,
|
|
2014
|
+
setPage: ee,
|
|
2015
|
+
setPageSize: je,
|
|
2016
|
+
resetPagination: ht,
|
|
2017
|
+
getPageWindow: pt,
|
|
2018
|
+
paginationConfig: We
|
|
2019
|
+
} = Ut({
|
|
1859
2020
|
config: f,
|
|
1860
|
-
totalRecords:
|
|
1861
|
-
onPageChange: (
|
|
1862
|
-
|
|
2021
|
+
totalRecords: le,
|
|
2022
|
+
onPageChange: (C, j) => {
|
|
2023
|
+
gt(C), mt(j);
|
|
1863
2024
|
}
|
|
1864
|
-
}),
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
),
|
|
1877
|
-
if (L.size === T.length && T.length > 0)
|
|
1878
|
-
ge(/* @__PURE__ */ new Set()), k?.([], []);
|
|
1879
|
-
else {
|
|
1880
|
-
const p = new Set(T.map((y, E) => O(y, E)));
|
|
1881
|
-
ge(p), k?.(T, Array.from(p));
|
|
1882
|
-
}
|
|
1883
|
-
}, [T, L.size, O, k]), Nt = A(() => {
|
|
1884
|
-
ge(/* @__PURE__ */ new Set()), k?.([], []);
|
|
1885
|
-
}, [k]), At = T.length > 0 && L.size === T.length, Ct = L.size > 0 && L.size < T.length, Ae = W(
|
|
2025
|
+
}), {
|
|
2026
|
+
selectedKeys: ze,
|
|
2027
|
+
selectedRows: te,
|
|
2028
|
+
onToggleSelectRow: xt,
|
|
2029
|
+
handleToggleSelectAll: kt,
|
|
2030
|
+
clearSelection: wt,
|
|
2031
|
+
allSelected: vt,
|
|
2032
|
+
isIndeterminate: Nt
|
|
2033
|
+
} = er({
|
|
2034
|
+
rows: K,
|
|
2035
|
+
rowKeyResolver: Ee,
|
|
2036
|
+
onSelectionChange: h
|
|
2037
|
+
}), At = B(
|
|
1886
2038
|
() => ({
|
|
1887
|
-
refresh:
|
|
1888
|
-
loading:
|
|
1889
|
-
page:
|
|
1890
|
-
selectedRows:
|
|
1891
|
-
setPage:
|
|
2039
|
+
refresh: V,
|
|
2040
|
+
loading: q,
|
|
2041
|
+
page: Q,
|
|
2042
|
+
selectedRows: te,
|
|
2043
|
+
setPage: ee
|
|
1892
2044
|
}),
|
|
1893
|
-
[
|
|
2045
|
+
[V, q, Q, te, ee]
|
|
1894
2046
|
);
|
|
1895
|
-
|
|
1896
|
-
tableRef:
|
|
1897
|
-
refresh:
|
|
1898
|
-
resetPagination:
|
|
1899
|
-
resetSearch:
|
|
1900
|
-
resetSorting:
|
|
1901
|
-
setPage:
|
|
1902
|
-
setPageSize:
|
|
1903
|
-
setSearch:
|
|
1904
|
-
setSorting:
|
|
1905
|
-
selectedRows:
|
|
1906
|
-
clearSelection:
|
|
2047
|
+
Qt({
|
|
2048
|
+
tableRef: P,
|
|
2049
|
+
refresh: V,
|
|
2050
|
+
resetPagination: ht,
|
|
2051
|
+
resetSearch: De,
|
|
2052
|
+
resetSorting: dt,
|
|
2053
|
+
setPage: ee,
|
|
2054
|
+
setPageSize: je,
|
|
2055
|
+
setSearch: Be,
|
|
2056
|
+
setSorting: lt,
|
|
2057
|
+
selectedRows: te,
|
|
2058
|
+
clearSelection: wt,
|
|
1907
2059
|
getState: () => ({
|
|
1908
|
-
data:
|
|
1909
|
-
loading:
|
|
1910
|
-
error:
|
|
1911
|
-
page:
|
|
1912
|
-
pageSize:
|
|
1913
|
-
total:
|
|
1914
|
-
totalPages:
|
|
1915
|
-
search:
|
|
1916
|
-
sortBy:
|
|
1917
|
-
sortOrder:
|
|
1918
|
-
selectedRowKeys: Array.from(
|
|
1919
|
-
selectedRows:
|
|
1920
|
-
isServerMode:
|
|
2060
|
+
data: K,
|
|
2061
|
+
loading: q,
|
|
2062
|
+
error: X,
|
|
2063
|
+
page: Q,
|
|
2064
|
+
pageSize: de,
|
|
2065
|
+
total: le,
|
|
2066
|
+
totalPages: _e,
|
|
2067
|
+
search: $e,
|
|
2068
|
+
sortBy: se,
|
|
2069
|
+
sortOrder: ie,
|
|
2070
|
+
selectedRowKeys: Array.from(ze),
|
|
2071
|
+
selectedRows: te,
|
|
2072
|
+
isServerMode: ut
|
|
1921
2073
|
})
|
|
1922
2074
|
});
|
|
1923
|
-
const
|
|
1924
|
-
const
|
|
1925
|
-
return
|
|
1926
|
-
}, [
|
|
1927
|
-
return /* @__PURE__ */
|
|
2075
|
+
const Ct = i || Xe, ce = Me.length > 0, St = B(() => {
|
|
2076
|
+
const C = {};
|
|
2077
|
+
return v.borderRadius && (C["--any-table-radius"] = v.borderRadius), v.fontFamily && (C["--any-table-font"] = v.fontFamily, C.fontFamily = v.fontFamily), v.colors?.primary && (C["--any-table-primary"] = v.colors.primary), v.colors?.primaryHover && (C["--any-table-primary-hover"] = v.colors.primaryHover), v.colors?.border && (C["--any-table-border"] = v.colors.border), C;
|
|
2078
|
+
}, [v]);
|
|
2079
|
+
return /* @__PURE__ */ y(
|
|
1928
2080
|
"div",
|
|
1929
2081
|
{
|
|
1930
|
-
style:
|
|
1931
|
-
className: `any-table-wrapper ${
|
|
2082
|
+
style: St,
|
|
2083
|
+
className: `any-table-wrapper ${v.classes?.container || "w-full flex flex-col gap-4 font-sans text-gray-900 dark:text-gray-100"} ${z}`,
|
|
1932
2084
|
children: [
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
"button",
|
|
1952
|
-
{
|
|
1953
|
-
type: "button",
|
|
1954
|
-
onClick: () => {
|
|
1955
|
-
De ? De() : $e && typeof window < "u" && (window.location.href = $e);
|
|
1956
|
-
},
|
|
1957
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-primary text-white text-xs sm:text-sm font-bold hover:bg-primary-soft transition-all shadow-sm shadow-primary/20 active:scale-95 whitespace-nowrap",
|
|
1958
|
-
children: [
|
|
1959
|
-
/* @__PURE__ */ n("span", { children: "+" }),
|
|
1960
|
-
/* @__PURE__ */ h("span", { children: [
|
|
1961
|
-
"Add ",
|
|
1962
|
-
X || "Record"
|
|
1963
|
-
] })
|
|
1964
|
-
]
|
|
1965
|
-
}
|
|
1966
|
-
)
|
|
1967
|
-
] })
|
|
1968
|
-
] }),
|
|
1969
|
-
/* @__PURE__ */ n(
|
|
2085
|
+
/* @__PURE__ */ o(
|
|
2086
|
+
ar,
|
|
2087
|
+
{
|
|
2088
|
+
displayTitle: Ct,
|
|
2089
|
+
subtitle: g,
|
|
2090
|
+
isSearchEnabled: rt,
|
|
2091
|
+
searchQuery: $e,
|
|
2092
|
+
setSearch: Be,
|
|
2093
|
+
clearSearch: De,
|
|
2094
|
+
isDebouncing: nt,
|
|
2095
|
+
searchPlaceholder: ot.placeholder,
|
|
2096
|
+
headerActions: _,
|
|
2097
|
+
add: Qe,
|
|
2098
|
+
linkAdd: et,
|
|
2099
|
+
addHandler: tt
|
|
2100
|
+
}
|
|
2101
|
+
),
|
|
2102
|
+
/* @__PURE__ */ o(
|
|
1970
2103
|
"div",
|
|
1971
2104
|
{
|
|
1972
|
-
style:
|
|
1973
|
-
className: `${
|
|
1974
|
-
children:
|
|
2105
|
+
style: v.borderRadius ? { borderRadius: v.borderRadius } : void 0,
|
|
2106
|
+
className: `${v.classes?.tableWrapper || "w-full overflow-x-auto rounded-2xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-slate-900 shadow-sm transition-colors"} ${Z ? "" : "border-0 shadow-none"}`,
|
|
2107
|
+
children: X ? typeof M == "function" ? M(X, V) : M || /* @__PURE__ */ o(Sr, { error: X, onRetry: V }) : /* @__PURE__ */ y(
|
|
1975
2108
|
"table",
|
|
1976
2109
|
{
|
|
1977
|
-
className: `${
|
|
2110
|
+
className: `${v.classes?.table || "w-full border-collapse text-left text-sm"} ${L || v.density === "compact" ? "text-xs" : ""} ${U ? "relative" : ""} ${W}`,
|
|
1978
2111
|
children: [
|
|
1979
|
-
|
|
1980
|
-
|
|
2112
|
+
F && /* @__PURE__ */ o(
|
|
2113
|
+
nr,
|
|
1981
2114
|
{
|
|
1982
|
-
columns:
|
|
1983
|
-
hasActions:
|
|
2115
|
+
columns: I,
|
|
2116
|
+
hasActions: ce,
|
|
1984
2117
|
actionsTitle: d,
|
|
1985
2118
|
actionsWidth: a,
|
|
1986
|
-
sortBy:
|
|
1987
|
-
sortOrder:
|
|
1988
|
-
onSort:
|
|
2119
|
+
sortBy: se,
|
|
2120
|
+
sortOrder: ie,
|
|
2121
|
+
onSort: st ? it : void 0,
|
|
1989
2122
|
selectable: b,
|
|
1990
|
-
allSelected:
|
|
1991
|
-
isIndeterminate:
|
|
1992
|
-
onToggleSelectAll:
|
|
1993
|
-
headerClassName:
|
|
2123
|
+
allSelected: vt,
|
|
2124
|
+
isIndeterminate: Nt,
|
|
2125
|
+
onToggleSelectAll: kt,
|
|
2126
|
+
headerClassName: oe
|
|
1994
2127
|
}
|
|
1995
2128
|
),
|
|
1996
|
-
|
|
1997
|
-
|
|
2129
|
+
q && K.length === 0 ? $ || /* @__PURE__ */ o(
|
|
2130
|
+
Ar,
|
|
1998
2131
|
{
|
|
1999
|
-
columnsCount:
|
|
2000
|
-
rowsCount:
|
|
2001
|
-
hasActions: me
|
|
2132
|
+
columnsCount: I.length + (b ? 1 : 0) + (ce ? 1 : 0),
|
|
2133
|
+
rowsCount: de || 5
|
|
2002
2134
|
}
|
|
2003
|
-
) :
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2135
|
+
) : K.length === 0 ? (
|
|
2136
|
+
// Empty State
|
|
2137
|
+
p || /* @__PURE__ */ o(
|
|
2138
|
+
Cr,
|
|
2007
2139
|
{
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
Nr,
|
|
2012
|
-
{
|
|
2013
|
-
title: v,
|
|
2014
|
-
description: w,
|
|
2015
|
-
isSearchActive: !!Le,
|
|
2016
|
-
onClearSearch: xe
|
|
2017
|
-
}
|
|
2018
|
-
)
|
|
2140
|
+
title: w,
|
|
2141
|
+
description: x,
|
|
2142
|
+
colSpan: I.length + (b ? 1 : 0) + (ce ? 1 : 0)
|
|
2019
2143
|
}
|
|
2020
|
-
)
|
|
2144
|
+
)
|
|
2021
2145
|
) : (
|
|
2022
|
-
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
|
|
2146
|
+
// Table Body
|
|
2147
|
+
/* @__PURE__ */ o(
|
|
2148
|
+
vr,
|
|
2025
2149
|
{
|
|
2026
|
-
rows:
|
|
2027
|
-
columns:
|
|
2028
|
-
actions:
|
|
2029
|
-
actionContext:
|
|
2030
|
-
rowKeyResolver:
|
|
2150
|
+
rows: K,
|
|
2151
|
+
columns: I,
|
|
2152
|
+
actions: Me,
|
|
2153
|
+
actionContext: At,
|
|
2154
|
+
rowKeyResolver: Ee,
|
|
2031
2155
|
selectable: b,
|
|
2032
|
-
selectedKeys:
|
|
2033
|
-
onToggleSelectRow:
|
|
2034
|
-
onRowClick:
|
|
2035
|
-
striped:
|
|
2036
|
-
hoverable:
|
|
2037
|
-
rowClassName:
|
|
2156
|
+
selectedKeys: ze,
|
|
2157
|
+
onToggleSelectRow: xt,
|
|
2158
|
+
onRowClick: k,
|
|
2159
|
+
striped: O,
|
|
2160
|
+
hoverable: R,
|
|
2161
|
+
rowClassName: D
|
|
2038
2162
|
}
|
|
2039
2163
|
)
|
|
2040
2164
|
)
|
|
@@ -2043,77 +2167,83 @@ function qe(e) {
|
|
|
2043
2167
|
)
|
|
2044
2168
|
}
|
|
2045
2169
|
),
|
|
2046
|
-
|
|
2047
|
-
|
|
2170
|
+
ft && /* @__PURE__ */ o(
|
|
2171
|
+
Nr,
|
|
2048
2172
|
{
|
|
2049
|
-
page:
|
|
2050
|
-
pageSize:
|
|
2051
|
-
totalRecords:
|
|
2052
|
-
totalPages:
|
|
2053
|
-
pageSizeOptions:
|
|
2054
|
-
onPageChange:
|
|
2055
|
-
onPageSizeChange:
|
|
2056
|
-
showPageSizeSelector:
|
|
2057
|
-
showTotalCount:
|
|
2058
|
-
pageWindow:
|
|
2173
|
+
page: Q,
|
|
2174
|
+
pageSize: de,
|
|
2175
|
+
totalRecords: le,
|
|
2176
|
+
totalPages: _e,
|
|
2177
|
+
pageSizeOptions: yt,
|
|
2178
|
+
onPageChange: ee,
|
|
2179
|
+
onPageSizeChange: je,
|
|
2180
|
+
showPageSizeSelector: We.showPageSizeSelector,
|
|
2181
|
+
showTotalCount: We.showTotalCount,
|
|
2182
|
+
pageWindow: pt(5)
|
|
2059
2183
|
}
|
|
2060
2184
|
)
|
|
2061
2185
|
]
|
|
2062
2186
|
}
|
|
2063
2187
|
);
|
|
2064
2188
|
}
|
|
2065
|
-
function
|
|
2066
|
-
return !e.theme && !e.preset ? /* @__PURE__ */
|
|
2189
|
+
function Er(e) {
|
|
2190
|
+
return !e.theme && !e.preset ? /* @__PURE__ */ o(Ie, { ...e }) : /* @__PURE__ */ o(tr, { theme: e.theme, preset: e.preset, children: /* @__PURE__ */ o(Ie, { ...e }) });
|
|
2067
2191
|
}
|
|
2068
2192
|
export {
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
Ye as
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2193
|
+
wr as ActionRenderer,
|
|
2194
|
+
Er as AnyTable,
|
|
2195
|
+
Ie as AnyTableInner,
|
|
2196
|
+
tr as AnyTableThemeProvider,
|
|
2197
|
+
gr as ArrayRenderer,
|
|
2198
|
+
pr as BadgeRenderer,
|
|
2199
|
+
sr as BooleanRenderer,
|
|
2200
|
+
xr as CellRenderer,
|
|
2201
|
+
kr as ConfirmModal,
|
|
2202
|
+
ir as CurrencyRenderer,
|
|
2203
|
+
Ye as DEFAULT_THEME_COLORS,
|
|
2204
|
+
Oe as DateRenderer,
|
|
2205
|
+
ur as EmailRenderer,
|
|
2206
|
+
E as FallbackPlaceholder,
|
|
2207
|
+
lr as ImageRenderer,
|
|
2083
2208
|
or as NumberRenderer,
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
nr as
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2209
|
+
br as ObjectRenderer,
|
|
2210
|
+
fr as PhoneRenderer,
|
|
2211
|
+
yr as ProgressRenderer,
|
|
2212
|
+
hr as RatingRenderer,
|
|
2213
|
+
cr as StatusRenderer,
|
|
2214
|
+
Je as StringRenderer,
|
|
2215
|
+
He as TABLE_PRESETS,
|
|
2216
|
+
vr as TableBody,
|
|
2217
|
+
Cr as TableEmptyState,
|
|
2218
|
+
Sr as TableErrorState,
|
|
2219
|
+
nr as TableHeader,
|
|
2220
|
+
Nr as TablePagination,
|
|
2221
|
+
rr as TableSearch,
|
|
2222
|
+
Ar as TableSkeleton,
|
|
2223
|
+
ar as TableToolbar,
|
|
2224
|
+
mr as UrlRenderer,
|
|
2225
|
+
Er as default,
|
|
2226
|
+
Ze as defaultAnyTableTheme,
|
|
2227
|
+
G as extractPaginationMeta,
|
|
2228
|
+
Jt as filterRowsBySearch,
|
|
2229
|
+
zt as generateAutoColumns,
|
|
2230
|
+
S as getNestedValue,
|
|
2231
|
+
ae as inferColumnType,
|
|
2232
|
+
Fe as isImageUrl,
|
|
2233
|
+
jt as isIsoDate,
|
|
2234
|
+
$t as isPlainObject,
|
|
2235
|
+
Zt as normalizeApiResponse,
|
|
2236
|
+
qe as renderActionIcon,
|
|
2237
|
+
Lt as resolveColumns,
|
|
2238
|
+
Ht as resolveTableActions,
|
|
2239
|
+
qt as sortRows,
|
|
2240
|
+
re as toTitleCase,
|
|
2241
|
+
Qt as useAnyTableController,
|
|
2242
|
+
Xt as useAnyTableData,
|
|
2243
|
+
Ut as useAnyTablePagination,
|
|
2244
|
+
Ot as useAnyTableSearch,
|
|
2245
|
+
er as useAnyTableSelection,
|
|
2246
|
+
Rt as useAnyTableSorting,
|
|
2247
|
+
Y as useAnyTableTheme
|
|
2118
2248
|
};
|
|
2119
2249
|
//# sourceMappingURL=index.js.map
|