react-admin-crud-manager 1.0.10 → 1.0.12
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/README.md +206 -146
- package/dist/index.cjs.js +27 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1003 -1264
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind.css +19 -8
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,343 +1,69 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as e, Fragment as G, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import Me, { useState as S, useRef as X, useEffect as z, useMemo as Se } from "react";
|
|
3
|
+
import { ChevronDown as Pe, Search as Ce, Check as _e, X as fe, Filter as je, ChevronLeft as He, ChevronRight as ze, EllipsisVertical as Ye, User as Ie, Plus as Ue } from "lucide-react";
|
|
4
|
+
import { createPortal as Ve } from "react-dom";
|
|
5
|
+
import { Icon as De } from "@iconify/react";
|
|
6
|
+
import { Editor as qe } from "@tinymce/tinymce-react";
|
|
7
|
+
import { SnackbarProvider as We, enqueueSnackbar as we } from "notistack";
|
|
7
8
|
import a from "prop-types";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/
|
|
18
|
-
var Ee;
|
|
19
|
-
function Qe() {
|
|
20
|
-
if (Ee) return pe;
|
|
21
|
-
Ee = 1;
|
|
22
|
-
var c = Symbol.for("react.transitional.element"), d = Symbol.for("react.fragment");
|
|
23
|
-
function s(i, l, r) {
|
|
24
|
-
var n = null;
|
|
25
|
-
if (r !== void 0 && (n = "" + r), l.key !== void 0 && (n = "" + l.key), "key" in l) {
|
|
26
|
-
r = {};
|
|
27
|
-
for (var k in l)
|
|
28
|
-
k !== "key" && (r[k] = l[k]);
|
|
29
|
-
} else r = l;
|
|
30
|
-
return l = r.ref, {
|
|
31
|
-
$$typeof: c,
|
|
32
|
-
type: i,
|
|
33
|
-
key: n,
|
|
34
|
-
ref: l !== void 0 ? l : null,
|
|
35
|
-
props: r
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
return pe.Fragment = d, pe.jsx = s, pe.jsxs = s, pe;
|
|
39
|
-
}
|
|
40
|
-
var ge = {};
|
|
41
|
-
/**
|
|
42
|
-
* @license React
|
|
43
|
-
* react-jsx-runtime.development.js
|
|
44
|
-
*
|
|
45
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the MIT license found in the
|
|
48
|
-
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/
|
|
50
|
-
var _e;
|
|
51
|
-
function ea() {
|
|
52
|
-
return _e || (_e = 1, process.env.NODE_ENV !== "production" && function() {
|
|
53
|
-
function c(t) {
|
|
54
|
-
if (t == null) return null;
|
|
55
|
-
if (typeof t == "function")
|
|
56
|
-
return t.$$typeof === C ? null : t.displayName || t.name || null;
|
|
57
|
-
if (typeof t == "string") return t;
|
|
58
|
-
switch (t) {
|
|
59
|
-
case j:
|
|
60
|
-
return "Fragment";
|
|
61
|
-
case R:
|
|
62
|
-
return "Profiler";
|
|
63
|
-
case S:
|
|
64
|
-
return "StrictMode";
|
|
65
|
-
case z:
|
|
66
|
-
return "Suspense";
|
|
67
|
-
case O:
|
|
68
|
-
return "SuspenseList";
|
|
69
|
-
case F:
|
|
70
|
-
return "Activity";
|
|
71
|
-
}
|
|
72
|
-
if (typeof t == "object")
|
|
73
|
-
switch (typeof t.tag == "number" && console.error(
|
|
74
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
75
|
-
), t.$$typeof) {
|
|
76
|
-
case N:
|
|
77
|
-
return "Portal";
|
|
78
|
-
case B:
|
|
79
|
-
return t.displayName || "Context";
|
|
80
|
-
case P:
|
|
81
|
-
return (t._context.displayName || "Context") + ".Consumer";
|
|
82
|
-
case Y:
|
|
83
|
-
var y = t.render;
|
|
84
|
-
return t = t.displayName, t || (t = y.displayName || y.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
|
85
|
-
case g:
|
|
86
|
-
return y = t.displayName || null, y !== null ? y : c(t.type) || "Memo";
|
|
87
|
-
case _:
|
|
88
|
-
y = t._payload, t = t._init;
|
|
89
|
-
try {
|
|
90
|
-
return c(t(y));
|
|
91
|
-
} catch {
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
function d(t) {
|
|
97
|
-
return "" + t;
|
|
98
|
-
}
|
|
99
|
-
function s(t) {
|
|
100
|
-
try {
|
|
101
|
-
d(t);
|
|
102
|
-
var y = !1;
|
|
103
|
-
} catch {
|
|
104
|
-
y = !0;
|
|
105
|
-
}
|
|
106
|
-
if (y) {
|
|
107
|
-
y = console;
|
|
108
|
-
var L = y.error, G = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
109
|
-
return L.call(
|
|
110
|
-
y,
|
|
111
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
112
|
-
G
|
|
113
|
-
), d(t);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function i(t) {
|
|
117
|
-
if (t === j) return "<>";
|
|
118
|
-
if (typeof t == "object" && t !== null && t.$$typeof === _)
|
|
119
|
-
return "<...>";
|
|
120
|
-
try {
|
|
121
|
-
var y = c(t);
|
|
122
|
-
return y ? "<" + y + ">" : "<...>";
|
|
123
|
-
} catch {
|
|
124
|
-
return "<...>";
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function l() {
|
|
128
|
-
var t = f.A;
|
|
129
|
-
return t === null ? null : t.getOwner();
|
|
130
|
-
}
|
|
131
|
-
function r() {
|
|
132
|
-
return Error("react-stack-top-frame");
|
|
133
|
-
}
|
|
134
|
-
function n(t) {
|
|
135
|
-
if (A.call(t, "key")) {
|
|
136
|
-
var y = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
137
|
-
if (y && y.isReactWarning) return !1;
|
|
138
|
-
}
|
|
139
|
-
return t.key !== void 0;
|
|
140
|
-
}
|
|
141
|
-
function k(t, y) {
|
|
142
|
-
function L() {
|
|
143
|
-
X || (X = !0, console.error(
|
|
144
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
145
|
-
y
|
|
146
|
-
));
|
|
147
|
-
}
|
|
148
|
-
L.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
149
|
-
get: L,
|
|
150
|
-
configurable: !0
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
function M() {
|
|
154
|
-
var t = c(this.type);
|
|
155
|
-
return ae[t] || (ae[t] = !0, console.error(
|
|
156
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
157
|
-
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
158
|
-
}
|
|
159
|
-
function x(t, y, L, G, te, ne) {
|
|
160
|
-
var I = L.ref;
|
|
161
|
-
return t = {
|
|
162
|
-
$$typeof: h,
|
|
163
|
-
type: t,
|
|
164
|
-
key: y,
|
|
165
|
-
props: L,
|
|
166
|
-
_owner: G
|
|
167
|
-
}, (I !== void 0 ? I : null) !== null ? Object.defineProperty(t, "ref", {
|
|
168
|
-
enumerable: !1,
|
|
169
|
-
get: M
|
|
170
|
-
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
171
|
-
configurable: !1,
|
|
172
|
-
enumerable: !1,
|
|
173
|
-
writable: !0,
|
|
174
|
-
value: 0
|
|
175
|
-
}), Object.defineProperty(t, "_debugInfo", {
|
|
176
|
-
configurable: !1,
|
|
177
|
-
enumerable: !1,
|
|
178
|
-
writable: !0,
|
|
179
|
-
value: null
|
|
180
|
-
}), Object.defineProperty(t, "_debugStack", {
|
|
181
|
-
configurable: !1,
|
|
182
|
-
enumerable: !1,
|
|
183
|
-
writable: !0,
|
|
184
|
-
value: te
|
|
185
|
-
}), Object.defineProperty(t, "_debugTask", {
|
|
186
|
-
configurable: !1,
|
|
187
|
-
enumerable: !1,
|
|
188
|
-
writable: !0,
|
|
189
|
-
value: ne
|
|
190
|
-
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
191
|
-
}
|
|
192
|
-
function m(t, y, L, G, te, ne) {
|
|
193
|
-
var I = y.children;
|
|
194
|
-
if (I !== void 0)
|
|
195
|
-
if (G)
|
|
196
|
-
if (U(I)) {
|
|
197
|
-
for (G = 0; G < I.length; G++)
|
|
198
|
-
u(I[G]);
|
|
199
|
-
Object.freeze && Object.freeze(I);
|
|
200
|
-
} else
|
|
201
|
-
console.error(
|
|
202
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
203
|
-
);
|
|
204
|
-
else u(I);
|
|
205
|
-
if (A.call(y, "key")) {
|
|
206
|
-
I = c(t);
|
|
207
|
-
var J = Object.keys(y).filter(function(ue) {
|
|
208
|
-
return ue !== "key";
|
|
209
|
-
});
|
|
210
|
-
G = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", ie[I + G] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
211
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
212
|
-
let props = %s;
|
|
213
|
-
<%s {...props} />
|
|
214
|
-
React keys must be passed directly to JSX without using spread:
|
|
215
|
-
let props = %s;
|
|
216
|
-
<%s key={someKey} {...props} />`,
|
|
217
|
-
G,
|
|
218
|
-
I,
|
|
219
|
-
J,
|
|
220
|
-
I
|
|
221
|
-
), ie[I + G] = !0);
|
|
222
|
-
}
|
|
223
|
-
if (I = null, L !== void 0 && (s(L), I = "" + L), n(y) && (s(y.key), I = "" + y.key), "key" in y) {
|
|
224
|
-
L = {};
|
|
225
|
-
for (var le in y)
|
|
226
|
-
le !== "key" && (L[le] = y[le]);
|
|
227
|
-
} else L = y;
|
|
228
|
-
return I && k(
|
|
229
|
-
L,
|
|
230
|
-
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
231
|
-
), x(
|
|
232
|
-
t,
|
|
233
|
-
I,
|
|
234
|
-
L,
|
|
235
|
-
l(),
|
|
236
|
-
te,
|
|
237
|
-
ne
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
function u(t) {
|
|
241
|
-
b(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === _ && (t._payload.status === "fulfilled" ? b(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
|
|
242
|
-
}
|
|
243
|
-
function b(t) {
|
|
244
|
-
return typeof t == "object" && t !== null && t.$$typeof === h;
|
|
245
|
-
}
|
|
246
|
-
var v = ve, h = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), P = Symbol.for("react.consumer"), B = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), z = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), F = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), f = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, U = Array.isArray, V = console.createTask ? console.createTask : function() {
|
|
247
|
-
return null;
|
|
248
|
-
};
|
|
249
|
-
v = {
|
|
250
|
-
react_stack_bottom_frame: function(t) {
|
|
251
|
-
return t();
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
var X, ae = {}, oe = v.react_stack_bottom_frame.bind(
|
|
255
|
-
v,
|
|
256
|
-
r
|
|
257
|
-
)(), re = V(i(r)), ie = {};
|
|
258
|
-
ge.Fragment = j, ge.jsx = function(t, y, L) {
|
|
259
|
-
var G = 1e4 > f.recentlyCreatedOwnerStacks++;
|
|
260
|
-
return m(
|
|
261
|
-
t,
|
|
262
|
-
y,
|
|
263
|
-
L,
|
|
264
|
-
!1,
|
|
265
|
-
G ? Error("react-stack-top-frame") : oe,
|
|
266
|
-
G ? V(i(t)) : re
|
|
267
|
-
);
|
|
268
|
-
}, ge.jsxs = function(t, y, L) {
|
|
269
|
-
var G = 1e4 > f.recentlyCreatedOwnerStacks++;
|
|
270
|
-
return m(
|
|
271
|
-
t,
|
|
272
|
-
y,
|
|
273
|
-
L,
|
|
274
|
-
!0,
|
|
275
|
-
G ? Error("react-stack-top-frame") : oe,
|
|
276
|
-
G ? V(i(t)) : re
|
|
277
|
-
);
|
|
278
|
-
};
|
|
279
|
-
}()), ge;
|
|
280
|
-
}
|
|
281
|
-
process.env.NODE_ENV === "production" ? Me.exports = Qe() : Me.exports = ea();
|
|
282
|
-
var e = Me.exports;
|
|
283
|
-
const Le = (c, d = "DD MMM YYYY") => {
|
|
9
|
+
const Oe = (c, d = "DD MMM YYYY") => {
|
|
284
10
|
if (!c) return "N/A";
|
|
285
|
-
const
|
|
286
|
-
if (isNaN(
|
|
287
|
-
const i = (r) => String(r).padStart(2, "0"),
|
|
288
|
-
YYYY:
|
|
289
|
-
YY: String(
|
|
290
|
-
MMMM:
|
|
291
|
-
MMM:
|
|
292
|
-
MM: i(
|
|
293
|
-
M:
|
|
294
|
-
DD: i(
|
|
295
|
-
D:
|
|
296
|
-
dddd:
|
|
297
|
-
ddd:
|
|
298
|
-
HH: i(
|
|
299
|
-
hh: i(
|
|
300
|
-
mm: i(
|
|
301
|
-
ss: i(
|
|
302
|
-
A:
|
|
11
|
+
const n = new Date(c);
|
|
12
|
+
if (isNaN(n)) return "Invalid Date";
|
|
13
|
+
const i = (r) => String(r).padStart(2, "0"), o = {
|
|
14
|
+
YYYY: n.getFullYear(),
|
|
15
|
+
YY: String(n.getFullYear()).slice(-2),
|
|
16
|
+
MMMM: n.toLocaleString("en-US", { month: "long" }),
|
|
17
|
+
MMM: n.toLocaleString("en-US", { month: "short" }),
|
|
18
|
+
MM: i(n.getMonth() + 1),
|
|
19
|
+
M: n.getMonth() + 1,
|
|
20
|
+
DD: i(n.getDate()),
|
|
21
|
+
D: n.getDate(),
|
|
22
|
+
dddd: n.toLocaleString("en-US", { weekday: "long" }),
|
|
23
|
+
ddd: n.toLocaleString("en-US", { weekday: "short" }),
|
|
24
|
+
HH: i(n.getHours()),
|
|
25
|
+
hh: i(n.getHours() % 12 || 12),
|
|
26
|
+
mm: i(n.getMinutes()),
|
|
27
|
+
ss: i(n.getSeconds()),
|
|
28
|
+
A: n.getHours() >= 12 ? "PM" : "AM"
|
|
303
29
|
};
|
|
304
30
|
return d.replace(
|
|
305
31
|
/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|ddd|HH|hh|mm|ss|A/g,
|
|
306
|
-
(r) =>
|
|
32
|
+
(r) => o[r]
|
|
307
33
|
);
|
|
308
|
-
},
|
|
34
|
+
}, Ze = (c, d, n = []) => {
|
|
309
35
|
if (!(d != null && d.trim())) return c;
|
|
310
|
-
const i = d.toLowerCase(),
|
|
36
|
+
const i = d.toLowerCase(), o = (r) => r == null ? [] : typeof r == "object" ? Object.values(r).flatMap(o) : [String(r)];
|
|
311
37
|
return c.filter((r) => {
|
|
312
|
-
let
|
|
313
|
-
return
|
|
314
|
-
r[
|
|
315
|
-
}) :
|
|
316
|
-
(
|
|
38
|
+
let l = [];
|
|
39
|
+
return n.length > 0 ? n.forEach((N) => {
|
|
40
|
+
r[N] !== void 0 && l.push(...o(r[N]));
|
|
41
|
+
}) : l = o(r), l.some(
|
|
42
|
+
(N) => N.toLowerCase().includes(i)
|
|
317
43
|
);
|
|
318
44
|
});
|
|
319
|
-
},
|
|
45
|
+
}, ae = Me.forwardRef(
|
|
320
46
|
({
|
|
321
47
|
className: c = "",
|
|
322
48
|
variant: d = "contained",
|
|
323
|
-
color:
|
|
49
|
+
color: n = "default",
|
|
324
50
|
size: i = "default",
|
|
325
|
-
fullWidth:
|
|
51
|
+
fullWidth: o = !1,
|
|
326
52
|
children: r,
|
|
327
|
-
...
|
|
328
|
-
},
|
|
329
|
-
var
|
|
330
|
-
const M = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
53
|
+
...l
|
|
54
|
+
}, N) => {
|
|
55
|
+
var u;
|
|
56
|
+
const M = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", y = {
|
|
331
57
|
sm: "h-8 px-3 rounded-md text-sm",
|
|
332
58
|
md: "h-9 px-4 rounded-md text-sm",
|
|
333
59
|
lg: "h-11 px-6 rounded-md text-base",
|
|
334
60
|
xl: "h-12 px-8 rounded-lg text-lg",
|
|
335
61
|
default: "h-9 px-4 rounded-md text-sm"
|
|
336
|
-
},
|
|
62
|
+
}, f = {
|
|
337
63
|
primary: {
|
|
338
|
-
contained: "bg-primary
|
|
339
|
-
outlined: "border border-primary
|
|
340
|
-
text: "bg-transparent text-primary
|
|
64
|
+
contained: "bg-primary text-white hover:bg-primary-600 focus:ring-primary-500 shadow-sm",
|
|
65
|
+
outlined: "border border-primary bg-transparent text-primary hover:bg-primary-50 focus:ring-primary-500",
|
|
66
|
+
text: "bg-transparent text-primary hover:bg-primary-50 focus:ring-primary-500"
|
|
341
67
|
},
|
|
342
68
|
success: {
|
|
343
69
|
contained: "bg-green-600 text-white hover:bg-green-700 focus:ring-green-500 shadow-sm",
|
|
@@ -354,196 +80,196 @@ const Le = (c, d = "DD MMM YYYY") => {
|
|
|
354
80
|
outlined: "border border-gray-300 bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300 dark:border-gray-600 dark:text-gray-200 dark:hover:bg-gray-700 dark:focus:ring-gray-500",
|
|
355
81
|
text: "bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300 dark:text-gray-200 dark:hover:bg-gray-700 dark:focus:ring-gray-500"
|
|
356
82
|
}
|
|
357
|
-
},
|
|
83
|
+
}, s = ((u = f[n]) == null ? void 0 : u[d]) || f.default.contained, g = y[i], m = `
|
|
358
84
|
${M}
|
|
359
|
-
${
|
|
360
|
-
${
|
|
361
|
-
${
|
|
85
|
+
${s}
|
|
86
|
+
${g}
|
|
87
|
+
${o ? "w-full" : ""}
|
|
362
88
|
${c}
|
|
363
89
|
`.trim();
|
|
364
|
-
return /* @__PURE__ */ e
|
|
90
|
+
return /* @__PURE__ */ e(
|
|
365
91
|
"button",
|
|
366
92
|
{
|
|
367
|
-
ref:
|
|
368
|
-
type:
|
|
369
|
-
className:
|
|
370
|
-
...
|
|
93
|
+
ref: N,
|
|
94
|
+
type: l.type || "button",
|
|
95
|
+
className: m,
|
|
96
|
+
...l,
|
|
371
97
|
children: r
|
|
372
98
|
}
|
|
373
99
|
);
|
|
374
100
|
}
|
|
375
101
|
);
|
|
376
|
-
|
|
377
|
-
function
|
|
378
|
-
return /* @__PURE__ */ e
|
|
102
|
+
ae.displayName = "Button";
|
|
103
|
+
function W({ label: c, required: d = !1 }) {
|
|
104
|
+
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ h("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
379
105
|
c,
|
|
380
|
-
d && /* @__PURE__ */ e
|
|
106
|
+
d && /* @__PURE__ */ e("span", { className: "ml-1", children: "*" })
|
|
381
107
|
] }) });
|
|
382
108
|
}
|
|
383
|
-
const
|
|
109
|
+
const Je = ({
|
|
384
110
|
options: c = [],
|
|
385
111
|
value: d,
|
|
386
|
-
onChange:
|
|
112
|
+
onChange: n,
|
|
387
113
|
placeholder: i = "Select option",
|
|
388
|
-
className:
|
|
114
|
+
className: o = "",
|
|
389
115
|
disabled: r = !1,
|
|
390
|
-
search:
|
|
391
|
-
label:
|
|
116
|
+
search: l = !1,
|
|
117
|
+
label: N = "",
|
|
392
118
|
required: M = !1,
|
|
393
|
-
name:
|
|
394
|
-
parentClass:
|
|
395
|
-
multiple:
|
|
119
|
+
name: y = "",
|
|
120
|
+
parentClass: f = "",
|
|
121
|
+
multiple: s = !1,
|
|
396
122
|
// ✅ NEW
|
|
397
|
-
dropdownMaxHeight:
|
|
123
|
+
dropdownMaxHeight: g = ""
|
|
398
124
|
}) => {
|
|
399
|
-
var
|
|
400
|
-
const [
|
|
401
|
-
(
|
|
402
|
-
),
|
|
403
|
-
const A =
|
|
404
|
-
return
|
|
125
|
+
var B;
|
|
126
|
+
const [m, u] = S(!1), [k, w] = S(""), [C, D] = S(!0), I = X(null), E = X(null), $ = (b) => String(typeof b == "boolean" ? b : b ?? ""), j = s ? (d || []).map($) : $(d), O = c.filter(
|
|
127
|
+
(b) => b.label.toLowerCase().includes(k.toLowerCase())
|
|
128
|
+
), v = (b) => {
|
|
129
|
+
const A = $(b);
|
|
130
|
+
return s ? j.includes(A) : A === j;
|
|
405
131
|
};
|
|
406
|
-
|
|
407
|
-
const
|
|
408
|
-
|
|
132
|
+
z(() => {
|
|
133
|
+
const b = (A) => {
|
|
134
|
+
I.current && !I.current.contains(A.target) && (u(!1), w(""));
|
|
409
135
|
};
|
|
410
|
-
return document.addEventListener("mousedown",
|
|
411
|
-
}, []),
|
|
412
|
-
if (
|
|
413
|
-
const
|
|
414
|
-
|
|
136
|
+
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
137
|
+
}, []), z(() => {
|
|
138
|
+
if (m && I.current) {
|
|
139
|
+
const b = I.current.getBoundingClientRect(), H = window.innerHeight - b.bottom;
|
|
140
|
+
D(H < 200);
|
|
415
141
|
}
|
|
416
|
-
}, [
|
|
417
|
-
|
|
418
|
-
}, [
|
|
419
|
-
const
|
|
420
|
-
let A =
|
|
421
|
-
if (
|
|
422
|
-
const
|
|
142
|
+
}, [m]), z(() => {
|
|
143
|
+
m && E.current && E.current.focus();
|
|
144
|
+
}, [m]);
|
|
145
|
+
const L = (b) => {
|
|
146
|
+
let A = b;
|
|
147
|
+
if (b === "true" ? A = !0 : b === "false" && (A = !1), s) {
|
|
148
|
+
const H = j.includes($(b));
|
|
423
149
|
let V;
|
|
424
|
-
|
|
425
|
-
(
|
|
426
|
-
) : V = [...d || [], A],
|
|
150
|
+
H ? V = d.filter(
|
|
151
|
+
(J) => $(J) !== $(b)
|
|
152
|
+
) : V = [...d || [], A], n(V);
|
|
427
153
|
} else
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
},
|
|
431
|
-
return /* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */ e
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */
|
|
154
|
+
n(A), u(!1);
|
|
155
|
+
w("");
|
|
156
|
+
}, T = s ? c.filter((b) => v(b.value)).map((b) => b.label).join(", ") : (B = c.find((b) => v(b.value))) == null ? void 0 : B.label;
|
|
157
|
+
return /* @__PURE__ */ h("div", { className: f || "col-span-12", children: [
|
|
158
|
+
/* @__PURE__ */ e(W, { label: N, required: M }),
|
|
159
|
+
/* @__PURE__ */ h("div", { className: `relative ${o}`, ref: I, children: [
|
|
160
|
+
/* @__PURE__ */ h(
|
|
435
161
|
"button",
|
|
436
162
|
{
|
|
437
163
|
type: "button",
|
|
438
|
-
onClick: () => !r &&
|
|
164
|
+
onClick: () => !r && u(!m),
|
|
439
165
|
disabled: r,
|
|
440
166
|
className: `w-full h-10 px-3 border border-gray-300 dark:border-gray-600 rounded-md text-left text-sm flex items-center justify-between
|
|
441
|
-
${
|
|
167
|
+
${T ? "dark:text-white" : "text-gray-500 dark:text-gray-400"}
|
|
442
168
|
${r ? "opacity-50 cursor-not-allowed" : "dark:bg-gray-700"}`,
|
|
443
169
|
children: [
|
|
444
|
-
/* @__PURE__ */ e
|
|
445
|
-
/* @__PURE__ */ e
|
|
446
|
-
|
|
170
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: T || i }),
|
|
171
|
+
/* @__PURE__ */ e(
|
|
172
|
+
Pe,
|
|
447
173
|
{
|
|
448
|
-
className: `w-4 h-4 transition-transform ${
|
|
174
|
+
className: `w-4 h-4 transition-transform ${m ? "rotate-180" : ""}`
|
|
449
175
|
}
|
|
450
176
|
)
|
|
451
177
|
]
|
|
452
178
|
}
|
|
453
179
|
),
|
|
454
|
-
|
|
180
|
+
m && /* @__PURE__ */ h(
|
|
455
181
|
"div",
|
|
456
182
|
{
|
|
457
183
|
className: `absolute z-50 w-full border rounded-md bg-white dark:bg-gray-700 shadow-lg
|
|
458
|
-
${
|
|
184
|
+
${C ? "bottom-full mb-1" : "top-full mt-1"}`,
|
|
459
185
|
children: [
|
|
460
|
-
|
|
461
|
-
/* @__PURE__ */ e
|
|
462
|
-
/* @__PURE__ */ e
|
|
186
|
+
l && /* @__PURE__ */ e("div", { className: "p-2 border-b border-gray-200 dark:border-gray-600", children: /* @__PURE__ */ h("div", { className: "relative", children: [
|
|
187
|
+
/* @__PURE__ */ e(Ce, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }),
|
|
188
|
+
/* @__PURE__ */ e(
|
|
463
189
|
"input",
|
|
464
190
|
{
|
|
465
|
-
ref:
|
|
191
|
+
ref: E,
|
|
466
192
|
type: "text",
|
|
467
|
-
value:
|
|
468
|
-
onChange: (
|
|
193
|
+
value: k,
|
|
194
|
+
onChange: (b) => w(b.target.value),
|
|
469
195
|
placeholder: "Search...",
|
|
470
196
|
className: "w-full pl-9 pr-3 py-2 text-sm border rounded-md bg-white dark:bg-gray-800 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none"
|
|
471
197
|
}
|
|
472
198
|
)
|
|
473
199
|
] }) }),
|
|
474
|
-
/* @__PURE__ */ e
|
|
200
|
+
/* @__PURE__ */ e(
|
|
475
201
|
"div",
|
|
476
202
|
{
|
|
477
203
|
className: "max-h-40 overflow-y-auto",
|
|
478
204
|
style: {
|
|
479
|
-
maxHeight:
|
|
205
|
+
maxHeight: g || ""
|
|
480
206
|
},
|
|
481
|
-
children: O.length > 0 ? O.map((
|
|
207
|
+
children: O.length > 0 ? O.map((b) => /* @__PURE__ */ h(
|
|
482
208
|
"button",
|
|
483
209
|
{
|
|
484
210
|
type: "button",
|
|
485
|
-
onClick: () =>
|
|
211
|
+
onClick: () => L(String(b.value)),
|
|
486
212
|
className: `w-full px-3 py-2 text-left text-sm flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-600
|
|
487
|
-
${
|
|
213
|
+
${v(b.value) ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300" : ""}`,
|
|
488
214
|
children: [
|
|
489
|
-
/* @__PURE__ */ e
|
|
490
|
-
|
|
215
|
+
/* @__PURE__ */ e("span", { children: b.label }),
|
|
216
|
+
s && v(b.value) && /* @__PURE__ */ e(_e, { className: "w-4 h-4" })
|
|
491
217
|
]
|
|
492
218
|
},
|
|
493
|
-
String(
|
|
494
|
-
)) : /* @__PURE__ */ e
|
|
219
|
+
String(b.value)
|
|
220
|
+
)) : /* @__PURE__ */ e("div", { className: "px-3 py-2 text-sm text-gray-500 dark:text-gray-400", children: "No options found" })
|
|
495
221
|
}
|
|
496
222
|
)
|
|
497
223
|
]
|
|
498
224
|
}
|
|
499
225
|
)
|
|
500
226
|
] })
|
|
501
|
-
] },
|
|
502
|
-
},
|
|
227
|
+
] }, y);
|
|
228
|
+
}, Qe = ({
|
|
503
229
|
value: c = !0,
|
|
504
230
|
onChange: d,
|
|
505
|
-
text:
|
|
231
|
+
text: n,
|
|
506
232
|
options: i = [],
|
|
507
|
-
label:
|
|
233
|
+
label: o,
|
|
508
234
|
required: r,
|
|
509
|
-
name:
|
|
510
|
-
disabled:
|
|
235
|
+
name: l = "",
|
|
236
|
+
disabled: N = !1,
|
|
511
237
|
parentClass: M = ""
|
|
512
238
|
}) => {
|
|
513
|
-
const
|
|
239
|
+
const y = i.length > 0 ? i : [
|
|
514
240
|
{ label: "Active", value: !0 },
|
|
515
241
|
{ label: "Inactive", value: !1 }
|
|
516
242
|
];
|
|
517
|
-
return /* @__PURE__ */ e
|
|
518
|
-
/* @__PURE__ */ e
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
|
|
521
|
-
/* @__PURE__ */ e
|
|
243
|
+
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ h("div", { className: M || "col-span-12", children: [
|
|
244
|
+
/* @__PURE__ */ e(W, { label: o, required: r }),
|
|
245
|
+
/* @__PURE__ */ h("div", { className: "flex items-center justify-between h-10 gap-4 bg-gray-100 dark:bg-gray-700 px-3 rounded-md border border-gray-100 dark:border-gray-600", children: [
|
|
246
|
+
n && /* @__PURE__ */ e("p", { className: "text-xs text-gray-600 dark:text-gray-400 flex-shrink overflow-hidden text-ellipsis whitespace-nowrap max-w-[200px]", children: n }),
|
|
247
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-6", children: y.map((f, s) => /* @__PURE__ */ h(
|
|
522
248
|
"label",
|
|
523
249
|
{
|
|
524
250
|
className: "flex items-center gap-2 cursor-pointer select-none",
|
|
525
251
|
children: [
|
|
526
|
-
/* @__PURE__ */ e
|
|
252
|
+
/* @__PURE__ */ e(
|
|
527
253
|
"input",
|
|
528
254
|
{
|
|
529
255
|
type: "radio",
|
|
530
256
|
name: "switch-field",
|
|
531
|
-
required: r &&
|
|
532
|
-
value:
|
|
533
|
-
disabled:
|
|
534
|
-
checked: c ===
|
|
535
|
-
onChange: () => d(
|
|
257
|
+
required: r && s === 0,
|
|
258
|
+
value: f.value,
|
|
259
|
+
disabled: N,
|
|
260
|
+
checked: c === f.value,
|
|
261
|
+
onChange: () => d(f.value),
|
|
536
262
|
className: "w-4 h-4 border-gray-300 cursor-pointer"
|
|
537
263
|
}
|
|
538
264
|
),
|
|
539
|
-
/* @__PURE__ */ e
|
|
265
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-gray-700 dark:text-white", children: f.label })
|
|
540
266
|
]
|
|
541
267
|
},
|
|
542
|
-
|
|
268
|
+
s
|
|
543
269
|
)) })
|
|
544
270
|
] })
|
|
545
|
-
] },
|
|
546
|
-
},
|
|
271
|
+
] }, l) });
|
|
272
|
+
}, ge = [
|
|
547
273
|
{ label: "Afghanistan", code: "AF", phone: "93" },
|
|
548
274
|
{ label: "Aland Islands", code: "AX", phone: "358" },
|
|
549
275
|
{ label: "Albania", code: "AL", phone: "355" },
|
|
@@ -795,126 +521,101 @@ const ra = ({
|
|
|
795
521
|
{ label: "Zambia", code: "ZM", phone: "260" },
|
|
796
522
|
{ label: "Zimbabwe", code: "ZW", phone: "263" }
|
|
797
523
|
];
|
|
798
|
-
function
|
|
524
|
+
function Xe({
|
|
799
525
|
label: c = "",
|
|
800
526
|
value: d = "",
|
|
801
|
-
name:
|
|
527
|
+
name: n = "",
|
|
802
528
|
parentClass: i = "",
|
|
803
|
-
onChange:
|
|
529
|
+
onChange: o,
|
|
804
530
|
disabled: r = !1,
|
|
805
|
-
required:
|
|
806
|
-
placeholder:
|
|
531
|
+
required: l = !1,
|
|
532
|
+
placeholder: N = "Phone number",
|
|
807
533
|
search: M = !1,
|
|
808
|
-
countriesList:
|
|
809
|
-
defaultCountry:
|
|
534
|
+
countriesList: y = !1,
|
|
535
|
+
defaultCountry: f = ""
|
|
810
536
|
}) {
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
), [
|
|
814
|
-
|
|
537
|
+
const s = (v) => ge.find((L) => L.code == v), [g, m] = S(
|
|
538
|
+
s(f) || ge[0]
|
|
539
|
+
), [u, k] = S(""), [w, C] = S(!1), [D, I] = S(""), E = X();
|
|
540
|
+
z(() => {
|
|
815
541
|
if (typeof d == "string" && d.startsWith("+")) {
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
818
|
-
v
|
|
542
|
+
const v = ge.filter((L) => d.startsWith("+" + L.phone)).sort((L, T) => T.phone.length - L.phone.length)[0];
|
|
543
|
+
if (v) {
|
|
544
|
+
m(v), k(d.replace("+" + v.phone, ""));
|
|
819
545
|
return;
|
|
820
546
|
}
|
|
821
547
|
}
|
|
822
|
-
|
|
548
|
+
k(d);
|
|
823
549
|
}, [d]);
|
|
824
|
-
const
|
|
825
|
-
const
|
|
826
|
-
|
|
827
|
-
},
|
|
828
|
-
v
|
|
550
|
+
const $ = (v) => {
|
|
551
|
+
const L = v.target.value.replace(/\D/g, "");
|
|
552
|
+
k(L), g && o && o("+" + g.phone + L);
|
|
553
|
+
}, j = (v) => {
|
|
554
|
+
m(v), o && o("+" + v.phone + u), C(!1), I("");
|
|
829
555
|
};
|
|
830
|
-
|
|
831
|
-
const
|
|
832
|
-
|
|
556
|
+
z(() => {
|
|
557
|
+
const v = (L) => {
|
|
558
|
+
E.current && !E.current.contains(L.target) && C(!1);
|
|
833
559
|
};
|
|
834
|
-
return document.addEventListener("mousedown",
|
|
560
|
+
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
835
561
|
}, []);
|
|
836
|
-
const O =
|
|
837
|
-
(
|
|
562
|
+
const O = ge.filter(
|
|
563
|
+
(v) => v.label.toLowerCase().includes(D.toLowerCase()) || v.phone.includes(D)
|
|
838
564
|
);
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
};
|
|
844
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: i || "col-span-12", children: [
|
|
845
|
-
/* @__PURE__ */ e.jsx(ee, { label: c, required: n }),
|
|
846
|
-
/* @__PURE__ */ e.jsx(
|
|
847
|
-
"input",
|
|
848
|
-
{
|
|
849
|
-
type: "text",
|
|
850
|
-
value: d,
|
|
851
|
-
onChange: g,
|
|
852
|
-
placeholder: k,
|
|
853
|
-
disabled: r,
|
|
854
|
-
required: n,
|
|
855
|
-
className: `w-full h-10 px-3 text-sm border border-gray-300 dark:border-gray-600 rounded-md \r
|
|
856
|
-
bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none \r
|
|
857
|
-
focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-200`,
|
|
858
|
-
inputMode: "tel",
|
|
859
|
-
pattern: "^\\+\\d{1,15}$"
|
|
860
|
-
}
|
|
861
|
-
)
|
|
862
|
-
] }, s) });
|
|
863
|
-
}
|
|
864
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: i || "col-span-12", children: [
|
|
865
|
-
/* @__PURE__ */ e.jsx(ee, { label: c, required: n }),
|
|
866
|
-
/* @__PURE__ */ e.jsxs("div", { className: "relative ", ref: B, children: [
|
|
867
|
-
/* @__PURE__ */ e.jsxs(
|
|
565
|
+
return y ? /* @__PURE__ */ e(G, { children: /* @__PURE__ */ h("div", { className: i || "col-span-12", children: [
|
|
566
|
+
/* @__PURE__ */ e(W, { label: c, required: l }),
|
|
567
|
+
/* @__PURE__ */ h("div", { className: "relative ", ref: E, children: [
|
|
568
|
+
/* @__PURE__ */ h(
|
|
868
569
|
"div",
|
|
869
570
|
{
|
|
870
571
|
className: `h-[40px] flex items-center border rounded-md px-2 bg-white dark:bg-gray-700 transition-all
|
|
871
|
-
${
|
|
572
|
+
${w ? "ring-0.5 ring-blue-100 border-blue-300" : "border-gray-300 dark:border-gray-600"}
|
|
872
573
|
${r ? "opacity-60 cursor-not-allowed" : ""}`,
|
|
873
574
|
children: [
|
|
874
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ h(
|
|
875
576
|
"button",
|
|
876
577
|
{
|
|
877
578
|
type: "button",
|
|
878
579
|
disabled: r,
|
|
879
|
-
onClick: () =>
|
|
580
|
+
onClick: () => C(!w),
|
|
880
581
|
className: "flex items-center gap-1 pr-2 border-r border-gray-300 dark:border-gray-700 focus:outline-none",
|
|
881
582
|
children: [
|
|
882
|
-
|
|
583
|
+
g ? /* @__PURE__ */ e(
|
|
883
584
|
"img",
|
|
884
585
|
{
|
|
885
|
-
src: `https://flagcdn.com/w20/${
|
|
886
|
-
alt:
|
|
586
|
+
src: `https://flagcdn.com/w20/${g.code.toLowerCase()}.png`,
|
|
587
|
+
alt: g.code,
|
|
887
588
|
className: "w-5 h-3 object-cover"
|
|
888
589
|
}
|
|
889
|
-
) : /* @__PURE__ */ e
|
|
890
|
-
/* @__PURE__ */ e
|
|
590
|
+
) : /* @__PURE__ */ e("span", { className: "text-gray-400 text-xs", children: "🌐" }),
|
|
591
|
+
/* @__PURE__ */ e(Pe, { className: "w-3 h-3 text-gray-500" })
|
|
891
592
|
]
|
|
892
593
|
}
|
|
893
594
|
),
|
|
894
|
-
|
|
595
|
+
g && /* @__PURE__ */ h("span", { className: "ml-2 text-sm text-gray-700 dark:text-gray-200 whitespace-nowrap", children: [
|
|
895
596
|
"+",
|
|
896
|
-
|
|
597
|
+
g.phone
|
|
897
598
|
] }),
|
|
898
|
-
/* @__PURE__ */ e
|
|
599
|
+
/* @__PURE__ */ e(
|
|
899
600
|
"input",
|
|
900
601
|
{
|
|
901
602
|
type: "tel",
|
|
902
|
-
value:
|
|
903
|
-
onChange:
|
|
904
|
-
required:
|
|
905
|
-
disabled: r || !
|
|
906
|
-
placeholder:
|
|
603
|
+
value: u,
|
|
604
|
+
onChange: $,
|
|
605
|
+
required: l,
|
|
606
|
+
disabled: r || !g,
|
|
607
|
+
placeholder: g ? N : "Select a country",
|
|
907
608
|
className: "flex-1 ml-2 bg-transparent outline-none text-sm text-gray-800 dark:text-gray-100 placeholder-gray-400"
|
|
908
609
|
}
|
|
909
610
|
),
|
|
910
|
-
/* @__PURE__ */ e
|
|
611
|
+
/* @__PURE__ */ e(
|
|
911
612
|
"input",
|
|
912
613
|
{
|
|
913
614
|
type: "tel",
|
|
914
|
-
required:
|
|
615
|
+
required: l,
|
|
915
616
|
tabIndex: -1,
|
|
916
617
|
readOnly: !0,
|
|
917
|
-
value:
|
|
618
|
+
value: g && u ? "+" + g.phone + u : "",
|
|
918
619
|
style: {
|
|
919
620
|
position: "absolute",
|
|
920
621
|
opacity: 0,
|
|
@@ -926,128 +627,149 @@ function na({
|
|
|
926
627
|
]
|
|
927
628
|
}
|
|
928
629
|
),
|
|
929
|
-
|
|
930
|
-
M && /* @__PURE__ */ e
|
|
931
|
-
/* @__PURE__ */ e
|
|
932
|
-
/* @__PURE__ */ e
|
|
630
|
+
w && /* @__PURE__ */ h("div", { className: "absolute top-full left-0 w-full mt-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-700 shadow-lg z-50 max-h-60 overflow-y-auto", children: [
|
|
631
|
+
M && /* @__PURE__ */ e("div", { className: "p-2 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ h("div", { className: "relative", children: [
|
|
632
|
+
/* @__PURE__ */ e(Ce, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400" }),
|
|
633
|
+
/* @__PURE__ */ e(
|
|
933
634
|
"input",
|
|
934
635
|
{
|
|
935
636
|
type: "text",
|
|
936
|
-
value:
|
|
937
|
-
onChange: (
|
|
637
|
+
value: D,
|
|
638
|
+
onChange: (v) => I(v.target.value),
|
|
938
639
|
placeholder: "Search country...",
|
|
939
640
|
className: "w-full pl-9 pr-3 py-2 text-sm border rounded-md bg-white dark:bg-gray-800 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none "
|
|
940
641
|
}
|
|
941
642
|
)
|
|
942
643
|
] }) }),
|
|
943
|
-
O.map((
|
|
644
|
+
O.map((v) => /* @__PURE__ */ h(
|
|
944
645
|
"button",
|
|
945
646
|
{
|
|
946
647
|
type: "button",
|
|
947
|
-
onClick: () =>
|
|
648
|
+
onClick: () => j(v),
|
|
948
649
|
className: "w-full flex items-center gap-2 px-2 py-1 text-sm hover:bg-blue-50 dark:hover:bg-gray-700 text-gray-800 dark:text-gray-100",
|
|
949
650
|
children: [
|
|
950
|
-
/* @__PURE__ */ e
|
|
651
|
+
/* @__PURE__ */ e(
|
|
951
652
|
"img",
|
|
952
653
|
{
|
|
953
|
-
src: `https://flagcdn.com/w20/${
|
|
954
|
-
alt:
|
|
654
|
+
src: `https://flagcdn.com/w20/${v.code.toLowerCase()}.png`,
|
|
655
|
+
alt: v.code,
|
|
955
656
|
className: "w-5 h-3 object-cover"
|
|
956
657
|
}
|
|
957
658
|
),
|
|
958
|
-
/* @__PURE__ */
|
|
959
|
-
|
|
659
|
+
/* @__PURE__ */ h("span", { children: [
|
|
660
|
+
v.label,
|
|
960
661
|
" (+",
|
|
961
|
-
|
|
662
|
+
v.phone,
|
|
962
663
|
")"
|
|
963
664
|
] })
|
|
964
665
|
]
|
|
965
666
|
},
|
|
966
|
-
|
|
667
|
+
v.code
|
|
967
668
|
))
|
|
968
669
|
] })
|
|
969
670
|
] })
|
|
970
|
-
] },
|
|
671
|
+
] }, n) }) : /* @__PURE__ */ e(G, { children: /* @__PURE__ */ h("div", { className: i || "col-span-12", children: [
|
|
672
|
+
/* @__PURE__ */ e(W, { label: c, required: l }),
|
|
673
|
+
/* @__PURE__ */ e(
|
|
674
|
+
"input",
|
|
675
|
+
{
|
|
676
|
+
type: "text",
|
|
677
|
+
value: d,
|
|
678
|
+
onChange: (L) => {
|
|
679
|
+
const T = L.target.value.replace(/[^+\d]/g, ""), B = T.startsWith("+") ? "+" + T.replace(/[+]/g, "").slice(0) : T;
|
|
680
|
+
o(B);
|
|
681
|
+
},
|
|
682
|
+
placeholder: N,
|
|
683
|
+
disabled: r,
|
|
684
|
+
required: l,
|
|
685
|
+
className: `w-full h-10 px-3 text-sm border border-gray-300 dark:border-gray-600 rounded-md \r
|
|
686
|
+
bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none \r
|
|
687
|
+
focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-200`,
|
|
688
|
+
inputMode: "tel",
|
|
689
|
+
pattern: "^\\+\\d{1,15}$"
|
|
690
|
+
}
|
|
691
|
+
)
|
|
692
|
+
] }, n) });
|
|
971
693
|
}
|
|
972
|
-
const
|
|
973
|
-
({ className: c = "", label: d, required:
|
|
694
|
+
const Fe = Me.forwardRef(
|
|
695
|
+
({ className: c = "", label: d, required: n, ...i }, o) => {
|
|
974
696
|
const r = `
|
|
975
697
|
placeholder-gray-400 dark:placeholder-gray-400
|
|
976
698
|
${c}
|
|
977
699
|
`.trim();
|
|
978
|
-
return /* @__PURE__ */ e
|
|
979
|
-
/* @__PURE__ */ e
|
|
980
|
-
/* @__PURE__ */ e
|
|
700
|
+
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ h("div", { className: i.parentClass || "col-span-12", children: [
|
|
701
|
+
/* @__PURE__ */ e(W, { label: d, required: n }),
|
|
702
|
+
/* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
|
|
981
703
|
"textarea",
|
|
982
704
|
{
|
|
983
705
|
className: r,
|
|
984
|
-
ref:
|
|
985
|
-
required:
|
|
706
|
+
ref: o,
|
|
707
|
+
required: n,
|
|
986
708
|
...i
|
|
987
709
|
}
|
|
988
710
|
) })
|
|
989
711
|
] }, i.name) });
|
|
990
712
|
}
|
|
991
713
|
);
|
|
992
|
-
|
|
993
|
-
const
|
|
714
|
+
Fe.displayName = "TextArea";
|
|
715
|
+
const ea = ({
|
|
994
716
|
label: c = "",
|
|
995
717
|
value: d = null,
|
|
996
|
-
onChange:
|
|
718
|
+
onChange: n,
|
|
997
719
|
required: i = !1,
|
|
998
|
-
accept:
|
|
720
|
+
accept: o = "image/*",
|
|
999
721
|
id: r,
|
|
1000
|
-
dragDrop:
|
|
1001
|
-
name:
|
|
722
|
+
dragDrop: l = !1,
|
|
723
|
+
name: N = "",
|
|
1002
724
|
parentClass: M = ""
|
|
1003
725
|
}) => {
|
|
1004
|
-
const [
|
|
1005
|
-
|
|
1006
|
-
|
|
726
|
+
const [y, f] = S(d), [s, g] = S(!1), m = X(null);
|
|
727
|
+
z(() => {
|
|
728
|
+
f(d);
|
|
1007
729
|
}, [d]);
|
|
1008
|
-
const
|
|
1009
|
-
if (!
|
|
1010
|
-
|
|
730
|
+
const u = (D) => {
|
|
731
|
+
if (!D || D.length === 0) {
|
|
732
|
+
f(null), n == null || n(null);
|
|
1011
733
|
return;
|
|
1012
734
|
}
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1015
|
-
}, N = (R) => {
|
|
1016
|
-
n && (R.preventDefault(), b(!0));
|
|
1017
|
-
}, j = (R) => {
|
|
1018
|
-
n && (R.preventDefault(), b(!1));
|
|
1019
|
-
}, S = (R) => {
|
|
1020
|
-
n && (R.preventDefault(), b(!1), h(R.dataTransfer.files));
|
|
735
|
+
const I = D[0], E = URL.createObjectURL(I);
|
|
736
|
+
f({ file: I, preview: E }), n == null || n(E);
|
|
1021
737
|
};
|
|
1022
|
-
return /* @__PURE__ */ e
|
|
1023
|
-
/* @__PURE__ */ e
|
|
1024
|
-
/* @__PURE__ */
|
|
738
|
+
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ h("div", { className: M || "col-span-12", children: [
|
|
739
|
+
/* @__PURE__ */ e(W, { label: c, required: i }),
|
|
740
|
+
/* @__PURE__ */ h(
|
|
1025
741
|
"div",
|
|
1026
742
|
{
|
|
1027
|
-
className: `relative rounded-md p-2 transition-all ${
|
|
1028
|
-
onDragOver:
|
|
1029
|
-
|
|
1030
|
-
|
|
743
|
+
className: `relative rounded-md p-2 transition-all ${s ? "border border-dashed border-blue-500 bg-blue-50 dark:bg-blue-900" : "border bg-gray-50 dark:bg-gray-700"}`,
|
|
744
|
+
onDragOver: (D) => {
|
|
745
|
+
l && (D.preventDefault(), g(!0));
|
|
746
|
+
},
|
|
747
|
+
onDragLeave: (D) => {
|
|
748
|
+
l && (D.preventDefault(), g(!1));
|
|
749
|
+
},
|
|
750
|
+
onDrop: (D) => {
|
|
751
|
+
l && (D.preventDefault(), g(!1), u(D.dataTransfer.files));
|
|
752
|
+
},
|
|
1031
753
|
children: [
|
|
1032
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ h(
|
|
1033
755
|
"div",
|
|
1034
756
|
{
|
|
1035
|
-
className: `flex items-center space-x-3 transition-all ${
|
|
757
|
+
className: `flex items-center space-x-3 transition-all ${s ? "filter blur-sm" : ""}`,
|
|
1036
758
|
children: [
|
|
1037
|
-
/* @__PURE__ */ e
|
|
759
|
+
/* @__PURE__ */ e(
|
|
1038
760
|
"div",
|
|
1039
761
|
{
|
|
1040
762
|
className: "cursor-pointer",
|
|
1041
|
-
onClick: () =>
|
|
1042
|
-
children:
|
|
763
|
+
onClick: () => m.current.click(),
|
|
764
|
+
children: y ? /* @__PURE__ */ e(
|
|
1043
765
|
"img",
|
|
1044
766
|
{
|
|
1045
|
-
src:
|
|
767
|
+
src: y.preview || y,
|
|
1046
768
|
alt: "preview",
|
|
1047
769
|
className: "object-cover w-20 h-20 rounded-full"
|
|
1048
770
|
}
|
|
1049
|
-
) : /* @__PURE__ */ e
|
|
1050
|
-
|
|
771
|
+
) : /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "rounded-full bg-gray-200 dark:bg-gray-800 h-20 w-20 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
772
|
+
De,
|
|
1051
773
|
{
|
|
1052
774
|
icon: "ri:image-add-fill",
|
|
1053
775
|
className: "text-gray-400 w-10 h-10"
|
|
@@ -1055,234 +777,247 @@ const la = ({
|
|
|
1055
777
|
) }) })
|
|
1056
778
|
}
|
|
1057
779
|
),
|
|
1058
|
-
/* @__PURE__ */ e
|
|
780
|
+
/* @__PURE__ */ e(
|
|
1059
781
|
"input",
|
|
1060
782
|
{
|
|
1061
|
-
ref:
|
|
783
|
+
ref: m,
|
|
1062
784
|
id: r,
|
|
1063
785
|
type: "file",
|
|
1064
|
-
accept:
|
|
1065
|
-
onChange: (
|
|
1066
|
-
required: i && !
|
|
786
|
+
accept: o,
|
|
787
|
+
onChange: (D) => u(D.target.files),
|
|
788
|
+
required: i && !y,
|
|
1067
789
|
className: "inline-flex items-center justify-center p-2 text-gray-400 text-sm file:cursor-pointer"
|
|
1068
790
|
}
|
|
1069
791
|
)
|
|
1070
792
|
]
|
|
1071
793
|
}
|
|
1072
794
|
),
|
|
1073
|
-
|
|
795
|
+
l && s && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ e("span", { className: "text-blue-500 font-semibold text-xl", children: "Drop here" }) })
|
|
1074
796
|
]
|
|
1075
797
|
}
|
|
1076
798
|
)
|
|
1077
|
-
] },
|
|
1078
|
-
}, Be =
|
|
799
|
+
] }, N) });
|
|
800
|
+
}, Be = Me.forwardRef(
|
|
1079
801
|
({
|
|
1080
802
|
label: c,
|
|
1081
803
|
required: d,
|
|
1082
|
-
parentClass:
|
|
804
|
+
parentClass: n = "",
|
|
1083
805
|
className: i = "",
|
|
1084
|
-
type:
|
|
806
|
+
type: o = "text",
|
|
1085
807
|
onKeyDown: r,
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
808
|
+
negativeNumberAllow: l = !0,
|
|
809
|
+
...N
|
|
810
|
+
}, M) => {
|
|
811
|
+
const [y, f] = S(!1), s = (m) => {
|
|
812
|
+
if (o === "number") {
|
|
813
|
+
if (["e", "E", "+"].includes(m.key)) {
|
|
814
|
+
m.preventDefault();
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
if (l == !1 && m.key === "-") {
|
|
818
|
+
m.preventDefault();
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
if (["ArrowUp", "ArrowDown"].includes(m.key)) {
|
|
822
|
+
m.preventDefault();
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
r == null || r(m);
|
|
827
|
+
}, g = `
|
|
1091
828
|
h-10 placeholder-gray-400 dark:placeholder-gray-400
|
|
1092
|
-
${
|
|
829
|
+
${o === "password" ? "pr-10" : ""}
|
|
830
|
+
${o === "number" ? "no-spinner" : ""}
|
|
1093
831
|
${i}
|
|
1094
832
|
`.trim();
|
|
1095
|
-
return /* @__PURE__ */ e
|
|
1096
|
-
/* @__PURE__ */ e
|
|
1097
|
-
/* @__PURE__ */
|
|
1098
|
-
/* @__PURE__ */ e
|
|
833
|
+
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ h("div", { className: n || "col-span-12", children: [
|
|
834
|
+
/* @__PURE__ */ e(W, { label: c, required: d }),
|
|
835
|
+
/* @__PURE__ */ h("div", { className: "relative", children: [
|
|
836
|
+
/* @__PURE__ */ e(
|
|
1099
837
|
"input",
|
|
1100
838
|
{
|
|
1101
|
-
type:
|
|
1102
|
-
ref:
|
|
839
|
+
type: o === "password" && y ? "text" : o,
|
|
840
|
+
ref: M,
|
|
1103
841
|
required: d,
|
|
1104
|
-
onKeyDown:
|
|
1105
|
-
className:
|
|
1106
|
-
...
|
|
842
|
+
onKeyDown: s,
|
|
843
|
+
className: g,
|
|
844
|
+
...N
|
|
1107
845
|
}
|
|
1108
846
|
),
|
|
1109
|
-
|
|
847
|
+
o === "password" && /* @__PURE__ */ e(
|
|
1110
848
|
"button",
|
|
1111
849
|
{
|
|
1112
850
|
type: "button",
|
|
1113
851
|
tabIndex: -1,
|
|
1114
|
-
onClick: () =>
|
|
852
|
+
onClick: () => f((m) => !m),
|
|
1115
853
|
className: "absolute inset-y-0 right-3 flex items-center text-gray-400 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-200",
|
|
1116
|
-
children: /* @__PURE__ */ e
|
|
1117
|
-
|
|
854
|
+
children: /* @__PURE__ */ e(
|
|
855
|
+
De,
|
|
1118
856
|
{
|
|
1119
|
-
icon:
|
|
857
|
+
icon: y ? "mdi:eye-off-outline" : "mdi:eye-outline",
|
|
1120
858
|
className: "w-5 h-5"
|
|
1121
859
|
}
|
|
1122
860
|
)
|
|
1123
861
|
}
|
|
1124
862
|
)
|
|
1125
863
|
] })
|
|
1126
|
-
] },
|
|
864
|
+
] }, N.name) });
|
|
1127
865
|
}
|
|
1128
866
|
);
|
|
1129
867
|
Be.displayName = "Input";
|
|
1130
|
-
const
|
|
868
|
+
const aa = ({
|
|
1131
869
|
key: c,
|
|
1132
870
|
editorKey: d = "",
|
|
1133
|
-
value:
|
|
871
|
+
value: n = "",
|
|
1134
872
|
onChange: i,
|
|
1135
|
-
label:
|
|
873
|
+
label: o = "",
|
|
1136
874
|
required: r = !1,
|
|
1137
|
-
placeholder:
|
|
1138
|
-
parentClass:
|
|
875
|
+
placeholder: l = "",
|
|
876
|
+
parentClass: N = "col-span-12",
|
|
1139
877
|
height: M = 400,
|
|
1140
|
-
inline:
|
|
1141
|
-
disabled:
|
|
1142
|
-
plugins:
|
|
1143
|
-
toolbar:
|
|
1144
|
-
menubar:
|
|
1145
|
-
fontFamily:
|
|
1146
|
-
initConfig:
|
|
1147
|
-
imageUploadHandler:
|
|
878
|
+
inline: y = !1,
|
|
879
|
+
disabled: f = !1,
|
|
880
|
+
plugins: s,
|
|
881
|
+
toolbar: g,
|
|
882
|
+
menubar: m = !1,
|
|
883
|
+
fontFamily: u = "Inter, sans-serif",
|
|
884
|
+
initConfig: k = {},
|
|
885
|
+
imageUploadHandler: w
|
|
1148
886
|
// ✅ Promise function passed from parent
|
|
1149
|
-
}) => {
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
placeholder: n,
|
|
1200
|
-
content_style: `
|
|
887
|
+
}) => /* @__PURE__ */ h("div", { className: N, children: [
|
|
888
|
+
o && /* @__PURE__ */ e(W, { label: o, required: r }),
|
|
889
|
+
/* @__PURE__ */ e(
|
|
890
|
+
qe,
|
|
891
|
+
{
|
|
892
|
+
apiKey: d,
|
|
893
|
+
value: n,
|
|
894
|
+
disabled: f,
|
|
895
|
+
init: {
|
|
896
|
+
height: M,
|
|
897
|
+
inline: y,
|
|
898
|
+
menubar: m,
|
|
899
|
+
branding: !1,
|
|
900
|
+
statusbar: !0,
|
|
901
|
+
automatic_uploads: !0,
|
|
902
|
+
images_upload_handler: (E) => new Promise(($, j) => {
|
|
903
|
+
if (!w) {
|
|
904
|
+
$(`data:${E.blob().type};base64,${E.base64()}`);
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
w(E).then((O) => {
|
|
908
|
+
O ? $(O) : j("Upload failed: No URL returned");
|
|
909
|
+
}).catch((O) => {
|
|
910
|
+
j(
|
|
911
|
+
typeof O == "string" ? O : (O == null ? void 0 : O.message) || "Image upload failed"
|
|
912
|
+
);
|
|
913
|
+
});
|
|
914
|
+
}),
|
|
915
|
+
plugins: s ?? [
|
|
916
|
+
"advlist",
|
|
917
|
+
"autolink",
|
|
918
|
+
"lists",
|
|
919
|
+
"link",
|
|
920
|
+
"image",
|
|
921
|
+
"charmap",
|
|
922
|
+
"preview",
|
|
923
|
+
"anchor",
|
|
924
|
+
"searchreplace",
|
|
925
|
+
"visualblocks",
|
|
926
|
+
"code",
|
|
927
|
+
"fullscreen",
|
|
928
|
+
"insertdatetime",
|
|
929
|
+
"media",
|
|
930
|
+
"table",
|
|
931
|
+
"help",
|
|
932
|
+
"wordcount"
|
|
933
|
+
],
|
|
934
|
+
toolbar: g ?? "undo redo | blocks | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media table | removeformat | code fullscreen preview",
|
|
935
|
+
placeholder: l,
|
|
936
|
+
content_style: `
|
|
1201
937
|
body {
|
|
1202
|
-
font-family: ${
|
|
938
|
+
font-family: ${u};
|
|
1203
939
|
}
|
|
1204
940
|
`,
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
}
|
|
941
|
+
...k
|
|
942
|
+
},
|
|
943
|
+
onEditorChange: (E) => {
|
|
944
|
+
i && i(E);
|
|
1210
945
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
},
|
|
946
|
+
}
|
|
947
|
+
)
|
|
948
|
+
] }, c), ra = ({
|
|
1214
949
|
name: c = "",
|
|
1215
950
|
label: d = "",
|
|
1216
951
|
// label for single checkbox
|
|
1217
|
-
options:
|
|
952
|
+
options: n = [],
|
|
1218
953
|
// array of { label, value } for multiple
|
|
1219
954
|
value: i = null,
|
|
1220
955
|
// boolean for single, array for multiple, or string for single select
|
|
1221
|
-
onChange:
|
|
956
|
+
onChange: o,
|
|
1222
957
|
disabled: r = !1,
|
|
1223
|
-
required:
|
|
1224
|
-
parentClass:
|
|
958
|
+
required: l = !1,
|
|
959
|
+
parentClass: N = "col-span-12",
|
|
1225
960
|
className: M = "",
|
|
1226
|
-
multiSelect:
|
|
961
|
+
multiSelect: y = !1
|
|
1227
962
|
// ✅ if true, only one option can be selected (like radio)
|
|
1228
963
|
}) => {
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
},
|
|
1232
|
-
if (
|
|
1233
|
-
if (!
|
|
1234
|
-
|
|
964
|
+
const f = Array.isArray(n) && n.length > 0, s = (u) => f ? y ? Array.isArray(i) && i.includes(u) : i === u : !!i, g = (u) => {
|
|
965
|
+
o == null || o(u.target.checked, c);
|
|
966
|
+
}, m = (u, k) => {
|
|
967
|
+
if (o)
|
|
968
|
+
if (!y)
|
|
969
|
+
o(k ? u : "", c);
|
|
1235
970
|
else {
|
|
1236
|
-
const
|
|
1237
|
-
if (
|
|
1238
|
-
|
|
971
|
+
const w = Array.isArray(i) ? [...i] : [];
|
|
972
|
+
if (k)
|
|
973
|
+
w.includes(u) || w.push(u);
|
|
1239
974
|
else {
|
|
1240
|
-
const
|
|
1241
|
-
|
|
975
|
+
const C = w.indexOf(u);
|
|
976
|
+
C > -1 && w.splice(C, 1);
|
|
1242
977
|
}
|
|
1243
|
-
|
|
978
|
+
o(w, c);
|
|
1244
979
|
}
|
|
1245
980
|
};
|
|
1246
|
-
return
|
|
1247
|
-
/* @__PURE__ */ e
|
|
1248
|
-
/* @__PURE__ */ e
|
|
1249
|
-
/* @__PURE__ */ e
|
|
981
|
+
return f ? /* @__PURE__ */ e(G, { children: /* @__PURE__ */ h("div", { className: `${N}`, children: [
|
|
982
|
+
/* @__PURE__ */ e(W, { label: d, required: l }),
|
|
983
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col space-y-2", children: n.map((u, k) => /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
984
|
+
/* @__PURE__ */ e(
|
|
1250
985
|
"input",
|
|
1251
986
|
{
|
|
1252
987
|
type: "checkbox",
|
|
1253
988
|
name: c,
|
|
1254
|
-
value:
|
|
1255
|
-
checked: u
|
|
1256
|
-
disabled: r ||
|
|
1257
|
-
required:
|
|
1258
|
-
onChange: (
|
|
989
|
+
value: u.value,
|
|
990
|
+
checked: s(u.value),
|
|
991
|
+
disabled: r || u.disabled,
|
|
992
|
+
required: l && k === 0,
|
|
993
|
+
onChange: (w) => m(u.value, w.target.checked),
|
|
1259
994
|
className: `h-4 w-4 cursor-pointer text-blue-600 border-gray-300 rounded focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 ${M}`
|
|
1260
995
|
},
|
|
1261
996
|
c
|
|
1262
997
|
),
|
|
1263
|
-
|
|
998
|
+
u.label && /* @__PURE__ */ e(
|
|
1264
999
|
"label",
|
|
1265
1000
|
{
|
|
1266
1001
|
htmlFor: c,
|
|
1267
1002
|
className: "ml-2 text-sm text-gray-700 dark:text-gray-200 select-none",
|
|
1268
|
-
children:
|
|
1003
|
+
children: u.label
|
|
1269
1004
|
}
|
|
1270
1005
|
)
|
|
1271
|
-
] },
|
|
1272
|
-
] }) }) : /* @__PURE__ */
|
|
1273
|
-
/* @__PURE__ */ e
|
|
1006
|
+
] }, u.value || u.label)) })
|
|
1007
|
+
] }) }) : /* @__PURE__ */ h("div", { className: `flex items-center ${N}`, children: [
|
|
1008
|
+
/* @__PURE__ */ e(
|
|
1274
1009
|
"input",
|
|
1275
1010
|
{
|
|
1276
1011
|
type: "checkbox",
|
|
1277
1012
|
name: c,
|
|
1278
|
-
checked:
|
|
1013
|
+
checked: s(),
|
|
1279
1014
|
disabled: r,
|
|
1280
|
-
required:
|
|
1281
|
-
onChange:
|
|
1015
|
+
required: l,
|
|
1016
|
+
onChange: g,
|
|
1282
1017
|
className: `h-4 w-4 text-blue-600 cursor-pointer border-gray-300 rounded focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 ${M}`
|
|
1283
1018
|
}
|
|
1284
1019
|
),
|
|
1285
|
-
d && /* @__PURE__ */ e
|
|
1020
|
+
d && /* @__PURE__ */ e(
|
|
1286
1021
|
"label",
|
|
1287
1022
|
{
|
|
1288
1023
|
htmlFor: c,
|
|
@@ -1291,184 +1026,186 @@ const sa = ({
|
|
|
1291
1026
|
}
|
|
1292
1027
|
)
|
|
1293
1028
|
] });
|
|
1294
|
-
},
|
|
1029
|
+
}, Ee = ({ field: c, formData: d, handleChange: n }) => {
|
|
1295
1030
|
const {
|
|
1296
1031
|
key: i,
|
|
1297
|
-
label:
|
|
1032
|
+
label: o,
|
|
1298
1033
|
type: r,
|
|
1299
|
-
options:
|
|
1300
|
-
placeholder:
|
|
1034
|
+
options: l,
|
|
1035
|
+
placeholder: N,
|
|
1301
1036
|
rows: M,
|
|
1302
|
-
inputClass:
|
|
1303
|
-
search:
|
|
1304
|
-
accept:
|
|
1305
|
-
text:
|
|
1306
|
-
required:
|
|
1307
|
-
minLength:
|
|
1308
|
-
dragDrop:
|
|
1309
|
-
parentClass:
|
|
1310
|
-
countriesList:
|
|
1311
|
-
defaultCountry:
|
|
1312
|
-
multiple:
|
|
1313
|
-
dropdownMaxHeight:
|
|
1314
|
-
editorKey:
|
|
1315
|
-
fontFamily:
|
|
1316
|
-
disabled: O
|
|
1037
|
+
inputClass: y,
|
|
1038
|
+
search: f,
|
|
1039
|
+
accept: s,
|
|
1040
|
+
text: g,
|
|
1041
|
+
required: m = !1,
|
|
1042
|
+
minLength: u,
|
|
1043
|
+
dragDrop: k,
|
|
1044
|
+
parentClass: w,
|
|
1045
|
+
countriesList: C,
|
|
1046
|
+
defaultCountry: D,
|
|
1047
|
+
multiple: I,
|
|
1048
|
+
dropdownMaxHeight: E,
|
|
1049
|
+
editorKey: $,
|
|
1050
|
+
fontFamily: j,
|
|
1051
|
+
disabled: O,
|
|
1052
|
+
negativeNumberAllow: v
|
|
1317
1053
|
} = c;
|
|
1318
|
-
let
|
|
1319
|
-
|
|
1320
|
-
const
|
|
1054
|
+
let L = d == null ? void 0 : d[i];
|
|
1055
|
+
L == null && (L = "");
|
|
1056
|
+
const T = N || (r === "select" ? `Select ${o}` : `Enter ${o}`), B = "w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 text-sm focus:outline-none focus:ring-1 focus:ring-blue-200 bg-white text-black dark:bg-gray-700 dark:text-white";
|
|
1321
1057
|
switch (r) {
|
|
1322
1058
|
case "select":
|
|
1323
|
-
return /* @__PURE__ */ e
|
|
1324
|
-
|
|
1059
|
+
return /* @__PURE__ */ e(
|
|
1060
|
+
Je,
|
|
1325
1061
|
{
|
|
1326
|
-
options:
|
|
1327
|
-
value:
|
|
1328
|
-
onChange: (
|
|
1329
|
-
placeholder:
|
|
1330
|
-
className:
|
|
1331
|
-
search:
|
|
1332
|
-
required:
|
|
1333
|
-
label:
|
|
1062
|
+
options: l || [],
|
|
1063
|
+
value: L,
|
|
1064
|
+
onChange: (b) => n(i, b),
|
|
1065
|
+
placeholder: T,
|
|
1066
|
+
className: y || "",
|
|
1067
|
+
search: f,
|
|
1068
|
+
required: m,
|
|
1069
|
+
label: o,
|
|
1334
1070
|
name: i,
|
|
1335
1071
|
disabled: O,
|
|
1336
|
-
parentClass:
|
|
1337
|
-
multiple:
|
|
1338
|
-
dropdownMaxHeight:
|
|
1072
|
+
parentClass: w,
|
|
1073
|
+
multiple: I,
|
|
1074
|
+
dropdownMaxHeight: E
|
|
1339
1075
|
}
|
|
1340
1076
|
);
|
|
1341
1077
|
case "checkbox":
|
|
1342
|
-
return /* @__PURE__ */ e
|
|
1343
|
-
|
|
1078
|
+
return /* @__PURE__ */ e(
|
|
1079
|
+
ra,
|
|
1344
1080
|
{
|
|
1345
1081
|
name: i,
|
|
1346
|
-
label:
|
|
1347
|
-
options:
|
|
1348
|
-
value:
|
|
1349
|
-
onChange: (
|
|
1350
|
-
required:
|
|
1351
|
-
parentClass:
|
|
1352
|
-
className:
|
|
1353
|
-
multiSelect:
|
|
1082
|
+
label: o,
|
|
1083
|
+
options: l || [],
|
|
1084
|
+
value: L,
|
|
1085
|
+
onChange: (b) => n(i, b),
|
|
1086
|
+
required: m,
|
|
1087
|
+
parentClass: w,
|
|
1088
|
+
className: y || "",
|
|
1089
|
+
multiSelect: I,
|
|
1354
1090
|
disabled: O
|
|
1355
1091
|
}
|
|
1356
1092
|
);
|
|
1357
1093
|
case "switch":
|
|
1358
|
-
return /* @__PURE__ */ e
|
|
1359
|
-
|
|
1094
|
+
return /* @__PURE__ */ e(
|
|
1095
|
+
Qe,
|
|
1360
1096
|
{
|
|
1361
|
-
value:
|
|
1362
|
-
onChange: (
|
|
1363
|
-
text:
|
|
1364
|
-
options:
|
|
1365
|
-
label:
|
|
1366
|
-
required:
|
|
1097
|
+
value: L,
|
|
1098
|
+
onChange: (b) => n(i, b),
|
|
1099
|
+
text: g,
|
|
1100
|
+
options: l || [],
|
|
1101
|
+
label: o,
|
|
1102
|
+
required: m,
|
|
1367
1103
|
name: i,
|
|
1368
1104
|
disabled: O,
|
|
1369
|
-
parentClass:
|
|
1105
|
+
parentClass: w
|
|
1370
1106
|
}
|
|
1371
1107
|
);
|
|
1372
1108
|
case "phone":
|
|
1373
|
-
return /* @__PURE__ */ e
|
|
1374
|
-
|
|
1109
|
+
return /* @__PURE__ */ e(
|
|
1110
|
+
Xe,
|
|
1375
1111
|
{
|
|
1376
|
-
value:
|
|
1377
|
-
onChange: (
|
|
1378
|
-
countriesList:
|
|
1379
|
-
defaultCountry:
|
|
1380
|
-
required:
|
|
1381
|
-
placeholder:
|
|
1382
|
-
search:
|
|
1383
|
-
label:
|
|
1112
|
+
value: L,
|
|
1113
|
+
onChange: (b) => n(i, b),
|
|
1114
|
+
countriesList: C,
|
|
1115
|
+
defaultCountry: D,
|
|
1116
|
+
required: m,
|
|
1117
|
+
placeholder: T,
|
|
1118
|
+
search: f,
|
|
1119
|
+
label: o,
|
|
1384
1120
|
name: i,
|
|
1385
1121
|
disabled: O,
|
|
1386
|
-
parentClass:
|
|
1122
|
+
parentClass: w
|
|
1387
1123
|
}
|
|
1388
1124
|
);
|
|
1389
1125
|
case "textarea":
|
|
1390
|
-
return /* @__PURE__ */ e
|
|
1391
|
-
|
|
1126
|
+
return /* @__PURE__ */ e(
|
|
1127
|
+
Fe,
|
|
1392
1128
|
{
|
|
1393
|
-
value:
|
|
1394
|
-
onChange: (
|
|
1395
|
-
placeholder:
|
|
1129
|
+
value: L,
|
|
1130
|
+
onChange: (b) => n(i, b.target.value),
|
|
1131
|
+
placeholder: T,
|
|
1396
1132
|
rows: M || 3,
|
|
1397
|
-
className: `${
|
|
1398
|
-
required:
|
|
1133
|
+
className: `${B} ${y || ""}`,
|
|
1134
|
+
required: m,
|
|
1399
1135
|
name: i,
|
|
1400
|
-
label:
|
|
1136
|
+
label: o,
|
|
1401
1137
|
disabled: O,
|
|
1402
|
-
parentClass:
|
|
1138
|
+
parentClass: w
|
|
1403
1139
|
}
|
|
1404
1140
|
);
|
|
1405
1141
|
case "image":
|
|
1406
|
-
return /* @__PURE__ */ e
|
|
1407
|
-
|
|
1142
|
+
return /* @__PURE__ */ e(
|
|
1143
|
+
ea,
|
|
1408
1144
|
{
|
|
1409
|
-
value:
|
|
1410
|
-
onChange: (
|
|
1411
|
-
required:
|
|
1412
|
-
accept:
|
|
1145
|
+
value: L,
|
|
1146
|
+
onChange: (b) => n(i, b),
|
|
1147
|
+
required: m,
|
|
1148
|
+
accept: s || "image/*",
|
|
1413
1149
|
id: `file-${i}`,
|
|
1414
|
-
dragDrop:
|
|
1415
|
-
label:
|
|
1150
|
+
dragDrop: k,
|
|
1151
|
+
label: o,
|
|
1416
1152
|
name: i,
|
|
1417
|
-
parentClass:
|
|
1153
|
+
parentClass: w
|
|
1418
1154
|
}
|
|
1419
1155
|
);
|
|
1420
1156
|
case "tinyEditor":
|
|
1421
|
-
return /* @__PURE__ */ e
|
|
1422
|
-
|
|
1157
|
+
return /* @__PURE__ */ e(
|
|
1158
|
+
aa,
|
|
1423
1159
|
{
|
|
1424
|
-
value:
|
|
1425
|
-
onChange: (
|
|
1426
|
-
required:
|
|
1427
|
-
placeholder:
|
|
1428
|
-
label:
|
|
1429
|
-
parentClass:
|
|
1430
|
-
fontFamily:
|
|
1431
|
-
editorKey:
|
|
1160
|
+
value: L,
|
|
1161
|
+
onChange: (b) => n(i, b),
|
|
1162
|
+
required: m,
|
|
1163
|
+
placeholder: T,
|
|
1164
|
+
label: o,
|
|
1165
|
+
parentClass: w,
|
|
1166
|
+
fontFamily: j,
|
|
1167
|
+
editorKey: $,
|
|
1432
1168
|
disabled: O
|
|
1433
1169
|
},
|
|
1434
1170
|
`editor-${i}`
|
|
1435
1171
|
);
|
|
1436
1172
|
default:
|
|
1437
|
-
return /* @__PURE__ */ e
|
|
1173
|
+
return /* @__PURE__ */ e(
|
|
1438
1174
|
Be,
|
|
1439
1175
|
{
|
|
1440
1176
|
type: r || "text",
|
|
1441
|
-
value:
|
|
1442
|
-
onChange: (
|
|
1443
|
-
placeholder:
|
|
1444
|
-
className: `${
|
|
1445
|
-
required:
|
|
1177
|
+
value: L,
|
|
1178
|
+
onChange: (b) => n(i, b.target.value),
|
|
1179
|
+
placeholder: T,
|
|
1180
|
+
className: `${B} ${y || ""}`,
|
|
1181
|
+
required: m,
|
|
1446
1182
|
name: i,
|
|
1447
|
-
minLength:
|
|
1448
|
-
label:
|
|
1449
|
-
|
|
1183
|
+
minLength: u,
|
|
1184
|
+
label: o,
|
|
1185
|
+
negativeNumberAllow: v,
|
|
1186
|
+
parentClass: w,
|
|
1450
1187
|
disabled: O
|
|
1451
1188
|
}
|
|
1452
1189
|
);
|
|
1453
1190
|
}
|
|
1454
|
-
},
|
|
1455
|
-
var
|
|
1456
|
-
const [
|
|
1457
|
-
r((
|
|
1458
|
-
},
|
|
1459
|
-
i == null || i(
|
|
1191
|
+
}, ta = ({ isOpen: c, onClose: d, config: n, onApply: i }) => {
|
|
1192
|
+
var y;
|
|
1193
|
+
const [o, r] = S({}), l = (f, s) => {
|
|
1194
|
+
r((g) => ({ ...g, [f]: s }));
|
|
1195
|
+
}, N = () => {
|
|
1196
|
+
i == null || i(o), d();
|
|
1460
1197
|
}, M = () => {
|
|
1461
1198
|
r({}), i == null || i({}), d();
|
|
1462
1199
|
};
|
|
1463
|
-
return /* @__PURE__ */
|
|
1464
|
-
/* @__PURE__ */ e
|
|
1200
|
+
return /* @__PURE__ */ h(G, { children: [
|
|
1201
|
+
/* @__PURE__ */ e(
|
|
1465
1202
|
"div",
|
|
1466
1203
|
{
|
|
1467
1204
|
className: `fixed inset-0 bg-black/50 z-40 transition-opacity duration-300 ${c ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
|
|
1468
1205
|
onClick: d
|
|
1469
1206
|
}
|
|
1470
1207
|
),
|
|
1471
|
-
/* @__PURE__ */
|
|
1208
|
+
/* @__PURE__ */ h(
|
|
1472
1209
|
"div",
|
|
1473
1210
|
{
|
|
1474
1211
|
className: `fixed top-0 right-0 h-full w-[28rem] bg-white dark:bg-gray-900 shadow-2xl z-50 flex flex-col border-l border-gray-200 dark:border-gray-700
|
|
@@ -1476,39 +1213,39 @@ const sa = ({
|
|
|
1476
1213
|
${c ? "translate-x-0" : "translate-x-full"}
|
|
1477
1214
|
`,
|
|
1478
1215
|
children: [
|
|
1479
|
-
/* @__PURE__ */
|
|
1480
|
-
/* @__PURE__ */ e
|
|
1481
|
-
/* @__PURE__ */ e
|
|
1216
|
+
/* @__PURE__ */ h("div", { className: "flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: [
|
|
1217
|
+
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: "Filters" }),
|
|
1218
|
+
/* @__PURE__ */ e(
|
|
1482
1219
|
"button",
|
|
1483
1220
|
{
|
|
1484
1221
|
onClick: d,
|
|
1485
1222
|
className: "p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition",
|
|
1486
|
-
children: /* @__PURE__ */ e
|
|
1223
|
+
children: /* @__PURE__ */ e(fe, { className: "w-5 h-5 text-gray-500 dark:text-gray-400" })
|
|
1487
1224
|
}
|
|
1488
1225
|
)
|
|
1489
1226
|
] }),
|
|
1490
|
-
/* @__PURE__ */ e
|
|
1491
|
-
|
|
1227
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-4 py-3", children: n != null && n.component ? /* @__PURE__ */ e(n.component, { filters: o, onFilterChange: l }) : /* @__PURE__ */ e("div", { className: "space-y-4", children: (y = n == null ? void 0 : n.fields) == null ? void 0 : y.map((f) => /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
|
|
1228
|
+
Ee,
|
|
1492
1229
|
{
|
|
1493
|
-
field:
|
|
1494
|
-
formData:
|
|
1495
|
-
handleChange:
|
|
1230
|
+
field: f,
|
|
1231
|
+
formData: o,
|
|
1232
|
+
handleChange: l
|
|
1496
1233
|
},
|
|
1497
|
-
|
|
1234
|
+
f.key
|
|
1498
1235
|
) })) }) }),
|
|
1499
|
-
/* @__PURE__ */
|
|
1500
|
-
/* @__PURE__ */ e
|
|
1501
|
-
|
|
1236
|
+
/* @__PURE__ */ h("div", { className: "flex gap-2 px-4 py-3 border-t border-gray-200 dark:border-gray-700", children: [
|
|
1237
|
+
/* @__PURE__ */ e(
|
|
1238
|
+
ae,
|
|
1502
1239
|
{
|
|
1503
|
-
onClick:
|
|
1240
|
+
onClick: N,
|
|
1504
1241
|
variant: "contained",
|
|
1505
1242
|
color: "primary",
|
|
1506
1243
|
fullWidth: !0,
|
|
1507
1244
|
children: "Apply Filters"
|
|
1508
1245
|
}
|
|
1509
1246
|
),
|
|
1510
|
-
/* @__PURE__ */ e
|
|
1511
|
-
|
|
1247
|
+
/* @__PURE__ */ e(
|
|
1248
|
+
ae,
|
|
1512
1249
|
{
|
|
1513
1250
|
onClick: M,
|
|
1514
1251
|
variant: "contained",
|
|
@@ -1521,7 +1258,7 @@ const sa = ({
|
|
|
1521
1258
|
}
|
|
1522
1259
|
)
|
|
1523
1260
|
] });
|
|
1524
|
-
},
|
|
1261
|
+
}, Le = {
|
|
1525
1262
|
blue: {
|
|
1526
1263
|
bg: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",
|
|
1527
1264
|
border: "border border-blue-300 text-blue-700 dark:border-blue-700 dark:text-blue-300"
|
|
@@ -1550,7 +1287,7 @@ const sa = ({
|
|
|
1550
1287
|
bg: "bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300",
|
|
1551
1288
|
border: "border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-300"
|
|
1552
1289
|
}
|
|
1553
|
-
},
|
|
1290
|
+
}, Te = {
|
|
1554
1291
|
contained: "bg",
|
|
1555
1292
|
outline: "border !bg-transparent",
|
|
1556
1293
|
soft: "bg opacity-90"
|
|
@@ -1558,64 +1295,64 @@ const sa = ({
|
|
|
1558
1295
|
label: c,
|
|
1559
1296
|
variant: d = "contained",
|
|
1560
1297
|
// contained | outline | soft
|
|
1561
|
-
color:
|
|
1298
|
+
color: n = "green",
|
|
1562
1299
|
className: i = ""
|
|
1563
1300
|
}) => {
|
|
1564
|
-
const
|
|
1565
|
-
return /* @__PURE__ */ e
|
|
1301
|
+
const o = Le[n] || Le.green, r = Te[d] || Te.contained, l = d === "outline" ? o.border : o.bg;
|
|
1302
|
+
return /* @__PURE__ */ e(
|
|
1566
1303
|
"span",
|
|
1567
1304
|
{
|
|
1568
1305
|
className: `inline-flex justify-center items-center rounded-sm text-xs font-semibold px-3 py-1 min-w-[78px]
|
|
1569
|
-
${
|
|
1306
|
+
${l}
|
|
1570
1307
|
${r}
|
|
1571
1308
|
${i}`,
|
|
1572
1309
|
children: c
|
|
1573
1310
|
}
|
|
1574
1311
|
);
|
|
1575
|
-
},
|
|
1576
|
-
/* @__PURE__ */ e
|
|
1577
|
-
/* @__PURE__ */ e
|
|
1578
|
-
/* @__PURE__ */ e
|
|
1579
|
-
/* @__PURE__ */ e
|
|
1312
|
+
}, la = ({ rows: c = 5, columns: d = 5 }) => /* @__PURE__ */ h(G, { children: [
|
|
1313
|
+
/* @__PURE__ */ e("div", { className: "w-full mb-6 inline-flex justify-end items-center", children: /* @__PURE__ */ e("div", { className: "h-8 w-80 bg-gray-300 dark:bg-gray-700 rounded animate-pulse" }) }),
|
|
1314
|
+
/* @__PURE__ */ e("div", { className: "overflow-hidden rounded-md border border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ h("table", { className: "w-full border-collapse", children: [
|
|
1315
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "bg-gray-50 dark:bg-gray-900", children: Array.from({ length: d }).map((n, i) => /* @__PURE__ */ e("th", { className: "px-4 py-3", children: /* @__PURE__ */ e("div", { className: "h-6 w-24 bg-gray-300 dark:bg-gray-700 rounded animate-pulse inline-flex justify-center items-center" }) }, i)) }) }),
|
|
1316
|
+
/* @__PURE__ */ e("tbody", { children: Array.from({ length: c }).map((n, i) => /* @__PURE__ */ e(
|
|
1580
1317
|
"tr",
|
|
1581
1318
|
{
|
|
1582
1319
|
className: "border-t border-gray-200 dark:border-gray-800",
|
|
1583
|
-
children: Array.from({ length: d }).map((
|
|
1320
|
+
children: Array.from({ length: d }).map((o, r) => /* @__PURE__ */ e("td", { className: "px-4 py-6", children: /* @__PURE__ */ e("div", { className: "h-6 w-full bg-gray-300 dark:bg-gray-700 rounded animate-pulse" }) }, r))
|
|
1584
1321
|
},
|
|
1585
1322
|
i
|
|
1586
1323
|
)) })
|
|
1587
1324
|
] }) })
|
|
1588
|
-
] }),
|
|
1589
|
-
const
|
|
1590
|
-
return
|
|
1591
|
-
const r = (
|
|
1592
|
-
|
|
1325
|
+
] }), Ke = ({ src: c, alt: d = "preview", isOpen: n, setIsOpen: i }) => {
|
|
1326
|
+
const o = () => i(!1);
|
|
1327
|
+
return z(() => {
|
|
1328
|
+
const r = (l) => {
|
|
1329
|
+
l.key === "Escape" && o();
|
|
1593
1330
|
};
|
|
1594
|
-
return
|
|
1331
|
+
return n && (document.body.style.overflow = "hidden", document.addEventListener("keydown", r)), () => {
|
|
1595
1332
|
document.body.style.overflow = "", document.removeEventListener("keydown", r);
|
|
1596
1333
|
};
|
|
1597
|
-
}, [
|
|
1334
|
+
}, [n]), /* @__PURE__ */ e(G, { children: /* @__PURE__ */ h(
|
|
1598
1335
|
"div",
|
|
1599
1336
|
{
|
|
1600
1337
|
className: `fixed inset-0 z-50 flex items-center justify-center bg-black/70 dark:bg-black/80 \r
|
|
1601
1338
|
backdrop-blur-sm animate-in fade-in duration-200`,
|
|
1602
|
-
onClick:
|
|
1339
|
+
onClick: o,
|
|
1603
1340
|
children: [
|
|
1604
|
-
/* @__PURE__ */ e
|
|
1341
|
+
/* @__PURE__ */ e(
|
|
1605
1342
|
"button",
|
|
1606
1343
|
{
|
|
1607
|
-
onClick:
|
|
1344
|
+
onClick: o,
|
|
1608
1345
|
className: `absolute top-4 right-4 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200\r
|
|
1609
1346
|
hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full p-2 shadow-lg transition`,
|
|
1610
|
-
children: /* @__PURE__ */ e
|
|
1347
|
+
children: /* @__PURE__ */ e(fe, { size: 20 })
|
|
1611
1348
|
}
|
|
1612
1349
|
),
|
|
1613
|
-
/* @__PURE__ */ e
|
|
1350
|
+
/* @__PURE__ */ e(
|
|
1614
1351
|
"div",
|
|
1615
1352
|
{
|
|
1616
1353
|
className: "max-w-5xl w-full px-4 transform transition-all duration-200 scale-95 animate-in zoom-in-95",
|
|
1617
1354
|
onClick: (r) => r.stopPropagation(),
|
|
1618
|
-
children: /* @__PURE__ */ e
|
|
1355
|
+
children: /* @__PURE__ */ e(
|
|
1619
1356
|
"img",
|
|
1620
1357
|
{
|
|
1621
1358
|
src: c,
|
|
@@ -1628,12 +1365,12 @@ const sa = ({
|
|
|
1628
1365
|
]
|
|
1629
1366
|
}
|
|
1630
1367
|
) });
|
|
1631
|
-
},
|
|
1368
|
+
}, na = ({ config: c }) => {
|
|
1632
1369
|
const {
|
|
1633
1370
|
data: d = [],
|
|
1634
|
-
table_head:
|
|
1371
|
+
table_head: n = [],
|
|
1635
1372
|
loading: i = !1,
|
|
1636
|
-
search:
|
|
1373
|
+
search: o = {
|
|
1637
1374
|
enabled: !1,
|
|
1638
1375
|
placeholder: "Search...",
|
|
1639
1376
|
useServerSideSearch: !1
|
|
@@ -1642,285 +1379,287 @@ const sa = ({
|
|
|
1642
1379
|
enabled: !1,
|
|
1643
1380
|
useServerSideFilters: !1
|
|
1644
1381
|
},
|
|
1645
|
-
pagination:
|
|
1382
|
+
pagination: l = {
|
|
1646
1383
|
enabled: !1,
|
|
1647
1384
|
rows_per_page: 10,
|
|
1648
1385
|
useServerSidePagination: !1
|
|
1649
1386
|
},
|
|
1650
|
-
emptyMessage:
|
|
1387
|
+
emptyMessage: N = "No data available",
|
|
1651
1388
|
onMenuAction: M,
|
|
1652
|
-
setServerSidePaginationData:
|
|
1389
|
+
setServerSidePaginationData: y = () => {
|
|
1653
1390
|
},
|
|
1654
|
-
onFilterApply:
|
|
1655
|
-
filterConfig:
|
|
1656
|
-
} = c, [
|
|
1657
|
-
if (
|
|
1658
|
-
const
|
|
1659
|
-
return
|
|
1660
|
-
}, [
|
|
1661
|
-
|
|
1391
|
+
onFilterApply: f,
|
|
1392
|
+
filterConfig: s = null
|
|
1393
|
+
} = c, [g, m] = S(""), [u, k] = S(null), [w, C] = S([]), [D, I] = S({}), [E, $] = S(!1), [j, O] = S(null), [v, L] = S(!1), T = Se(() => !o.enabled || !g.trim() || o.useServerSideSearch ? d : Ze(d, g, o.searchKeys || []), [d, g, o]), [B, b] = S(1), [A, H] = S((l == null ? void 0 : l.rows_per_page) || 50), [V, J] = S(T.length || 0), re = l != null && l.useServerSidePagination ? l.total_pages : Math.ceil(T.length / A), ie = Se(() => {
|
|
1394
|
+
if (l.useServerSidePagination) return T;
|
|
1395
|
+
const t = (B - 1) * A;
|
|
1396
|
+
return T.slice(t, t + A);
|
|
1397
|
+
}, [T, B, A]), te = X(null), de = X({}), le = X(null), ee = (t) => {
|
|
1398
|
+
m(t), b(1), o.useServerSideSearch && (le.current && clearTimeout(le.current), le.current = setTimeout(async () => {
|
|
1662
1399
|
try {
|
|
1663
|
-
await
|
|
1400
|
+
await y((p) => ({
|
|
1664
1401
|
...p,
|
|
1665
|
-
search:
|
|
1402
|
+
search: t,
|
|
1666
1403
|
current_page: 1
|
|
1667
1404
|
}));
|
|
1668
1405
|
} catch (p) {
|
|
1669
1406
|
console.error("Search error:", p);
|
|
1670
1407
|
}
|
|
1671
1408
|
}, 800));
|
|
1672
|
-
},
|
|
1673
|
-
|
|
1674
|
-
},
|
|
1675
|
-
p.stopPropagation(),
|
|
1676
|
-
const
|
|
1677
|
-
|
|
1678
|
-
const K =
|
|
1679
|
-
|
|
1680
|
-
top: Math.max(8, Math.min(
|
|
1681
|
-
left: Math.max(8, Math.min(
|
|
1682
|
-
}),
|
|
1683
|
-
},
|
|
1684
|
-
O(
|
|
1685
|
-
},
|
|
1409
|
+
}, ye = (t, p, P) => {
|
|
1410
|
+
P.stopPropagation(), k(null), M == null || M(t.type, p);
|
|
1411
|
+
}, xe = (t, p, P) => {
|
|
1412
|
+
p.stopPropagation(), C(P);
|
|
1413
|
+
const _ = p.currentTarget;
|
|
1414
|
+
de.current[t] = _;
|
|
1415
|
+
const K = _.getBoundingClientRect(), q = 192, U = P.length * 40, Q = window.innerWidth, oe = window.innerHeight, R = Q - K.right < q ? K.left - q + K.width : K.left, Z = oe - K.bottom < U && K.top > U ? K.top - U - 2 : K.bottom + 2;
|
|
1416
|
+
I({
|
|
1417
|
+
top: Math.max(8, Math.min(Z, oe - U - 8)),
|
|
1418
|
+
left: Math.max(8, Math.min(R, Q - q - 8))
|
|
1419
|
+
}), k(u === t ? null : t);
|
|
1420
|
+
}, ve = (t) => (B - 1) * A + t + 1, se = (t) => {
|
|
1421
|
+
O(t), L(!0);
|
|
1422
|
+
}, ne = (t, p, P, _ = null) => /* @__PURE__ */ e(G, { children: t ? /* @__PURE__ */ e(
|
|
1686
1423
|
"img",
|
|
1687
1424
|
{
|
|
1688
|
-
src:
|
|
1425
|
+
src: t,
|
|
1689
1426
|
alt: p || "Avatar",
|
|
1690
1427
|
onClick: (K) => {
|
|
1691
|
-
K.stopPropagation(), K.preventDefault(),
|
|
1428
|
+
K.stopPropagation(), K.preventDefault(), se({ src: t, alt: p });
|
|
1692
1429
|
},
|
|
1693
|
-
className: `w-10 h-10 cursor-pointer rounded-full object-cover border border-gray-200 dark:border-gray-700 ${
|
|
1430
|
+
className: `w-10 h-10 cursor-pointer rounded-full object-cover border border-gray-200 dark:border-gray-700 ${P || ""}`
|
|
1694
1431
|
}
|
|
1695
|
-
) : /* @__PURE__ */ e
|
|
1432
|
+
) : /* @__PURE__ */ e(G, { children: _ || /* @__PURE__ */ e(
|
|
1696
1433
|
"div",
|
|
1697
1434
|
{
|
|
1698
|
-
className: `w-10 h-10 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600 ${
|
|
1699
|
-
children: /* @__PURE__ */ e
|
|
1435
|
+
className: `w-10 h-10 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600 ${P || ""}`,
|
|
1436
|
+
children: /* @__PURE__ */ e(Ie, { className: "w-6 h-6 text-gray-400 dark:text-gray-400" })
|
|
1700
1437
|
}
|
|
1701
|
-
) }) }),
|
|
1702
|
-
p.imageKey ?
|
|
1703
|
-
/* @__PURE__ */
|
|
1704
|
-
/* @__PURE__ */ e
|
|
1705
|
-
/* @__PURE__ */ e
|
|
1438
|
+
) }) }), ce = (t, p) => /* @__PURE__ */ h("div", { className: `flex items-center space-x-4 ${p.className || ""}`, children: [
|
|
1439
|
+
p.imageKey ? ne(t[p.imageKey], t[p.titleKey], "group-avatar") : "",
|
|
1440
|
+
/* @__PURE__ */ h("div", { children: [
|
|
1441
|
+
/* @__PURE__ */ e("p", { className: "font-medium text-gray-900 dark:text-white group-title", children: t[p.titleKey] || "" }),
|
|
1442
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-gray-500 dark:text-gray-400 group-sub-title", children: t[p.subtitleKey] || "" })
|
|
1706
1443
|
] })
|
|
1707
|
-
] }),
|
|
1708
|
-
var
|
|
1709
|
-
let
|
|
1710
|
-
const
|
|
1444
|
+
] }), he = (t, p) => {
|
|
1445
|
+
var q;
|
|
1446
|
+
let P = String(t);
|
|
1447
|
+
const _ = p.variant || "contained";
|
|
1711
1448
|
let K = p.defaultColor;
|
|
1712
|
-
if (((
|
|
1713
|
-
let
|
|
1714
|
-
|
|
1449
|
+
if (((q = p == null ? void 0 : p.chipOptions) == null ? void 0 : q.length) > 0) {
|
|
1450
|
+
let U = p == null ? void 0 : p.chipOptions.find((Q) => Q.value == t);
|
|
1451
|
+
U && (P = U.label, K = U.color);
|
|
1715
1452
|
}
|
|
1716
|
-
return /* @__PURE__ */ e
|
|
1453
|
+
return /* @__PURE__ */ e(
|
|
1717
1454
|
Ge,
|
|
1718
1455
|
{
|
|
1719
|
-
label:
|
|
1720
|
-
variant:
|
|
1456
|
+
label: P,
|
|
1457
|
+
variant: _,
|
|
1721
1458
|
color: K,
|
|
1722
1459
|
className: p.className || ""
|
|
1723
1460
|
}
|
|
1724
1461
|
);
|
|
1725
|
-
}, ue = (
|
|
1726
|
-
const
|
|
1727
|
-
return
|
|
1462
|
+
}, ue = (t, p, P) => {
|
|
1463
|
+
const _ = p[t.key];
|
|
1464
|
+
return t.type === "menu_actions" ? /* @__PURE__ */ e("div", { className: `text-center ${t.className || ""}`, children: /* @__PURE__ */ e(
|
|
1728
1465
|
"button",
|
|
1729
1466
|
{
|
|
1730
|
-
ref: (K) =>
|
|
1731
|
-
onClick: (K) =>
|
|
1467
|
+
ref: (K) => de.current[p.id || p._id] = K,
|
|
1468
|
+
onClick: (K) => xe(p.id || p._id, K, t.menuList),
|
|
1732
1469
|
className: "p-2 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full transition text-gray-700 dark:text-gray-300",
|
|
1733
|
-
children: /* @__PURE__ */ e
|
|
1470
|
+
children: /* @__PURE__ */ e(Ye, { className: "h-4 w-4" })
|
|
1734
1471
|
}
|
|
1735
|
-
) }) :
|
|
1736
|
-
},
|
|
1737
|
-
if (
|
|
1472
|
+
) }) : t.type === "index" ? /* @__PURE__ */ e("span", { className: t.className || "", children: ve(P) }) : t.type === "group" ? ce(p, t) : t.type === "chip" ? /* @__PURE__ */ e(G, { children: he(_, t) }) : t.type === "date" ? /* @__PURE__ */ e("span", { className: t.className || "", children: Oe(_, t.format || "DD MMM YYYY") }) : t.type === "avatar" ? /* @__PURE__ */ e(G, { children: ne(_, t.alt, t.className, t.fallback_icon) }) : /* @__PURE__ */ e("span", { className: t.className || "", children: _ || "N/A" });
|
|
1473
|
+
}, be = (t, p) => {
|
|
1474
|
+
if (t.onClickDetails)
|
|
1738
1475
|
return M == null ? void 0 : M("view", p);
|
|
1739
|
-
if (typeof
|
|
1740
|
-
return
|
|
1741
|
-
},
|
|
1742
|
-
return
|
|
1743
|
-
const
|
|
1744
|
-
|
|
1476
|
+
if (typeof t.handleClick == "function")
|
|
1477
|
+
return t.handleClick(p);
|
|
1478
|
+
}, pe = (t) => t.onClickDetails || typeof t.handleClick == "function";
|
|
1479
|
+
return z(() => {
|
|
1480
|
+
const t = () => {
|
|
1481
|
+
u && k(null);
|
|
1745
1482
|
};
|
|
1746
|
-
return window.addEventListener("scroll",
|
|
1747
|
-
window.removeEventListener("scroll",
|
|
1483
|
+
return window.addEventListener("scroll", t, !0), () => {
|
|
1484
|
+
window.removeEventListener("scroll", t, !0);
|
|
1748
1485
|
};
|
|
1749
|
-
}, [
|
|
1750
|
-
const
|
|
1751
|
-
|
|
1486
|
+
}, [u]), z(() => {
|
|
1487
|
+
const t = (p) => {
|
|
1488
|
+
te.current && !te.current.contains(p.target) && k(null);
|
|
1752
1489
|
};
|
|
1753
|
-
return document.addEventListener("click",
|
|
1754
|
-
}, []),
|
|
1755
|
-
|
|
1490
|
+
return document.addEventListener("click", t), () => document.removeEventListener("click", t);
|
|
1491
|
+
}, []), z(() => {
|
|
1492
|
+
l != null && l.rows_per_page && (l != null && l.useServerSidePagination) && H((l == null ? void 0 : l.rows_per_page) || 50), l.current_page && b(l.current_page);
|
|
1756
1493
|
}, [
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
]),
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
),
|
|
1494
|
+
l.rows_per_page,
|
|
1495
|
+
l == null ? void 0 : l.useServerSidePagination,
|
|
1496
|
+
l.current_page
|
|
1497
|
+
]), z(() => {
|
|
1498
|
+
J(
|
|
1499
|
+
l != null && l.useServerSidePagination ? l.total_records : T.length
|
|
1500
|
+
), T.length <= A * (B - 1) && !(l != null && l.useServerSidePagination) && b((t) => t - 1 || 1);
|
|
1764
1501
|
}, [
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
]), i ? /* @__PURE__ */ e
|
|
1769
|
-
/* @__PURE__ */
|
|
1770
|
-
|
|
1771
|
-
/* @__PURE__ */ e
|
|
1772
|
-
/* @__PURE__ */ e
|
|
1502
|
+
T.length,
|
|
1503
|
+
l.total_records,
|
|
1504
|
+
l == null ? void 0 : l.useServerSidePagination
|
|
1505
|
+
]), i ? /* @__PURE__ */ e(la, { rows: 6, columns: 6 }) : /* @__PURE__ */ h(G, { children: [
|
|
1506
|
+
/* @__PURE__ */ h("div", { className: "flex justify-end items-center mb-4 gap-2", children: [
|
|
1507
|
+
o.enabled && /* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ h("div", { className: "relative min-w-[300px]", children: [
|
|
1508
|
+
/* @__PURE__ */ e(Ce, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 dark:text-gray-300" }),
|
|
1509
|
+
/* @__PURE__ */ e(
|
|
1773
1510
|
"input",
|
|
1774
1511
|
{
|
|
1775
1512
|
type: "text",
|
|
1776
|
-
placeholder:
|
|
1777
|
-
value:
|
|
1778
|
-
onChange: (
|
|
1513
|
+
placeholder: o.placeholder || "Search...",
|
|
1514
|
+
value: g,
|
|
1515
|
+
onChange: (t) => ee(t.target.value),
|
|
1779
1516
|
className: "w-full h-[36px] pl-9 pr-4 py-3 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-300 dark:ring-blue-200 disabled:opacity-50"
|
|
1780
1517
|
}
|
|
1781
1518
|
)
|
|
1782
1519
|
] }) }),
|
|
1783
|
-
|
|
1784
|
-
/* @__PURE__ */ e
|
|
1520
|
+
s && r.enabled && /* @__PURE__ */ h(ae, { onClick: () => $(!0), variant: "contained", children: [
|
|
1521
|
+
/* @__PURE__ */ e(je, { className: "w-4 h-4 mr-2" }),
|
|
1785
1522
|
"Filters"
|
|
1786
1523
|
] })
|
|
1787
1524
|
] }),
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
/* @__PURE__ */ e
|
|
1790
|
-
/* @__PURE__ */ e
|
|
1525
|
+
/* @__PURE__ */ h("div", { className: "bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden border border-gray-200 dark:border-gray-700", children: [
|
|
1526
|
+
/* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ h("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [
|
|
1527
|
+
/* @__PURE__ */ e("thead", { className: "bg-gray-50 dark:bg-gray-700/60", children: /* @__PURE__ */ e("tr", { children: n.map((t) => /* @__PURE__ */ e(
|
|
1791
1528
|
"th",
|
|
1792
1529
|
{
|
|
1793
1530
|
className: "px-6 py-4 text-left text-xs font-medium text-black dark:text-white uppercase tracking-wider min-w-max max-w-[180px] truncate",
|
|
1794
|
-
children:
|
|
1531
|
+
children: t.title
|
|
1795
1532
|
},
|
|
1796
|
-
|
|
1533
|
+
t.key
|
|
1797
1534
|
)) }) }),
|
|
1798
|
-
/* @__PURE__ */ e
|
|
1535
|
+
/* @__PURE__ */ e("tbody", { className: "bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700", children: ie.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
1799
1536
|
"td",
|
|
1800
1537
|
{
|
|
1801
|
-
colSpan:
|
|
1538
|
+
colSpan: n.length,
|
|
1802
1539
|
className: "text-center py-10 text-gray-500 dark:text-gray-400",
|
|
1803
|
-
children:
|
|
1540
|
+
children: N
|
|
1804
1541
|
}
|
|
1805
|
-
) }) :
|
|
1542
|
+
) }) : ie.map((t, p) => /* @__PURE__ */ e(
|
|
1806
1543
|
"tr",
|
|
1807
1544
|
{
|
|
1808
1545
|
className: "hover:bg-gray-50 dark:hover:bg-blue-800/10 transition",
|
|
1809
|
-
children:
|
|
1546
|
+
children: n.map((P) => /* @__PURE__ */ e(
|
|
1810
1547
|
"td",
|
|
1811
1548
|
{
|
|
1812
|
-
className: `px-6 py-4 text-sm text-gray-900 dark:text-gray-100 min-w-max max-w-[300px] truncate ${
|
|
1813
|
-
title: String(
|
|
1814
|
-
onClick: () =>
|
|
1815
|
-
children:
|
|
1549
|
+
className: `px-6 py-4 text-sm text-gray-900 dark:text-gray-100 min-w-max max-w-[300px] truncate ${pe(P) ? "cursor-pointer" : ""}`,
|
|
1550
|
+
title: String(t[P.key] ?? ""),
|
|
1551
|
+
onClick: () => be(P, t),
|
|
1552
|
+
children: P.render ? P.render(t, p) : ue(P, t, p)
|
|
1816
1553
|
},
|
|
1817
|
-
|
|
1554
|
+
P.key
|
|
1818
1555
|
))
|
|
1819
1556
|
},
|
|
1820
|
-
|
|
1557
|
+
t.id || t._id || p
|
|
1821
1558
|
)) })
|
|
1822
1559
|
] }) }),
|
|
1823
|
-
(
|
|
1824
|
-
/* @__PURE__ */
|
|
1560
|
+
(l == null ? void 0 : l.enabled) && T.length > 0 && /* @__PURE__ */ h("div", { className: " bg-gray-50 dark:bg-gray-700/60 px-6 py-3 flex flex-wrap items-center justify-between border-t border-gray-200 dark:border-gray-600 gap-3", children: [
|
|
1561
|
+
/* @__PURE__ */ h("div", { className: "text-sm text-gray-700 dark:text-gray-300", children: [
|
|
1825
1562
|
"Showing ",
|
|
1826
|
-
(
|
|
1563
|
+
(B - 1) * A + 1,
|
|
1827
1564
|
" to",
|
|
1828
1565
|
" ",
|
|
1829
|
-
Math.min(
|
|
1566
|
+
Math.min(B * A, V),
|
|
1830
1567
|
" of ",
|
|
1831
1568
|
V,
|
|
1832
1569
|
" ",
|
|
1833
1570
|
"results"
|
|
1834
1571
|
] }),
|
|
1835
|
-
/* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
/* @__PURE__ */ e
|
|
1838
|
-
/* @__PURE__ */ e
|
|
1572
|
+
/* @__PURE__ */ h("div", { className: "flex items-center gap-4", children: [
|
|
1573
|
+
/* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1574
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-gray-700 dark:text-gray-300", children: "Rows per page:" }),
|
|
1575
|
+
/* @__PURE__ */ e(
|
|
1839
1576
|
"select",
|
|
1840
1577
|
{
|
|
1841
1578
|
value: A,
|
|
1842
|
-
onChange: (
|
|
1843
|
-
const p = Number(
|
|
1844
|
-
|
|
1845
|
-
...
|
|
1579
|
+
onChange: (t) => {
|
|
1580
|
+
const p = Number(t.target.value);
|
|
1581
|
+
H(p), b(1), l.useServerSidePagination && y((P) => ({
|
|
1582
|
+
...P,
|
|
1846
1583
|
current_page: 1,
|
|
1847
1584
|
rows_per_page: p
|
|
1848
1585
|
}));
|
|
1849
1586
|
},
|
|
1850
1587
|
className: "border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-sm rounded-md px-2 py-1 focus:outline-none focus:ring-1 focus:ring-blue-500",
|
|
1851
|
-
children: [2, 10, 25, 50, 100].map((
|
|
1588
|
+
children: [2, 10, 25, 50, 100].map((t) => /* @__PURE__ */ e("option", { value: t, children: t }, t))
|
|
1852
1589
|
}
|
|
1853
1590
|
)
|
|
1854
1591
|
] }),
|
|
1855
|
-
/* @__PURE__ */
|
|
1856
|
-
/* @__PURE__ */ e
|
|
1592
|
+
/* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1593
|
+
/* @__PURE__ */ e(
|
|
1857
1594
|
"button",
|
|
1858
1595
|
{
|
|
1859
1596
|
onClick: () => {
|
|
1860
|
-
if (
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1597
|
+
if (B > 1) {
|
|
1598
|
+
const t = B - 1;
|
|
1599
|
+
b(t), l.useServerSidePagination && y((p) => ({
|
|
1863
1600
|
...p,
|
|
1864
|
-
current_page:
|
|
1601
|
+
current_page: t
|
|
1865
1602
|
}));
|
|
1866
1603
|
}
|
|
1867
1604
|
},
|
|
1868
|
-
disabled:
|
|
1605
|
+
disabled: B === 1,
|
|
1869
1606
|
className: "p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition text-gray-500 dark:text-gray-300 disabled:opacity-50",
|
|
1870
|
-
children: /* @__PURE__ */ e
|
|
1607
|
+
children: /* @__PURE__ */ e(He, { className: "h-4 w-4" })
|
|
1871
1608
|
}
|
|
1872
1609
|
),
|
|
1873
|
-
/* @__PURE__ */
|
|
1610
|
+
/* @__PURE__ */ h("span", { className: "text-sm text-gray-800 dark:text-gray-200", children: [
|
|
1874
1611
|
"Page ",
|
|
1875
|
-
|
|
1612
|
+
B,
|
|
1876
1613
|
" of ",
|
|
1877
|
-
|
|
1614
|
+
re
|
|
1878
1615
|
] }),
|
|
1879
|
-
/* @__PURE__ */ e
|
|
1616
|
+
/* @__PURE__ */ e(
|
|
1880
1617
|
"button",
|
|
1881
1618
|
{
|
|
1882
1619
|
onClick: () => {
|
|
1883
|
-
if (
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1620
|
+
if (B < re) {
|
|
1621
|
+
const t = B + 1;
|
|
1622
|
+
b(t), l.useServerSidePagination && y((p) => ({
|
|
1886
1623
|
...p,
|
|
1887
|
-
current_page:
|
|
1624
|
+
current_page: t
|
|
1888
1625
|
}));
|
|
1889
1626
|
}
|
|
1890
1627
|
},
|
|
1891
|
-
disabled:
|
|
1628
|
+
disabled: B === re,
|
|
1892
1629
|
className: "p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition text-gray-500 dark:text-gray-300 disabled:opacity-50",
|
|
1893
|
-
children: /* @__PURE__ */ e
|
|
1630
|
+
children: /* @__PURE__ */ e(ze, { className: "h-4 w-4" })
|
|
1894
1631
|
}
|
|
1895
1632
|
)
|
|
1896
1633
|
] })
|
|
1897
1634
|
] })
|
|
1898
1635
|
] })
|
|
1899
1636
|
] }),
|
|
1900
|
-
|
|
1901
|
-
/* @__PURE__ */ e
|
|
1637
|
+
u && Ve(
|
|
1638
|
+
/* @__PURE__ */ e(
|
|
1902
1639
|
"div",
|
|
1903
1640
|
{
|
|
1904
|
-
ref:
|
|
1641
|
+
ref: te,
|
|
1905
1642
|
style: {
|
|
1906
1643
|
position: "fixed",
|
|
1907
|
-
top: `${
|
|
1908
|
-
left: `${
|
|
1644
|
+
top: `${D.top}px`,
|
|
1645
|
+
left: `${D.left}px`,
|
|
1909
1646
|
zIndex: 9999
|
|
1910
1647
|
},
|
|
1911
1648
|
className: "w-48 bg-white dark:bg-gray-700 rounded-md shadow-lg border border-gray-200 dark:border-gray-600",
|
|
1912
|
-
children:
|
|
1649
|
+
children: w.map((t, p) => /* @__PURE__ */ h(
|
|
1913
1650
|
"button",
|
|
1914
1651
|
{
|
|
1915
|
-
onClick: (
|
|
1916
|
-
|
|
1917
|
-
d.find(
|
|
1918
|
-
|
|
1652
|
+
onClick: (P) => ye(
|
|
1653
|
+
t,
|
|
1654
|
+
d.find(
|
|
1655
|
+
(_) => _.id === u || _._id == u
|
|
1656
|
+
),
|
|
1657
|
+
P
|
|
1919
1658
|
),
|
|
1920
|
-
className: `w-full flex items-center gap-2 px-4 py-2 text-sm text-left hover:bg-gray-100 dark:hover:bg-gray-600 ${
|
|
1659
|
+
className: `w-full flex items-center gap-2 px-4 py-2 text-sm text-left hover:bg-gray-100 dark:hover:bg-gray-600 ${t.variant === "danger" ? "text-red-600 dark:text-red-500" : "text-gray-700 dark:text-gray-200"}`,
|
|
1921
1660
|
children: [
|
|
1922
|
-
|
|
1923
|
-
|
|
1661
|
+
t.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: t.icon }),
|
|
1662
|
+
t.title
|
|
1924
1663
|
]
|
|
1925
1664
|
},
|
|
1926
1665
|
p
|
|
@@ -1929,320 +1668,320 @@ const sa = ({
|
|
|
1929
1668
|
),
|
|
1930
1669
|
document.body
|
|
1931
1670
|
),
|
|
1932
|
-
|
|
1933
|
-
|
|
1671
|
+
s && /* @__PURE__ */ e(
|
|
1672
|
+
ta,
|
|
1934
1673
|
{
|
|
1935
|
-
isOpen:
|
|
1936
|
-
onClose: () =>
|
|
1937
|
-
config:
|
|
1938
|
-
onApply:
|
|
1674
|
+
isOpen: E,
|
|
1675
|
+
onClose: () => $(!1),
|
|
1676
|
+
config: s,
|
|
1677
|
+
onApply: f
|
|
1939
1678
|
}
|
|
1940
1679
|
),
|
|
1941
|
-
|
|
1942
|
-
|
|
1680
|
+
v && /* @__PURE__ */ e(
|
|
1681
|
+
Ke,
|
|
1943
1682
|
{
|
|
1944
|
-
src:
|
|
1945
|
-
alt:
|
|
1946
|
-
isOpen:
|
|
1947
|
-
setIsOpen:
|
|
1683
|
+
src: j.src,
|
|
1684
|
+
alt: j.alt,
|
|
1685
|
+
isOpen: v,
|
|
1686
|
+
setIsOpen: L
|
|
1948
1687
|
}
|
|
1949
1688
|
)
|
|
1950
1689
|
] });
|
|
1951
|
-
},
|
|
1690
|
+
}, me = ({
|
|
1952
1691
|
isOpen: c,
|
|
1953
1692
|
onClose: d,
|
|
1954
|
-
icon:
|
|
1693
|
+
icon: n,
|
|
1955
1694
|
title: i,
|
|
1956
|
-
children:
|
|
1695
|
+
children: o,
|
|
1957
1696
|
size: r = "md",
|
|
1958
|
-
actionButtons:
|
|
1959
|
-
actions:
|
|
1697
|
+
actionButtons: l = [],
|
|
1698
|
+
actions: N,
|
|
1960
1699
|
showDefaultClose: M = !0,
|
|
1961
|
-
footerConfig:
|
|
1962
|
-
hideFooter:
|
|
1963
|
-
onFormSubmit:
|
|
1700
|
+
footerConfig: y = null,
|
|
1701
|
+
hideFooter: f = !1,
|
|
1702
|
+
onFormSubmit: s = () => {
|
|
1964
1703
|
},
|
|
1965
|
-
onCancel:
|
|
1966
|
-
loadingBtn:
|
|
1967
|
-
executeFunction:
|
|
1704
|
+
onCancel: g,
|
|
1705
|
+
loadingBtn: m = !1,
|
|
1706
|
+
executeFunction: u = () => {
|
|
1968
1707
|
},
|
|
1969
|
-
selectedItem:
|
|
1708
|
+
selectedItem: k = null
|
|
1970
1709
|
}) => {
|
|
1971
1710
|
if (!c) return null;
|
|
1972
|
-
const
|
|
1711
|
+
const w = {
|
|
1973
1712
|
sm: "max-w-md",
|
|
1974
1713
|
md: "max-w-lg",
|
|
1975
1714
|
lg: "max-w-2xl",
|
|
1976
1715
|
xl: "max-w-4xl",
|
|
1977
1716
|
full: "max-w-full"
|
|
1978
1717
|
};
|
|
1979
|
-
return /* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */ e
|
|
1718
|
+
return /* @__PURE__ */ h("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
1719
|
+
/* @__PURE__ */ e(
|
|
1981
1720
|
"div",
|
|
1982
1721
|
{
|
|
1983
1722
|
className: "fixed inset-0 bg-gray-500 opacity-75",
|
|
1984
1723
|
onClick: () => d()
|
|
1985
1724
|
}
|
|
1986
1725
|
),
|
|
1987
|
-
/* @__PURE__ */
|
|
1726
|
+
/* @__PURE__ */ h(
|
|
1988
1727
|
"div",
|
|
1989
1728
|
{
|
|
1990
|
-
className: `relative bg-white rounded-lg shadow-xl w-full ${
|
|
1729
|
+
className: `relative bg-white rounded-lg shadow-xl w-full ${w[r] || w.md} max-h-[90vh] flex flex-col dark:bg-gray-800`,
|
|
1991
1730
|
children: [
|
|
1992
|
-
/* @__PURE__ */
|
|
1993
|
-
/* @__PURE__ */
|
|
1994
|
-
|
|
1995
|
-
/* @__PURE__ */ e
|
|
1731
|
+
/* @__PURE__ */ h("div", { className: "flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [
|
|
1732
|
+
/* @__PURE__ */ h("div", { className: "flex items-center gap-1", children: [
|
|
1733
|
+
n && /* @__PURE__ */ e("span", { children: n }),
|
|
1734
|
+
/* @__PURE__ */ e("h3", { className: "text-lg font-medium text-gray-900 dark:text-white", children: i })
|
|
1996
1735
|
] }),
|
|
1997
|
-
/* @__PURE__ */ e
|
|
1736
|
+
/* @__PURE__ */ e(
|
|
1998
1737
|
"button",
|
|
1999
1738
|
{
|
|
2000
1739
|
onClick: () => d(),
|
|
2001
1740
|
className: "text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",
|
|
2002
|
-
children: /* @__PURE__ */ e
|
|
1741
|
+
children: /* @__PURE__ */ e(fe, { className: "w-6 h-6" })
|
|
2003
1742
|
}
|
|
2004
1743
|
)
|
|
2005
1744
|
] }),
|
|
2006
|
-
/* @__PURE__ */ e
|
|
2007
|
-
|
|
2008
|
-
|
|
1745
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto p-4", children: o }),
|
|
1746
|
+
l.length > 0 && /* @__PURE__ */ e("div", { className: "px-4 py-3 flex justify-end gap-3 border-t border-gray-200 dark:border-gray-700 sm:px-6", children: l.map((C) => /* @__PURE__ */ e(
|
|
1747
|
+
ae,
|
|
2009
1748
|
{
|
|
2010
|
-
onClick: (
|
|
2011
|
-
|
|
1749
|
+
onClick: (D) => {
|
|
1750
|
+
C.type == "submit" ? s(D) : u(
|
|
2012
1751
|
() => {
|
|
2013
|
-
var
|
|
2014
|
-
return (
|
|
1752
|
+
var I;
|
|
1753
|
+
return (I = C == null ? void 0 : C.onClick) == null ? void 0 : I.call(C, D, k);
|
|
2015
1754
|
},
|
|
2016
|
-
(
|
|
1755
|
+
(I) => d == null ? void 0 : d(I)
|
|
2017
1756
|
);
|
|
2018
1757
|
},
|
|
2019
|
-
disabled:
|
|
2020
|
-
variant:
|
|
2021
|
-
color:
|
|
2022
|
-
className: `min-w-[100px] ${
|
|
2023
|
-
type:
|
|
2024
|
-
children:
|
|
2025
|
-
/* @__PURE__ */ e
|
|
2026
|
-
|
|
1758
|
+
disabled: m || C.disabled,
|
|
1759
|
+
variant: C.variant || "contained",
|
|
1760
|
+
color: C.color || "primary",
|
|
1761
|
+
className: `min-w-[100px] ${C.className}`,
|
|
1762
|
+
type: C.type || "button",
|
|
1763
|
+
children: m ? /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
1764
|
+
/* @__PURE__ */ e("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-white/30 border-t-2 border-t-white mr-2" }),
|
|
1765
|
+
C.label || "Submit",
|
|
2027
1766
|
"..."
|
|
2028
|
-
] }) :
|
|
1767
|
+
] }) : C.label || "Submit"
|
|
2029
1768
|
}
|
|
2030
1769
|
)) })
|
|
2031
1770
|
]
|
|
2032
1771
|
}
|
|
2033
1772
|
)
|
|
2034
1773
|
] });
|
|
2035
|
-
},
|
|
2036
|
-
var
|
|
2037
|
-
const { formClass: i = "grid grid-cols-12 gap-4", formFields:
|
|
2038
|
-
|
|
2039
|
-
n
|
|
1774
|
+
}, Ae = ({ config: c, onSubmit: d, initialData: n = {} }) => {
|
|
1775
|
+
var y;
|
|
1776
|
+
const { formClass: i = "grid grid-cols-12 gap-4", formFields: o = [] } = c || {}, [r, l] = S(n);
|
|
1777
|
+
z(() => {
|
|
1778
|
+
l(n);
|
|
2040
1779
|
}, []);
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2043
|
-
}, M = (
|
|
2044
|
-
|
|
2045
|
-
const
|
|
2046
|
-
if (!
|
|
2047
|
-
|
|
1780
|
+
const N = (f, s) => {
|
|
1781
|
+
l((g) => ({ ...g, [f]: s }));
|
|
1782
|
+
}, M = (f) => {
|
|
1783
|
+
f.preventDefault();
|
|
1784
|
+
const s = f.target;
|
|
1785
|
+
if (!s.checkValidity()) {
|
|
1786
|
+
s.reportValidity();
|
|
2048
1787
|
return;
|
|
2049
1788
|
}
|
|
2050
1789
|
d(r);
|
|
2051
1790
|
};
|
|
2052
|
-
return /* @__PURE__ */ e
|
|
1791
|
+
return /* @__PURE__ */ e(
|
|
2053
1792
|
"form",
|
|
2054
1793
|
{
|
|
2055
|
-
id: (
|
|
1794
|
+
id: (y = c.title) != null && y.toLowerCase().includes("edit") ? "editForm" : "addForm",
|
|
2056
1795
|
onSubmit: M,
|
|
2057
1796
|
className: i,
|
|
2058
1797
|
noValidate: !1,
|
|
2059
|
-
children:
|
|
2060
|
-
|
|
1798
|
+
children: o.map((f) => /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
|
|
1799
|
+
Ee,
|
|
2061
1800
|
{
|
|
2062
|
-
field:
|
|
1801
|
+
field: f,
|
|
2063
1802
|
formData: r,
|
|
2064
|
-
handleChange:
|
|
1803
|
+
handleChange: N
|
|
2065
1804
|
},
|
|
2066
|
-
|
|
1805
|
+
f.key
|
|
2067
1806
|
) }))
|
|
2068
1807
|
}
|
|
2069
1808
|
);
|
|
2070
1809
|
};
|
|
2071
|
-
function
|
|
2072
|
-
const { fields:
|
|
2073
|
-
r(
|
|
2074
|
-
},
|
|
2075
|
-
let
|
|
2076
|
-
if (
|
|
2077
|
-
let
|
|
2078
|
-
|
|
1810
|
+
function oa({ data: c, config: d }) {
|
|
1811
|
+
const { fields: n, containerClass: i } = d, [o, r] = S(null), [l, N] = S(!1), M = (s) => {
|
|
1812
|
+
r(s), N(!0);
|
|
1813
|
+
}, y = ({ col: s }) => {
|
|
1814
|
+
let g = s == null ? void 0 : s.icon, m = s.label, u = c[s.key], k = s.type, w = s.variant || "outline", C = s.defaultColor;
|
|
1815
|
+
if (k == "chip" && s.chipOptions.length > 0) {
|
|
1816
|
+
let D = s == null ? void 0 : s.chipOptions.find((I) => I.value == u);
|
|
1817
|
+
D && (u = D.label, C = D.color);
|
|
2079
1818
|
}
|
|
2080
|
-
return /* @__PURE__ */
|
|
1819
|
+
return /* @__PURE__ */ h(
|
|
2081
1820
|
"div",
|
|
2082
1821
|
{
|
|
2083
1822
|
className: `col-span-12 flex items-center space-x-4 p-4 rounded-xl
|
|
2084
|
-
bg-gray-100 dark:bg-gray-900 ${
|
|
1823
|
+
bg-gray-100 dark:bg-gray-900 ${s.blockClass}`,
|
|
2085
1824
|
children: [
|
|
2086
|
-
|
|
2087
|
-
/* @__PURE__ */
|
|
2088
|
-
/* @__PURE__ */ e
|
|
2089
|
-
|
|
1825
|
+
g && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: g }),
|
|
1826
|
+
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0", children: [
|
|
1827
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: m }),
|
|
1828
|
+
k == "chip" ? /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
|
|
2090
1829
|
Ge,
|
|
2091
1830
|
{
|
|
2092
|
-
label:
|
|
2093
|
-
variant:
|
|
2094
|
-
color:
|
|
1831
|
+
label: u,
|
|
1832
|
+
variant: w,
|
|
1833
|
+
color: C,
|
|
2095
1834
|
className: "mt-1"
|
|
2096
1835
|
}
|
|
2097
|
-
) }) :
|
|
1836
|
+
) }) : k == "tinyEditor" ? /* @__PURE__ */ e(
|
|
2098
1837
|
"p",
|
|
2099
1838
|
{
|
|
2100
1839
|
className: "mt-1 text-sm text-gray-900 dark:text-white break-words",
|
|
2101
1840
|
dangerouslySetInnerHTML: {
|
|
2102
|
-
__html:
|
|
1841
|
+
__html: u
|
|
2103
1842
|
}
|
|
2104
1843
|
}
|
|
2105
|
-
) : /* @__PURE__ */ e
|
|
1844
|
+
) : /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-900 dark:text-white break-words", children: k == "date" ? /* @__PURE__ */ e("span", { children: Oe(u, s.format || "DD MMM YYYY") }) : u || "N/A" })
|
|
2106
1845
|
] })
|
|
2107
1846
|
]
|
|
2108
1847
|
}
|
|
2109
1848
|
);
|
|
2110
|
-
},
|
|
2111
|
-
let
|
|
2112
|
-
return /* @__PURE__ */
|
|
1849
|
+
}, f = ({ col: s }) => {
|
|
1850
|
+
let g = c[s.titleKey], m = c[s.subtitleKey], u = c[s.imageKey], k = c[s.fallback_icon];
|
|
1851
|
+
return /* @__PURE__ */ h(
|
|
2113
1852
|
"div",
|
|
2114
1853
|
{
|
|
2115
1854
|
className: `col-span-12 flex items-center space-x-4 p-4 rounded-xl
|
|
2116
1855
|
bg-gray-100 dark:bg-gray-900
|
|
2117
|
-
${
|
|
1856
|
+
${s.blockClass}`,
|
|
2118
1857
|
children: [
|
|
2119
|
-
|
|
1858
|
+
u ? /* @__PURE__ */ e(
|
|
2120
1859
|
"img",
|
|
2121
1860
|
{
|
|
2122
|
-
src:
|
|
2123
|
-
alt:
|
|
2124
|
-
onClick: () => M({ src:
|
|
1861
|
+
src: u,
|
|
1862
|
+
alt: g,
|
|
1863
|
+
onClick: () => M({ src: u, alt: g }),
|
|
2125
1864
|
className: "w-16 h-16 cursor-pointer rounded-full object-cover border-2 border-gray-200 dark:border-gray-700"
|
|
2126
1865
|
}
|
|
2127
|
-
) :
|
|
2128
|
-
/* @__PURE__ */
|
|
2129
|
-
/* @__PURE__ */ e
|
|
2130
|
-
/* @__PURE__ */ e
|
|
1866
|
+
) : k || /* @__PURE__ */ e("div", { className: "w-16 h-16 flex items-center justify-center rounded-full border-2 border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600", children: /* @__PURE__ */ e(Ie, { className: "w-8 h-8 text-gray-400" }) }),
|
|
1867
|
+
/* @__PURE__ */ h("div", { children: [
|
|
1868
|
+
/* @__PURE__ */ e("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white", children: g }),
|
|
1869
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: m })
|
|
2131
1870
|
] })
|
|
2132
1871
|
]
|
|
2133
1872
|
}
|
|
2134
1873
|
);
|
|
2135
1874
|
};
|
|
2136
|
-
return /* @__PURE__ */
|
|
2137
|
-
|
|
2138
|
-
|
|
1875
|
+
return /* @__PURE__ */ h(G, { children: [
|
|
1876
|
+
l && /* @__PURE__ */ e(
|
|
1877
|
+
Ke,
|
|
2139
1878
|
{
|
|
2140
|
-
src:
|
|
2141
|
-
alt:
|
|
2142
|
-
isOpen:
|
|
2143
|
-
setIsOpen:
|
|
1879
|
+
src: o.src,
|
|
1880
|
+
alt: o.alt,
|
|
1881
|
+
isOpen: l,
|
|
1882
|
+
setIsOpen: N
|
|
2144
1883
|
}
|
|
2145
1884
|
),
|
|
2146
|
-
/* @__PURE__ */ e
|
|
2147
|
-
(
|
|
1885
|
+
/* @__PURE__ */ e("div", { className: `grid grid-cols-12 gap-4 ${i || ""}`, children: n.map(
|
|
1886
|
+
(s) => s.type == "group" ? /* @__PURE__ */ e(f, { col: s }) : /* @__PURE__ */ e(y, { col: s })
|
|
2148
1887
|
) })
|
|
2149
1888
|
] });
|
|
2150
1889
|
}
|
|
2151
|
-
const
|
|
2152
|
-
var
|
|
1890
|
+
const $e = ({ config: c }) => {
|
|
1891
|
+
var se, ne, ce, he, ue, be, pe, t, p, P, _, K, q, U, Q, oe;
|
|
2153
1892
|
const {
|
|
2154
1893
|
title: d,
|
|
2155
|
-
fetchData:
|
|
1894
|
+
fetchData: n = async () => {
|
|
2156
1895
|
},
|
|
2157
1896
|
isStaticData: i = !1,
|
|
2158
|
-
tableConfig:
|
|
1897
|
+
tableConfig: o = {},
|
|
2159
1898
|
modalConfig: r = {},
|
|
2160
|
-
filterConfig:
|
|
2161
|
-
} = c, [
|
|
1899
|
+
filterConfig: l
|
|
1900
|
+
} = c, [N, M] = S(!0), [y, f] = S(!1), [s, g] = S([]), [m, u] = S(null), [k, w] = S({
|
|
2162
1901
|
search: "",
|
|
2163
1902
|
rows_per_page: 50,
|
|
2164
1903
|
current_page: 1
|
|
2165
|
-
}), [
|
|
2166
|
-
|
|
2167
|
-
},
|
|
2168
|
-
|
|
1904
|
+
}), [C, D] = S({}), [I, E] = S(!1), [$, j] = S(!1), [O, v] = S(!1), [L, T] = S(!1), [B, b] = S(!1), [A, H] = S(null), V = (x, R) => {
|
|
1905
|
+
x === "edit" ? (H(R), v(!0)) : x === "view" ? (H(R), b(!0)) : x === "delete" && (H(R), T(!0));
|
|
1906
|
+
}, J = async (x, R, F = "", Z = "") => {
|
|
1907
|
+
f(!0);
|
|
2169
1908
|
try {
|
|
2170
|
-
const
|
|
2171
|
-
(
|
|
1909
|
+
const Y = await (x == null ? void 0 : x());
|
|
1910
|
+
(F || Y.message) && we(F || Y.message, {
|
|
2172
1911
|
variant: "success"
|
|
2173
|
-
}),
|
|
2174
|
-
} catch (
|
|
2175
|
-
(
|
|
1912
|
+
}), R == null || R(Y);
|
|
1913
|
+
} catch (Y) {
|
|
1914
|
+
(Z || Y.message) && we(Z || Y.message, { variant: "error" });
|
|
2176
1915
|
} finally {
|
|
2177
|
-
|
|
1916
|
+
f(!1);
|
|
2178
1917
|
}
|
|
2179
|
-
},
|
|
2180
|
-
let
|
|
2181
|
-
i ? (
|
|
2182
|
-
|
|
1918
|
+
}, re = (x) => {
|
|
1919
|
+
let R = x.newObject;
|
|
1920
|
+
i ? (g((F) => [R, ...F]), u((F) => ({
|
|
1921
|
+
...F,
|
|
2183
1922
|
current_page: 1
|
|
2184
|
-
}))) : (
|
|
2185
|
-
|
|
1923
|
+
}))) : (w((F) => ({
|
|
1924
|
+
...F,
|
|
2186
1925
|
current_page: 1
|
|
2187
|
-
})),
|
|
2188
|
-
},
|
|
2189
|
-
let
|
|
2190
|
-
i ?
|
|
2191
|
-
(
|
|
2192
|
-
(
|
|
1926
|
+
})), k.current_page == 1 && ee()), j(!1);
|
|
1927
|
+
}, ie = (x) => {
|
|
1928
|
+
let R = x.newObject, F = x.targetObject;
|
|
1929
|
+
i ? g(
|
|
1930
|
+
(Z) => Z.map(
|
|
1931
|
+
(Y) => Y.id === F.id ? { ...Y, ...R } : Y
|
|
2193
1932
|
)
|
|
2194
|
-
) :
|
|
2195
|
-
},
|
|
2196
|
-
if (!
|
|
2197
|
-
|
|
1933
|
+
) : ee(), v(!1);
|
|
1934
|
+
}, te = (x) => {
|
|
1935
|
+
if (!x) {
|
|
1936
|
+
T(!1), H(null);
|
|
2198
1937
|
return;
|
|
2199
1938
|
}
|
|
2200
|
-
i ?
|
|
2201
|
-
(
|
|
2202
|
-
) :
|
|
2203
|
-
...
|
|
2204
|
-
current_page:
|
|
2205
|
-
})) :
|
|
2206
|
-
},
|
|
1939
|
+
i ? g(
|
|
1940
|
+
(R) => R.filter((F) => F.id !== x.targetObject.id)
|
|
1941
|
+
) : s.length == 1 && k.current_page > 1 ? w((R) => ({
|
|
1942
|
+
...R,
|
|
1943
|
+
current_page: R.current_page - 1
|
|
1944
|
+
})) : ee(), T(!1), H(null);
|
|
1945
|
+
}, de = (x) => J(
|
|
2207
1946
|
() => {
|
|
2208
|
-
var
|
|
2209
|
-
return (
|
|
1947
|
+
var R, F;
|
|
1948
|
+
return (F = (R = r == null ? void 0 : r.addModal) == null ? void 0 : R.handleSubmit) == null ? void 0 : F.call(R, x);
|
|
2210
1949
|
},
|
|
2211
|
-
|
|
2212
|
-
),
|
|
1950
|
+
re
|
|
1951
|
+
), le = (x) => J(
|
|
2213
1952
|
() => {
|
|
2214
|
-
var
|
|
2215
|
-
return (
|
|
1953
|
+
var R, F;
|
|
1954
|
+
return (F = (R = r == null ? void 0 : r.editModal) == null ? void 0 : R.handleSubmit) == null ? void 0 : F.call(R, x, A);
|
|
2216
1955
|
},
|
|
2217
|
-
|
|
2218
|
-
),
|
|
2219
|
-
M(!0),
|
|
2220
|
-
|
|
2221
|
-
}).catch((
|
|
2222
|
-
|
|
1956
|
+
ie
|
|
1957
|
+
), ee = async () => {
|
|
1958
|
+
M(!0), n == null || n({ ...k, ...C }).then((x) => {
|
|
1959
|
+
g(x.data), u(x.pagination);
|
|
1960
|
+
}).catch((x) => {
|
|
1961
|
+
we(x.message, { variant: "error" });
|
|
2223
1962
|
}).finally(() => {
|
|
2224
1963
|
M(!1);
|
|
2225
1964
|
});
|
|
2226
|
-
},
|
|
2227
|
-
var
|
|
2228
|
-
|
|
2229
|
-
...
|
|
2230
|
-
})), (
|
|
2231
|
-
},
|
|
2232
|
-
(
|
|
2233
|
-
),
|
|
2234
|
-
var
|
|
2235
|
-
return (
|
|
2236
|
-
}, [
|
|
2237
|
-
return
|
|
2238
|
-
|
|
1965
|
+
}, ye = (x) => {
|
|
1966
|
+
var R;
|
|
1967
|
+
D((F) => ({
|
|
1968
|
+
...x
|
|
1969
|
+
})), (R = o == null ? void 0 : o.filter) != null && R.useServerSideFilters && E((F) => !F);
|
|
1970
|
+
}, xe = (x, R) => x.filter(
|
|
1971
|
+
(F) => Object.entries(R).every(([Z, Y]) => F[Z] === Y)
|
|
1972
|
+
), ve = Se(() => {
|
|
1973
|
+
var x;
|
|
1974
|
+
return (x = o == null ? void 0 : o.filter) != null && x.useServerSideFilters ? s : xe(s, C);
|
|
1975
|
+
}, [s, C]);
|
|
1976
|
+
return z(() => {
|
|
1977
|
+
ee();
|
|
2239
1978
|
}, [
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
]), /* @__PURE__ */ e
|
|
2245
|
-
|
|
1979
|
+
k.search,
|
|
1980
|
+
k.rows_per_page,
|
|
1981
|
+
k.current_page,
|
|
1982
|
+
I
|
|
1983
|
+
]), /* @__PURE__ */ e(
|
|
1984
|
+
We,
|
|
2246
1985
|
{
|
|
2247
1986
|
maxSnack: 3,
|
|
2248
1987
|
anchorOrigin: {
|
|
@@ -2250,138 +1989,138 @@ const Ke = ({ config: c }) => {
|
|
|
2250
1989
|
horizontal: "right"
|
|
2251
1990
|
},
|
|
2252
1991
|
autoHideDuration: 3e3,
|
|
2253
|
-
action: (
|
|
1992
|
+
action: (x) => /* @__PURE__ */ e(
|
|
2254
1993
|
"button",
|
|
2255
1994
|
{
|
|
2256
1995
|
onClick: () => {
|
|
2257
1996
|
window.dispatchEvent(
|
|
2258
|
-
new CustomEvent("closeSnackbar", { detail:
|
|
1997
|
+
new CustomEvent("closeSnackbar", { detail: x })
|
|
2259
1998
|
);
|
|
2260
1999
|
},
|
|
2261
2000
|
className: "p-1 hover:bg-white/20 rounded-full transition-colors duration-200 text-white flex items-center justify-center",
|
|
2262
|
-
children: /* @__PURE__ */ e
|
|
2001
|
+
children: /* @__PURE__ */ e(fe, { className: "h-4 w-4" })
|
|
2263
2002
|
}
|
|
2264
2003
|
),
|
|
2265
|
-
children: /* @__PURE__ */
|
|
2266
|
-
/* @__PURE__ */
|
|
2267
|
-
/* @__PURE__ */
|
|
2268
|
-
/* @__PURE__ */ e
|
|
2269
|
-
/* @__PURE__ */ e
|
|
2004
|
+
children: /* @__PURE__ */ h("div", { children: [
|
|
2005
|
+
/* @__PURE__ */ h("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-3", children: [
|
|
2006
|
+
/* @__PURE__ */ h("div", { children: [
|
|
2007
|
+
/* @__PURE__ */ e("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: d }),
|
|
2008
|
+
/* @__PURE__ */ e("p", { className: "text-md text-gray-600 dark:text-gray-400", children: c == null ? void 0 : c.description })
|
|
2270
2009
|
] }),
|
|
2271
|
-
/* @__PURE__ */ e
|
|
2272
|
-
|
|
2010
|
+
/* @__PURE__ */ e("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ h(
|
|
2011
|
+
ae,
|
|
2273
2012
|
{
|
|
2274
|
-
onClick: () =>
|
|
2013
|
+
onClick: () => j(!0),
|
|
2275
2014
|
variant: "contained",
|
|
2276
2015
|
color: "primary",
|
|
2277
2016
|
children: [
|
|
2278
|
-
/* @__PURE__ */ e
|
|
2017
|
+
/* @__PURE__ */ e(Ue, { className: "w-4 h-4 mr-2" }),
|
|
2279
2018
|
c.buttonText || "Add New"
|
|
2280
2019
|
]
|
|
2281
2020
|
}
|
|
2282
2021
|
) })
|
|
2283
2022
|
] }),
|
|
2284
|
-
/* @__PURE__ */ e
|
|
2285
|
-
|
|
2023
|
+
/* @__PURE__ */ e(
|
|
2024
|
+
na,
|
|
2286
2025
|
{
|
|
2287
2026
|
config: {
|
|
2288
|
-
...
|
|
2027
|
+
...o,
|
|
2289
2028
|
pagination: {
|
|
2290
|
-
...
|
|
2291
|
-
...
|
|
2029
|
+
...o.pagination,
|
|
2030
|
+
...m
|
|
2292
2031
|
},
|
|
2293
|
-
data:
|
|
2294
|
-
setServerSidePaginationData:
|
|
2032
|
+
data: ve,
|
|
2033
|
+
setServerSidePaginationData: w,
|
|
2295
2034
|
onMenuAction: V,
|
|
2296
|
-
filterConfig:
|
|
2297
|
-
onFilterApply:
|
|
2298
|
-
loading:
|
|
2035
|
+
filterConfig: l,
|
|
2036
|
+
onFilterApply: ye,
|
|
2037
|
+
loading: N
|
|
2299
2038
|
}
|
|
2300
2039
|
}
|
|
2301
2040
|
),
|
|
2302
|
-
/* @__PURE__ */ e
|
|
2303
|
-
|
|
2041
|
+
/* @__PURE__ */ e(
|
|
2042
|
+
me,
|
|
2304
2043
|
{
|
|
2305
|
-
isOpen:
|
|
2306
|
-
onClose: () =>
|
|
2307
|
-
icon: (
|
|
2308
|
-
title: ((
|
|
2309
|
-
size: ((
|
|
2044
|
+
isOpen: $,
|
|
2045
|
+
onClose: () => j(!1),
|
|
2046
|
+
icon: (se = r.addModal) == null ? void 0 : se.icon,
|
|
2047
|
+
title: ((ne = r.addModal) == null ? void 0 : ne.title) || "Add New",
|
|
2048
|
+
size: ((ce = r.addModal) == null ? void 0 : ce.size) || "md",
|
|
2310
2049
|
onFormSubmit: () => {
|
|
2311
|
-
var
|
|
2312
|
-
return (
|
|
2050
|
+
var x;
|
|
2051
|
+
return (x = document.querySelector("#addForm")) == null ? void 0 : x.requestSubmit();
|
|
2313
2052
|
},
|
|
2314
|
-
loadingBtn:
|
|
2053
|
+
loadingBtn: y,
|
|
2315
2054
|
actionButtons: r.addModal.actionButtons,
|
|
2316
|
-
children: /* @__PURE__ */ e
|
|
2317
|
-
|
|
2055
|
+
children: /* @__PURE__ */ e(
|
|
2056
|
+
Ae,
|
|
2318
2057
|
{
|
|
2319
2058
|
config: (r == null ? void 0 : r.addModal) || [],
|
|
2320
|
-
onSubmit:
|
|
2059
|
+
onSubmit: de,
|
|
2321
2060
|
initialData: {},
|
|
2322
|
-
loading:
|
|
2061
|
+
loading: y
|
|
2323
2062
|
}
|
|
2324
2063
|
)
|
|
2325
2064
|
}
|
|
2326
2065
|
),
|
|
2327
|
-
/* @__PURE__ */ e
|
|
2328
|
-
|
|
2066
|
+
/* @__PURE__ */ e(
|
|
2067
|
+
me,
|
|
2329
2068
|
{
|
|
2330
2069
|
isOpen: O,
|
|
2331
|
-
onClose: () =>
|
|
2332
|
-
icon: (
|
|
2070
|
+
onClose: () => v(!1),
|
|
2071
|
+
icon: (he = r.editModal) == null ? void 0 : he.icon,
|
|
2333
2072
|
title: ((ue = r.editModal) == null ? void 0 : ue.title) || "Edit",
|
|
2334
|
-
size: ((
|
|
2073
|
+
size: ((be = r.editModal) == null ? void 0 : be.size) || "md",
|
|
2335
2074
|
onFormSubmit: () => {
|
|
2336
|
-
var
|
|
2337
|
-
return (
|
|
2075
|
+
var x;
|
|
2076
|
+
return (x = document.querySelector("#editForm")) == null ? void 0 : x.requestSubmit();
|
|
2338
2077
|
},
|
|
2339
2078
|
actionButtons: r.editModal.actionButtons,
|
|
2340
|
-
loadingBtn:
|
|
2341
|
-
children: /* @__PURE__ */ e
|
|
2342
|
-
|
|
2079
|
+
loadingBtn: y,
|
|
2080
|
+
children: /* @__PURE__ */ e(
|
|
2081
|
+
Ae,
|
|
2343
2082
|
{
|
|
2344
2083
|
config: r.editModal || [],
|
|
2345
|
-
onSubmit:
|
|
2084
|
+
onSubmit: le,
|
|
2346
2085
|
initialData: A,
|
|
2347
|
-
loading:
|
|
2086
|
+
loading: y
|
|
2348
2087
|
}
|
|
2349
2088
|
)
|
|
2350
2089
|
}
|
|
2351
2090
|
),
|
|
2352
|
-
|
|
2353
|
-
|
|
2091
|
+
L && /* @__PURE__ */ e(
|
|
2092
|
+
me,
|
|
2354
2093
|
{
|
|
2355
|
-
isOpen:
|
|
2356
|
-
onClose: (
|
|
2357
|
-
|
|
2094
|
+
isOpen: L,
|
|
2095
|
+
onClose: (x) => {
|
|
2096
|
+
te(x);
|
|
2358
2097
|
},
|
|
2359
|
-
icon: ((
|
|
2360
|
-
title: ((
|
|
2098
|
+
icon: ((pe = r.deleteModal) == null ? void 0 : pe.icon) || /* @__PURE__ */ e(De, { icon: "ph:warning-bold", className: "w-6 h-6 text-red-500" }),
|
|
2099
|
+
title: ((t = r.deleteModal) == null ? void 0 : t.title) || "Confirm Delete",
|
|
2361
2100
|
size: ((p = r.deleteModal) == null ? void 0 : p.size) || "md",
|
|
2362
|
-
loading:
|
|
2101
|
+
loading: y,
|
|
2363
2102
|
actionButtons: r.deleteModal.actionButtons,
|
|
2364
|
-
executeFunction:
|
|
2103
|
+
executeFunction: J,
|
|
2365
2104
|
selectedItem: A,
|
|
2366
|
-
children: /* @__PURE__ */ e
|
|
2367
|
-
/* @__PURE__ */ e
|
|
2368
|
-
((
|
|
2105
|
+
children: /* @__PURE__ */ e("div", { className: "flex items-center space-x-2 py-3", children: /* @__PURE__ */ h("div", { children: [
|
|
2106
|
+
/* @__PURE__ */ e("p", { className: "text-md text-gray-700 dark:text-white", children: ((P = r.deleteModal) == null ? void 0 : P.confirmText) || "Are you sure you want to delete this item?" }),
|
|
2107
|
+
((_ = r.deleteModal) == null ? void 0 : _.referenceKey) && /* @__PURE__ */ e("p", { className: "text-md font-semibold text-gray-700 dark:text-white", children: A[(K = r.deleteModal) == null ? void 0 : K.referenceKey] })
|
|
2369
2108
|
] }) })
|
|
2370
2109
|
}
|
|
2371
2110
|
),
|
|
2372
|
-
r.viewModal && /* @__PURE__ */ e
|
|
2373
|
-
|
|
2111
|
+
r.viewModal && /* @__PURE__ */ e(
|
|
2112
|
+
me,
|
|
2374
2113
|
{
|
|
2375
|
-
isOpen:
|
|
2114
|
+
isOpen: B,
|
|
2376
2115
|
onClose: () => {
|
|
2377
|
-
|
|
2116
|
+
b(!1), H(null);
|
|
2378
2117
|
},
|
|
2379
|
-
icon: (
|
|
2380
|
-
title: ((
|
|
2381
|
-
size: ((
|
|
2118
|
+
icon: (q = r.viewModal) == null ? void 0 : q.icon,
|
|
2119
|
+
title: ((U = r.viewModal) == null ? void 0 : U.title) || "View Details",
|
|
2120
|
+
size: ((Q = r.viewModal) == null ? void 0 : Q.size) || "lg",
|
|
2382
2121
|
footerConfig: r == null ? void 0 : r.viewModal.footer,
|
|
2383
|
-
children: (
|
|
2384
|
-
|
|
2122
|
+
children: (oe = r.viewModal) != null && oe.component ? /* @__PURE__ */ e(r.viewModal.component, { data: A }) : /* @__PURE__ */ e(
|
|
2123
|
+
oa,
|
|
2385
2124
|
{
|
|
2386
2125
|
data: A,
|
|
2387
2126
|
config: r.viewModal || {}
|
|
@@ -2392,7 +2131,7 @@ const Ke = ({ config: c }) => {
|
|
|
2392
2131
|
] })
|
|
2393
2132
|
}
|
|
2394
2133
|
);
|
|
2395
|
-
},
|
|
2134
|
+
}, Re = a.shape({
|
|
2396
2135
|
value: a.oneOfType([
|
|
2397
2136
|
a.string,
|
|
2398
2137
|
a.number,
|
|
@@ -2400,18 +2139,18 @@ const Ke = ({ config: c }) => {
|
|
|
2400
2139
|
]).isRequired,
|
|
2401
2140
|
label: a.string.isRequired,
|
|
2402
2141
|
color: a.string
|
|
2403
|
-
}),
|
|
2142
|
+
}), ke = a.shape({
|
|
2404
2143
|
type: a.string.isRequired,
|
|
2405
2144
|
label: a.string.isRequired,
|
|
2406
2145
|
color: a.string,
|
|
2407
2146
|
variant: a.string,
|
|
2408
2147
|
onClick: a.func
|
|
2409
|
-
}),
|
|
2148
|
+
}), ia = a.shape({
|
|
2410
2149
|
title: a.string.isRequired,
|
|
2411
2150
|
type: a.string.isRequired,
|
|
2412
2151
|
variant: a.string,
|
|
2413
2152
|
icon: a.node
|
|
2414
|
-
}),
|
|
2153
|
+
}), da = a.shape({
|
|
2415
2154
|
key: a.string.isRequired,
|
|
2416
2155
|
title: a.string,
|
|
2417
2156
|
type: a.string,
|
|
@@ -2420,11 +2159,11 @@ const Ke = ({ config: c }) => {
|
|
|
2420
2159
|
subtitleKey: a.string,
|
|
2421
2160
|
onClickDetails: a.bool,
|
|
2422
2161
|
variant: a.string,
|
|
2423
|
-
chipOptions: a.arrayOf(
|
|
2162
|
+
chipOptions: a.arrayOf(Re),
|
|
2424
2163
|
defaultColor: a.string,
|
|
2425
2164
|
className: a.string,
|
|
2426
2165
|
format: a.string,
|
|
2427
|
-
menuList: a.arrayOf(
|
|
2166
|
+
menuList: a.arrayOf(ia)
|
|
2428
2167
|
}), Ne = a.shape({
|
|
2429
2168
|
key: a.string.isRequired,
|
|
2430
2169
|
label: a.string,
|
|
@@ -2442,8 +2181,8 @@ const Ke = ({ config: c }) => {
|
|
|
2442
2181
|
rows: a.number,
|
|
2443
2182
|
text: a.string,
|
|
2444
2183
|
editorKey: a.string,
|
|
2445
|
-
options: a.arrayOf(
|
|
2446
|
-
}),
|
|
2184
|
+
options: a.arrayOf(Re)
|
|
2185
|
+
}), sa = a.shape({
|
|
2447
2186
|
key: a.string,
|
|
2448
2187
|
label: a.string,
|
|
2449
2188
|
type: a.string,
|
|
@@ -2453,12 +2192,12 @@ const Ke = ({ config: c }) => {
|
|
|
2453
2192
|
blockClass: a.string,
|
|
2454
2193
|
icon: a.node,
|
|
2455
2194
|
variant: a.string,
|
|
2456
|
-
chipOptions: a.arrayOf(
|
|
2195
|
+
chipOptions: a.arrayOf(Re),
|
|
2457
2196
|
defaultColor: a.string,
|
|
2458
2197
|
className: a.string,
|
|
2459
2198
|
format: a.string
|
|
2460
2199
|
});
|
|
2461
|
-
|
|
2200
|
+
$e.propTypes = {
|
|
2462
2201
|
config: a.shape({
|
|
2463
2202
|
title: a.string.isRequired,
|
|
2464
2203
|
description: a.string,
|
|
@@ -2467,7 +2206,7 @@ Ke.propTypes = {
|
|
|
2467
2206
|
isStaticData: a.bool,
|
|
2468
2207
|
/* ================= TABLE CONFIG ================= */
|
|
2469
2208
|
tableConfig: a.shape({
|
|
2470
|
-
table_head: a.arrayOf(
|
|
2209
|
+
table_head: a.arrayOf(da).isRequired,
|
|
2471
2210
|
search: a.shape({
|
|
2472
2211
|
enabled: a.bool,
|
|
2473
2212
|
useServerSideSearch: a.bool,
|
|
@@ -2490,7 +2229,7 @@ Ke.propTypes = {
|
|
|
2490
2229
|
formClass: a.string,
|
|
2491
2230
|
formFields: a.arrayOf(Ne),
|
|
2492
2231
|
handleSubmit: a.func.isRequired,
|
|
2493
|
-
actionButtons: a.arrayOf(
|
|
2232
|
+
actionButtons: a.arrayOf(ke)
|
|
2494
2233
|
}),
|
|
2495
2234
|
editModal: a.shape({
|
|
2496
2235
|
title: a.string.isRequired,
|
|
@@ -2498,14 +2237,14 @@ Ke.propTypes = {
|
|
|
2498
2237
|
formClass: a.string,
|
|
2499
2238
|
formFields: a.arrayOf(Ne),
|
|
2500
2239
|
handleSubmit: a.func.isRequired,
|
|
2501
|
-
actionButtons: a.arrayOf(
|
|
2240
|
+
actionButtons: a.arrayOf(ke)
|
|
2502
2241
|
}),
|
|
2503
2242
|
deleteModal: a.shape({
|
|
2504
2243
|
title: a.string.isRequired,
|
|
2505
2244
|
size: a.string,
|
|
2506
2245
|
confirmText: a.string,
|
|
2507
2246
|
referenceKey: a.string,
|
|
2508
|
-
actionButtons: a.arrayOf(
|
|
2247
|
+
actionButtons: a.arrayOf(ke)
|
|
2509
2248
|
}),
|
|
2510
2249
|
viewModal: a.shape({
|
|
2511
2250
|
title: a.string.isRequired,
|
|
@@ -2513,7 +2252,7 @@ Ke.propTypes = {
|
|
|
2513
2252
|
// 👇 This covers your commented code:
|
|
2514
2253
|
component: a.elementType,
|
|
2515
2254
|
// for custom component like TeamMemberDetail
|
|
2516
|
-
fields: a.arrayOf(
|
|
2255
|
+
fields: a.arrayOf(sa),
|
|
2517
2256
|
footer: a.shape({
|
|
2518
2257
|
cancelButton: a.bool,
|
|
2519
2258
|
cancelText: a.string
|
|
@@ -2526,10 +2265,10 @@ Ke.propTypes = {
|
|
|
2526
2265
|
})
|
|
2527
2266
|
}).isRequired
|
|
2528
2267
|
};
|
|
2529
|
-
function
|
|
2530
|
-
return /* @__PURE__ */ e
|
|
2268
|
+
function ya(c) {
|
|
2269
|
+
return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e($e, { config: c.config }) });
|
|
2531
2270
|
}
|
|
2532
2271
|
export {
|
|
2533
|
-
|
|
2272
|
+
ya as default
|
|
2534
2273
|
};
|
|
2535
2274
|
//# sourceMappingURL=index.es.js.map
|