react-admin-crud-manager 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +23 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +547 -539
- package/dist/index.es.js.map +1 -1
- package/dist/tailwind.css +0 -18
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
1
|
+
import { jsx as e, Fragment as j, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import Me, { useState as C, useRef as X, useEffect as K, useMemo as Fe } from "react";
|
|
3
3
|
import { Info as Xe, ChevronDown as $e, Search as Ie, Check as ea, X as Le, User as Ae, Plus as aa, Filter as ra, ChevronLeft as ta, ChevronRight as na, EllipsisVertical as la, Music as oa } from "lucide-react";
|
|
4
4
|
import { createPortal as ia } from "react-dom";
|
|
5
5
|
import { Icon as ne } from "@iconify/react";
|
|
6
6
|
import { Editor as sa } from "@tinymce/tinymce-react";
|
|
7
|
-
import { enqueueSnackbar as ce, SnackbarProvider as da } from "notistack";
|
|
8
|
-
import
|
|
9
|
-
const Ge = (
|
|
10
|
-
if (!
|
|
11
|
-
const t = new Date(
|
|
7
|
+
import { enqueueSnackbar as ce, SnackbarProvider as da, useSnackbar as ca } from "notistack";
|
|
8
|
+
import l from "prop-types";
|
|
9
|
+
const Ge = (n, o = "DD MMM YYYY") => {
|
|
10
|
+
if (!n) return "N/A";
|
|
11
|
+
const t = new Date(n);
|
|
12
12
|
if (isNaN(t)) return "Invalid Date";
|
|
13
13
|
const s = (d) => String(d).padStart(2, "0"), i = {
|
|
14
14
|
YYYY: t.getFullYear(),
|
|
@@ -27,14 +27,14 @@ const Ge = (o, l = "DD MMM YYYY") => {
|
|
|
27
27
|
ss: s(t.getSeconds()),
|
|
28
28
|
A: t.getHours() >= 12 ? "PM" : "AM"
|
|
29
29
|
};
|
|
30
|
-
return
|
|
30
|
+
return o.replace(
|
|
31
31
|
/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|ddd|HH|hh|mm|ss|A/g,
|
|
32
32
|
(d) => i[d]
|
|
33
33
|
);
|
|
34
|
-
},
|
|
35
|
-
if (!(
|
|
36
|
-
const s =
|
|
37
|
-
return
|
|
34
|
+
}, ua = (n, o, t = []) => {
|
|
35
|
+
if (!(o != null && o.trim())) return n;
|
|
36
|
+
const s = o.toLowerCase(), i = (d) => d == null ? [] : typeof d == "object" ? Object.values(d).flatMap(i) : [String(d)];
|
|
37
|
+
return n.filter((d) => {
|
|
38
38
|
let r = [];
|
|
39
39
|
return t.length > 0 ? t.forEach((x) => {
|
|
40
40
|
d[x] !== void 0 && r.push(...i(d[x]));
|
|
@@ -44,8 +44,8 @@ const Ge = (o, l = "DD MMM YYYY") => {
|
|
|
44
44
|
});
|
|
45
45
|
}, Q = Me.forwardRef(
|
|
46
46
|
({
|
|
47
|
-
className:
|
|
48
|
-
variant:
|
|
47
|
+
className: n = "",
|
|
48
|
+
variant: o = "contained",
|
|
49
49
|
color: t = "default",
|
|
50
50
|
size: s = "default",
|
|
51
51
|
fullWidth: i = !1,
|
|
@@ -80,12 +80,12 @@ const Ge = (o, l = "DD MMM YYYY") => {
|
|
|
80
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",
|
|
81
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"
|
|
82
82
|
}
|
|
83
|
-
}, u = ((g = b[t]) == null ? void 0 : g[
|
|
83
|
+
}, u = ((g = b[t]) == null ? void 0 : g[o]) || b.default.contained, k = c[s], f = `
|
|
84
84
|
${S}
|
|
85
85
|
${u}
|
|
86
|
-
${
|
|
86
|
+
${k}
|
|
87
87
|
${i ? "w-full" : ""}
|
|
88
|
-
${
|
|
88
|
+
${n}
|
|
89
89
|
`.trim();
|
|
90
90
|
return /* @__PURE__ */ e(
|
|
91
91
|
"button",
|
|
@@ -100,10 +100,10 @@ const Ge = (o, l = "DD MMM YYYY") => {
|
|
|
100
100
|
}
|
|
101
101
|
);
|
|
102
102
|
Q.displayName = "Button";
|
|
103
|
-
function q({ label:
|
|
104
|
-
return /* @__PURE__ */ e(
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
function q({ label: n, required: o = !1, infoText: t = "" }) {
|
|
104
|
+
return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ h("label", { className: "flex text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
105
|
+
n,
|
|
106
|
+
o && /* @__PURE__ */ e("span", { className: "ml-1", children: "*" }),
|
|
107
107
|
t && /* @__PURE__ */ h("span", { className: "ml-2 relative group inline-flex items-center cursor-pointer", children: [
|
|
108
108
|
/* @__PURE__ */ e(Xe, { className: "w-4 h-4 text-gray-500 dark:text-gray-400" }),
|
|
109
109
|
/* @__PURE__ */ e(
|
|
@@ -120,9 +120,9 @@ function q({ label: o, required: l = !1, infoText: t = "" }) {
|
|
|
120
120
|
] })
|
|
121
121
|
] }) });
|
|
122
122
|
}
|
|
123
|
-
const
|
|
124
|
-
options:
|
|
125
|
-
value:
|
|
123
|
+
const ha = ({
|
|
124
|
+
options: n = [],
|
|
125
|
+
value: o = "",
|
|
126
126
|
defaultValue: t = "",
|
|
127
127
|
onChange: s,
|
|
128
128
|
placeholder: i = "Select option",
|
|
@@ -133,59 +133,59 @@ const ua = ({
|
|
|
133
133
|
required: c = !1,
|
|
134
134
|
name: b = "",
|
|
135
135
|
parentClass: u = "",
|
|
136
|
-
multiple:
|
|
136
|
+
multiple: k = !1,
|
|
137
137
|
// ✅ NEW
|
|
138
138
|
dropdownMaxHeight: f = "",
|
|
139
139
|
formData: g = {},
|
|
140
140
|
dependencyKey: N = ""
|
|
141
141
|
}) => {
|
|
142
142
|
var I;
|
|
143
|
-
const [y, M] = C(!1), [
|
|
144
|
-
let G =
|
|
145
|
-
const _ = (
|
|
143
|
+
const [y, M] = C(!1), [D, U] = C(""), [L, O] = C(!0), E = X(null), F = X(null), [T, B] = C([]);
|
|
144
|
+
let G = o || o === !1 ? o : t;
|
|
145
|
+
const _ = (w) => w == null || w === "" ? "" : String(typeof w == "boolean" ? w : w ?? "");
|
|
146
146
|
K(
|
|
147
147
|
() => {
|
|
148
148
|
(async () => {
|
|
149
|
-
if (typeof
|
|
150
|
-
const P = await
|
|
149
|
+
if (typeof n == "function") {
|
|
150
|
+
const P = await n(g);
|
|
151
151
|
B(P);
|
|
152
152
|
} else
|
|
153
|
-
B(
|
|
153
|
+
B(n || []);
|
|
154
154
|
})();
|
|
155
155
|
},
|
|
156
|
-
N ? [
|
|
156
|
+
N ? [n, g == null ? void 0 : g[N]] : [n]
|
|
157
157
|
);
|
|
158
|
-
const J =
|
|
159
|
-
(
|
|
160
|
-
), A = (
|
|
161
|
-
const P = _(
|
|
162
|
-
return
|
|
158
|
+
const J = k ? (G || []).map(_) : _(G), Z = T.filter(
|
|
159
|
+
(w) => w.label.toLowerCase().includes(D.toLowerCase())
|
|
160
|
+
), A = (w) => {
|
|
161
|
+
const P = _(w);
|
|
162
|
+
return k ? J.includes(P) : P === J;
|
|
163
163
|
};
|
|
164
164
|
K(() => {
|
|
165
|
-
const
|
|
165
|
+
const w = (P) => {
|
|
166
166
|
E.current && !E.current.contains(P.target) && (M(!1), U(""));
|
|
167
167
|
};
|
|
168
|
-
return document.addEventListener("mousedown",
|
|
168
|
+
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
169
169
|
}, []), K(() => {
|
|
170
170
|
if (y && E.current) {
|
|
171
|
-
const
|
|
171
|
+
const w = E.current.getBoundingClientRect(), W = window.innerHeight - w.bottom;
|
|
172
172
|
O(W < 200);
|
|
173
173
|
}
|
|
174
174
|
}, [y]), K(() => {
|
|
175
175
|
y && F.current && F.current.focus();
|
|
176
176
|
}, [y]);
|
|
177
|
-
const z = (
|
|
178
|
-
let P =
|
|
179
|
-
if (
|
|
180
|
-
const W = J.includes(_(
|
|
177
|
+
const z = (w) => {
|
|
178
|
+
let P = w;
|
|
179
|
+
if (w === "true" ? P = !0 : w === "false" && (P = !1), k) {
|
|
180
|
+
const W = J.includes(_(w));
|
|
181
181
|
let H;
|
|
182
|
-
W ? H =
|
|
183
|
-
(ae) => _(ae) !== _(
|
|
184
|
-
) : H = [...
|
|
182
|
+
W ? H = o.filter(
|
|
183
|
+
(ae) => _(ae) !== _(w)
|
|
184
|
+
) : H = [...o || [], P], s(H);
|
|
185
185
|
} else
|
|
186
186
|
s(P), M(!1);
|
|
187
187
|
U("");
|
|
188
|
-
}, V =
|
|
188
|
+
}, V = k ? T.filter((w) => A(w.value)).map((w) => w.label).join(", ") : (I = T.find((w) => A(w.value))) == null ? void 0 : I.label;
|
|
189
189
|
return K(() => {
|
|
190
190
|
(G || G === !1) && setTimeout(() => {
|
|
191
191
|
s(G);
|
|
@@ -199,7 +199,7 @@ const ua = ({
|
|
|
199
199
|
name: "hidden_select_for_validation",
|
|
200
200
|
value: V || "",
|
|
201
201
|
required: c,
|
|
202
|
-
multiple:
|
|
202
|
+
multiple: k,
|
|
203
203
|
className: "absolute opacity-0 right-1/2 top-[80%] -translate-x-1/2 -translate-y-1/2 pointer-events-none h-[10px]",
|
|
204
204
|
children: /* @__PURE__ */ e("option", { hidden: !0, value: V, children: V })
|
|
205
205
|
}
|
|
@@ -237,8 +237,8 @@ const ua = ({
|
|
|
237
237
|
{
|
|
238
238
|
ref: F,
|
|
239
239
|
type: "text",
|
|
240
|
-
value:
|
|
241
|
-
onChange: (
|
|
240
|
+
value: D,
|
|
241
|
+
onChange: (w) => U(w.target.value),
|
|
242
242
|
placeholder: "Search...",
|
|
243
243
|
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"
|
|
244
244
|
}
|
|
@@ -251,19 +251,19 @@ const ua = ({
|
|
|
251
251
|
style: {
|
|
252
252
|
maxHeight: f || ""
|
|
253
253
|
},
|
|
254
|
-
children: Z.length > 0 ? Z.map((
|
|
254
|
+
children: Z.length > 0 ? Z.map((w) => /* @__PURE__ */ h(
|
|
255
255
|
"button",
|
|
256
256
|
{
|
|
257
257
|
type: "button",
|
|
258
|
-
onClick: () => z(String(
|
|
258
|
+
onClick: () => z(String(w.value)),
|
|
259
259
|
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
|
|
260
|
-
${A(
|
|
260
|
+
${A(w.value) ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300" : ""}`,
|
|
261
261
|
children: [
|
|
262
|
-
/* @__PURE__ */ e("span", { children:
|
|
263
|
-
|
|
262
|
+
/* @__PURE__ */ e("span", { children: w.label }),
|
|
263
|
+
k && A(w.value) && /* @__PURE__ */ e(ea, { className: "w-4 h-4" })
|
|
264
264
|
]
|
|
265
265
|
},
|
|
266
|
-
String(
|
|
266
|
+
String(w.value)
|
|
267
267
|
)) : /* @__PURE__ */ e("div", { className: "px-3 py-2 text-sm text-gray-500 dark:text-gray-400", children: "No options found" })
|
|
268
268
|
}
|
|
269
269
|
)
|
|
@@ -274,8 +274,8 @@ const ua = ({
|
|
|
274
274
|
] }, b);
|
|
275
275
|
}, Ke = Me.forwardRef(
|
|
276
276
|
({
|
|
277
|
-
label:
|
|
278
|
-
required:
|
|
277
|
+
label: n,
|
|
278
|
+
required: o,
|
|
279
279
|
parentClass: t = "col-span-12",
|
|
280
280
|
className: s = "",
|
|
281
281
|
value: i,
|
|
@@ -283,7 +283,7 @@ const ua = ({
|
|
|
283
283
|
disabled: r = !1,
|
|
284
284
|
...x
|
|
285
285
|
}, S) => /* @__PURE__ */ h("div", { className: `flex justify-between ${t}`, children: [
|
|
286
|
-
|
|
286
|
+
n && /* @__PURE__ */ e(q, { label: n, required: o }),
|
|
287
287
|
/* @__PURE__ */ h("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
288
288
|
/* @__PURE__ */ e(
|
|
289
289
|
"input",
|
|
@@ -577,9 +577,9 @@ const Se = [
|
|
|
577
577
|
{ label: "Zambia", code: "ZM", phone: "260" },
|
|
578
578
|
{ label: "Zimbabwe", code: "ZW", phone: "263" }
|
|
579
579
|
];
|
|
580
|
-
function
|
|
581
|
-
label:
|
|
582
|
-
value:
|
|
580
|
+
function ba({
|
|
581
|
+
label: n = "",
|
|
582
|
+
value: o = "",
|
|
583
583
|
name: t = "",
|
|
584
584
|
parentClass: s = "",
|
|
585
585
|
onChange: i,
|
|
@@ -590,22 +590,22 @@ function ha({
|
|
|
590
590
|
countriesList: c = !1,
|
|
591
591
|
defaultCountry: b = ""
|
|
592
592
|
}) {
|
|
593
|
-
const u = (T) => Se.find((B) => B.code == T), [
|
|
593
|
+
const u = (T) => Se.find((B) => B.code == T), [k, f] = C(
|
|
594
594
|
u(b) || Se[0]
|
|
595
|
-
), [g, N] = C(""), [y, M] = C(!1), [
|
|
595
|
+
), [g, N] = C(""), [y, M] = C(!1), [D, U] = C(""), L = X();
|
|
596
596
|
K(() => {
|
|
597
|
-
if (typeof
|
|
598
|
-
const T = Se.filter((B) =>
|
|
597
|
+
if (typeof o == "string" && o.startsWith("+")) {
|
|
598
|
+
const T = Se.filter((B) => o.startsWith("+" + B.phone)).sort((B, G) => G.phone.length - B.phone.length)[0];
|
|
599
599
|
if (T) {
|
|
600
|
-
f(T), N(
|
|
600
|
+
f(T), N(o.replace("+" + T.phone, ""));
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
N(
|
|
605
|
-
}, [
|
|
604
|
+
N(o);
|
|
605
|
+
}, [o]);
|
|
606
606
|
const O = (T) => {
|
|
607
607
|
const B = T.target.value.replace(/\D/g, "");
|
|
608
|
-
N(B),
|
|
608
|
+
N(B), k && i && i("+" + k.phone + B);
|
|
609
609
|
}, E = (T) => {
|
|
610
610
|
f(T), i && i("+" + T.phone + g), M(!1), U("");
|
|
611
611
|
};
|
|
@@ -616,10 +616,10 @@ function ha({
|
|
|
616
616
|
return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
|
|
617
617
|
}, []);
|
|
618
618
|
const F = Se.filter(
|
|
619
|
-
(T) => T.label.toLowerCase().includes(
|
|
619
|
+
(T) => T.label.toLowerCase().includes(D.toLowerCase()) || T.phone.includes(D)
|
|
620
620
|
);
|
|
621
|
-
return c ? /* @__PURE__ */ e(
|
|
622
|
-
/* @__PURE__ */ e(q, { label:
|
|
621
|
+
return c ? /* @__PURE__ */ e(j, { children: /* @__PURE__ */ h("div", { className: s || "col-span-12", children: [
|
|
622
|
+
/* @__PURE__ */ e(q, { label: n, required: r }),
|
|
623
623
|
/* @__PURE__ */ h("div", { className: "relative ", ref: L, children: [
|
|
624
624
|
/* @__PURE__ */ h(
|
|
625
625
|
"div",
|
|
@@ -636,11 +636,11 @@ function ha({
|
|
|
636
636
|
onClick: () => M(!y),
|
|
637
637
|
className: "flex items-center gap-1 pr-2 border-r border-gray-300 dark:border-gray-700 focus:outline-none",
|
|
638
638
|
children: [
|
|
639
|
-
|
|
639
|
+
k ? /* @__PURE__ */ e(
|
|
640
640
|
"img",
|
|
641
641
|
{
|
|
642
|
-
src: `https://flagcdn.com/w20/${
|
|
643
|
-
alt:
|
|
642
|
+
src: `https://flagcdn.com/w20/${k.code.toLowerCase()}.png`,
|
|
643
|
+
alt: k.code,
|
|
644
644
|
className: "w-5 h-3 object-cover"
|
|
645
645
|
}
|
|
646
646
|
) : /* @__PURE__ */ e("span", { className: "text-gray-400 text-xs", children: "🌐" }),
|
|
@@ -648,9 +648,9 @@ function ha({
|
|
|
648
648
|
]
|
|
649
649
|
}
|
|
650
650
|
),
|
|
651
|
-
|
|
651
|
+
k && /* @__PURE__ */ h("span", { className: "ml-2 text-sm text-gray-700 dark:text-gray-200 whitespace-nowrap", children: [
|
|
652
652
|
"+",
|
|
653
|
-
|
|
653
|
+
k.phone
|
|
654
654
|
] }),
|
|
655
655
|
/* @__PURE__ */ e(
|
|
656
656
|
"input",
|
|
@@ -659,8 +659,8 @@ function ha({
|
|
|
659
659
|
value: g,
|
|
660
660
|
onChange: O,
|
|
661
661
|
required: r,
|
|
662
|
-
disabled: d || !
|
|
663
|
-
placeholder:
|
|
662
|
+
disabled: d || !k,
|
|
663
|
+
placeholder: k ? x : "Select a country",
|
|
664
664
|
className: "flex-1 ml-2 bg-transparent outline-none text-sm text-gray-800 dark:text-gray-100 placeholder-gray-400"
|
|
665
665
|
}
|
|
666
666
|
),
|
|
@@ -671,7 +671,7 @@ function ha({
|
|
|
671
671
|
required: r,
|
|
672
672
|
tabIndex: -1,
|
|
673
673
|
readOnly: !0,
|
|
674
|
-
value:
|
|
674
|
+
value: k && g ? "+" + k.phone + g : "",
|
|
675
675
|
style: {
|
|
676
676
|
position: "absolute",
|
|
677
677
|
opacity: 0,
|
|
@@ -690,7 +690,7 @@ function ha({
|
|
|
690
690
|
"input",
|
|
691
691
|
{
|
|
692
692
|
type: "text",
|
|
693
|
-
value:
|
|
693
|
+
value: D,
|
|
694
694
|
onChange: (T) => U(T.target.value),
|
|
695
695
|
placeholder: "Search country...",
|
|
696
696
|
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 "
|
|
@@ -724,13 +724,13 @@ function ha({
|
|
|
724
724
|
))
|
|
725
725
|
] })
|
|
726
726
|
] })
|
|
727
|
-
] }, t) }) : /* @__PURE__ */ e(
|
|
728
|
-
/* @__PURE__ */ e(q, { label:
|
|
727
|
+
] }, t) }) : /* @__PURE__ */ e(j, { children: /* @__PURE__ */ h("div", { className: s || "col-span-12", children: [
|
|
728
|
+
/* @__PURE__ */ e(q, { label: n, required: r }),
|
|
729
729
|
/* @__PURE__ */ e(
|
|
730
730
|
"input",
|
|
731
731
|
{
|
|
732
732
|
type: "text",
|
|
733
|
-
value:
|
|
733
|
+
value: o,
|
|
734
734
|
onChange: (B) => {
|
|
735
735
|
const G = B.target.value.replace(/[^+\d]/g, ""), _ = G.startsWith("+") ? "+" + G.replace(/[+]/g, "").slice(0) : G;
|
|
736
736
|
i(_);
|
|
@@ -748,13 +748,13 @@ function ha({
|
|
|
748
748
|
] }, t) });
|
|
749
749
|
}
|
|
750
750
|
const _e = Me.forwardRef(
|
|
751
|
-
({ className:
|
|
751
|
+
({ className: n = "", label: o, required: t, ...s }, i) => {
|
|
752
752
|
const d = `
|
|
753
753
|
placeholder-gray-400 dark:placeholder-gray-400
|
|
754
|
-
${
|
|
754
|
+
${n}
|
|
755
755
|
`.trim();
|
|
756
|
-
return /* @__PURE__ */ e(
|
|
757
|
-
/* @__PURE__ */ e(q, { label:
|
|
756
|
+
return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ h("div", { className: s.parentClass || "col-span-12", children: [
|
|
757
|
+
/* @__PURE__ */ e(q, { label: o, required: t }),
|
|
758
758
|
/* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
|
|
759
759
|
"textarea",
|
|
760
760
|
{
|
|
@@ -768,9 +768,9 @@ const _e = Me.forwardRef(
|
|
|
768
768
|
}
|
|
769
769
|
);
|
|
770
770
|
_e.displayName = "TextArea";
|
|
771
|
-
const
|
|
772
|
-
label:
|
|
773
|
-
value:
|
|
771
|
+
const pa = ({
|
|
772
|
+
label: n = "",
|
|
773
|
+
value: o = null,
|
|
774
774
|
onChange: t,
|
|
775
775
|
required: s = !1,
|
|
776
776
|
accept: i = "image/*",
|
|
@@ -779,10 +779,10 @@ const ba = ({
|
|
|
779
779
|
name: x = "",
|
|
780
780
|
parentClass: S = ""
|
|
781
781
|
}) => {
|
|
782
|
-
const [c, b] = C(
|
|
783
|
-
K(() => (
|
|
782
|
+
const [c, b] = C(o), [u, k] = C(!1), f = X(null);
|
|
783
|
+
K(() => (o instanceof File ? b({ file: o, preview: URL.createObjectURL(o) }) : (o != null && o.preview, b(o)), () => {
|
|
784
784
|
c != null && c.preview && c.preview.startsWith("blob:") && URL.revokeObjectURL(c.preview);
|
|
785
|
-
}), [
|
|
785
|
+
}), [o]);
|
|
786
786
|
const g = (L) => {
|
|
787
787
|
if (!L || L.length === 0)
|
|
788
788
|
return;
|
|
@@ -791,23 +791,23 @@ const ba = ({
|
|
|
791
791
|
}, N = (L) => {
|
|
792
792
|
L && L.stopPropagation(), c != null && c.preview && c.preview.startsWith("blob:") && URL.revokeObjectURL(c.preview), b(null), t == null || t(null), f.current && (f.current.value = "");
|
|
793
793
|
}, y = (L) => {
|
|
794
|
-
r && (L.preventDefault(),
|
|
794
|
+
r && (L.preventDefault(), k(!0));
|
|
795
795
|
}, M = (L) => {
|
|
796
|
-
r && (L.preventDefault(),
|
|
797
|
-
},
|
|
798
|
-
r && (L.preventDefault(),
|
|
796
|
+
r && (L.preventDefault(), k(!1));
|
|
797
|
+
}, D = (L) => {
|
|
798
|
+
r && (L.preventDefault(), k(!1), g(L.dataTransfer.files));
|
|
799
799
|
}, U = () => {
|
|
800
800
|
f.current.click();
|
|
801
801
|
};
|
|
802
|
-
return /* @__PURE__ */ e(
|
|
803
|
-
/* @__PURE__ */ e(q, { label:
|
|
802
|
+
return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ h("div", { className: S || "col-span-12", children: [
|
|
803
|
+
/* @__PURE__ */ e(q, { label: n, required: s }),
|
|
804
804
|
/* @__PURE__ */ h(
|
|
805
805
|
"div",
|
|
806
806
|
{
|
|
807
807
|
className: `relative rounded-md p-2 transition-all ${u ? "border-2 border-dashed border-blue-500 bg-blue-50 dark:bg-blue-900/20" : "border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"}`,
|
|
808
808
|
onDragOver: y,
|
|
809
809
|
onDragLeave: M,
|
|
810
|
-
onDrop:
|
|
810
|
+
onDrop: D,
|
|
811
811
|
children: [
|
|
812
812
|
/* @__PURE__ */ e(
|
|
813
813
|
"input",
|
|
@@ -881,8 +881,8 @@ const ba = ({
|
|
|
881
881
|
] }, x) });
|
|
882
882
|
}, ze = Me.forwardRef(
|
|
883
883
|
({
|
|
884
|
-
label:
|
|
885
|
-
required:
|
|
884
|
+
label: n,
|
|
885
|
+
required: o,
|
|
886
886
|
parentClass: t = "",
|
|
887
887
|
className: s = "",
|
|
888
888
|
type: i = "text",
|
|
@@ -892,7 +892,7 @@ const ba = ({
|
|
|
892
892
|
field: S = {},
|
|
893
893
|
...c
|
|
894
894
|
}, b) => {
|
|
895
|
-
const [u,
|
|
895
|
+
const [u, k] = C(!1), f = (N) => {
|
|
896
896
|
if (i === "number") {
|
|
897
897
|
if (["e", "E", "+"].includes(N.key)) {
|
|
898
898
|
N.preventDefault();
|
|
@@ -922,12 +922,12 @@ const ba = ({
|
|
|
922
922
|
(y = c.onChange) == null || y.call(c, { target: { value: N } });
|
|
923
923
|
}, 100);
|
|
924
924
|
}
|
|
925
|
-
}, [x]), /* @__PURE__ */ e(
|
|
925
|
+
}, [x]), /* @__PURE__ */ e(j, { children: /* @__PURE__ */ h("div", { className: t || "col-span-12", children: [
|
|
926
926
|
/* @__PURE__ */ e(
|
|
927
927
|
q,
|
|
928
928
|
{
|
|
929
|
-
label:
|
|
930
|
-
required:
|
|
929
|
+
label: n,
|
|
930
|
+
required: o,
|
|
931
931
|
infoText: S.infoText
|
|
932
932
|
}
|
|
933
933
|
),
|
|
@@ -937,7 +937,7 @@ const ba = ({
|
|
|
937
937
|
{
|
|
938
938
|
type: i === "password" && u ? "text" : i,
|
|
939
939
|
ref: b,
|
|
940
|
-
required:
|
|
940
|
+
required: o,
|
|
941
941
|
onKeyDown: f,
|
|
942
942
|
className: g,
|
|
943
943
|
...c
|
|
@@ -948,7 +948,7 @@ const ba = ({
|
|
|
948
948
|
{
|
|
949
949
|
type: "button",
|
|
950
950
|
tabIndex: -1,
|
|
951
|
-
onClick: () =>
|
|
951
|
+
onClick: () => k((N) => !N),
|
|
952
952
|
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",
|
|
953
953
|
children: /* @__PURE__ */ e(
|
|
954
954
|
ne,
|
|
@@ -964,9 +964,9 @@ const ba = ({
|
|
|
964
964
|
}
|
|
965
965
|
);
|
|
966
966
|
ze.displayName = "Input";
|
|
967
|
-
const
|
|
968
|
-
key:
|
|
969
|
-
editorKey:
|
|
967
|
+
const ga = ({
|
|
968
|
+
key: n,
|
|
969
|
+
editorKey: o = "",
|
|
970
970
|
value: t = "",
|
|
971
971
|
onChange: s,
|
|
972
972
|
label: i = "",
|
|
@@ -977,7 +977,7 @@ const pa = ({
|
|
|
977
977
|
inline: c = !1,
|
|
978
978
|
disabled: b = !1,
|
|
979
979
|
plugins: u,
|
|
980
|
-
toolbar:
|
|
980
|
+
toolbar: k,
|
|
981
981
|
menubar: f = !1,
|
|
982
982
|
fontFamily: g = "Inter, sans-serif",
|
|
983
983
|
initConfig: N = {},
|
|
@@ -988,7 +988,7 @@ const pa = ({
|
|
|
988
988
|
/* @__PURE__ */ e(
|
|
989
989
|
sa,
|
|
990
990
|
{
|
|
991
|
-
apiKey:
|
|
991
|
+
apiKey: o,
|
|
992
992
|
value: t,
|
|
993
993
|
disabled: b,
|
|
994
994
|
init: {
|
|
@@ -1030,7 +1030,7 @@ const pa = ({
|
|
|
1030
1030
|
"help",
|
|
1031
1031
|
"wordcount"
|
|
1032
1032
|
],
|
|
1033
|
-
toolbar:
|
|
1033
|
+
toolbar: k ?? "undo redo | blocks | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media table | removeformat | code fullscreen preview",
|
|
1034
1034
|
placeholder: r,
|
|
1035
1035
|
content_style: `
|
|
1036
1036
|
body {
|
|
@@ -1044,9 +1044,9 @@ const pa = ({
|
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
)
|
|
1047
|
-
] },
|
|
1048
|
-
name:
|
|
1049
|
-
label:
|
|
1047
|
+
] }, n), ma = ({
|
|
1048
|
+
name: n = "",
|
|
1049
|
+
label: o = "",
|
|
1050
1050
|
// label for single checkbox
|
|
1051
1051
|
options: t = [],
|
|
1052
1052
|
// array of { label, value } for multiple
|
|
@@ -1060,12 +1060,12 @@ const pa = ({
|
|
|
1060
1060
|
multiSelect: c = !1
|
|
1061
1061
|
// ✅ if true, only one option can be selected (like radio)
|
|
1062
1062
|
}) => {
|
|
1063
|
-
const b = Array.isArray(t) && t.length > 0, u = (g) => b ? c ? Array.isArray(s) && s.includes(g) : s === g : !!s,
|
|
1064
|
-
i == null || i(g.target.checked,
|
|
1063
|
+
const b = Array.isArray(t) && t.length > 0, u = (g) => b ? c ? Array.isArray(s) && s.includes(g) : s === g : !!s, k = (g) => {
|
|
1064
|
+
i == null || i(g.target.checked, n);
|
|
1065
1065
|
}, f = (g, N) => {
|
|
1066
1066
|
if (i)
|
|
1067
1067
|
if (!c)
|
|
1068
|
-
i(N ? g : "",
|
|
1068
|
+
i(N ? g : "", n);
|
|
1069
1069
|
else {
|
|
1070
1070
|
const y = Array.isArray(s) ? [...s] : [];
|
|
1071
1071
|
if (N)
|
|
@@ -1074,17 +1074,17 @@ const pa = ({
|
|
|
1074
1074
|
const M = y.indexOf(g);
|
|
1075
1075
|
M > -1 && y.splice(M, 1);
|
|
1076
1076
|
}
|
|
1077
|
-
i(y,
|
|
1077
|
+
i(y, n);
|
|
1078
1078
|
}
|
|
1079
1079
|
};
|
|
1080
|
-
return b ? /* @__PURE__ */ e(
|
|
1081
|
-
/* @__PURE__ */ e(q, { label:
|
|
1080
|
+
return b ? /* @__PURE__ */ e(j, { children: /* @__PURE__ */ h("div", { className: `${x}`, children: [
|
|
1081
|
+
/* @__PURE__ */ e(q, { label: o, required: r }),
|
|
1082
1082
|
/* @__PURE__ */ e("div", { className: "flex flex-col space-y-2", children: t.map((g, N) => /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
1083
1083
|
/* @__PURE__ */ e(
|
|
1084
1084
|
"input",
|
|
1085
1085
|
{
|
|
1086
1086
|
type: "checkbox",
|
|
1087
|
-
name:
|
|
1087
|
+
name: n,
|
|
1088
1088
|
value: g.value,
|
|
1089
1089
|
checked: u(g.value),
|
|
1090
1090
|
disabled: d || g.disabled,
|
|
@@ -1092,12 +1092,12 @@ const pa = ({
|
|
|
1092
1092
|
onChange: (y) => f(g.value, y.target.checked),
|
|
1093
1093
|
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}`
|
|
1094
1094
|
},
|
|
1095
|
-
|
|
1095
|
+
n
|
|
1096
1096
|
),
|
|
1097
1097
|
g.label && /* @__PURE__ */ e(
|
|
1098
1098
|
"label",
|
|
1099
1099
|
{
|
|
1100
|
-
htmlFor:
|
|
1100
|
+
htmlFor: n,
|
|
1101
1101
|
className: "ml-2 text-sm text-gray-700 dark:text-gray-200 select-none",
|
|
1102
1102
|
children: g.label
|
|
1103
1103
|
}
|
|
@@ -1108,26 +1108,26 @@ const pa = ({
|
|
|
1108
1108
|
"input",
|
|
1109
1109
|
{
|
|
1110
1110
|
type: "checkbox",
|
|
1111
|
-
name:
|
|
1111
|
+
name: n,
|
|
1112
1112
|
checked: u(),
|
|
1113
1113
|
disabled: d,
|
|
1114
1114
|
required: r,
|
|
1115
|
-
onChange:
|
|
1115
|
+
onChange: k,
|
|
1116
1116
|
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}`
|
|
1117
1117
|
}
|
|
1118
1118
|
),
|
|
1119
|
-
|
|
1119
|
+
o && /* @__PURE__ */ e(
|
|
1120
1120
|
"label",
|
|
1121
1121
|
{
|
|
1122
|
-
htmlFor:
|
|
1122
|
+
htmlFor: n,
|
|
1123
1123
|
className: "ml-2 text-sm text-gray-700 dark:text-gray-200 select-none",
|
|
1124
|
-
children:
|
|
1124
|
+
children: o
|
|
1125
1125
|
}
|
|
1126
1126
|
)
|
|
1127
1127
|
] });
|
|
1128
|
-
},
|
|
1129
|
-
label:
|
|
1130
|
-
value:
|
|
1128
|
+
}, fa = ({
|
|
1129
|
+
label: n = "",
|
|
1130
|
+
value: o = null,
|
|
1131
1131
|
onChange: t,
|
|
1132
1132
|
required: s = !1,
|
|
1133
1133
|
accept: i = "audio/*",
|
|
@@ -1136,19 +1136,19 @@ const pa = ({
|
|
|
1136
1136
|
name: x = "",
|
|
1137
1137
|
parentClass: S = ""
|
|
1138
1138
|
}) => {
|
|
1139
|
-
const [c, b] = C(null), [u,
|
|
1139
|
+
const [c, b] = C(null), [u, k] = C(!1), f = X(null);
|
|
1140
1140
|
K(() => {
|
|
1141
|
-
if (!
|
|
1141
|
+
if (!o) {
|
|
1142
1142
|
g(), b(null);
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
if (
|
|
1146
|
-
const O = URL.createObjectURL(
|
|
1147
|
-
return b({ file:
|
|
1145
|
+
if (o instanceof File) {
|
|
1146
|
+
const O = URL.createObjectURL(o);
|
|
1147
|
+
return b({ file: o, preview: O }), () => {
|
|
1148
1148
|
URL.revokeObjectURL(O);
|
|
1149
1149
|
};
|
|
1150
|
-
} else typeof
|
|
1151
|
-
}, [
|
|
1150
|
+
} else typeof o == "string" ? b({ preview: o }) : o != null && o.preview && b(o);
|
|
1151
|
+
}, [o]);
|
|
1152
1152
|
const g = () => {
|
|
1153
1153
|
c != null && c.preview && c.preview.startsWith("blob:") && URL.revokeObjectURL(c.preview);
|
|
1154
1154
|
}, N = (O) => {
|
|
@@ -1159,22 +1159,22 @@ const pa = ({
|
|
|
1159
1159
|
}, y = (O) => {
|
|
1160
1160
|
O && O.stopPropagation(), g(), b(null), t == null || t(null), f.current && (f.current.value = "");
|
|
1161
1161
|
}, M = (O) => {
|
|
1162
|
-
r && (O.preventDefault(),
|
|
1163
|
-
},
|
|
1164
|
-
r && (O.preventDefault(),
|
|
1162
|
+
r && (O.preventDefault(), k(!0));
|
|
1163
|
+
}, D = (O) => {
|
|
1164
|
+
r && (O.preventDefault(), k(!1));
|
|
1165
1165
|
}, U = (O) => {
|
|
1166
|
-
r && (O.preventDefault(),
|
|
1166
|
+
r && (O.preventDefault(), k(!1), N(O.dataTransfer.files));
|
|
1167
1167
|
}, L = () => {
|
|
1168
1168
|
f.current.click();
|
|
1169
1169
|
};
|
|
1170
1170
|
return /* @__PURE__ */ h("div", { className: S || "col-span-12", children: [
|
|
1171
|
-
/* @__PURE__ */ e(q, { label:
|
|
1171
|
+
/* @__PURE__ */ e(q, { label: n, required: s }),
|
|
1172
1172
|
/* @__PURE__ */ h(
|
|
1173
1173
|
"div",
|
|
1174
1174
|
{
|
|
1175
1175
|
className: `relative rounded-lg p-2 transition-all ${u ? "border-2 border-dashed border-blue-500 bg-blue-50 dark:bg-blue-900/20" : "border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"}`,
|
|
1176
1176
|
onDragOver: M,
|
|
1177
|
-
onDragLeave:
|
|
1177
|
+
onDragLeave: D,
|
|
1178
1178
|
onDrop: U,
|
|
1179
1179
|
children: [
|
|
1180
1180
|
/* @__PURE__ */ e(
|
|
@@ -1242,7 +1242,7 @@ const pa = ({
|
|
|
1242
1242
|
}
|
|
1243
1243
|
)
|
|
1244
1244
|
] }, x);
|
|
1245
|
-
}, Pe = ({ src:
|
|
1245
|
+
}, Pe = ({ src: n, alt: o = "preview", isOpen: t, setIsOpen: s }) => {
|
|
1246
1246
|
const i = () => s(!1);
|
|
1247
1247
|
return K(() => {
|
|
1248
1248
|
const d = (r) => {
|
|
@@ -1251,7 +1251,7 @@ const pa = ({
|
|
|
1251
1251
|
return t && (document.body.style.overflow = "hidden", document.addEventListener("keydown", d)), () => {
|
|
1252
1252
|
document.body.style.overflow = "", document.removeEventListener("keydown", d);
|
|
1253
1253
|
};
|
|
1254
|
-
}, [t]), /* @__PURE__ */ e(
|
|
1254
|
+
}, [t]), /* @__PURE__ */ e(j, { children: /* @__PURE__ */ h(
|
|
1255
1255
|
"div",
|
|
1256
1256
|
{
|
|
1257
1257
|
className: `fixed inset-0 z-50 flex items-center justify-center bg-black/70 dark:bg-black/80 \r
|
|
@@ -1275,8 +1275,8 @@ const pa = ({
|
|
|
1275
1275
|
children: /* @__PURE__ */ e(
|
|
1276
1276
|
"img",
|
|
1277
1277
|
{
|
|
1278
|
-
src:
|
|
1279
|
-
alt:
|
|
1278
|
+
src: n,
|
|
1279
|
+
alt: o,
|
|
1280
1280
|
className: "w-full max-h-[90vh] object-contain rounded-xl"
|
|
1281
1281
|
}
|
|
1282
1282
|
)
|
|
@@ -1285,12 +1285,12 @@ const pa = ({
|
|
|
1285
1285
|
]
|
|
1286
1286
|
}
|
|
1287
1287
|
) });
|
|
1288
|
-
}, He = ({ col:
|
|
1289
|
-
let t =
|
|
1288
|
+
}, He = ({ col: n, data: o }) => {
|
|
1289
|
+
let t = o[n.titleKey], s = o[n.subtitleKey], i = o[n.imageKey], d = n.fallback_icon;
|
|
1290
1290
|
const [r, x] = C(null), [S, c] = C(!1), b = (u) => {
|
|
1291
1291
|
u && u.src instanceof File && (u = { ...u, src: URL.createObjectURL(u.src) }), x(u), c(!0);
|
|
1292
1292
|
};
|
|
1293
|
-
return /* @__PURE__ */ h(
|
|
1293
|
+
return /* @__PURE__ */ h(j, { children: [
|
|
1294
1294
|
S && /* @__PURE__ */ e(
|
|
1295
1295
|
Pe,
|
|
1296
1296
|
{
|
|
@@ -1305,7 +1305,7 @@ const pa = ({
|
|
|
1305
1305
|
{
|
|
1306
1306
|
className: `col-span-12 flex items-center space-x-4 p-4 rounded-xl
|
|
1307
1307
|
bg-gray-100 dark:bg-gray-900
|
|
1308
|
-
${
|
|
1308
|
+
${n.blockClass}`,
|
|
1309
1309
|
children: [
|
|
1310
1310
|
i ? /* @__PURE__ */ e(
|
|
1311
1311
|
"img",
|
|
@@ -1315,7 +1315,7 @@ const pa = ({
|
|
|
1315
1315
|
onClick: () => b({ src: i, alt: t }),
|
|
1316
1316
|
className: "w-16 h-16 cursor-pointer rounded-full object-cover border-2 border-gray-200 dark:border-gray-700"
|
|
1317
1317
|
}
|
|
1318
|
-
) : d ? d instanceof Function ? d(
|
|
1318
|
+
) : d ? d instanceof Function ? d(o) : d : /* @__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(Ae, { className: "w-8 h-8 text-gray-400" }) }),
|
|
1319
1319
|
/* @__PURE__ */ h("div", { children: [
|
|
1320
1320
|
/* @__PURE__ */ e("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white", children: t }),
|
|
1321
1321
|
/* @__PURE__ */ e("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: s })
|
|
@@ -1324,12 +1324,12 @@ const pa = ({
|
|
|
1324
1324
|
}
|
|
1325
1325
|
)
|
|
1326
1326
|
] });
|
|
1327
|
-
}, Ye = ({ col:
|
|
1328
|
-
let t =
|
|
1329
|
-
const [S, c] = C(null), [b, u] = C(!1),
|
|
1327
|
+
}, Ye = ({ col: n, data: o }) => {
|
|
1328
|
+
let t = o[n.titleKey], s = o[n.subtitleKey], i = o[n.imageKey], d = n.label, r = n == null ? void 0 : n.icon, x = n.fallback_icon;
|
|
1329
|
+
const [S, c] = C(null), [b, u] = C(!1), k = (f) => {
|
|
1330
1330
|
f && f.src instanceof File && (f = { ...f, src: URL.createObjectURL(f.src) }), c(f), u(!0);
|
|
1331
1331
|
};
|
|
1332
|
-
return /* @__PURE__ */ h(
|
|
1332
|
+
return /* @__PURE__ */ h(j, { children: [
|
|
1333
1333
|
b && /* @__PURE__ */ e(
|
|
1334
1334
|
Pe,
|
|
1335
1335
|
{
|
|
@@ -1344,7 +1344,7 @@ const pa = ({
|
|
|
1344
1344
|
{
|
|
1345
1345
|
className: `col-span-12 flex items-center space-x-4 p-4 rounded-xl
|
|
1346
1346
|
bg-gray-100 dark:bg-gray-900
|
|
1347
|
-
${
|
|
1347
|
+
${n.blockClass}`,
|
|
1348
1348
|
children: [
|
|
1349
1349
|
r && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: r }),
|
|
1350
1350
|
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -1355,10 +1355,10 @@ const pa = ({
|
|
|
1355
1355
|
{
|
|
1356
1356
|
src: i instanceof File ? URL.createObjectURL(i) : i,
|
|
1357
1357
|
alt: t,
|
|
1358
|
-
onClick: () =>
|
|
1358
|
+
onClick: () => k({ src: i, alt: t }),
|
|
1359
1359
|
className: "w-8 h-8 cursor-pointer rounded-full object-cover border-2 border-gray-200 dark:border-gray-700"
|
|
1360
1360
|
}
|
|
1361
|
-
) : x ? x instanceof Function ? x(
|
|
1361
|
+
) : x ? x instanceof Function ? x(o) : x : /* @__PURE__ */ e("div", { className: "w-8 h-8 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(Ae, { className: "w-6 h-6 text-gray-400" }) }),
|
|
1362
1362
|
/* @__PURE__ */ h("div", { className: "ml-2", children: [
|
|
1363
1363
|
/* @__PURE__ */ e("p", { className: "mb-0 text-sm text-gray-900 dark:text-white break-words", children: t }),
|
|
1364
1364
|
/* @__PURE__ */ e("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: s })
|
|
@@ -1403,13 +1403,13 @@ const pa = ({
|
|
|
1403
1403
|
outline: "border !bg-transparent",
|
|
1404
1404
|
soft: "bg opacity-90"
|
|
1405
1405
|
}, Ve = ({
|
|
1406
|
-
label:
|
|
1407
|
-
variant:
|
|
1406
|
+
label: n,
|
|
1407
|
+
variant: o = "contained",
|
|
1408
1408
|
// contained | outline | soft
|
|
1409
1409
|
color: t = "green",
|
|
1410
1410
|
className: s = ""
|
|
1411
1411
|
}) => {
|
|
1412
|
-
const i = Be[t] || Be.green, d = Ue[
|
|
1412
|
+
const i = Be[t] || Be.green, d = Ue[o] || Ue.contained, r = o === "outline" ? i.border : i.bg;
|
|
1413
1413
|
return /* @__PURE__ */ e(
|
|
1414
1414
|
"span",
|
|
1415
1415
|
{
|
|
@@ -1417,21 +1417,21 @@ const pa = ({
|
|
|
1417
1417
|
${r}
|
|
1418
1418
|
${d}
|
|
1419
1419
|
${s}`,
|
|
1420
|
-
children:
|
|
1420
|
+
children: n
|
|
1421
1421
|
}
|
|
1422
1422
|
);
|
|
1423
|
-
}, We = ({ col:
|
|
1423
|
+
}, We = ({ col: n, data: o }) => {
|
|
1424
1424
|
var S;
|
|
1425
|
-
let t =
|
|
1426
|
-
if (d === "chip" && ((S =
|
|
1427
|
-
let c =
|
|
1425
|
+
let t = n == null ? void 0 : n.icon, s = n.label, i = o[n.key], d = n.type, r = n.variant || "outline", x = n.defaultColor;
|
|
1426
|
+
if (d === "chip" && ((S = n.chipOptions) == null ? void 0 : S.length) > 0) {
|
|
1427
|
+
let c = n == null ? void 0 : n.chipOptions.find((b) => b.value == i);
|
|
1428
1428
|
c && (i = c.label, x = c.color);
|
|
1429
1429
|
}
|
|
1430
1430
|
return /* @__PURE__ */ h(
|
|
1431
1431
|
"div",
|
|
1432
1432
|
{
|
|
1433
1433
|
className: `col-span-12 flex items-center space-x-4 p-4 rounded-xl
|
|
1434
|
-
bg-gray-100 dark:bg-gray-900 ${
|
|
1434
|
+
bg-gray-100 dark:bg-gray-900 ${n.blockClass || ""}`,
|
|
1435
1435
|
children: [
|
|
1436
1436
|
t && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: t }),
|
|
1437
1437
|
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -1465,16 +1465,16 @@ const pa = ({
|
|
|
1465
1465
|
i instanceof File ? URL.createObjectURL(i) : i
|
|
1466
1466
|
) : /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-400", children: "N/A" }) : (
|
|
1467
1467
|
/* DEFAULT */
|
|
1468
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-900 dark:text-white break-words", children: d == "date" ? /* @__PURE__ */ e("span", { children: Ge(i,
|
|
1468
|
+
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-900 dark:text-white break-words", children: d == "date" ? /* @__PURE__ */ e("span", { children: Ge(i, n.format || "DD MMM YYYY") }) : i || "N/A" })
|
|
1469
1469
|
)
|
|
1470
1470
|
)
|
|
1471
1471
|
] })
|
|
1472
1472
|
]
|
|
1473
1473
|
}
|
|
1474
1474
|
);
|
|
1475
|
-
},
|
|
1476
|
-
value:
|
|
1477
|
-
onChange:
|
|
1475
|
+
}, ya = ({
|
|
1476
|
+
value: n = !0,
|
|
1477
|
+
onChange: o,
|
|
1478
1478
|
text: t,
|
|
1479
1479
|
options: s = [],
|
|
1480
1480
|
label: i,
|
|
@@ -1487,7 +1487,7 @@ const pa = ({
|
|
|
1487
1487
|
{ label: "Active", value: !0 },
|
|
1488
1488
|
{ label: "Inactive", value: !1 }
|
|
1489
1489
|
];
|
|
1490
|
-
return /* @__PURE__ */ e(
|
|
1490
|
+
return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ h("div", { className: S || "col-span-12", children: [
|
|
1491
1491
|
/* @__PURE__ */ e(q, { label: i, required: d }),
|
|
1492
1492
|
/* @__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: [
|
|
1493
1493
|
t && /* @__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: t }),
|
|
@@ -1504,8 +1504,8 @@ const pa = ({
|
|
|
1504
1504
|
required: d && u === 0,
|
|
1505
1505
|
value: b.value,
|
|
1506
1506
|
disabled: x,
|
|
1507
|
-
checked:
|
|
1508
|
-
onChange: () =>
|
|
1507
|
+
checked: n === b.value,
|
|
1508
|
+
onChange: () => o(b.value),
|
|
1509
1509
|
className: "w-4 h-4 border-gray-300 cursor-pointer"
|
|
1510
1510
|
}
|
|
1511
1511
|
),
|
|
@@ -1516,7 +1516,7 @@ const pa = ({
|
|
|
1516
1516
|
)) })
|
|
1517
1517
|
] })
|
|
1518
1518
|
] }, r) });
|
|
1519
|
-
}, qe = ({ field:
|
|
1519
|
+
}, qe = ({ field: n, formData: o, handleChange: t }) => {
|
|
1520
1520
|
const {
|
|
1521
1521
|
key: s,
|
|
1522
1522
|
label: i,
|
|
@@ -1527,13 +1527,13 @@ const pa = ({
|
|
|
1527
1527
|
inputClass: c,
|
|
1528
1528
|
search: b,
|
|
1529
1529
|
accept: u,
|
|
1530
|
-
text:
|
|
1530
|
+
text: k,
|
|
1531
1531
|
required: f = !1,
|
|
1532
1532
|
minLength: g,
|
|
1533
1533
|
dragDrop: N,
|
|
1534
1534
|
parentClass: y,
|
|
1535
1535
|
countriesList: M,
|
|
1536
|
-
defaultCountry:
|
|
1536
|
+
defaultCountry: D,
|
|
1537
1537
|
multiple: U,
|
|
1538
1538
|
dropdownMaxHeight: L,
|
|
1539
1539
|
editorKey: O,
|
|
@@ -1545,29 +1545,29 @@ const pa = ({
|
|
|
1545
1545
|
optionDependencyKey: _,
|
|
1546
1546
|
pattern: J,
|
|
1547
1547
|
renderType: Z
|
|
1548
|
-
} =
|
|
1549
|
-
let A =
|
|
1548
|
+
} = n;
|
|
1549
|
+
let A = o == null ? void 0 : o[s];
|
|
1550
1550
|
A == null && (A = "");
|
|
1551
1551
|
const z = x || (d === "select" ? `Select ${i}` : `Enter ${i}`), V = "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";
|
|
1552
|
-
if (G && typeof G == "function" && !G(
|
|
1552
|
+
if (G && typeof G == "function" && !G(o))
|
|
1553
1553
|
return null;
|
|
1554
1554
|
if (Z && Z == "details")
|
|
1555
1555
|
switch (d) {
|
|
1556
1556
|
case "group":
|
|
1557
|
-
return /* @__PURE__ */ e(He, { col:
|
|
1557
|
+
return /* @__PURE__ */ e(He, { col: n, data: o });
|
|
1558
1558
|
case "cardGroup":
|
|
1559
|
-
return /* @__PURE__ */ e(Ye, { col:
|
|
1559
|
+
return /* @__PURE__ */ e(Ye, { col: n, data: o });
|
|
1560
1560
|
default:
|
|
1561
|
-
return /* @__PURE__ */ e(We, { col:
|
|
1561
|
+
return /* @__PURE__ */ e(We, { col: n, data: o });
|
|
1562
1562
|
}
|
|
1563
1563
|
switch (d) {
|
|
1564
1564
|
case "select":
|
|
1565
1565
|
return /* @__PURE__ */ e(
|
|
1566
|
-
|
|
1566
|
+
ha,
|
|
1567
1567
|
{
|
|
1568
1568
|
options: r || [],
|
|
1569
1569
|
value: A,
|
|
1570
|
-
formData:
|
|
1570
|
+
formData: o,
|
|
1571
1571
|
dependencyKey: _,
|
|
1572
1572
|
onChange: (I) => t(s, I),
|
|
1573
1573
|
placeholder: z,
|
|
@@ -1585,7 +1585,7 @@ const pa = ({
|
|
|
1585
1585
|
);
|
|
1586
1586
|
case "checkbox":
|
|
1587
1587
|
return /* @__PURE__ */ e(
|
|
1588
|
-
|
|
1588
|
+
ma,
|
|
1589
1589
|
{
|
|
1590
1590
|
name: s,
|
|
1591
1591
|
label: i,
|
|
@@ -1601,11 +1601,11 @@ const pa = ({
|
|
|
1601
1601
|
);
|
|
1602
1602
|
case "radio":
|
|
1603
1603
|
return /* @__PURE__ */ e(
|
|
1604
|
-
|
|
1604
|
+
ya,
|
|
1605
1605
|
{
|
|
1606
1606
|
value: A,
|
|
1607
1607
|
onChange: (I) => t(s, I),
|
|
1608
|
-
text:
|
|
1608
|
+
text: k,
|
|
1609
1609
|
options: r || [],
|
|
1610
1610
|
label: i,
|
|
1611
1611
|
required: f,
|
|
@@ -1620,7 +1620,7 @@ const pa = ({
|
|
|
1620
1620
|
{
|
|
1621
1621
|
value: A,
|
|
1622
1622
|
onChange: (I) => t(s, I),
|
|
1623
|
-
text:
|
|
1623
|
+
text: k,
|
|
1624
1624
|
options: r || [],
|
|
1625
1625
|
label: i,
|
|
1626
1626
|
required: f,
|
|
@@ -1631,12 +1631,12 @@ const pa = ({
|
|
|
1631
1631
|
);
|
|
1632
1632
|
case "phone":
|
|
1633
1633
|
return /* @__PURE__ */ e(
|
|
1634
|
-
|
|
1634
|
+
ba,
|
|
1635
1635
|
{
|
|
1636
1636
|
value: A,
|
|
1637
1637
|
onChange: (I) => t(s, I),
|
|
1638
1638
|
countriesList: M,
|
|
1639
|
-
defaultCountry:
|
|
1639
|
+
defaultCountry: D,
|
|
1640
1640
|
required: f,
|
|
1641
1641
|
placeholder: z,
|
|
1642
1642
|
search: b,
|
|
@@ -1664,7 +1664,7 @@ const pa = ({
|
|
|
1664
1664
|
);
|
|
1665
1665
|
case "image":
|
|
1666
1666
|
return /* @__PURE__ */ e(
|
|
1667
|
-
|
|
1667
|
+
pa,
|
|
1668
1668
|
{
|
|
1669
1669
|
value: A,
|
|
1670
1670
|
onChange: (I) => t(s, I),
|
|
@@ -1679,7 +1679,7 @@ const pa = ({
|
|
|
1679
1679
|
);
|
|
1680
1680
|
case "audio":
|
|
1681
1681
|
return /* @__PURE__ */ e(
|
|
1682
|
-
|
|
1682
|
+
fa,
|
|
1683
1683
|
{
|
|
1684
1684
|
value: A,
|
|
1685
1685
|
onChange: (I) => t(s, I),
|
|
@@ -1694,7 +1694,7 @@ const pa = ({
|
|
|
1694
1694
|
);
|
|
1695
1695
|
case "tinyEditor":
|
|
1696
1696
|
return /* @__PURE__ */ e(
|
|
1697
|
-
|
|
1697
|
+
ga,
|
|
1698
1698
|
{
|
|
1699
1699
|
value: A,
|
|
1700
1700
|
onChange: (I) => t(s, I),
|
|
@@ -1712,7 +1712,7 @@ const pa = ({
|
|
|
1712
1712
|
return /* @__PURE__ */ e(
|
|
1713
1713
|
ze,
|
|
1714
1714
|
{
|
|
1715
|
-
field:
|
|
1715
|
+
field: n,
|
|
1716
1716
|
type: d || "text",
|
|
1717
1717
|
defaultValue: B,
|
|
1718
1718
|
value: A,
|
|
@@ -1730,21 +1730,21 @@ const pa = ({
|
|
|
1730
1730
|
}
|
|
1731
1731
|
);
|
|
1732
1732
|
}
|
|
1733
|
-
},
|
|
1733
|
+
}, xa = ({ isOpen: n, onClose: o, config: t, onApply: s }) => {
|
|
1734
1734
|
var c;
|
|
1735
1735
|
const [i, d] = C({}), r = (b, u) => {
|
|
1736
|
-
d((
|
|
1736
|
+
d((k) => ({ ...k, [b]: u }));
|
|
1737
1737
|
}, x = () => {
|
|
1738
|
-
s == null || s(i),
|
|
1738
|
+
s == null || s(i), o();
|
|
1739
1739
|
}, S = () => {
|
|
1740
|
-
d({}), s == null || s({}),
|
|
1740
|
+
d({}), s == null || s({}), o();
|
|
1741
1741
|
};
|
|
1742
|
-
return /* @__PURE__ */ h(
|
|
1742
|
+
return /* @__PURE__ */ h(j, { children: [
|
|
1743
1743
|
/* @__PURE__ */ e(
|
|
1744
1744
|
"div",
|
|
1745
1745
|
{
|
|
1746
|
-
className: `fixed inset-0 bg-black/50 z-40 transition-opacity duration-300 ${
|
|
1747
|
-
onClick:
|
|
1746
|
+
className: `fixed inset-0 bg-black/50 z-40 transition-opacity duration-300 ${n ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
|
|
1747
|
+
onClick: o
|
|
1748
1748
|
}
|
|
1749
1749
|
),
|
|
1750
1750
|
/* @__PURE__ */ h(
|
|
@@ -1752,7 +1752,7 @@ const pa = ({
|
|
|
1752
1752
|
{
|
|
1753
1753
|
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
|
|
1754
1754
|
transform transition-transform duration-300 ease-in-out
|
|
1755
|
-
${
|
|
1755
|
+
${n ? "translate-x-0" : "translate-x-full"}
|
|
1756
1756
|
`,
|
|
1757
1757
|
children: [
|
|
1758
1758
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: [
|
|
@@ -1760,19 +1760,19 @@ const pa = ({
|
|
|
1760
1760
|
/* @__PURE__ */ e(
|
|
1761
1761
|
"button",
|
|
1762
1762
|
{
|
|
1763
|
-
onClick:
|
|
1763
|
+
onClick: o,
|
|
1764
1764
|
className: "p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition",
|
|
1765
1765
|
children: /* @__PURE__ */ e(Le, { className: "w-5 h-5 text-gray-500 dark:text-gray-400" })
|
|
1766
1766
|
}
|
|
1767
1767
|
)
|
|
1768
1768
|
] }),
|
|
1769
|
-
|
|
1769
|
+
n && /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-4 py-3", children: t != null && t.component ? /* @__PURE__ */ e(
|
|
1770
1770
|
t.component,
|
|
1771
1771
|
{
|
|
1772
1772
|
filters: i,
|
|
1773
1773
|
onFilterChange: r
|
|
1774
1774
|
}
|
|
1775
|
-
) : /* @__PURE__ */ e("div", { className: "space-y-4", children: (c = t == null ? void 0 : t.fields) == null ? void 0 : c.map((b) => /* @__PURE__ */ e(
|
|
1775
|
+
) : /* @__PURE__ */ e("div", { className: "space-y-4", children: (c = t == null ? void 0 : t.fields) == null ? void 0 : c.map((b) => /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(
|
|
1776
1776
|
qe,
|
|
1777
1777
|
{
|
|
1778
1778
|
field: b,
|
|
@@ -1806,22 +1806,22 @@ const pa = ({
|
|
|
1806
1806
|
}
|
|
1807
1807
|
)
|
|
1808
1808
|
] });
|
|
1809
|
-
},
|
|
1809
|
+
}, va = ({ rows: n = 5, columns: o = 5 }) => /* @__PURE__ */ h(j, { children: [
|
|
1810
1810
|
/* @__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" }) }),
|
|
1811
1811
|
/* @__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: [
|
|
1812
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "bg-gray-50 dark:bg-gray-900", children: Array.from({ length:
|
|
1813
|
-
/* @__PURE__ */ e("tbody", { children: Array.from({ length:
|
|
1812
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "bg-gray-50 dark:bg-gray-900", children: Array.from({ length: o }).map((t, s) => /* @__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" }) }, s)) }) }),
|
|
1813
|
+
/* @__PURE__ */ e("tbody", { children: Array.from({ length: n }).map((t, s) => /* @__PURE__ */ e(
|
|
1814
1814
|
"tr",
|
|
1815
1815
|
{
|
|
1816
1816
|
className: "border-t border-gray-200 dark:border-gray-800",
|
|
1817
|
-
children: Array.from({ length:
|
|
1817
|
+
children: Array.from({ length: o }).map((i, d) => /* @__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" }) }, d))
|
|
1818
1818
|
},
|
|
1819
1819
|
s
|
|
1820
1820
|
)) })
|
|
1821
1821
|
] }) })
|
|
1822
|
-
] }),
|
|
1823
|
-
config:
|
|
1824
|
-
setShowAdd:
|
|
1822
|
+
] }), ka = ({
|
|
1823
|
+
config: n,
|
|
1824
|
+
setShowAdd: o,
|
|
1825
1825
|
title: t,
|
|
1826
1826
|
buttonText: s,
|
|
1827
1827
|
description: i,
|
|
@@ -1845,18 +1845,18 @@ const pa = ({
|
|
|
1845
1845
|
rows_per_page: 10,
|
|
1846
1846
|
useServerSidePagination: !1
|
|
1847
1847
|
},
|
|
1848
|
-
emptyMessage:
|
|
1848
|
+
emptyMessage: k = "No data available",
|
|
1849
1849
|
onMenuAction: f,
|
|
1850
1850
|
setServerSidePaginationData: g = () => {
|
|
1851
1851
|
},
|
|
1852
1852
|
onFilterApply: N,
|
|
1853
1853
|
filterConfig: y = null,
|
|
1854
1854
|
rowClick: M = null
|
|
1855
|
-
} =
|
|
1856
|
-
if (u.useServerSidePagination) return
|
|
1855
|
+
} = n, [D, U] = C(""), [L, O] = C(null), [E, F] = C([]), [T, B] = C({}), [G, _] = C(!1), [J, Z] = C({}), [A, z] = C(null), [V, I] = C(!1), w = Fe(() => !c.enabled || !D.trim() || c.useServerSideSearch ? r : ua(r, D, c.searchKeys || []), [r, D, c]), [P, W] = C(1), [H, ae] = C((u == null ? void 0 : u.rows_per_page) || 50), [ee, Re] = C(w.length || 0), le = u != null && u.useServerSidePagination ? u.total_pages : Math.ceil(w.length / H), ue = Fe(() => {
|
|
1856
|
+
if (u.useServerSidePagination) return w;
|
|
1857
1857
|
const a = (P - 1) * H;
|
|
1858
|
-
return
|
|
1859
|
-
}, [
|
|
1858
|
+
return w.slice(a, a + H);
|
|
1859
|
+
}, [w, P, H]), re = X(null), oe = X({}), te = X(null), he = (a) => {
|
|
1860
1860
|
U(a), W(1), c.useServerSideSearch && (te.current && clearTimeout(te.current), te.current = setTimeout(async () => {
|
|
1861
1861
|
try {
|
|
1862
1862
|
await g((m) => ({
|
|
@@ -1881,7 +1881,7 @@ const pa = ({
|
|
|
1881
1881
|
}), O(L === a ? null : a);
|
|
1882
1882
|
}, ge = (a) => (P - 1) * H + a + 1, me = (a) => {
|
|
1883
1883
|
a && a.src instanceof File && (a = { ...a, src: URL.createObjectURL(a.src) }), z(a), I(!0);
|
|
1884
|
-
}, ie = (a, m, p, v = null, R = null) => /* @__PURE__ */ e(
|
|
1884
|
+
}, ie = (a, m, p, v = null, R = null) => /* @__PURE__ */ e(j, { children: a ? /* @__PURE__ */ e(
|
|
1885
1885
|
"img",
|
|
1886
1886
|
{
|
|
1887
1887
|
src: a instanceof File ? URL.createObjectURL(a) : a,
|
|
@@ -1891,13 +1891,13 @@ const pa = ({
|
|
|
1891
1891
|
},
|
|
1892
1892
|
className: `w-10 h-10 cursor-pointer shrink-0 rounded-full object-cover border border-gray-200 dark:border-gray-700 ${p || ""}`
|
|
1893
1893
|
}
|
|
1894
|
-
) : /* @__PURE__ */ e(
|
|
1894
|
+
) : /* @__PURE__ */ e(j, { children: v ? typeof v == "function" ? v(R) : v : /* @__PURE__ */ e(
|
|
1895
1895
|
"div",
|
|
1896
1896
|
{
|
|
1897
1897
|
className: `w-10 h-10 flex items-center shrink-0 justify-center rounded-full border border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600 ${p || ""}`,
|
|
1898
1898
|
children: /* @__PURE__ */ e(Ae, { className: "w-6 h-6 text-gray-400 dark:text-gray-400" })
|
|
1899
1899
|
}
|
|
1900
|
-
) }) }), fe = (a, m) => /* @__PURE__ */ e(
|
|
1900
|
+
) }) }), fe = (a, m) => /* @__PURE__ */ e(j, { children: a ? /* @__PURE__ */ e(
|
|
1901
1901
|
"audio",
|
|
1902
1902
|
{
|
|
1903
1903
|
controls: !0,
|
|
@@ -1908,7 +1908,7 @@ const pa = ({
|
|
|
1908
1908
|
className: `w-64 cursor-pointer ${m || ""}`
|
|
1909
1909
|
},
|
|
1910
1910
|
a instanceof File ? URL.createObjectURL(a) : a
|
|
1911
|
-
) : /* @__PURE__ */ e(
|
|
1911
|
+
) : /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(
|
|
1912
1912
|
"div",
|
|
1913
1913
|
{
|
|
1914
1914
|
className: `w-12 h-12 flex items-center shrink-0 justify-center rounded-full border border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600 ${m || ""}`,
|
|
@@ -1954,19 +1954,19 @@ const pa = ({
|
|
|
1954
1954
|
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",
|
|
1955
1955
|
children: /* @__PURE__ */ e(la, { className: "h-4 w-4" })
|
|
1956
1956
|
}
|
|
1957
|
-
) }) : a.type === "index" ? /* @__PURE__ */ e("span", { className: a.className || "", children: ge(p) }) : a.type === "group" ? ye(m, a) : a.type === "chip" ? /* @__PURE__ */ e(
|
|
1957
|
+
) }) : a.type === "index" ? /* @__PURE__ */ e("span", { className: a.className || "", children: ge(p) }) : a.type === "group" ? ye(m, a) : a.type === "chip" ? /* @__PURE__ */ e(j, { children: xe(v, a) }) : a.type === "date" ? /* @__PURE__ */ e("span", { className: a.className || "", children: Ge(v, a.format || "DD MMM YYYY") }) : a.type === "avatar" ? /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e("div", { className: "min-w-[40px]", children: ie(
|
|
1958
1958
|
v,
|
|
1959
1959
|
a.alt,
|
|
1960
1960
|
a.className,
|
|
1961
1961
|
a.fallback_icon,
|
|
1962
1962
|
m
|
|
1963
|
-
) }) }) : a.type === "audio" ? /* @__PURE__ */ e(
|
|
1964
|
-
},
|
|
1963
|
+
) }) }) : a.type === "audio" ? /* @__PURE__ */ e(j, { children: fe(v, a.className) }) : /* @__PURE__ */ e("span", { className: a.className || "", children: v || "N/A" });
|
|
1964
|
+
}, ke = (a) => {
|
|
1965
1965
|
if (typeof M == "function")
|
|
1966
1966
|
return M(a);
|
|
1967
1967
|
if (M)
|
|
1968
1968
|
return f == null ? void 0 : f("view", a);
|
|
1969
|
-
},
|
|
1969
|
+
}, we = (a, m) => {
|
|
1970
1970
|
if (a.onClickDetails)
|
|
1971
1971
|
return f == null ? void 0 : f("view", m);
|
|
1972
1972
|
if (typeof a.handleClick == "function")
|
|
@@ -1992,14 +1992,14 @@ const pa = ({
|
|
|
1992
1992
|
u.current_page
|
|
1993
1993
|
]), K(() => {
|
|
1994
1994
|
Re(
|
|
1995
|
-
u != null && u.useServerSidePagination ? u.total_records :
|
|
1996
|
-
),
|
|
1995
|
+
u != null && u.useServerSidePagination ? u.total_records : w.length
|
|
1996
|
+
), w.length <= H * (P - 1) && !(u != null && u.useServerSidePagination) && W((a) => a - 1 || 1);
|
|
1997
1997
|
}, [
|
|
1998
|
-
|
|
1998
|
+
w.length,
|
|
1999
1999
|
u.total_records,
|
|
2000
2000
|
u == null ? void 0 : u.useServerSidePagination
|
|
2001
|
-
]), /* @__PURE__ */ h(
|
|
2002
|
-
S ? /* @__PURE__ */ e(
|
|
2001
|
+
]), /* @__PURE__ */ h(j, { children: [
|
|
2002
|
+
S ? /* @__PURE__ */ e(va, { rows: 6, columns: 6 }) : /* @__PURE__ */ h(j, { children: [
|
|
2003
2003
|
/* @__PURE__ */ h("div", { className: "flex flex-col sm:flex-row sm:justify-between gap-4 mb-3", children: [
|
|
2004
2004
|
/* @__PURE__ */ h("div", { children: [
|
|
2005
2005
|
/* @__PURE__ */ e("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: t }),
|
|
@@ -2009,7 +2009,7 @@ const pa = ({
|
|
|
2009
2009
|
d && /* @__PURE__ */ h(
|
|
2010
2010
|
Q,
|
|
2011
2011
|
{
|
|
2012
|
-
onClick: () =>
|
|
2012
|
+
onClick: () => o(!0),
|
|
2013
2013
|
variant: "contained",
|
|
2014
2014
|
color: "primary",
|
|
2015
2015
|
children: [
|
|
@@ -2026,7 +2026,7 @@ const pa = ({
|
|
|
2026
2026
|
{
|
|
2027
2027
|
type: "text",
|
|
2028
2028
|
placeholder: c.placeholder || "Search...",
|
|
2029
|
-
value:
|
|
2029
|
+
value: D,
|
|
2030
2030
|
onChange: (a) => he(a.target.value),
|
|
2031
2031
|
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"
|
|
2032
2032
|
}
|
|
@@ -2065,14 +2065,14 @@ const pa = ({
|
|
|
2065
2065
|
{
|
|
2066
2066
|
colSpan: x.length,
|
|
2067
2067
|
className: "text-center py-10 text-gray-500 dark:text-gray-400",
|
|
2068
|
-
children:
|
|
2068
|
+
children: k
|
|
2069
2069
|
}
|
|
2070
2070
|
) }) : ue.map((a, m) => /* @__PURE__ */ e(
|
|
2071
2071
|
"tr",
|
|
2072
2072
|
{
|
|
2073
2073
|
className: `hover:bg-gray-50 dark:hover:bg-blue-800/10 transition ${se() ? "cursor-pointer" : ""}`,
|
|
2074
2074
|
onClick: (p) => {
|
|
2075
|
-
se() &&
|
|
2075
|
+
se() && ke(a);
|
|
2076
2076
|
},
|
|
2077
2077
|
children: x.map((p) => /* @__PURE__ */ e(
|
|
2078
2078
|
"td",
|
|
@@ -2080,7 +2080,7 @@ const pa = ({
|
|
|
2080
2080
|
className: `px-6 py-4 text-sm text-gray-900 dark:text-gray-100 min-w-max ${p.type == "audio" ? "" : "max-w-[300px]"} truncate ${de(p) ? "cursor-pointer" : ""}`,
|
|
2081
2081
|
title: String(a[p.key] ?? ""),
|
|
2082
2082
|
onClick: (v) => {
|
|
2083
|
-
de(p) && (v.stopPropagation(), v.preventDefault(),
|
|
2083
|
+
de(p) && (v.stopPropagation(), v.preventDefault(), we(p, a));
|
|
2084
2084
|
},
|
|
2085
2085
|
children: p.render ? p.render(a, m) : ve(p, a, m)
|
|
2086
2086
|
},
|
|
@@ -2090,7 +2090,7 @@ const pa = ({
|
|
|
2090
2090
|
a.id || a._id || m
|
|
2091
2091
|
)) })
|
|
2092
2092
|
] }) }),
|
|
2093
|
-
(u == null ? void 0 : u.enabled) &&
|
|
2093
|
+
(u == null ? void 0 : u.enabled) && w.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: [
|
|
2094
2094
|
/* @__PURE__ */ h("div", { className: "text-sm text-gray-700 dark:text-gray-300", children: [
|
|
2095
2095
|
"Showing ",
|
|
2096
2096
|
(P - 1) * H + 1,
|
|
@@ -2203,7 +2203,7 @@ const pa = ({
|
|
|
2203
2203
|
document.body
|
|
2204
2204
|
),
|
|
2205
2205
|
y && /* @__PURE__ */ e(
|
|
2206
|
-
|
|
2206
|
+
xa,
|
|
2207
2207
|
{
|
|
2208
2208
|
isOpen: G,
|
|
2209
2209
|
onClose: () => _(!1),
|
|
@@ -2224,8 +2224,8 @@ const pa = ({
|
|
|
2224
2224
|
)
|
|
2225
2225
|
] });
|
|
2226
2226
|
}, Ce = ({
|
|
2227
|
-
isOpen:
|
|
2228
|
-
onClose:
|
|
2227
|
+
isOpen: n,
|
|
2228
|
+
onClose: o,
|
|
2229
2229
|
icon: t,
|
|
2230
2230
|
title: s,
|
|
2231
2231
|
children: i,
|
|
@@ -2237,13 +2237,13 @@ const pa = ({
|
|
|
2237
2237
|
hideFooter: b = !1,
|
|
2238
2238
|
onFormSubmit: u = () => {
|
|
2239
2239
|
},
|
|
2240
|
-
onCancel:
|
|
2240
|
+
onCancel: k,
|
|
2241
2241
|
loadingBtn: f = !1,
|
|
2242
2242
|
executeFunction: g = () => {
|
|
2243
2243
|
},
|
|
2244
2244
|
selectedItem: N = null
|
|
2245
2245
|
}) => {
|
|
2246
|
-
if (!
|
|
2246
|
+
if (!n) return null;
|
|
2247
2247
|
const y = {
|
|
2248
2248
|
sm: "max-w-md",
|
|
2249
2249
|
md: "max-w-lg",
|
|
@@ -2256,7 +2256,7 @@ const pa = ({
|
|
|
2256
2256
|
"div",
|
|
2257
2257
|
{
|
|
2258
2258
|
className: "fixed inset-0 bg-gray-500 opacity-75",
|
|
2259
|
-
onClick: () =>
|
|
2259
|
+
onClick: () => o()
|
|
2260
2260
|
}
|
|
2261
2261
|
),
|
|
2262
2262
|
/* @__PURE__ */ h(
|
|
@@ -2272,7 +2272,7 @@ const pa = ({
|
|
|
2272
2272
|
/* @__PURE__ */ e(
|
|
2273
2273
|
"button",
|
|
2274
2274
|
{
|
|
2275
|
-
onClick: () =>
|
|
2275
|
+
onClick: () => o(),
|
|
2276
2276
|
className: "text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",
|
|
2277
2277
|
children: /* @__PURE__ */ e(Le, { className: "w-6 h-6" })
|
|
2278
2278
|
}
|
|
@@ -2282,13 +2282,13 @@ const pa = ({
|
|
|
2282
2282
|
r.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: r.map((M) => /* @__PURE__ */ e(
|
|
2283
2283
|
Q,
|
|
2284
2284
|
{
|
|
2285
|
-
onClick: (
|
|
2286
|
-
M.type == "submit" ? u(
|
|
2285
|
+
onClick: (D) => {
|
|
2286
|
+
M.type == "submit" ? u(D) : g(
|
|
2287
2287
|
() => {
|
|
2288
2288
|
var U;
|
|
2289
|
-
return (U = M == null ? void 0 : M.onClick) == null ? void 0 : U.call(M,
|
|
2289
|
+
return (U = M == null ? void 0 : M.onClick) == null ? void 0 : U.call(M, D, N);
|
|
2290
2290
|
},
|
|
2291
|
-
(U) =>
|
|
2291
|
+
(U) => o == null ? void 0 : o(U)
|
|
2292
2292
|
);
|
|
2293
2293
|
},
|
|
2294
2294
|
disabled: f || M.disabled,
|
|
@@ -2308,13 +2308,13 @@ const pa = ({
|
|
|
2308
2308
|
)
|
|
2309
2309
|
] });
|
|
2310
2310
|
}, Ee = ({
|
|
2311
|
-
config:
|
|
2312
|
-
onSubmit:
|
|
2311
|
+
config: n,
|
|
2312
|
+
onSubmit: o,
|
|
2313
2313
|
initialData: t = {},
|
|
2314
2314
|
fetchRowDetails: s,
|
|
2315
2315
|
type: i = "add"
|
|
2316
2316
|
}) => {
|
|
2317
|
-
const { formClass: d = "grid grid-cols-12 gap-4", formFields: r = [] } =
|
|
2317
|
+
const { formClass: d = "grid grid-cols-12 gap-4", formFields: r = [] } = n || {}, [x, S] = C(t), [c, b] = C(!0), u = async () => {
|
|
2318
2318
|
s == null || s(t).then((g) => {
|
|
2319
2319
|
S(g.data);
|
|
2320
2320
|
}).catch((g) => {
|
|
@@ -2326,7 +2326,7 @@ const pa = ({
|
|
|
2326
2326
|
K(() => {
|
|
2327
2327
|
s instanceof Function ? u() : (S(t), b(!1));
|
|
2328
2328
|
}, []);
|
|
2329
|
-
const
|
|
2329
|
+
const k = (g, N) => {
|
|
2330
2330
|
S((y) => ({ ...y, [g]: N }));
|
|
2331
2331
|
}, f = (g) => {
|
|
2332
2332
|
g.preventDefault();
|
|
@@ -2335,7 +2335,7 @@ const pa = ({
|
|
|
2335
2335
|
N.reportValidity();
|
|
2336
2336
|
return;
|
|
2337
2337
|
}
|
|
2338
|
-
|
|
2338
|
+
o(x);
|
|
2339
2339
|
};
|
|
2340
2340
|
return c ? (
|
|
2341
2341
|
// spinner loader
|
|
@@ -2355,21 +2355,21 @@ const pa = ({
|
|
|
2355
2355
|
onSubmit: f,
|
|
2356
2356
|
className: d,
|
|
2357
2357
|
noValidate: !1,
|
|
2358
|
-
children: r.map((g) => /* @__PURE__ */ e(
|
|
2358
|
+
children: r.map((g) => /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(
|
|
2359
2359
|
qe,
|
|
2360
2360
|
{
|
|
2361
2361
|
field: g,
|
|
2362
2362
|
formData: x,
|
|
2363
|
-
handleChange:
|
|
2363
|
+
handleChange: k
|
|
2364
2364
|
},
|
|
2365
2365
|
g.key
|
|
2366
2366
|
) }))
|
|
2367
2367
|
}
|
|
2368
2368
|
);
|
|
2369
2369
|
};
|
|
2370
|
-
function wa({ data:
|
|
2371
|
-
const { fields: s, containerClass: i } =
|
|
2372
|
-
t == null || t(
|
|
2370
|
+
function wa({ data: n, config: o, fetchRowDetails: t }) {
|
|
2371
|
+
const { fields: s, containerClass: i } = o, [d, r] = C(n), [x, S] = C(!0), c = async () => {
|
|
2372
|
+
t == null || t(n).then((b) => {
|
|
2373
2373
|
r(b.data);
|
|
2374
2374
|
}).catch((b) => {
|
|
2375
2375
|
ce(b.message, { variant: "error" });
|
|
@@ -2378,7 +2378,7 @@ function wa({ data: o, config: l, fetchRowDetails: t }) {
|
|
|
2378
2378
|
});
|
|
2379
2379
|
};
|
|
2380
2380
|
return K(() => {
|
|
2381
|
-
t instanceof Function ? c() : (r(
|
|
2381
|
+
t instanceof Function ? c() : (r(n), S(!1));
|
|
2382
2382
|
}, []), x ? (
|
|
2383
2383
|
// spinner loader
|
|
2384
2384
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ e(
|
|
@@ -2390,12 +2390,12 @@ function wa({ data: o, config: l, fetchRowDetails: t }) {
|
|
|
2390
2390
|
}
|
|
2391
2391
|
}
|
|
2392
2392
|
) })
|
|
2393
|
-
) : /* @__PURE__ */ e(
|
|
2393
|
+
) : /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e("div", { className: `grid grid-cols-12 gap-4 ${i || ""}`, children: s.map((b) => b.renderCondition && typeof b.renderCondition == "function" && !b.renderCondition(d) ? null : b.type == "group" ? /* @__PURE__ */ e(He, { col: b, data: d }) : b.type == "cardGroup" ? /* @__PURE__ */ e(Ye, { col: b, data: d }) : /* @__PURE__ */ e(We, { col: b, data: d })) }) });
|
|
2394
2394
|
}
|
|
2395
|
-
const Ze = ({ config:
|
|
2396
|
-
var re, oe, te, he, be, pe, ge, me, ie, fe, ye, xe, ve,
|
|
2395
|
+
const Ze = ({ config: n }) => {
|
|
2396
|
+
var re, oe, te, he, be, pe, ge, me, ie, fe, ye, xe, ve, ke, we, se, de, a, m;
|
|
2397
2397
|
const {
|
|
2398
|
-
title:
|
|
2398
|
+
title: o,
|
|
2399
2399
|
fetchData: t = async () => {
|
|
2400
2400
|
},
|
|
2401
2401
|
fetchRowDetails: s = null,
|
|
@@ -2403,11 +2403,11 @@ const Ze = ({ config: o }) => {
|
|
|
2403
2403
|
tableConfig: d = {},
|
|
2404
2404
|
modalConfig: r = {},
|
|
2405
2405
|
filterConfig: x
|
|
2406
|
-
} =
|
|
2406
|
+
} = n, [S, c] = C(!0), [b, u] = C(!1), [k, f] = C([]), [g, N] = C(null), [y, M] = C({
|
|
2407
2407
|
search: "",
|
|
2408
2408
|
rows_per_page: 50,
|
|
2409
2409
|
current_page: 1
|
|
2410
|
-
}), [
|
|
2410
|
+
}), [D, U] = C({}), [L, O] = C(!1), [E, F] = C(!1), [T, B] = C(!1), [G, _] = C(!1), [J, Z] = C(!1), [A, z] = C(null), V = (p, v) => {
|
|
2411
2411
|
p === "edit" ? (z(v), B(!0)) : p === "view" ? (z(v), Z(!0)) : p === "delete" && (z(v), _(!0));
|
|
2412
2412
|
}, I = async (p, v, R = "", Y = "") => {
|
|
2413
2413
|
u(!0);
|
|
@@ -2421,7 +2421,7 @@ const Ze = ({ config: o }) => {
|
|
|
2421
2421
|
} finally {
|
|
2422
2422
|
u(!1);
|
|
2423
2423
|
}
|
|
2424
|
-
},
|
|
2424
|
+
}, w = (p) => {
|
|
2425
2425
|
let v = p.newObject;
|
|
2426
2426
|
i ? (f((R) => [v, ...R]), N((R) => ({
|
|
2427
2427
|
...R,
|
|
@@ -2444,7 +2444,7 @@ const Ze = ({ config: o }) => {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
i ? f(
|
|
2446
2446
|
(v) => v.filter((R) => R.id !== p.targetObject.id)
|
|
2447
|
-
) :
|
|
2447
|
+
) : k.length == 1 && y.current_page > 1 ? M((v) => ({
|
|
2448
2448
|
...v,
|
|
2449
2449
|
current_page: v.current_page - 1
|
|
2450
2450
|
})) : ee(), _(!1), z(null);
|
|
@@ -2453,7 +2453,7 @@ const Ze = ({ config: o }) => {
|
|
|
2453
2453
|
var v, R;
|
|
2454
2454
|
return (R = (v = r == null ? void 0 : r.addModal) == null ? void 0 : v.handleSubmit) == null ? void 0 : R.call(v, p);
|
|
2455
2455
|
},
|
|
2456
|
-
|
|
2456
|
+
w
|
|
2457
2457
|
), ae = (p) => I(
|
|
2458
2458
|
() => {
|
|
2459
2459
|
var v, R;
|
|
@@ -2461,7 +2461,7 @@ const Ze = ({ config: o }) => {
|
|
|
2461
2461
|
},
|
|
2462
2462
|
P
|
|
2463
2463
|
), ee = async () => {
|
|
2464
|
-
c(!0), t == null || t({ ...y, ...
|
|
2464
|
+
c(!0), t == null || t({ ...y, ...D }).then((p) => {
|
|
2465
2465
|
f(p.data), N(p.pagination);
|
|
2466
2466
|
}).catch((p) => {
|
|
2467
2467
|
ce(p.message, { variant: "error" });
|
|
@@ -2477,8 +2477,8 @@ const Ze = ({ config: o }) => {
|
|
|
2477
2477
|
(R) => Object.entries(v).every(([Y, $]) => R[Y] === $)
|
|
2478
2478
|
), ue = Fe(() => {
|
|
2479
2479
|
var p;
|
|
2480
|
-
return (p = d == null ? void 0 : d.filter) != null && p.useServerSideFilters ?
|
|
2481
|
-
}, [
|
|
2480
|
+
return (p = d == null ? void 0 : d.filter) != null && p.useServerSideFilters ? k : le(k, D);
|
|
2481
|
+
}, [k, D]);
|
|
2482
2482
|
return K(() => {
|
|
2483
2483
|
ee();
|
|
2484
2484
|
}, [
|
|
@@ -2486,314 +2486,322 @@ const Ze = ({ config: o }) => {
|
|
|
2486
2486
|
y.rows_per_page,
|
|
2487
2487
|
y.current_page,
|
|
2488
2488
|
L
|
|
2489
|
-
]), /* @__PURE__ */
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
new CustomEvent("closeSnackbar", { detail: p })
|
|
2504
|
-
);
|
|
2489
|
+
]), /* @__PURE__ */ h("div", { children: [
|
|
2490
|
+
/* @__PURE__ */ e(
|
|
2491
|
+
ka,
|
|
2492
|
+
{
|
|
2493
|
+
title: o,
|
|
2494
|
+
setShowAdd: F,
|
|
2495
|
+
description: n.description,
|
|
2496
|
+
buttonText: n.buttonText,
|
|
2497
|
+
showAddButton: !!r.addModal,
|
|
2498
|
+
config: {
|
|
2499
|
+
...d,
|
|
2500
|
+
pagination: {
|
|
2501
|
+
...d.pagination,
|
|
2502
|
+
...g
|
|
2505
2503
|
},
|
|
2506
|
-
|
|
2507
|
-
|
|
2504
|
+
data: ue,
|
|
2505
|
+
setServerSidePaginationData: M,
|
|
2506
|
+
onMenuAction: V,
|
|
2507
|
+
filterConfig: x,
|
|
2508
|
+
onFilterApply: Re,
|
|
2509
|
+
loading: S
|
|
2508
2510
|
}
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
onFilterApply: Re,
|
|
2530
|
-
loading: S
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
),
|
|
2534
|
-
/* @__PURE__ */ e(
|
|
2535
|
-
Ce,
|
|
2536
|
-
{
|
|
2537
|
-
isOpen: E,
|
|
2538
|
-
onClose: () => {
|
|
2539
|
-
b || F(!1);
|
|
2540
|
-
},
|
|
2541
|
-
icon: (re = r.addModal) == null ? void 0 : re.icon,
|
|
2542
|
-
title: ((oe = r.addModal) == null ? void 0 : oe.title) || "Add New",
|
|
2543
|
-
size: ((te = r.addModal) == null ? void 0 : te.size) || "md",
|
|
2544
|
-
onFormSubmit: () => {
|
|
2545
|
-
var p;
|
|
2546
|
-
return (p = document.querySelector("#addForm")) == null ? void 0 : p.requestSubmit();
|
|
2547
|
-
},
|
|
2548
|
-
loadingBtn: b,
|
|
2549
|
-
actionButtons: ((he = r == null ? void 0 : r.addModal) == null ? void 0 : he.actionButtons) || [],
|
|
2550
|
-
children: /* @__PURE__ */ e(
|
|
2551
|
-
Ee,
|
|
2552
|
-
{
|
|
2553
|
-
config: (r == null ? void 0 : r.addModal) || {},
|
|
2554
|
-
onSubmit: H,
|
|
2555
|
-
initialData: {},
|
|
2556
|
-
type: "add",
|
|
2557
|
-
loading: b
|
|
2558
|
-
}
|
|
2559
|
-
)
|
|
2560
|
-
}
|
|
2561
|
-
),
|
|
2562
|
-
/* @__PURE__ */ e(
|
|
2563
|
-
Ce,
|
|
2511
|
+
}
|
|
2512
|
+
),
|
|
2513
|
+
/* @__PURE__ */ e(
|
|
2514
|
+
Ce,
|
|
2515
|
+
{
|
|
2516
|
+
isOpen: E,
|
|
2517
|
+
onClose: () => {
|
|
2518
|
+
b || F(!1);
|
|
2519
|
+
},
|
|
2520
|
+
icon: (re = r.addModal) == null ? void 0 : re.icon,
|
|
2521
|
+
title: ((oe = r.addModal) == null ? void 0 : oe.title) || "Add New",
|
|
2522
|
+
size: ((te = r.addModal) == null ? void 0 : te.size) || "md",
|
|
2523
|
+
onFormSubmit: () => {
|
|
2524
|
+
var p;
|
|
2525
|
+
return (p = document.querySelector("#addForm")) == null ? void 0 : p.requestSubmit();
|
|
2526
|
+
},
|
|
2527
|
+
loadingBtn: b,
|
|
2528
|
+
actionButtons: ((he = r == null ? void 0 : r.addModal) == null ? void 0 : he.actionButtons) || [],
|
|
2529
|
+
children: /* @__PURE__ */ e(
|
|
2530
|
+
Ee,
|
|
2564
2531
|
{
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
title: ((pe = r.editModal) == null ? void 0 : pe.title) || "Edit",
|
|
2571
|
-
size: ((ge = r.editModal) == null ? void 0 : ge.size) || "md",
|
|
2572
|
-
onFormSubmit: () => {
|
|
2573
|
-
var p;
|
|
2574
|
-
return (p = document.querySelector("#editForm")) == null ? void 0 : p.requestSubmit();
|
|
2575
|
-
},
|
|
2576
|
-
actionButtons: ((me = r == null ? void 0 : r.editModal) == null ? void 0 : me.actionButtons) || [],
|
|
2577
|
-
loadingBtn: b,
|
|
2578
|
-
children: /* @__PURE__ */ e(
|
|
2579
|
-
Ee,
|
|
2580
|
-
{
|
|
2581
|
-
config: r.editModal || {},
|
|
2582
|
-
onSubmit: ae,
|
|
2583
|
-
initialData: A,
|
|
2584
|
-
type: "edit",
|
|
2585
|
-
loading: b,
|
|
2586
|
-
fetchRowDetails: s
|
|
2587
|
-
}
|
|
2588
|
-
)
|
|
2532
|
+
config: (r == null ? void 0 : r.addModal) || {},
|
|
2533
|
+
onSubmit: H,
|
|
2534
|
+
initialData: {},
|
|
2535
|
+
type: "add",
|
|
2536
|
+
loading: b
|
|
2589
2537
|
}
|
|
2590
|
-
)
|
|
2591
|
-
|
|
2592
|
-
|
|
2538
|
+
)
|
|
2539
|
+
}
|
|
2540
|
+
),
|
|
2541
|
+
/* @__PURE__ */ e(
|
|
2542
|
+
Ce,
|
|
2543
|
+
{
|
|
2544
|
+
isOpen: T,
|
|
2545
|
+
onClose: () => {
|
|
2546
|
+
b || B(!1);
|
|
2547
|
+
},
|
|
2548
|
+
icon: (be = r.editModal) == null ? void 0 : be.icon,
|
|
2549
|
+
title: ((pe = r.editModal) == null ? void 0 : pe.title) || "Edit",
|
|
2550
|
+
size: ((ge = r.editModal) == null ? void 0 : ge.size) || "md",
|
|
2551
|
+
onFormSubmit: () => {
|
|
2552
|
+
var p;
|
|
2553
|
+
return (p = document.querySelector("#editForm")) == null ? void 0 : p.requestSubmit();
|
|
2554
|
+
},
|
|
2555
|
+
actionButtons: ((me = r == null ? void 0 : r.editModal) == null ? void 0 : me.actionButtons) || [],
|
|
2556
|
+
loadingBtn: b,
|
|
2557
|
+
children: /* @__PURE__ */ e(
|
|
2558
|
+
Ee,
|
|
2593
2559
|
{
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
icon: ((ie = r.deleteModal) == null ? void 0 : ie.icon) || /* @__PURE__ */ e(ne, { icon: "ph:warning-bold", className: "w-6 h-6 text-red-500" }),
|
|
2599
|
-
title: ((fe = r.deleteModal) == null ? void 0 : fe.title) || "Confirm Delete",
|
|
2600
|
-
size: ((ye = r.deleteModal) == null ? void 0 : ye.size) || "md",
|
|
2560
|
+
config: r.editModal || {},
|
|
2561
|
+
onSubmit: ae,
|
|
2562
|
+
initialData: A,
|
|
2563
|
+
type: "edit",
|
|
2601
2564
|
loading: b,
|
|
2602
|
-
|
|
2603
|
-
executeFunction: I,
|
|
2604
|
-
selectedItem: A,
|
|
2605
|
-
children: /* @__PURE__ */ e("div", { className: "flex items-center space-x-2 py-3", children: /* @__PURE__ */ h("div", { children: [
|
|
2606
|
-
/* @__PURE__ */ e("p", { className: "text-md text-gray-700 dark:text-white", children: ((ve = r.deleteModal) == null ? void 0 : ve.confirmText) || "Are you sure you want to delete this item?" }),
|
|
2607
|
-
((we = r.deleteModal) == null ? void 0 : we.referenceKey) && /* @__PURE__ */ e("p", { className: "text-md font-semibold text-gray-700 dark:text-white", children: A[(ke = r.deleteModal) == null ? void 0 : ke.referenceKey] })
|
|
2608
|
-
] }) })
|
|
2565
|
+
fetchRowDetails: s
|
|
2609
2566
|
}
|
|
2610
|
-
)
|
|
2611
|
-
|
|
2612
|
-
|
|
2567
|
+
)
|
|
2568
|
+
}
|
|
2569
|
+
),
|
|
2570
|
+
G && /* @__PURE__ */ e(
|
|
2571
|
+
Ce,
|
|
2572
|
+
{
|
|
2573
|
+
isOpen: G,
|
|
2574
|
+
onClose: (p) => {
|
|
2575
|
+
W(p);
|
|
2576
|
+
},
|
|
2577
|
+
icon: ((ie = r.deleteModal) == null ? void 0 : ie.icon) || /* @__PURE__ */ e(ne, { icon: "ph:warning-bold", className: "w-6 h-6 text-red-500" }),
|
|
2578
|
+
title: ((fe = r.deleteModal) == null ? void 0 : fe.title) || "Confirm Delete",
|
|
2579
|
+
size: ((ye = r.deleteModal) == null ? void 0 : ye.size) || "md",
|
|
2580
|
+
loading: b,
|
|
2581
|
+
actionButtons: ((xe = r == null ? void 0 : r.deleteModal) == null ? void 0 : xe.actionButtons) || [],
|
|
2582
|
+
executeFunction: I,
|
|
2583
|
+
selectedItem: A,
|
|
2584
|
+
children: /* @__PURE__ */ e("div", { className: "flex items-center space-x-2 py-3", children: /* @__PURE__ */ h("div", { children: [
|
|
2585
|
+
/* @__PURE__ */ e("p", { className: "text-md text-gray-700 dark:text-white", children: ((ve = r.deleteModal) == null ? void 0 : ve.confirmText) || "Are you sure you want to delete this item?" }),
|
|
2586
|
+
((ke = r.deleteModal) == null ? void 0 : ke.referenceKey) && /* @__PURE__ */ e("p", { className: "text-md font-semibold text-gray-700 dark:text-white", children: A[(we = r.deleteModal) == null ? void 0 : we.referenceKey] })
|
|
2587
|
+
] }) })
|
|
2588
|
+
}
|
|
2589
|
+
),
|
|
2590
|
+
r.viewModal && /* @__PURE__ */ e(
|
|
2591
|
+
Ce,
|
|
2592
|
+
{
|
|
2593
|
+
isOpen: J,
|
|
2594
|
+
onClose: () => {
|
|
2595
|
+
Z(!1), z(null);
|
|
2596
|
+
},
|
|
2597
|
+
icon: (se = r.viewModal) == null ? void 0 : se.icon,
|
|
2598
|
+
title: ((de = r.viewModal) == null ? void 0 : de.title) || "View Details",
|
|
2599
|
+
size: ((a = r.viewModal) == null ? void 0 : a.size) || "lg",
|
|
2600
|
+
footerConfig: r == null ? void 0 : r.viewModal.footer,
|
|
2601
|
+
children: (m = r.viewModal) != null && m.component ? /* @__PURE__ */ e(r.viewModal.component, { data: A }) : /* @__PURE__ */ e(
|
|
2602
|
+
wa,
|
|
2613
2603
|
{
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
},
|
|
2618
|
-
icon: (se = r.viewModal) == null ? void 0 : se.icon,
|
|
2619
|
-
title: ((de = r.viewModal) == null ? void 0 : de.title) || "View Details",
|
|
2620
|
-
size: ((a = r.viewModal) == null ? void 0 : a.size) || "lg",
|
|
2621
|
-
footerConfig: r == null ? void 0 : r.viewModal.footer,
|
|
2622
|
-
children: (m = r.viewModal) != null && m.component ? /* @__PURE__ */ e(r.viewModal.component, { data: A }) : /* @__PURE__ */ e(
|
|
2623
|
-
wa,
|
|
2624
|
-
{
|
|
2625
|
-
data: A,
|
|
2626
|
-
fetchRowDetails: s,
|
|
2627
|
-
config: r.viewModal || {}
|
|
2628
|
-
}
|
|
2629
|
-
)
|
|
2604
|
+
data: A,
|
|
2605
|
+
fetchRowDetails: s,
|
|
2606
|
+
config: r.viewModal || {}
|
|
2630
2607
|
}
|
|
2631
2608
|
)
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
);
|
|
2635
|
-
}, De =
|
|
2636
|
-
value:
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2609
|
+
}
|
|
2610
|
+
)
|
|
2611
|
+
] });
|
|
2612
|
+
}, De = l.shape({
|
|
2613
|
+
value: l.oneOfType([
|
|
2614
|
+
l.string,
|
|
2615
|
+
l.number,
|
|
2616
|
+
l.bool
|
|
2640
2617
|
]).isRequired,
|
|
2641
|
-
label:
|
|
2642
|
-
color:
|
|
2643
|
-
}), Oe =
|
|
2644
|
-
type:
|
|
2645
|
-
label:
|
|
2646
|
-
color:
|
|
2647
|
-
variant:
|
|
2648
|
-
onClick:
|
|
2649
|
-
}),
|
|
2650
|
-
title:
|
|
2651
|
-
type:
|
|
2652
|
-
variant:
|
|
2653
|
-
icon:
|
|
2654
|
-
}),
|
|
2655
|
-
key:
|
|
2656
|
-
title:
|
|
2657
|
-
type:
|
|
2658
|
-
imageKey:
|
|
2659
|
-
titleKey:
|
|
2660
|
-
subtitleKey:
|
|
2661
|
-
onClickDetails:
|
|
2662
|
-
variant:
|
|
2663
|
-
chipOptions:
|
|
2664
|
-
defaultColor:
|
|
2665
|
-
className:
|
|
2666
|
-
format:
|
|
2667
|
-
menuList:
|
|
2668
|
-
}), Te =
|
|
2669
|
-
key:
|
|
2670
|
-
label:
|
|
2671
|
-
type:
|
|
2672
|
-
required:
|
|
2673
|
-
minLength:
|
|
2674
|
-
parentClass:
|
|
2675
|
-
search:
|
|
2676
|
-
multiple:
|
|
2677
|
-
dropdownMaxHeight:
|
|
2678
|
-
dragDrop:
|
|
2679
|
-
countriesList:
|
|
2680
|
-
defaultCountry:
|
|
2681
|
-
placeholder:
|
|
2682
|
-
rows:
|
|
2683
|
-
text:
|
|
2684
|
-
editorKey:
|
|
2685
|
-
options:
|
|
2686
|
-
}),
|
|
2687
|
-
key:
|
|
2688
|
-
label:
|
|
2689
|
-
type:
|
|
2690
|
-
imageKey:
|
|
2691
|
-
titleKey:
|
|
2692
|
-
subtitleKey:
|
|
2693
|
-
blockClass:
|
|
2694
|
-
icon:
|
|
2695
|
-
variant:
|
|
2696
|
-
chipOptions:
|
|
2697
|
-
defaultColor:
|
|
2698
|
-
className:
|
|
2699
|
-
format:
|
|
2618
|
+
label: l.string.isRequired,
|
|
2619
|
+
color: l.string
|
|
2620
|
+
}), Oe = l.shape({
|
|
2621
|
+
type: l.string.isRequired,
|
|
2622
|
+
label: l.string.isRequired,
|
|
2623
|
+
color: l.string,
|
|
2624
|
+
variant: l.string,
|
|
2625
|
+
onClick: l.func
|
|
2626
|
+
}), Na = l.shape({
|
|
2627
|
+
title: l.string.isRequired,
|
|
2628
|
+
type: l.string.isRequired,
|
|
2629
|
+
variant: l.string,
|
|
2630
|
+
icon: l.node
|
|
2631
|
+
}), Sa = l.shape({
|
|
2632
|
+
key: l.string.isRequired,
|
|
2633
|
+
title: l.string,
|
|
2634
|
+
type: l.string,
|
|
2635
|
+
imageKey: l.string,
|
|
2636
|
+
titleKey: l.string,
|
|
2637
|
+
subtitleKey: l.string,
|
|
2638
|
+
onClickDetails: l.bool,
|
|
2639
|
+
variant: l.string,
|
|
2640
|
+
chipOptions: l.arrayOf(De),
|
|
2641
|
+
defaultColor: l.string,
|
|
2642
|
+
className: l.string,
|
|
2643
|
+
format: l.string,
|
|
2644
|
+
menuList: l.arrayOf(Na)
|
|
2645
|
+
}), Te = l.shape({
|
|
2646
|
+
key: l.string.isRequired,
|
|
2647
|
+
label: l.string,
|
|
2648
|
+
type: l.string.isRequired,
|
|
2649
|
+
required: l.bool,
|
|
2650
|
+
minLength: l.number,
|
|
2651
|
+
parentClass: l.string,
|
|
2652
|
+
search: l.bool,
|
|
2653
|
+
multiple: l.bool,
|
|
2654
|
+
dropdownMaxHeight: l.string,
|
|
2655
|
+
dragDrop: l.bool,
|
|
2656
|
+
countriesList: l.bool,
|
|
2657
|
+
defaultCountry: l.string,
|
|
2658
|
+
placeholder: l.string,
|
|
2659
|
+
rows: l.number,
|
|
2660
|
+
text: l.string,
|
|
2661
|
+
editorKey: l.string,
|
|
2662
|
+
options: l.arrayOf(De)
|
|
2663
|
+
}), Ca = l.shape({
|
|
2664
|
+
key: l.string,
|
|
2665
|
+
label: l.string,
|
|
2666
|
+
type: l.string,
|
|
2667
|
+
imageKey: l.string,
|
|
2668
|
+
titleKey: l.string,
|
|
2669
|
+
subtitleKey: l.string,
|
|
2670
|
+
blockClass: l.string,
|
|
2671
|
+
icon: l.node,
|
|
2672
|
+
variant: l.string,
|
|
2673
|
+
chipOptions: l.arrayOf(De),
|
|
2674
|
+
defaultColor: l.string,
|
|
2675
|
+
className: l.string,
|
|
2676
|
+
format: l.string
|
|
2700
2677
|
});
|
|
2701
2678
|
Ze.propTypes = {
|
|
2702
|
-
config:
|
|
2703
|
-
title:
|
|
2704
|
-
description:
|
|
2705
|
-
buttonText:
|
|
2706
|
-
fetchData:
|
|
2707
|
-
isStaticData:
|
|
2679
|
+
config: l.shape({
|
|
2680
|
+
title: l.string.isRequired,
|
|
2681
|
+
description: l.string,
|
|
2682
|
+
buttonText: l.string,
|
|
2683
|
+
fetchData: l.func.isRequired,
|
|
2684
|
+
isStaticData: l.bool,
|
|
2708
2685
|
/* ================= TABLE CONFIG ================= */
|
|
2709
|
-
tableConfig:
|
|
2710
|
-
table_head:
|
|
2711
|
-
search:
|
|
2712
|
-
enabled:
|
|
2713
|
-
useServerSideSearch:
|
|
2714
|
-
searchKeys:
|
|
2686
|
+
tableConfig: l.shape({
|
|
2687
|
+
table_head: l.arrayOf(Sa).isRequired,
|
|
2688
|
+
search: l.shape({
|
|
2689
|
+
enabled: l.bool,
|
|
2690
|
+
useServerSideSearch: l.bool,
|
|
2691
|
+
searchKeys: l.arrayOf(l.string)
|
|
2715
2692
|
}),
|
|
2716
|
-
pagination:
|
|
2717
|
-
enabled:
|
|
2718
|
-
useServerSidePagination:
|
|
2693
|
+
pagination: l.shape({
|
|
2694
|
+
enabled: l.bool,
|
|
2695
|
+
useServerSidePagination: l.bool
|
|
2719
2696
|
}),
|
|
2720
|
-
filter:
|
|
2721
|
-
enabled:
|
|
2722
|
-
useServerSideFilters:
|
|
2697
|
+
filter: l.shape({
|
|
2698
|
+
enabled: l.bool,
|
|
2699
|
+
useServerSideFilters: l.bool
|
|
2723
2700
|
})
|
|
2724
2701
|
}).isRequired,
|
|
2725
2702
|
/* ================= MODAL CONFIG ================= */
|
|
2726
|
-
modalConfig:
|
|
2727
|
-
addModal:
|
|
2728
|
-
title:
|
|
2729
|
-
size:
|
|
2730
|
-
formClass:
|
|
2731
|
-
formFields:
|
|
2732
|
-
handleSubmit:
|
|
2733
|
-
actionButtons:
|
|
2703
|
+
modalConfig: l.shape({
|
|
2704
|
+
addModal: l.shape({
|
|
2705
|
+
title: l.string.isRequired,
|
|
2706
|
+
size: l.string,
|
|
2707
|
+
formClass: l.string,
|
|
2708
|
+
formFields: l.arrayOf(Te),
|
|
2709
|
+
handleSubmit: l.func.isRequired,
|
|
2710
|
+
actionButtons: l.arrayOf(Oe)
|
|
2734
2711
|
}),
|
|
2735
|
-
editModal:
|
|
2736
|
-
title:
|
|
2737
|
-
size:
|
|
2738
|
-
formClass:
|
|
2739
|
-
formFields:
|
|
2740
|
-
handleSubmit:
|
|
2741
|
-
actionButtons:
|
|
2712
|
+
editModal: l.shape({
|
|
2713
|
+
title: l.string.isRequired,
|
|
2714
|
+
size: l.string,
|
|
2715
|
+
formClass: l.string,
|
|
2716
|
+
formFields: l.arrayOf(Te),
|
|
2717
|
+
handleSubmit: l.func.isRequired,
|
|
2718
|
+
actionButtons: l.arrayOf(Oe)
|
|
2742
2719
|
}),
|
|
2743
|
-
deleteModal:
|
|
2744
|
-
title:
|
|
2745
|
-
size:
|
|
2746
|
-
confirmText:
|
|
2747
|
-
referenceKey:
|
|
2748
|
-
actionButtons:
|
|
2720
|
+
deleteModal: l.shape({
|
|
2721
|
+
title: l.string.isRequired,
|
|
2722
|
+
size: l.string,
|
|
2723
|
+
confirmText: l.string,
|
|
2724
|
+
referenceKey: l.string,
|
|
2725
|
+
actionButtons: l.arrayOf(Oe)
|
|
2749
2726
|
}),
|
|
2750
|
-
viewModal:
|
|
2751
|
-
title:
|
|
2752
|
-
size:
|
|
2727
|
+
viewModal: l.shape({
|
|
2728
|
+
title: l.string.isRequired,
|
|
2729
|
+
size: l.string,
|
|
2753
2730
|
// 👇 This covers your commented code:
|
|
2754
|
-
component:
|
|
2731
|
+
component: l.elementType,
|
|
2755
2732
|
// for custom component like TeamMemberDetail
|
|
2756
|
-
fields:
|
|
2757
|
-
footer:
|
|
2758
|
-
cancelButton:
|
|
2759
|
-
cancelText:
|
|
2733
|
+
fields: l.arrayOf(Ca),
|
|
2734
|
+
footer: l.shape({
|
|
2735
|
+
cancelButton: l.bool,
|
|
2736
|
+
cancelText: l.string
|
|
2760
2737
|
})
|
|
2761
2738
|
})
|
|
2762
2739
|
}),
|
|
2763
2740
|
/* ================= FILTER CONFIG ================= */
|
|
2764
|
-
filterConfig:
|
|
2765
|
-
fields:
|
|
2741
|
+
filterConfig: l.shape({
|
|
2742
|
+
fields: l.arrayOf(Te)
|
|
2766
2743
|
})
|
|
2767
2744
|
}).isRequired
|
|
2768
2745
|
};
|
|
2769
|
-
|
|
2746
|
+
function Ma({ children: n }) {
|
|
2747
|
+
return ca(), n;
|
|
2748
|
+
}
|
|
2749
|
+
function La({ children: n }) {
|
|
2750
|
+
try {
|
|
2751
|
+
return /* @__PURE__ */ e(Ma, { children: n });
|
|
2752
|
+
} catch {
|
|
2753
|
+
return /* @__PURE__ */ e(
|
|
2754
|
+
da,
|
|
2755
|
+
{
|
|
2756
|
+
anchorOrigin: {
|
|
2757
|
+
vertical: "bottom",
|
|
2758
|
+
horizontal: "right"
|
|
2759
|
+
},
|
|
2760
|
+
action: (t) => /* @__PURE__ */ e(
|
|
2761
|
+
"button",
|
|
2762
|
+
{
|
|
2763
|
+
onClick: () => {
|
|
2764
|
+
window.dispatchEvent(
|
|
2765
|
+
new CustomEvent("closeSnackbar", { detail: t })
|
|
2766
|
+
);
|
|
2767
|
+
},
|
|
2768
|
+
className: "p-1 hover:bg-white/20 rounded-full transition-colors duration-200 text-white flex items-center justify-center",
|
|
2769
|
+
children: /* @__PURE__ */ e(Le, { className: "h-4 w-4" })
|
|
2770
|
+
}
|
|
2771
|
+
),
|
|
2772
|
+
maxSnack: 3,
|
|
2773
|
+
autoHideDuration: 3e3,
|
|
2774
|
+
children: n
|
|
2775
|
+
}
|
|
2776
|
+
);
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
const Ra = () => {
|
|
2770
2780
|
if (typeof document > "u" || document.getElementById("react-admin-crud-manager-styles")) return;
|
|
2771
|
-
const
|
|
2772
|
-
|
|
2773
|
-
const l = `
|
|
2781
|
+
const n = document.createElement("style");
|
|
2782
|
+
n.id = "react-admin-crud-manager-styles", n.textContent = `
|
|
2774
2783
|
.no-spinner::-webkit-outer-spin-button,
|
|
2775
2784
|
.no-spinner::-webkit-inner-spin-button {
|
|
2776
2785
|
-webkit-appearance: none;
|
|
2777
2786
|
margin: 0;
|
|
2778
2787
|
}
|
|
2779
|
-
|
|
2788
|
+
|
|
2780
2789
|
.no-spinner {
|
|
2781
2790
|
-moz-appearance: textfield;
|
|
2782
2791
|
}
|
|
2783
|
-
|
|
2792
|
+
|
|
2784
2793
|
.tox.tox-tinymce .tox-edit-area::before {
|
|
2785
2794
|
border: 0 !important;
|
|
2786
2795
|
box-shadow: none !important;
|
|
2787
2796
|
}
|
|
2788
|
-
|
|
2789
|
-
o.textContent = l, document.head.appendChild(o);
|
|
2797
|
+
`, document.head.appendChild(n);
|
|
2790
2798
|
};
|
|
2791
|
-
function
|
|
2799
|
+
function Ea(n) {
|
|
2792
2800
|
return K(() => {
|
|
2793
|
-
|
|
2794
|
-
}, []), /* @__PURE__ */ e(
|
|
2801
|
+
Ra();
|
|
2802
|
+
}, []), /* @__PURE__ */ e(La, { children: /* @__PURE__ */ e(Ze, { config: n.config }) });
|
|
2795
2803
|
}
|
|
2796
2804
|
export {
|
|
2797
|
-
|
|
2805
|
+
Ea as default
|
|
2798
2806
|
};
|
|
2799
2807
|
//# sourceMappingURL=index.es.js.map
|