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