@arudovwen/form-builder-react 1.8.6 → 1.8.7
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.
|
@@ -460,7 +460,7 @@ const xe = kn(void 0), Oi = {
|
|
|
460
460
|
), a == null || a("UPDATE_SECTION", { sectionId: O, value: E });
|
|
461
461
|
},
|
|
462
462
|
[g, a]
|
|
463
|
-
),
|
|
463
|
+
), W = ie(
|
|
464
464
|
() => ({
|
|
465
465
|
formData: S,
|
|
466
466
|
setFormData: g,
|
|
@@ -529,7 +529,7 @@ const xe = kn(void 0), Oi = {
|
|
|
529
529
|
Ne
|
|
530
530
|
]
|
|
531
531
|
);
|
|
532
|
-
return /* @__PURE__ */ i(xe.Provider, { value:
|
|
532
|
+
return /* @__PURE__ */ i(xe.Provider, { value: W, children: e });
|
|
533
533
|
};
|
|
534
534
|
function sn(e) {
|
|
535
535
|
var n, a, s = "";
|
|
@@ -1884,7 +1884,7 @@ nn((e, n) => fn({
|
|
|
1884
1884
|
...e,
|
|
1885
1885
|
_ref: n
|
|
1886
1886
|
}));
|
|
1887
|
-
function
|
|
1887
|
+
function U({
|
|
1888
1888
|
icon: e,
|
|
1889
1889
|
iconClass: n
|
|
1890
1890
|
}) {
|
|
@@ -1939,7 +1939,7 @@ function Ei({
|
|
|
1939
1939
|
disabled: l,
|
|
1940
1940
|
children: [
|
|
1941
1941
|
/* @__PURE__ */ i("span", { className: "custom-select__value", children: (r == null ? void 0 : r.length) > 0 ? m : /* @__PURE__ */ i("span", { className: "custom-select__placeholder", children: a != null ? a : " Select options" }) }),
|
|
1942
|
-
/* @__PURE__ */ i("span", { className: "custom-select__icon", children: /* @__PURE__ */ i(
|
|
1942
|
+
/* @__PURE__ */ i("span", { className: "custom-select__icon", children: /* @__PURE__ */ i(U, { icon: "lucide:chevron-down" }) })
|
|
1943
1943
|
]
|
|
1944
1944
|
}
|
|
1945
1945
|
),
|
|
@@ -2036,8 +2036,8 @@ function xn({
|
|
|
2036
2036
|
className: "!flex items-center rounded cursor-pointer gap-x-3",
|
|
2037
2037
|
title: `Click to preview ${t}`,
|
|
2038
2038
|
children: [
|
|
2039
|
-
l === "image" && /* @__PURE__ */ i("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ i(
|
|
2040
|
-
l !== "image" && /* @__PURE__ */ i(
|
|
2039
|
+
l === "image" && /* @__PURE__ */ i("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ i(U, { iconClass: "text-4xl", icon: "fluent-color:image-48" }) }),
|
|
2040
|
+
l !== "image" && /* @__PURE__ */ i(U, { icon: za[l], iconClass: "text-4xl" }),
|
|
2041
2041
|
/* @__PURE__ */ i("span", { className: "text-sm font-semibold text-center text-gray-700 truncate max-w-[300px]", children: t })
|
|
2042
2042
|
]
|
|
2043
2043
|
}
|
|
@@ -2050,7 +2050,7 @@ function xn({
|
|
|
2050
2050
|
className: "p-2",
|
|
2051
2051
|
onClick: () => p(u || e, n),
|
|
2052
2052
|
title: `Download ${t}`,
|
|
2053
|
-
children: /* @__PURE__ */ i(
|
|
2053
|
+
children: /* @__PURE__ */ i(U, { icon: "streamline-flex:download-tray-solid" })
|
|
2054
2054
|
}
|
|
2055
2055
|
),
|
|
2056
2056
|
a && /* @__PURE__ */ i(
|
|
@@ -2059,7 +2059,7 @@ function xn({
|
|
|
2059
2059
|
type: "button",
|
|
2060
2060
|
className: "p-2 text-lg text-red-500",
|
|
2061
2061
|
onClick: a,
|
|
2062
|
-
children: /* @__PURE__ */ i(
|
|
2062
|
+
children: /* @__PURE__ */ i(U, { icon: "lets-icons:trash-duotone" })
|
|
2063
2063
|
}
|
|
2064
2064
|
)
|
|
2065
2065
|
] }),
|
|
@@ -2257,7 +2257,7 @@ function Ja({
|
|
|
2257
2257
|
onClick: () => S(),
|
|
2258
2258
|
disabled: t,
|
|
2259
2259
|
"aria-label": "Remove all files",
|
|
2260
|
-
children: /* @__PURE__ */ i(
|
|
2260
|
+
children: /* @__PURE__ */ i(U, { icon: "lets-icons:trash-duotone" })
|
|
2261
2261
|
}
|
|
2262
2262
|
)
|
|
2263
2263
|
] }),
|
|
@@ -2425,7 +2425,7 @@ const z = ({
|
|
|
2425
2425
|
peer-disabled:cursor-not-allowed
|
|
2426
2426
|
`,
|
|
2427
2427
|
children: w && /* @__PURE__ */ i(
|
|
2428
|
-
|
|
2428
|
+
U,
|
|
2429
2429
|
{
|
|
2430
2430
|
icon: "meteor-icons:check",
|
|
2431
2431
|
iconClass: "w-3.5 h-3.5 text-white"
|
|
@@ -2619,7 +2619,7 @@ const je = ({
|
|
|
2619
2619
|
children: N
|
|
2620
2620
|
}
|
|
2621
2621
|
),
|
|
2622
|
-
/* @__PURE__ */ i("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ i(
|
|
2622
|
+
/* @__PURE__ */ i("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ i(U, { icon: "lucide:chevron-down" }) })
|
|
2623
2623
|
] }),
|
|
2624
2624
|
/* @__PURE__ */ i(
|
|
2625
2625
|
Pe,
|
|
@@ -2724,7 +2724,7 @@ function _e({
|
|
|
2724
2724
|
!l && /* @__PURE__ */ i(Bn, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: p ? /* @__PURE__ */ b("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
2725
2725
|
/* @__PURE__ */ i("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
2726
2726
|
/* @__PURE__ */ i("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
2727
|
-
] }) : /* @__PURE__ */ i(
|
|
2727
|
+
] }) : /* @__PURE__ */ i(U, { icon: "octicon:chevron-down-12" }) })
|
|
2728
2728
|
] }),
|
|
2729
2729
|
/* @__PURE__ */ i(En, { anchor: "bottom start", className: "select-options__combo", children: p ? /* @__PURE__ */ i("div", { className: "px-3 py-2 text-sm text-gray-500", children: "Loading..." }) : x.length === 0 ? /* @__PURE__ */ i("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : x == null ? void 0 : x.map((N) => /* @__PURE__ */ i(
|
|
2730
2730
|
Pn,
|
|
@@ -3595,7 +3595,7 @@ function Co({
|
|
|
3595
3595
|
children: [
|
|
3596
3596
|
/* @__PURE__ */ b(ae.Button, { className: "w-full flex items-center justify-between px-3 py-2 bg-white border border-slate-200/80 rounded-lg text-sm text-slate-700 font-medium hover:bg-slate-50 hover:border-slate-300 transition-colors focus:outline-none focus:ring-2 focus:ring-gray-500/20 focus:border-gray-500 shadow-sm", children: [
|
|
3597
3597
|
/* @__PURE__ */ i("span", { className: "block truncate capitalize", children: c.fieldType }),
|
|
3598
|
-
/* @__PURE__ */ i(
|
|
3598
|
+
/* @__PURE__ */ i(U, { icon: "lucide:chevron-down", iconClass: "w-4 h-4 text-slate-400" })
|
|
3599
3599
|
] }),
|
|
3600
3600
|
/* @__PURE__ */ i(
|
|
3601
3601
|
Pe,
|
|
@@ -3633,7 +3633,7 @@ function Co({
|
|
|
3633
3633
|
children: [
|
|
3634
3634
|
/* @__PURE__ */ b(ae.Button, { className: "w-full flex items-center justify-between px-3 py-2 bg-white border border-slate-200/80 rounded-lg text-sm text-slate-700 font-medium hover:bg-slate-50 hover:border-slate-300 transition-colors focus:outline-none focus:ring-2 focus:ring-gray-500/20 focus:border-gray-500 shadow-sm", children: [
|
|
3635
3635
|
/* @__PURE__ */ i("span", { className: "block truncate capitalize", children: c.operator.replace("_", " ") }),
|
|
3636
|
-
/* @__PURE__ */ i(
|
|
3636
|
+
/* @__PURE__ */ i(U, { icon: "lucide:chevron-down", iconClass: "w-4 h-4 text-slate-400" })
|
|
3637
3637
|
] }),
|
|
3638
3638
|
/* @__PURE__ */ i(
|
|
3639
3639
|
Pe,
|
|
@@ -3671,7 +3671,7 @@ function Co({
|
|
|
3671
3671
|
children: [
|
|
3672
3672
|
/* @__PURE__ */ b(ae.Button, { className: "w-full flex items-center justify-between px-3 py-2 bg-white border border-slate-200/80 rounded-lg text-sm text-slate-700 font-medium hover:bg-slate-50 hover:border-slate-300 transition-colors focus:outline-none focus:ring-2 focus:ring-gray-500/20 focus:border-gray-500 shadow-sm", children: [
|
|
3673
3673
|
/* @__PURE__ */ i("span", { className: "block truncate pr-2", children: ((g = h.find((x) => x.value === c.fieldValue)) == null ? void 0 : g.label) || "Select value" }),
|
|
3674
|
-
/* @__PURE__ */ i(
|
|
3674
|
+
/* @__PURE__ */ i(U, { icon: "lucide:chevron-down", iconClass: "w-4 h-4 flex-shrink-0 text-slate-400" })
|
|
3675
3675
|
] }),
|
|
3676
3676
|
/* @__PURE__ */ i(
|
|
3677
3677
|
Pe,
|
|
@@ -3717,7 +3717,7 @@ function Co({
|
|
|
3717
3717
|
children: [
|
|
3718
3718
|
/* @__PURE__ */ b(ae.Button, { className: "w-full flex items-center justify-between px-3 py-2 bg-white border border-slate-200/80 rounded-lg text-sm text-slate-700 font-medium hover:bg-slate-50 hover:border-slate-300 transition-colors focus:outline-none focus:ring-2 focus:ring-gray-500/20 focus:border-gray-500 shadow-sm", children: [
|
|
3719
3719
|
/* @__PURE__ */ i("span", { className: "block truncate", children: c.fieldValue === !0 ? "True" : c.fieldValue === !1 ? "False" : "Select value" }),
|
|
3720
|
-
/* @__PURE__ */ i(
|
|
3720
|
+
/* @__PURE__ */ i(U, { icon: "lucide:chevron-down", iconClass: "w-4 h-4 text-slate-400" })
|
|
3721
3721
|
] }),
|
|
3722
3722
|
/* @__PURE__ */ i(
|
|
3723
3723
|
Pe,
|
|
@@ -3968,9 +3968,9 @@ const wo = K.object().shape({
|
|
|
3968
3968
|
requiredMessage: K.string().nullable(),
|
|
3969
3969
|
minLengthMessage: K.string().nullable(),
|
|
3970
3970
|
maxLengthMessage: K.string().nullable(),
|
|
3971
|
-
maxLength: K.number().typeError("Expecting a number").nullable(),
|
|
3972
|
-
minLength: K.number().typeError("Expecting a number").nullable(),
|
|
3973
|
-
minChecked: K.number().typeError("Expecting a number").nullable()
|
|
3971
|
+
maxLength: K.number().transform((e, n) => String(n).trim() === "" ? null : e).typeError("Expecting a number").nullable(),
|
|
3972
|
+
minLength: K.number().transform((e, n) => String(n).trim() === "" ? null : e).typeError("Expecting a number").nullable(),
|
|
3973
|
+
minChecked: K.number().transform((e, n) => String(n).trim() === "" ? null : e).typeError("Expecting a number").nullable(),
|
|
3974
3974
|
requireAllChecked: K.boolean(),
|
|
3975
3975
|
inputType: K.string().nullable(),
|
|
3976
3976
|
maxAmountMessage: K.string().nullable(),
|
|
@@ -4042,17 +4042,17 @@ const wo = K.object().shape({
|
|
|
4042
4042
|
}) => {
|
|
4043
4043
|
var Ie;
|
|
4044
4044
|
const s = To.filter(
|
|
4045
|
-
(
|
|
4046
|
-
), { updateElement: o, formData: l } = de.useContext(xe), [d, u] = G("basic"), [r, c] = G(!1), [m, t] = G("manual"), p = ((Ie = l == null ? void 0 : l.flatMap((
|
|
4047
|
-
(
|
|
4045
|
+
(W) => !Ye.includes(a.inputType) || W.key !== "validation"
|
|
4046
|
+
), { updateElement: o, formData: l } = de.useContext(xe), [d, u] = G("basic"), [r, c] = G(!1), [m, t] = G("manual"), p = ((Ie = l == null ? void 0 : l.flatMap((W) => (W == null ? void 0 : W.questionData) || [])) == null ? void 0 : Ie.length) || 0, h = de.useMemo(() => (l == null ? void 0 : l.flatMap((W) => (W == null ? void 0 : W.questionData) || []).filter(
|
|
4047
|
+
(W) => {
|
|
4048
4048
|
var E;
|
|
4049
|
-
return
|
|
4050
|
-
(E =
|
|
4049
|
+
return W.id !== (a == null ? void 0 : a.id) && !["spacer", "divider", "section", "grid"].includes(
|
|
4050
|
+
(E = W.type) == null ? void 0 : E.toLowerCase()
|
|
4051
4051
|
);
|
|
4052
4052
|
}
|
|
4053
|
-
).map((
|
|
4054
|
-
id:
|
|
4055
|
-
display:
|
|
4053
|
+
).map((W) => ({
|
|
4054
|
+
id: W.id,
|
|
4055
|
+
display: W.inputLabel || W.label || "Unnamed"
|
|
4056
4056
|
}))) || [], [p, a == null ? void 0 : a.id]), y = ce("config"), {
|
|
4057
4057
|
register: f,
|
|
4058
4058
|
handleSubmit: g,
|
|
@@ -4089,14 +4089,14 @@ const wo = K.object().shape({
|
|
|
4089
4089
|
H(() => {
|
|
4090
4090
|
e || w();
|
|
4091
4091
|
}, [e, w]);
|
|
4092
|
-
const J = (
|
|
4093
|
-
o(
|
|
4092
|
+
const J = (W) => {
|
|
4093
|
+
o(W, a.sectionId), n();
|
|
4094
4094
|
}, Me = {
|
|
4095
4095
|
headers: {
|
|
4096
4096
|
Authorization: `Bearer ${ce("token")}`
|
|
4097
4097
|
}
|
|
4098
4098
|
}, Ne = $(async () => {
|
|
4099
|
-
var
|
|
4099
|
+
var W, E, O;
|
|
4100
4100
|
if (!C.apiUrl || !/^https?:\/\//.test(C.apiUrl)) {
|
|
4101
4101
|
ve.info("Please provide a valid API URL");
|
|
4102
4102
|
return;
|
|
@@ -4113,7 +4113,7 @@ const wo = K.object().shape({
|
|
|
4113
4113
|
ve.error("Expected an array in response (data, record, or result).");
|
|
4114
4114
|
return;
|
|
4115
4115
|
}
|
|
4116
|
-
((
|
|
4116
|
+
((W = a.type) == null ? void 0 : W.toLowerCase()) === "datagrid" ? x("dataColumns", Ci(L)) : x("options", Ni(L));
|
|
4117
4117
|
} catch (P) {
|
|
4118
4118
|
const D = ((O = (E = P == null ? void 0 : P.response) == null ? void 0 : E.data) == null ? void 0 : O.message) || (P == null ? void 0 : P.message) || "Unable to load options";
|
|
4119
4119
|
ve.error(D);
|
|
@@ -4125,7 +4125,7 @@ const wo = K.object().shape({
|
|
|
4125
4125
|
m === "api" && Ne();
|
|
4126
4126
|
}
|
|
4127
4127
|
const fe = () => {
|
|
4128
|
-
var
|
|
4128
|
+
var W, E;
|
|
4129
4129
|
return /* @__PURE__ */ b("div", { className: "flex flex-col justify-start gap-y-1", children: [
|
|
4130
4130
|
/* @__PURE__ */ i("div", { className: "flex items-center mb-4 gap-x-5", children: Se == null ? void 0 : Se.map((O) => /* @__PURE__ */ b("label", { className: "items-center text-base capitalize gap-x-3", children: [
|
|
4131
4131
|
/* @__PURE__ */ i(
|
|
@@ -4183,7 +4183,7 @@ const wo = K.object().shape({
|
|
|
4183
4183
|
}
|
|
4184
4184
|
) }),
|
|
4185
4185
|
/* @__PURE__ */ b("div", { children: [
|
|
4186
|
-
/* @__PURE__ */ i("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((
|
|
4186
|
+
/* @__PURE__ */ i("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((W = a == null ? void 0 : a.type) == null ? void 0 : W.toLowerCase()) === "matrix" ? "Rows Options" : "Parent Options" }),
|
|
4187
4187
|
T == null ? void 0 : T.map((O, P) => /* @__PURE__ */ b(
|
|
4188
4188
|
"div",
|
|
4189
4189
|
{
|
|
@@ -4227,7 +4227,7 @@ const wo = K.object().shape({
|
|
|
4227
4227
|
type: "button",
|
|
4228
4228
|
className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
4229
4229
|
onClick: () => B(P),
|
|
4230
|
-
children: /* @__PURE__ */ i(
|
|
4230
|
+
children: /* @__PURE__ */ i(U, { icon: "iconamoon:sign-times-fill" })
|
|
4231
4231
|
}
|
|
4232
4232
|
)
|
|
4233
4233
|
]
|
|
@@ -4244,7 +4244,7 @@ const wo = K.object().shape({
|
|
|
4244
4244
|
className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
|
|
4245
4245
|
onClick: () => R({ label: "", value: "", id: ge() }),
|
|
4246
4246
|
children: [
|
|
4247
|
-
/* @__PURE__ */ i(
|
|
4247
|
+
/* @__PURE__ */ i(U, { icon: "qlementine-icons:plus-16" }),
|
|
4248
4248
|
" Add Option"
|
|
4249
4249
|
]
|
|
4250
4250
|
}
|
|
@@ -4311,7 +4311,7 @@ const wo = K.object().shape({
|
|
|
4311
4311
|
type: "button",
|
|
4312
4312
|
className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
4313
4313
|
onClick: () => ne(P),
|
|
4314
|
-
children: /* @__PURE__ */ i(
|
|
4314
|
+
children: /* @__PURE__ */ i(U, { icon: "iconamoon:sign-times-fill" })
|
|
4315
4315
|
}
|
|
4316
4316
|
)
|
|
4317
4317
|
]
|
|
@@ -4327,7 +4327,7 @@ const wo = K.object().shape({
|
|
|
4327
4327
|
className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
|
|
4328
4328
|
onClick: () => Q({ label: "", value: "", key: "", id: ge() }),
|
|
4329
4329
|
children: [
|
|
4330
|
-
/* @__PURE__ */ i(
|
|
4330
|
+
/* @__PURE__ */ i(U, { icon: "qlementine-icons:plus-16" }),
|
|
4331
4331
|
" Add Option"
|
|
4332
4332
|
]
|
|
4333
4333
|
}
|
|
@@ -4337,23 +4337,23 @@ const wo = K.object().shape({
|
|
|
4337
4337
|
] })
|
|
4338
4338
|
] });
|
|
4339
4339
|
}, Be = () => /* @__PURE__ */ b("div", { className: "flex flex-col justify-start gap-y-1", children: [
|
|
4340
|
-
/* @__PURE__ */ i("div", { className: "flex items-center mb-4 gap-x-5", children: Se == null ? void 0 : Se.map((
|
|
4340
|
+
/* @__PURE__ */ i("div", { className: "flex items-center mb-4 gap-x-5", children: Se == null ? void 0 : Se.map((W) => /* @__PURE__ */ b("label", { className: "items-center text-base capitalize gap-x-3", children: [
|
|
4341
4341
|
/* @__PURE__ */ i(
|
|
4342
4342
|
"input",
|
|
4343
4343
|
{
|
|
4344
4344
|
type: "radio",
|
|
4345
4345
|
name: "optionType",
|
|
4346
4346
|
onChange: (E) => t(E.target.value),
|
|
4347
|
-
value:
|
|
4348
|
-
checked:
|
|
4347
|
+
value: W,
|
|
4348
|
+
checked: W === m
|
|
4349
4349
|
}
|
|
4350
4350
|
),
|
|
4351
4351
|
" ",
|
|
4352
4352
|
/* @__PURE__ */ b("span", { children: [
|
|
4353
|
-
|
|
4353
|
+
W,
|
|
4354
4354
|
" options"
|
|
4355
4355
|
] })
|
|
4356
|
-
] },
|
|
4356
|
+
] }, W)) }),
|
|
4357
4357
|
m === "api" && /* @__PURE__ */ b("div", { className: "mb-4", children: [
|
|
4358
4358
|
/* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
|
|
4359
4359
|
/* @__PURE__ */ b("div", { className: "relative flex items-center w-full mb-2", children: [
|
|
@@ -4393,7 +4393,7 @@ const wo = K.object().shape({
|
|
|
4393
4393
|
name: "dataColumns"
|
|
4394
4394
|
}
|
|
4395
4395
|
) }),
|
|
4396
|
-
/* @__PURE__ */ i("div", { className: "grid gap-y-3", children: le == null ? void 0 : le.map((
|
|
4396
|
+
/* @__PURE__ */ i("div", { className: "grid gap-y-3", children: le == null ? void 0 : le.map((W, E) => {
|
|
4397
4397
|
var O, P;
|
|
4398
4398
|
return /* @__PURE__ */ b(
|
|
4399
4399
|
"div",
|
|
@@ -4469,7 +4469,7 @@ const wo = K.object().shape({
|
|
|
4469
4469
|
type: "button",
|
|
4470
4470
|
className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
4471
4471
|
onClick: () => _(E),
|
|
4472
|
-
children: /* @__PURE__ */ i(
|
|
4472
|
+
children: /* @__PURE__ */ i(U, { icon: "iconamoon:sign-times-fill" })
|
|
4473
4473
|
}
|
|
4474
4474
|
)
|
|
4475
4475
|
] }),
|
|
@@ -4487,7 +4487,7 @@ const wo = K.object().shape({
|
|
|
4487
4487
|
) }) })
|
|
4488
4488
|
]
|
|
4489
4489
|
},
|
|
4490
|
-
|
|
4490
|
+
W.id
|
|
4491
4491
|
);
|
|
4492
4492
|
}) }),
|
|
4493
4493
|
/* @__PURE__ */ b("div", { children: [
|
|
@@ -4506,16 +4506,16 @@ const wo = K.object().shape({
|
|
|
4506
4506
|
validate: !1
|
|
4507
4507
|
}),
|
|
4508
4508
|
children: [
|
|
4509
|
-
/* @__PURE__ */ i(
|
|
4509
|
+
/* @__PURE__ */ i(U, { icon: "qlementine-icons:plus-16" }),
|
|
4510
4510
|
" Add column"
|
|
4511
4511
|
]
|
|
4512
4512
|
}
|
|
4513
4513
|
)
|
|
4514
4514
|
] })
|
|
4515
4515
|
] }), Le = $(async () => {
|
|
4516
|
-
const
|
|
4516
|
+
const W = ce("token"), { status: E, data: O } = await Oe.get(C.url, {
|
|
4517
4517
|
headers: {
|
|
4518
|
-
Authorization: `Bearer ${
|
|
4518
|
+
Authorization: `Bearer ${W}`
|
|
4519
4519
|
}
|
|
4520
4520
|
});
|
|
4521
4521
|
E === 200 && x("options", (O == null ? void 0 : O.data) || O);
|
|
@@ -4527,10 +4527,10 @@ const wo = K.object().shape({
|
|
|
4527
4527
|
"div",
|
|
4528
4528
|
{
|
|
4529
4529
|
className: "fixed inset-0 bg-gray-800/40 backdrop-blur-sm flex items-center justify-end z-[999] cursor-default",
|
|
4530
|
-
onMouseDown: (
|
|
4531
|
-
onPointerDown: (
|
|
4532
|
-
onDragStart: (
|
|
4533
|
-
|
|
4530
|
+
onMouseDown: (W) => W.stopPropagation(),
|
|
4531
|
+
onPointerDown: (W) => W.stopPropagation(),
|
|
4532
|
+
onDragStart: (W) => {
|
|
4533
|
+
W.preventDefault(), W.stopPropagation();
|
|
4534
4534
|
},
|
|
4535
4535
|
children: /* @__PURE__ */ b("div", { className: "w-full lg:w-2/3 xl:w-2/5 bg-white h-screen shadow-xl relative flex flex-col items-center", children: [
|
|
4536
4536
|
/* @__PURE__ */ i(
|
|
@@ -4538,7 +4538,7 @@ const wo = K.object().shape({
|
|
|
4538
4538
|
{
|
|
4539
4539
|
className: "bg-white h-10 w-10 flex justify-center items-center absolute top-1 -left-12 rounded-lg hover:bg-gray-50",
|
|
4540
4540
|
onClick: n,
|
|
4541
|
-
children: /* @__PURE__ */ i(
|
|
4541
|
+
children: /* @__PURE__ */ i(U, { icon: "tabler:x", iconClass: "text-xl" })
|
|
4542
4542
|
}
|
|
4543
4543
|
),
|
|
4544
4544
|
/* @__PURE__ */ i("div", { className: "w-full pt-4", children: /* @__PURE__ */ i(
|
|
@@ -4679,8 +4679,8 @@ const wo = K.object().shape({
|
|
|
4679
4679
|
po.includes(a.inputType) && /* @__PURE__ */ i(
|
|
4680
4680
|
go,
|
|
4681
4681
|
{
|
|
4682
|
-
onChange: (
|
|
4683
|
-
x("denominators",
|
|
4682
|
+
onChange: (W) => {
|
|
4683
|
+
x("denominators", W);
|
|
4684
4684
|
},
|
|
4685
4685
|
value: S("denominators")
|
|
4686
4686
|
}
|
|
@@ -4934,7 +4934,7 @@ const wo = K.object().shape({
|
|
|
4934
4934
|
Mo,
|
|
4935
4935
|
{
|
|
4936
4936
|
value: S("formula") || "",
|
|
4937
|
-
onChange: (
|
|
4937
|
+
onChange: (W) => x("formula", W, {
|
|
4938
4938
|
shouldValidate: !0,
|
|
4939
4939
|
shouldDirty: !0
|
|
4940
4940
|
}),
|
|
@@ -5188,6 +5188,18 @@ const wo = K.object().shape({
|
|
|
5188
5188
|
),
|
|
5189
5189
|
/* @__PURE__ */ i("span", { className: "mt-0.5", children: "Required" })
|
|
5190
5190
|
] }),
|
|
5191
|
+
/* @__PURE__ */ i(
|
|
5192
|
+
"button",
|
|
5193
|
+
{
|
|
5194
|
+
type: "button",
|
|
5195
|
+
className: "text-sm outline-none hover:opacity-80 py-1 text-gray-600",
|
|
5196
|
+
onClick: () => {
|
|
5197
|
+
typeof d == "function" && d(n == null ? void 0 : n.id, n.sectionId);
|
|
5198
|
+
},
|
|
5199
|
+
title: "Duplicate",
|
|
5200
|
+
children: /* @__PURE__ */ i(U, { icon: "solar:copy-outline", iconClass: "text-base" })
|
|
5201
|
+
}
|
|
5202
|
+
),
|
|
5191
5203
|
/* @__PURE__ */ i(
|
|
5192
5204
|
"button",
|
|
5193
5205
|
{
|
|
@@ -5197,7 +5209,7 @@ const wo = K.object().shape({
|
|
|
5197
5209
|
typeof r == "function" && r(n == null ? void 0 : n.id, n.sectionId);
|
|
5198
5210
|
},
|
|
5199
5211
|
title: "Copy to Clipboard",
|
|
5200
|
-
children: /* @__PURE__ */ i(
|
|
5212
|
+
children: /* @__PURE__ */ i(U, { icon: "lucide:clipboard-copy", iconClass: "text-base" })
|
|
5201
5213
|
}
|
|
5202
5214
|
),
|
|
5203
5215
|
/* @__PURE__ */ i(
|
|
@@ -5207,7 +5219,7 @@ const wo = K.object().shape({
|
|
|
5207
5219
|
className: "text-sm outline-none hover:opacity-80 text-gray-600 py-1",
|
|
5208
5220
|
onClick: () => o(!0),
|
|
5209
5221
|
title: "Edit",
|
|
5210
|
-
children: /* @__PURE__ */ i(
|
|
5222
|
+
children: /* @__PURE__ */ i(U, { icon: "circum:edit", iconClass: "text-base" })
|
|
5211
5223
|
}
|
|
5212
5224
|
),
|
|
5213
5225
|
/* @__PURE__ */ i(
|
|
@@ -5217,7 +5229,7 @@ const wo = K.object().shape({
|
|
|
5217
5229
|
className: "text-sm outline-none hover:opacity-80 text-gray-600 py-1",
|
|
5218
5230
|
onClick: m,
|
|
5219
5231
|
title: "Remove",
|
|
5220
|
-
children: /* @__PURE__ */ i(
|
|
5232
|
+
children: /* @__PURE__ */ i(U, { icon: "iconamoon:trash", iconClass: "text-base" })
|
|
5221
5233
|
}
|
|
5222
5234
|
)
|
|
5223
5235
|
] })
|
|
@@ -5452,7 +5464,7 @@ function Ro({
|
|
|
5452
5464
|
}
|
|
5453
5465
|
)
|
|
5454
5466
|
] }),
|
|
5455
|
-
c && !u && /* @__PURE__ */ i("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ i(
|
|
5467
|
+
c && !u && /* @__PURE__ */ i("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ i(U, { icon: "gg:check-o" }) })
|
|
5456
5468
|
] })
|
|
5457
5469
|
] }),
|
|
5458
5470
|
t && x === "string" && /* @__PURE__ */ i(
|
|
@@ -5701,7 +5713,7 @@ function Ho({
|
|
|
5701
5713
|
onClick: () => l(e.id),
|
|
5702
5714
|
className: "text-red-500 hover:text-red-700",
|
|
5703
5715
|
"aria-label": "Delete row",
|
|
5704
|
-
children: /* @__PURE__ */ i(
|
|
5716
|
+
children: /* @__PURE__ */ i(U, { icon: "lets-icons:trash-duotone", iconClass: "text-xl" })
|
|
5705
5717
|
}
|
|
5706
5718
|
) })
|
|
5707
5719
|
] });
|
|
@@ -5866,7 +5878,7 @@ const Qi = ({
|
|
|
5866
5878
|
children: /* @__PURE__ */ b("div", { className: "custom-select__wrapper", children: [
|
|
5867
5879
|
/* @__PURE__ */ b(ae.Button, { className: x, disabled: f, children: [
|
|
5868
5880
|
y ? /* @__PURE__ */ i("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ i("span", { className: "custom-select__value", children: (g == null ? void 0 : g.label) || /* @__PURE__ */ i("span", { className: "custom-select__placeholder", children: a }) }),
|
|
5869
|
-
/* @__PURE__ */ i("span", { className: "custom-select__icon", children: /* @__PURE__ */ i(
|
|
5881
|
+
/* @__PURE__ */ i("span", { className: "custom-select__icon", children: /* @__PURE__ */ i(U, { icon: "lucide:chevron-down" }) })
|
|
5870
5882
|
] }),
|
|
5871
5883
|
/* @__PURE__ */ i(
|
|
5872
5884
|
Pe,
|
|
@@ -6165,7 +6177,7 @@ function Jo({
|
|
|
6165
6177
|
),
|
|
6166
6178
|
children: [
|
|
6167
6179
|
/* @__PURE__ */ i(
|
|
6168
|
-
|
|
6180
|
+
U,
|
|
6169
6181
|
{
|
|
6170
6182
|
icon: m ? "solar:refresh-outline" : r ? "solar:check-circle-bold" : "solar:pen-2-line-duotone",
|
|
6171
6183
|
iconClass: m ? "animate-spin" : ""
|
|
@@ -6487,7 +6499,7 @@ function _o({
|
|
|
6487
6499
|
}
|
|
6488
6500
|
),
|
|
6489
6501
|
/* @__PURE__ */ b("div", { className: "relative !flex items-center input-control text-[#667085] !py-0 field-control", children: [
|
|
6490
|
-
/* @__PURE__ */ i(
|
|
6502
|
+
/* @__PURE__ */ i(U, { icon: "lucide:phone-call" }),
|
|
6491
6503
|
/* @__PURE__ */ i(Ge, { value: v, onChange: x, children: /* @__PURE__ */ b("div", { className: "relative", children: [
|
|
6492
6504
|
/* @__PURE__ */ i(
|
|
6493
6505
|
Ge.Input,
|
|
@@ -6498,7 +6510,7 @@ function _o({
|
|
|
6498
6510
|
onChange: (B) => g(B.target.value)
|
|
6499
6511
|
}
|
|
6500
6512
|
),
|
|
6501
|
-
/* @__PURE__ */ i(Ge.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ i(
|
|
6513
|
+
/* @__PURE__ */ i(Ge.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ i(U, { icon: "lucide:chevron-down" }) }),
|
|
6502
6514
|
/* @__PURE__ */ i(Ge.Options, { className: "absolute z-10 w-[250px] left-0 bg-white border rounded-md shadow-lg max-h-[400px] overflow-y-auto", children: k == null ? void 0 : k.map((B, V) => /* @__PURE__ */ b(
|
|
6503
6515
|
Ge.Option,
|
|
6504
6516
|
{
|
|
@@ -6532,7 +6544,7 @@ function _o({
|
|
|
6532
6544
|
minLength: M
|
|
6533
6545
|
}
|
|
6534
6546
|
),
|
|
6535
|
-
/* @__PURE__ */ i("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !R && S.length > 0 && !c && /* @__PURE__ */ i("span", { className: "text-green-500", children: /* @__PURE__ */ i(
|
|
6547
|
+
/* @__PURE__ */ i("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !R && S.length > 0 && !c && /* @__PURE__ */ i("span", { className: "text-green-500", children: /* @__PURE__ */ i(U, { icon: "bi:check-lg" }) }) })
|
|
6536
6548
|
] })
|
|
6537
6549
|
] }),
|
|
6538
6550
|
t && /* @__PURE__ */ i("span", { className: "block text-[#475467] font-light leading-4 text-xs mt-2", children: t })
|
|
@@ -6745,7 +6757,7 @@ function Qo({
|
|
|
6745
6757
|
g,
|
|
6746
6758
|
"%"
|
|
6747
6759
|
] }),
|
|
6748
|
-
v && /* @__PURE__ */ i(
|
|
6760
|
+
v && /* @__PURE__ */ i(U, { icon: "material-symbols:check-circle", iconClass: "text-blue-500 text-lg" })
|
|
6749
6761
|
] }),
|
|
6750
6762
|
/* @__PURE__ */ i(
|
|
6751
6763
|
"input",
|
|
@@ -6953,9 +6965,9 @@ const Nn = {
|
|
|
6953
6965
|
R && B && "bg-orange-50 border-orange-400 border-dashed shadow-inner scale-[1.01] text-orange-500"
|
|
6954
6966
|
),
|
|
6955
6967
|
children: [
|
|
6956
|
-
B && k === "edit" && /* @__PURE__ */ i("div", { className: "absolute top-1 left-1/2 -translate-x-1/2 flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-gray-100 hover:bg-blue-100 text-gray-400 hover:text-blue-500 cursor-grab active:cursor-grabbing transition-colors z-10 opacity-60 hover:opacity-100 pointer-events-none select-none", children: /* @__PURE__ */ i(
|
|
6968
|
+
B && k === "edit" && /* @__PURE__ */ i("div", { className: "absolute top-1 left-1/2 -translate-x-1/2 flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-gray-100 hover:bg-blue-100 text-gray-400 hover:text-blue-500 cursor-grab active:cursor-grabbing transition-colors z-10 opacity-60 hover:opacity-100 pointer-events-none select-none", children: /* @__PURE__ */ i(U, { icon: "ph:dots-six-bold" }) }),
|
|
6957
6969
|
R && !B && /* @__PURE__ */ b("span", { className: "absolute inset-0 flex flex-col items-center justify-center gap-1 text-blue-400 text-xs font-medium pointer-events-none", children: [
|
|
6958
|
-
/* @__PURE__ */ i(
|
|
6970
|
+
/* @__PURE__ */ i(U, { icon: "ph:plus-bold" }),
|
|
6959
6971
|
"Drop here"
|
|
6960
6972
|
] }),
|
|
6961
6973
|
R && B && /* @__PURE__ */ i("span", { className: "absolute top-1 right-1 text-xs text-orange-400 font-medium pointer-events-none px-1 py-0.5 bg-orange-50 rounded", children: "Replace" }),
|
|
@@ -6966,7 +6978,7 @@ const Nn = {
|
|
|
6966
6978
|
"w-full select-none min-w-0",
|
|
6967
6979
|
R && "opacity-50 pointer-events-none"
|
|
6968
6980
|
),
|
|
6969
|
-
children: T || /* @__PURE__ */ i("span", { className: "flex items-center justify-center text-gray-300", children: k === "edit" && /* @__PURE__ */ i(
|
|
6981
|
+
children: T || /* @__PURE__ */ i("span", { className: "flex items-center justify-center text-gray-300", children: k === "edit" && /* @__PURE__ */ i(U, { icon: "ph:plus-bold" }) })
|
|
6970
6982
|
}
|
|
6971
6983
|
)
|
|
6972
6984
|
]
|
|
@@ -7016,7 +7028,7 @@ function bi({
|
|
|
7016
7028
|
o ? "bg-blue-50 border-2 border-blue-300 border-dashed" : s ? "border-2 border-blue-200 border-dashed" : "border-2 border-transparent"
|
|
7017
7029
|
),
|
|
7018
7030
|
children: o && /* @__PURE__ */ b("span", { className: "flex items-center gap-1 text-blue-500 text-xs font-medium select-none pointer-events-none", children: [
|
|
7019
|
-
/* @__PURE__ */ i(
|
|
7031
|
+
/* @__PURE__ */ i(U, { icon: "octicon:plus-16" }),
|
|
7020
7032
|
"Drop here"
|
|
7021
7033
|
] })
|
|
7022
7034
|
}
|
|
@@ -7217,7 +7229,7 @@ const as = ei(ns), os = K.object({
|
|
|
7217
7229
|
{
|
|
7218
7230
|
onClick: n,
|
|
7219
7231
|
className: "absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",
|
|
7220
|
-
children: /* @__PURE__ */ i(
|
|
7232
|
+
children: /* @__PURE__ */ i(U, { icon: "tabler:x" })
|
|
7221
7233
|
}
|
|
7222
7234
|
)
|
|
7223
7235
|
] }),
|
|
@@ -7302,7 +7314,7 @@ const as = ei(ns), os = K.object({
|
|
|
7302
7314
|
{
|
|
7303
7315
|
onClick: n,
|
|
7304
7316
|
className: "absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",
|
|
7305
|
-
children: /* @__PURE__ */ i(
|
|
7317
|
+
children: /* @__PURE__ */ i(U, { icon: "tabler:x" })
|
|
7306
7318
|
}
|
|
7307
7319
|
)
|
|
7308
7320
|
] }),
|
|
@@ -7551,7 +7563,7 @@ const as = ei(ns), os = K.object({
|
|
|
7551
7563
|
className: "flex-1 h-full py-4 cursor-grab active:cursor-grabbing flex items-center gap-2",
|
|
7552
7564
|
title: "Drag to reorder section",
|
|
7553
7565
|
children: [
|
|
7554
|
-
/* @__PURE__ */ i(
|
|
7566
|
+
/* @__PURE__ */ i(U, { icon: "material-symbols:drag-indicator", iconClass: "text-gray-400 text-lg" }),
|
|
7555
7567
|
/* @__PURE__ */ i("h2", { className: "font-medium", children: e.title || "Section title" })
|
|
7556
7568
|
]
|
|
7557
7569
|
}
|
|
@@ -7563,7 +7575,7 @@ const as = ei(ns), os = K.object({
|
|
|
7563
7575
|
type: "button",
|
|
7564
7576
|
className: "p-1 text-xs border rounded-lg",
|
|
7565
7577
|
onClick: () => d(e),
|
|
7566
|
-
children: /* @__PURE__ */ i(
|
|
7578
|
+
children: /* @__PURE__ */ i(U, { icon: "fluent:edit-28-regular" })
|
|
7567
7579
|
}
|
|
7568
7580
|
),
|
|
7569
7581
|
r > 1 && /* @__PURE__ */ i(
|
|
@@ -7572,7 +7584,7 @@ const as = ei(ns), os = K.object({
|
|
|
7572
7584
|
type: "button",
|
|
7573
7585
|
className: "p-1 text-xs border rounded-lg",
|
|
7574
7586
|
onClick: () => u(e.id),
|
|
7575
|
-
children: /* @__PURE__ */ i(
|
|
7587
|
+
children: /* @__PURE__ */ i(U, { icon: "lets-icons:trash-duotone-line" })
|
|
7576
7588
|
}
|
|
7577
7589
|
),
|
|
7578
7590
|
/* @__PURE__ */ i(
|
|
@@ -7582,7 +7594,7 @@ const as = ei(ns), os = K.object({
|
|
|
7582
7594
|
className: "p-1 text-xs rounded-lg",
|
|
7583
7595
|
onClick: () => l(n),
|
|
7584
7596
|
children: /* @__PURE__ */ i(
|
|
7585
|
-
|
|
7597
|
+
U,
|
|
7586
7598
|
{
|
|
7587
7599
|
icon: o.includes(n) ? "fa6-solid:chevron-up" : "fa6-solid:chevron-down",
|
|
7588
7600
|
iconClass: "text-base"
|
|
@@ -7830,7 +7842,7 @@ const as = ei(ns), os = K.object({
|
|
|
7830
7842
|
const a = ce("config"), s = (a == null ? void 0 : a.loaderColor) || "#333";
|
|
7831
7843
|
document.documentElement.style.setProperty("--loader-color", s);
|
|
7832
7844
|
}, []), /* @__PURE__ */ i("div", { className: n, children: /* @__PURE__ */ i("span", { className: "loader" }) });
|
|
7833
|
-
}, cs = de.lazy(() => import("./logic-flow-
|
|
7845
|
+
}, cs = de.lazy(() => import("./logic-flow-Byv2PY49.js"));
|
|
7834
7846
|
function ms({
|
|
7835
7847
|
questionData: e,
|
|
7836
7848
|
uploadUrl: n,
|
|
@@ -7969,7 +7981,7 @@ const pi = [
|
|
|
7969
7981
|
},
|
|
7970
7982
|
title: "Paste copied element",
|
|
7971
7983
|
children: [
|
|
7972
|
-
/* @__PURE__ */ i(
|
|
7984
|
+
/* @__PURE__ */ i(U, { icon: "lucide:clipboard-paste" }),
|
|
7973
7985
|
"Paste Element (Ctrl+V)"
|
|
7974
7986
|
]
|
|
7975
7987
|
}
|
|
@@ -7995,7 +8007,7 @@ const pi = [
|
|
|
7995
8007
|
active:opacity-50 element_class`,
|
|
7996
8008
|
draggable: !0,
|
|
7997
8009
|
children: /* @__PURE__ */ b("span", { className: "flex flex-col items-center justify-center w-full gap-2", children: [
|
|
7998
|
-
/* @__PURE__ */ i("span", { style: { color: t }, children: /* @__PURE__ */ i(
|
|
8010
|
+
/* @__PURE__ */ i("span", { style: { color: t }, children: /* @__PURE__ */ i(U, { icon: S.icon, iconClass: "w-6 h-6" }) }),
|
|
7999
8011
|
/* @__PURE__ */ i(
|
|
8000
8012
|
"span",
|
|
8001
8013
|
{
|
|
@@ -8066,9 +8078,9 @@ const pi = [
|
|
|
8066
8078
|
),
|
|
8067
8079
|
"Submitting..."
|
|
8068
8080
|
] }) : /* @__PURE__ */ b("span", { className: "flex items-center", children: [
|
|
8069
|
-
o && l === "left" && /* @__PURE__ */ i("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ i(
|
|
8081
|
+
o && l === "left" && /* @__PURE__ */ i("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ i(U, { icon: o }) }),
|
|
8070
8082
|
e && /* @__PURE__ */ i("span", { children: e }),
|
|
8071
|
-
o && l === "right" && /* @__PURE__ */ i("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ i(
|
|
8083
|
+
o && l === "right" && /* @__PURE__ */ i("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ i(U, { icon: o }) })
|
|
8072
8084
|
] });
|
|
8073
8085
|
return c ? /* @__PURE__ */ i("div", { className: h, children: y() }) : r ? /* @__PURE__ */ i(jn, { to: r, className: h, children: y() }) : /* @__PURE__ */ i(
|
|
8074
8086
|
"button",
|
|
@@ -8269,7 +8281,7 @@ function fs({
|
|
|
8269
8281
|
onClick: () => c("canvas"),
|
|
8270
8282
|
children: [
|
|
8271
8283
|
/* @__PURE__ */ i(
|
|
8272
|
-
|
|
8284
|
+
U,
|
|
8273
8285
|
{
|
|
8274
8286
|
icon: "mdi:view-dashboard-outline",
|
|
8275
8287
|
iconClass: "text-base"
|
|
@@ -8288,7 +8300,7 @@ function fs({
|
|
|
8288
8300
|
className: `px-3 flex items-center gap-1.5 border-l border-gray-300 transition-colors flow_view ${r === "flow" ? " bg-white font-medium" : "bg-gray-100 text-gray-500 hover:bg-gray-50"}`,
|
|
8289
8301
|
onClick: () => c("flow"),
|
|
8290
8302
|
children: [
|
|
8291
|
-
/* @__PURE__ */ i(
|
|
8303
|
+
/* @__PURE__ */ i(U, { icon: "mdi:sitemap-outline", iconClass: "text-base" }),
|
|
8292
8304
|
" Flow"
|
|
8293
8305
|
]
|
|
8294
8306
|
}
|
|
@@ -8562,15 +8574,16 @@ function Cs({ formData: e, isReadOnly: n, answerData: a }) {
|
|
|
8562
8574
|
"require-all-checked",
|
|
8563
8575
|
"All options must be selected",
|
|
8564
8576
|
(p) => {
|
|
8565
|
-
var
|
|
8566
|
-
if (p == null || p === "")
|
|
8567
|
-
|
|
8568
|
-
|
|
8577
|
+
var f;
|
|
8578
|
+
if (p == null || p === "" || Array.isArray(p) && p.length === 0)
|
|
8579
|
+
return !r;
|
|
8580
|
+
const y = ((f = l.options) == null ? void 0 : f.length) || 0;
|
|
8581
|
+
return Array.isArray(p) ? p.length >= y : y <= 1;
|
|
8569
8582
|
}
|
|
8570
8583
|
) : l.minChecked && (t = t.test(
|
|
8571
8584
|
"min-checked",
|
|
8572
8585
|
`Please select at least ${l.minChecked} option(s)`,
|
|
8573
|
-
(p) => p == null || p === "" ? !
|
|
8586
|
+
(p) => p == null || p === "" || Array.isArray(p) && p.length === 0 ? !r : Array.isArray(p) ? p.length >= l.minChecked : 1 >= l.minChecked
|
|
8574
8587
|
)), s[d] = t;
|
|
8575
8588
|
});
|
|
8576
8589
|
}), K.object().shape(s);
|
|
@@ -8818,7 +8831,7 @@ function ws({ element: e, options: n, onNext: a, onPrev: s, isFirst: o, isLast:
|
|
|
8818
8831
|
),
|
|
8819
8832
|
!l && /* @__PURE__ */ i("span", { className: "text-xs text-gray-400 font-medium hidden sm:inline-block", children: "press Enter ↵" }),
|
|
8820
8833
|
!o && /* @__PURE__ */ b("button", { type: "button", onClick: s, className: "text-gray-400 hover:text-gray-600 font-medium text-sm ml-auto flex items-center gap-1 transition-colors", children: [
|
|
8821
|
-
/* @__PURE__ */ i(
|
|
8834
|
+
/* @__PURE__ */ i(U, { icon: "material-symbols:arrow-upward-rounded", iconClass: "text-lg" }),
|
|
8822
8835
|
"Back"
|
|
8823
8836
|
] })
|
|
8824
8837
|
] })
|
|
@@ -8844,7 +8857,7 @@ const Bs = ({
|
|
|
8844
8857
|
hideFooter: r = !1,
|
|
8845
8858
|
uploadUrl: c
|
|
8846
8859
|
}) => {
|
|
8847
|
-
var Be, Le, Re, Ie,
|
|
8860
|
+
var Be, Le, Re, Ie, W, E, O, P, D, L;
|
|
8848
8861
|
const { setAnswerData: m, setUploadUrl: t, apiActivityCount: p } = ke(xe), [h, y] = G(0), [f, g] = G(0), v = ie(
|
|
8849
8862
|
() => e.filter((I) => !I.isHidden).map((I) => {
|
|
8850
8863
|
var F;
|
|
@@ -9035,7 +9048,7 @@ const Bs = ({
|
|
|
9035
9048
|
className: "multi_section__box min-w-0",
|
|
9036
9049
|
children: [
|
|
9037
9050
|
d === "multi" && (((Le = v == null ? void 0 : v[h]) == null ? void 0 : Le.title) || ((Re = v == null ? void 0 : v[h]) == null ? void 0 : Re.description)) && /* @__PURE__ */ b("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
|
|
9038
|
-
((Ie = v[h]) == null ? void 0 : Ie.title) && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold mb-[6px]", children: (
|
|
9051
|
+
((Ie = v[h]) == null ? void 0 : Ie.title) && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold mb-[6px]", children: (W = v[h]) == null ? void 0 : W.title }),
|
|
9039
9052
|
((E = v[h]) == null ? void 0 : E.description) && /* @__PURE__ */ i("p", { className: "text-sm", children: (O = v[h]) == null ? void 0 : O.description })
|
|
9040
9053
|
] }),
|
|
9041
9054
|
d === "multi" ? /* @__PURE__ */ i(
|
|
@@ -9079,7 +9092,7 @@ const Bs = ({
|
|
|
9079
9092
|
className: "text-gray-400 hover:text-gray-600 font-medium text-sm flex items-center gap-1 transition-colors back_btn",
|
|
9080
9093
|
children: [
|
|
9081
9094
|
/* @__PURE__ */ i(
|
|
9082
|
-
|
|
9095
|
+
U,
|
|
9083
9096
|
{
|
|
9084
9097
|
icon: "material-symbols:arrow-upward-rounded",
|
|
9085
9098
|
iconClass: "text-lg"
|
|
@@ -9181,7 +9194,7 @@ function Cn({
|
|
|
9181
9194
|
] }) : /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("p", { className: "p-6 text-sm text-gray-400", children: "Error: No form data available." }) });
|
|
9182
9195
|
}
|
|
9183
9196
|
export {
|
|
9184
|
-
|
|
9197
|
+
U as A,
|
|
9185
9198
|
Ws as H,
|
|
9186
9199
|
Cn as V
|
|
9187
9200
|
};
|