@arudovwen/form-builder-react 1.4.50 → 1.4.51
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/form-builder.es.js +847 -846
- package/dist/form-builder.umd.js +13 -13
- package/package.json +1 -1
package/dist/form-builder.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import mi, { createContext as mo, useState as P, useMemo as oi, useEffect as D, forwardRef as ye, createElement as Sn, Fragment as Zi, useContext as ji, useRef as Ci, useCallback as $, memo as an } from "react";
|
|
2
2
|
import { v4 as Ai } from "uuid";
|
|
3
3
|
import bo from "react-datepicker";
|
|
4
|
-
import { Listbox as di, Transition as
|
|
4
|
+
import { Listbox as di, Transition as wi, Combobox as Ri, ComboboxInput as vo, ComboboxButton as ho, ComboboxOptions as po, ComboboxOption as go } from "@headlessui/react";
|
|
5
5
|
import { toast as ki, Toaster as Ae } from "sonner";
|
|
6
6
|
import Ii from "axios";
|
|
7
7
|
import sn from "react-currency-input-field";
|
|
@@ -28,11 +28,11 @@ function Co() {
|
|
|
28
28
|
ie = 1;
|
|
29
29
|
var i = mi, e = Symbol.for("react.element"), o = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
30
30
|
function u(t, d, r) {
|
|
31
|
-
var c, v = {},
|
|
32
|
-
r !== void 0 && (
|
|
31
|
+
var c, v = {}, h = null, p = null;
|
|
32
|
+
r !== void 0 && (h = "" + r), d.key !== void 0 && (h = "" + d.key), d.ref !== void 0 && (p = d.ref);
|
|
33
33
|
for (c in d) s.call(d, c) && !l.hasOwnProperty(c) && (v[c] = d[c]);
|
|
34
34
|
if (t && t.defaultProps) for (c in d = t.defaultProps, d) v[c] === void 0 && (v[c] = d[c]);
|
|
35
|
-
return { $$typeof: e, type: t, key:
|
|
35
|
+
return { $$typeof: e, type: t, key: h, ref: p, props: v, _owner: a.current };
|
|
36
36
|
}
|
|
37
37
|
return Gi.Fragment = o, Gi.jsx = u, Gi.jsxs = u, Gi;
|
|
38
38
|
}
|
|
@@ -49,58 +49,58 @@ var Hi = {};
|
|
|
49
49
|
var ne;
|
|
50
50
|
function Mo() {
|
|
51
51
|
return ne || (ne = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
|
-
var i = mi, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), t = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), r = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"),
|
|
53
|
-
function
|
|
54
|
-
if (
|
|
52
|
+
var i = mi, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), t = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), r = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), y = Symbol.iterator, f = "@@iterator";
|
|
53
|
+
function g(b) {
|
|
54
|
+
if (b === null || typeof b != "object")
|
|
55
55
|
return null;
|
|
56
|
-
var C = y &&
|
|
56
|
+
var C = y && b[y] || b[f];
|
|
57
57
|
return typeof C == "function" ? C : null;
|
|
58
58
|
}
|
|
59
|
-
var
|
|
60
|
-
function x(
|
|
59
|
+
var m = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
60
|
+
function x(b) {
|
|
61
61
|
{
|
|
62
62
|
for (var C = arguments.length, M = new Array(C > 1 ? C - 1 : 0), V = 1; V < C; V++)
|
|
63
63
|
M[V - 1] = arguments[V];
|
|
64
|
-
j("error",
|
|
64
|
+
j("error", b, M);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function j(
|
|
67
|
+
function j(b, C, M) {
|
|
68
68
|
{
|
|
69
|
-
var V =
|
|
69
|
+
var V = m.ReactDebugCurrentFrame, ei = V.getStackAddendum();
|
|
70
70
|
ei !== "" && (C += "%s", M = M.concat([ei]));
|
|
71
71
|
var ai = M.map(function(Q) {
|
|
72
72
|
return String(Q);
|
|
73
73
|
});
|
|
74
|
-
ai.unshift("Warning: " + C), Function.prototype.apply.call(console[
|
|
74
|
+
ai.unshift("Warning: " + C), Function.prototype.apply.call(console[b], console, ai);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
var S = !1, N = !1, A = !1, k = !1, O = !1, ii;
|
|
78
78
|
ii = Symbol.for("react.module.reference");
|
|
79
|
-
function z(
|
|
80
|
-
return !!(typeof
|
|
79
|
+
function z(b) {
|
|
80
|
+
return !!(typeof b == "string" || typeof b == "function" || b === s || b === l || O || b === a || b === r || b === c || k || b === p || S || N || A || typeof b == "object" && b !== null && (b.$$typeof === h || b.$$typeof === v || b.$$typeof === u || b.$$typeof === t || b.$$typeof === d || // This needs to include all possible module reference object
|
|
81
81
|
// types supported by any Flight configuration anywhere since
|
|
82
82
|
// we don't know which Flight build this will end up being used
|
|
83
83
|
// with.
|
|
84
|
-
|
|
84
|
+
b.$$typeof === ii || b.getModuleId !== void 0));
|
|
85
85
|
}
|
|
86
|
-
function Z(
|
|
87
|
-
var V =
|
|
86
|
+
function Z(b, C, M) {
|
|
87
|
+
var V = b.displayName;
|
|
88
88
|
if (V)
|
|
89
89
|
return V;
|
|
90
90
|
var ei = C.displayName || C.name || "";
|
|
91
91
|
return ei !== "" ? M + "(" + ei + ")" : M;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
93
|
+
function w(b) {
|
|
94
|
+
return b.displayName || "Context";
|
|
95
95
|
}
|
|
96
|
-
function W(
|
|
97
|
-
if (
|
|
96
|
+
function W(b) {
|
|
97
|
+
if (b == null)
|
|
98
98
|
return null;
|
|
99
|
-
if (typeof
|
|
100
|
-
return
|
|
101
|
-
if (typeof
|
|
102
|
-
return
|
|
103
|
-
switch (
|
|
99
|
+
if (typeof b.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof b == "function")
|
|
100
|
+
return b.displayName || b.name || null;
|
|
101
|
+
if (typeof b == "string")
|
|
102
|
+
return b;
|
|
103
|
+
switch (b) {
|
|
104
104
|
case s:
|
|
105
105
|
return "Fragment";
|
|
106
106
|
case o:
|
|
@@ -114,21 +114,21 @@ function Mo() {
|
|
|
114
114
|
case c:
|
|
115
115
|
return "SuspenseList";
|
|
116
116
|
}
|
|
117
|
-
if (typeof
|
|
118
|
-
switch (
|
|
117
|
+
if (typeof b == "object")
|
|
118
|
+
switch (b.$$typeof) {
|
|
119
119
|
case t:
|
|
120
|
-
var C =
|
|
121
|
-
return
|
|
120
|
+
var C = b;
|
|
121
|
+
return w(C) + ".Consumer";
|
|
122
122
|
case u:
|
|
123
|
-
var M =
|
|
124
|
-
return
|
|
123
|
+
var M = b;
|
|
124
|
+
return w(M._context) + ".Provider";
|
|
125
125
|
case d:
|
|
126
|
-
return Z(
|
|
126
|
+
return Z(b, b.render, "ForwardRef");
|
|
127
127
|
case v:
|
|
128
|
-
var V =
|
|
129
|
-
return V !== null ? V : W(
|
|
130
|
-
case
|
|
131
|
-
var ei =
|
|
128
|
+
var V = b.displayName || null;
|
|
129
|
+
return V !== null ? V : W(b.type) || "Memo";
|
|
130
|
+
case h: {
|
|
131
|
+
var ei = b, ai = ei._payload, Q = ei._init;
|
|
132
132
|
try {
|
|
133
133
|
return W(Q(ai));
|
|
134
134
|
} catch (Y) {
|
|
@@ -146,20 +146,20 @@ function Mo() {
|
|
|
146
146
|
{
|
|
147
147
|
if (G === 0) {
|
|
148
148
|
H = console.log, R = console.info, T = console.warn, E = console.error, U = console.group, ci = console.groupCollapsed, ni = console.groupEnd;
|
|
149
|
-
var
|
|
149
|
+
var b = {
|
|
150
150
|
configurable: !0,
|
|
151
151
|
enumerable: !0,
|
|
152
152
|
value: si,
|
|
153
153
|
writable: !0
|
|
154
154
|
};
|
|
155
155
|
Object.defineProperties(console, {
|
|
156
|
-
info:
|
|
157
|
-
log:
|
|
158
|
-
warn:
|
|
159
|
-
error:
|
|
160
|
-
group:
|
|
161
|
-
groupCollapsed:
|
|
162
|
-
groupEnd:
|
|
156
|
+
info: b,
|
|
157
|
+
log: b,
|
|
158
|
+
warn: b,
|
|
159
|
+
error: b,
|
|
160
|
+
group: b,
|
|
161
|
+
groupCollapsed: b,
|
|
162
|
+
groupEnd: b
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
G++;
|
|
@@ -168,31 +168,31 @@ function Mo() {
|
|
|
168
168
|
function vi() {
|
|
169
169
|
{
|
|
170
170
|
if (G--, G === 0) {
|
|
171
|
-
var
|
|
171
|
+
var b = {
|
|
172
172
|
configurable: !0,
|
|
173
173
|
enumerable: !0,
|
|
174
174
|
writable: !0
|
|
175
175
|
};
|
|
176
176
|
Object.defineProperties(console, {
|
|
177
|
-
log: I({},
|
|
177
|
+
log: I({}, b, {
|
|
178
178
|
value: H
|
|
179
179
|
}),
|
|
180
|
-
info: I({},
|
|
180
|
+
info: I({}, b, {
|
|
181
181
|
value: R
|
|
182
182
|
}),
|
|
183
|
-
warn: I({},
|
|
183
|
+
warn: I({}, b, {
|
|
184
184
|
value: T
|
|
185
185
|
}),
|
|
186
|
-
error: I({},
|
|
186
|
+
error: I({}, b, {
|
|
187
187
|
value: E
|
|
188
188
|
}),
|
|
189
|
-
group: I({},
|
|
189
|
+
group: I({}, b, {
|
|
190
190
|
value: U
|
|
191
191
|
}),
|
|
192
|
-
groupCollapsed: I({},
|
|
192
|
+
groupCollapsed: I({}, b, {
|
|
193
193
|
value: ci
|
|
194
194
|
}),
|
|
195
|
-
groupEnd: I({},
|
|
195
|
+
groupEnd: I({}, b, {
|
|
196
196
|
value: ni
|
|
197
197
|
})
|
|
198
198
|
});
|
|
@@ -200,8 +200,8 @@ function Mo() {
|
|
|
200
200
|
G < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
var
|
|
204
|
-
function X(
|
|
203
|
+
var L = m.ReactCurrentDispatcher, K;
|
|
204
|
+
function X(b, C, M) {
|
|
205
205
|
{
|
|
206
206
|
if (K === void 0)
|
|
207
207
|
try {
|
|
@@ -211,7 +211,7 @@ function Mo() {
|
|
|
211
211
|
K = V && V[1] || "";
|
|
212
212
|
}
|
|
213
213
|
return `
|
|
214
|
-
` + K +
|
|
214
|
+
` + K + b;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
var ui = !1, J;
|
|
@@ -219,11 +219,11 @@ function Mo() {
|
|
|
219
219
|
var li = typeof WeakMap == "function" ? WeakMap : Map;
|
|
220
220
|
J = new li();
|
|
221
221
|
}
|
|
222
|
-
function pi(
|
|
223
|
-
if (!
|
|
222
|
+
function pi(b, C) {
|
|
223
|
+
if (!b || ui)
|
|
224
224
|
return "";
|
|
225
225
|
{
|
|
226
|
-
var M = J.get(
|
|
226
|
+
var M = J.get(b);
|
|
227
227
|
if (M !== void 0)
|
|
228
228
|
return M;
|
|
229
229
|
}
|
|
@@ -232,7 +232,7 @@ function Mo() {
|
|
|
232
232
|
var ei = Error.prepareStackTrace;
|
|
233
233
|
Error.prepareStackTrace = void 0;
|
|
234
234
|
var ai;
|
|
235
|
-
ai =
|
|
235
|
+
ai = L.current, L.current = null, hi();
|
|
236
236
|
try {
|
|
237
237
|
if (C) {
|
|
238
238
|
var Q = function() {
|
|
@@ -248,14 +248,14 @@ function Mo() {
|
|
|
248
248
|
} catch (yi) {
|
|
249
249
|
V = yi;
|
|
250
250
|
}
|
|
251
|
-
Reflect.construct(
|
|
251
|
+
Reflect.construct(b, [], Q);
|
|
252
252
|
} else {
|
|
253
253
|
try {
|
|
254
254
|
Q.call();
|
|
255
255
|
} catch (yi) {
|
|
256
256
|
V = yi;
|
|
257
257
|
}
|
|
258
|
-
|
|
258
|
+
b.call(Q.prototype);
|
|
259
259
|
}
|
|
260
260
|
} else {
|
|
261
261
|
try {
|
|
@@ -263,7 +263,7 @@ function Mo() {
|
|
|
263
263
|
} catch (yi) {
|
|
264
264
|
V = yi;
|
|
265
265
|
}
|
|
266
|
-
|
|
266
|
+
b();
|
|
267
267
|
}
|
|
268
268
|
} catch (yi) {
|
|
269
269
|
if (yi && V && typeof yi.stack == "string") {
|
|
@@ -278,46 +278,46 @@ function Mo() {
|
|
|
278
278
|
if (ri--, bi--, bi < 0 || Y[ri] !== fi[bi]) {
|
|
279
279
|
var Ni = `
|
|
280
280
|
` + Y[ri].replace(" at new ", " at ");
|
|
281
|
-
return
|
|
281
|
+
return b.displayName && Ni.includes("<anonymous>") && (Ni = Ni.replace("<anonymous>", b.displayName)), typeof b == "function" && J.set(b, Ni), Ni;
|
|
282
282
|
}
|
|
283
283
|
while (ri >= 1 && bi >= 0);
|
|
284
284
|
break;
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
} finally {
|
|
288
|
-
ui = !1,
|
|
288
|
+
ui = !1, L.current = ai, vi(), Error.prepareStackTrace = ei;
|
|
289
289
|
}
|
|
290
|
-
var Pi =
|
|
291
|
-
return typeof
|
|
290
|
+
var Pi = b ? b.displayName || b.name : "", Bi = Pi ? X(Pi) : "";
|
|
291
|
+
return typeof b == "function" && J.set(b, Bi), Bi;
|
|
292
292
|
}
|
|
293
|
-
function Si(
|
|
294
|
-
return pi(
|
|
293
|
+
function Si(b, C, M) {
|
|
294
|
+
return pi(b, !1);
|
|
295
295
|
}
|
|
296
|
-
function Mi(
|
|
297
|
-
var C =
|
|
296
|
+
function Mi(b) {
|
|
297
|
+
var C = b.prototype;
|
|
298
298
|
return !!(C && C.isReactComponent);
|
|
299
299
|
}
|
|
300
|
-
function zi(
|
|
301
|
-
if (
|
|
300
|
+
function zi(b, C, M) {
|
|
301
|
+
if (b == null)
|
|
302
302
|
return "";
|
|
303
|
-
if (typeof
|
|
304
|
-
return pi(
|
|
305
|
-
if (typeof
|
|
306
|
-
return X(
|
|
307
|
-
switch (
|
|
303
|
+
if (typeof b == "function")
|
|
304
|
+
return pi(b, Mi(b));
|
|
305
|
+
if (typeof b == "string")
|
|
306
|
+
return X(b);
|
|
307
|
+
switch (b) {
|
|
308
308
|
case r:
|
|
309
309
|
return X("Suspense");
|
|
310
310
|
case c:
|
|
311
311
|
return X("SuspenseList");
|
|
312
312
|
}
|
|
313
|
-
if (typeof
|
|
314
|
-
switch (
|
|
313
|
+
if (typeof b == "object")
|
|
314
|
+
switch (b.$$typeof) {
|
|
315
315
|
case d:
|
|
316
|
-
return Si(
|
|
316
|
+
return Si(b.render);
|
|
317
317
|
case v:
|
|
318
|
-
return zi(
|
|
319
|
-
case
|
|
320
|
-
var V =
|
|
318
|
+
return zi(b.type, C, M);
|
|
319
|
+
case h: {
|
|
320
|
+
var V = b, ei = V._payload, ai = V._init;
|
|
321
321
|
try {
|
|
322
322
|
return zi(ai(ei), C, M);
|
|
323
323
|
} catch (Q) {
|
|
@@ -326,26 +326,26 @@ function Mo() {
|
|
|
326
326
|
}
|
|
327
327
|
return "";
|
|
328
328
|
}
|
|
329
|
-
var Ki = Object.prototype.hasOwnProperty, Gn = {}, Hn =
|
|
330
|
-
function _i(
|
|
331
|
-
if (
|
|
332
|
-
var C =
|
|
329
|
+
var Ki = Object.prototype.hasOwnProperty, Gn = {}, Hn = m.ReactDebugCurrentFrame;
|
|
330
|
+
function _i(b) {
|
|
331
|
+
if (b) {
|
|
332
|
+
var C = b._owner, M = zi(b.type, b._source, C ? C.type : null);
|
|
333
333
|
Hn.setExtraStackFrame(M);
|
|
334
334
|
} else
|
|
335
335
|
Hn.setExtraStackFrame(null);
|
|
336
336
|
}
|
|
337
|
-
function We(
|
|
337
|
+
function We(b, C, M, V, ei) {
|
|
338
338
|
{
|
|
339
339
|
var ai = Function.call.bind(Ki);
|
|
340
|
-
for (var Q in
|
|
341
|
-
if (ai(
|
|
340
|
+
for (var Q in b)
|
|
341
|
+
if (ai(b, Q)) {
|
|
342
342
|
var Y = void 0;
|
|
343
343
|
try {
|
|
344
|
-
if (typeof
|
|
345
|
-
var fi = Error((V || "React class") + ": " + M + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
344
|
+
if (typeof b[Q] != "function") {
|
|
345
|
+
var fi = Error((V || "React class") + ": " + M + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof b[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
346
346
|
throw fi.name = "Invariant Violation", fi;
|
|
347
347
|
}
|
|
348
|
-
Y =
|
|
348
|
+
Y = b[Q](C, Q, V, M, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
349
349
|
} catch (ri) {
|
|
350
350
|
Y = ri;
|
|
351
351
|
}
|
|
@@ -354,82 +354,82 @@ function Mo() {
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
var Ue = Array.isArray;
|
|
357
|
-
function dn(
|
|
358
|
-
return Ue(
|
|
357
|
+
function dn(b) {
|
|
358
|
+
return Ue(b);
|
|
359
359
|
}
|
|
360
|
-
function ze(
|
|
360
|
+
function ze(b) {
|
|
361
361
|
{
|
|
362
|
-
var C = typeof Symbol == "function" && Symbol.toStringTag, M = C &&
|
|
362
|
+
var C = typeof Symbol == "function" && Symbol.toStringTag, M = C && b[Symbol.toStringTag] || b.constructor.name || "Object";
|
|
363
363
|
return M;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
function _e(
|
|
366
|
+
function _e(b) {
|
|
367
367
|
try {
|
|
368
|
-
return Vn(
|
|
368
|
+
return Vn(b), !1;
|
|
369
369
|
} catch (C) {
|
|
370
370
|
return !0;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
function Vn(
|
|
374
|
-
return "" +
|
|
373
|
+
function Vn(b) {
|
|
374
|
+
return "" + b;
|
|
375
375
|
}
|
|
376
|
-
function Fn(
|
|
377
|
-
if (_e(
|
|
378
|
-
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(
|
|
376
|
+
function Fn(b) {
|
|
377
|
+
if (_e(b))
|
|
378
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(b)), Vn(b);
|
|
379
379
|
}
|
|
380
|
-
var Wn =
|
|
380
|
+
var Wn = m.ReactCurrentOwner, Je = {
|
|
381
381
|
key: !0,
|
|
382
382
|
ref: !0,
|
|
383
383
|
__self: !0,
|
|
384
384
|
__source: !0
|
|
385
385
|
}, Un, zn;
|
|
386
|
-
function Ye(
|
|
387
|
-
if (Ki.call(
|
|
388
|
-
var C = Object.getOwnPropertyDescriptor(
|
|
386
|
+
function Ye(b) {
|
|
387
|
+
if (Ki.call(b, "ref")) {
|
|
388
|
+
var C = Object.getOwnPropertyDescriptor(b, "ref").get;
|
|
389
389
|
if (C && C.isReactWarning)
|
|
390
390
|
return !1;
|
|
391
391
|
}
|
|
392
|
-
return
|
|
392
|
+
return b.ref !== void 0;
|
|
393
393
|
}
|
|
394
|
-
function qe(
|
|
395
|
-
if (Ki.call(
|
|
396
|
-
var C = Object.getOwnPropertyDescriptor(
|
|
394
|
+
function qe(b) {
|
|
395
|
+
if (Ki.call(b, "key")) {
|
|
396
|
+
var C = Object.getOwnPropertyDescriptor(b, "key").get;
|
|
397
397
|
if (C && C.isReactWarning)
|
|
398
398
|
return !1;
|
|
399
399
|
}
|
|
400
|
-
return
|
|
400
|
+
return b.key !== void 0;
|
|
401
401
|
}
|
|
402
|
-
function Ze(
|
|
403
|
-
typeof
|
|
402
|
+
function Ze(b, C) {
|
|
403
|
+
typeof b.ref == "string" && Wn.current;
|
|
404
404
|
}
|
|
405
|
-
function $e(
|
|
405
|
+
function $e(b, C) {
|
|
406
406
|
{
|
|
407
407
|
var M = function() {
|
|
408
408
|
Un || (Un = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", C));
|
|
409
409
|
};
|
|
410
|
-
M.isReactWarning = !0, Object.defineProperty(
|
|
410
|
+
M.isReactWarning = !0, Object.defineProperty(b, "key", {
|
|
411
411
|
get: M,
|
|
412
412
|
configurable: !0
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
function Qe(
|
|
416
|
+
function Qe(b, C) {
|
|
417
417
|
{
|
|
418
418
|
var M = function() {
|
|
419
419
|
zn || (zn = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", C));
|
|
420
420
|
};
|
|
421
|
-
M.isReactWarning = !0, Object.defineProperty(
|
|
421
|
+
M.isReactWarning = !0, Object.defineProperty(b, "ref", {
|
|
422
422
|
get: M,
|
|
423
423
|
configurable: !0
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
var Xe = function(
|
|
427
|
+
var Xe = function(b, C, M, V, ei, ai, Q) {
|
|
428
428
|
var Y = {
|
|
429
429
|
// This tag allows us to uniquely identify this as a React Element
|
|
430
430
|
$$typeof: e,
|
|
431
431
|
// Built-in properties that belong on the element
|
|
432
|
-
type:
|
|
432
|
+
type: b,
|
|
433
433
|
key: C,
|
|
434
434
|
ref: M,
|
|
435
435
|
props: Q,
|
|
@@ -453,58 +453,58 @@ function Mo() {
|
|
|
453
453
|
value: ei
|
|
454
454
|
}), Object.freeze && (Object.freeze(Y.props), Object.freeze(Y)), Y;
|
|
455
455
|
};
|
|
456
|
-
function io(
|
|
456
|
+
function io(b, C, M, V, ei) {
|
|
457
457
|
{
|
|
458
458
|
var ai, Q = {}, Y = null, fi = null;
|
|
459
459
|
M !== void 0 && (Fn(M), Y = "" + M), qe(C) && (Fn(C.key), Y = "" + C.key), Ye(C) && (fi = C.ref, Ze(C, ei));
|
|
460
460
|
for (ai in C)
|
|
461
461
|
Ki.call(C, ai) && !Je.hasOwnProperty(ai) && (Q[ai] = C[ai]);
|
|
462
|
-
if (
|
|
463
|
-
var ri =
|
|
462
|
+
if (b && b.defaultProps) {
|
|
463
|
+
var ri = b.defaultProps;
|
|
464
464
|
for (ai in ri)
|
|
465
465
|
Q[ai] === void 0 && (Q[ai] = ri[ai]);
|
|
466
466
|
}
|
|
467
467
|
if (Y || fi) {
|
|
468
|
-
var bi = typeof
|
|
468
|
+
var bi = typeof b == "function" ? b.displayName || b.name || "Unknown" : b;
|
|
469
469
|
Y && $e(Q, bi), fi && Qe(Q, bi);
|
|
470
470
|
}
|
|
471
|
-
return Xe(
|
|
471
|
+
return Xe(b, Y, fi, ei, V, Wn.current, Q);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
var un =
|
|
475
|
-
function
|
|
476
|
-
if (
|
|
477
|
-
var C =
|
|
474
|
+
var un = m.ReactCurrentOwner, _n = m.ReactDebugCurrentFrame;
|
|
475
|
+
function Li(b) {
|
|
476
|
+
if (b) {
|
|
477
|
+
var C = b._owner, M = zi(b.type, b._source, C ? C.type : null);
|
|
478
478
|
_n.setExtraStackFrame(M);
|
|
479
479
|
} else
|
|
480
480
|
_n.setExtraStackFrame(null);
|
|
481
481
|
}
|
|
482
482
|
var tn;
|
|
483
483
|
tn = !1;
|
|
484
|
-
function cn(
|
|
485
|
-
return typeof
|
|
484
|
+
function cn(b) {
|
|
485
|
+
return typeof b == "object" && b !== null && b.$$typeof === e;
|
|
486
486
|
}
|
|
487
487
|
function Jn() {
|
|
488
488
|
{
|
|
489
489
|
if (un.current) {
|
|
490
|
-
var
|
|
491
|
-
if (
|
|
490
|
+
var b = W(un.current.type);
|
|
491
|
+
if (b)
|
|
492
492
|
return `
|
|
493
493
|
|
|
494
|
-
Check the render method of \`` +
|
|
494
|
+
Check the render method of \`` + b + "`.";
|
|
495
495
|
}
|
|
496
496
|
return "";
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
function no(
|
|
499
|
+
function no(b) {
|
|
500
500
|
return "";
|
|
501
501
|
}
|
|
502
502
|
var Yn = {};
|
|
503
|
-
function eo(
|
|
503
|
+
function eo(b) {
|
|
504
504
|
{
|
|
505
505
|
var C = Jn();
|
|
506
506
|
if (!C) {
|
|
507
|
-
var M = typeof
|
|
507
|
+
var M = typeof b == "string" ? b : b.displayName || b.name;
|
|
508
508
|
M && (C = `
|
|
509
509
|
|
|
510
510
|
Check the top-level render call using <` + M + ">.");
|
|
@@ -512,41 +512,41 @@ Check the top-level render call using <` + M + ">.");
|
|
|
512
512
|
return C;
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function qn(
|
|
515
|
+
function qn(b, C) {
|
|
516
516
|
{
|
|
517
|
-
if (!
|
|
517
|
+
if (!b._store || b._store.validated || b.key != null)
|
|
518
518
|
return;
|
|
519
|
-
|
|
519
|
+
b._store.validated = !0;
|
|
520
520
|
var M = eo(C);
|
|
521
521
|
if (Yn[M])
|
|
522
522
|
return;
|
|
523
523
|
Yn[M] = !0;
|
|
524
524
|
var V = "";
|
|
525
|
-
|
|
525
|
+
b && b._owner && b._owner !== un.current && (V = " It was passed a child from " + W(b._owner.type) + "."), Li(b), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', M, V), Li(null);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
function Zn(
|
|
528
|
+
function Zn(b, C) {
|
|
529
529
|
{
|
|
530
|
-
if (typeof
|
|
530
|
+
if (typeof b != "object")
|
|
531
531
|
return;
|
|
532
|
-
if (dn(
|
|
533
|
-
for (var M = 0; M <
|
|
534
|
-
var V =
|
|
532
|
+
if (dn(b))
|
|
533
|
+
for (var M = 0; M < b.length; M++) {
|
|
534
|
+
var V = b[M];
|
|
535
535
|
cn(V) && qn(V, C);
|
|
536
536
|
}
|
|
537
|
-
else if (cn(
|
|
538
|
-
|
|
539
|
-
else if (
|
|
540
|
-
var ei =
|
|
541
|
-
if (typeof ei == "function" && ei !==
|
|
542
|
-
for (var ai = ei.call(
|
|
537
|
+
else if (cn(b))
|
|
538
|
+
b._store && (b._store.validated = !0);
|
|
539
|
+
else if (b) {
|
|
540
|
+
var ei = g(b);
|
|
541
|
+
if (typeof ei == "function" && ei !== b.entries)
|
|
542
|
+
for (var ai = ei.call(b), Q; !(Q = ai.next()).done; )
|
|
543
543
|
cn(Q.value) && qn(Q.value, C);
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
function oo(
|
|
547
|
+
function oo(b) {
|
|
548
548
|
{
|
|
549
|
-
var C =
|
|
549
|
+
var C = b.type;
|
|
550
550
|
if (C == null || typeof C == "string")
|
|
551
551
|
return;
|
|
552
552
|
var M;
|
|
@@ -560,7 +560,7 @@ Check the top-level render call using <` + M + ">.");
|
|
|
560
560
|
return;
|
|
561
561
|
if (M) {
|
|
562
562
|
var V = W(C);
|
|
563
|
-
We(M,
|
|
563
|
+
We(M, b.props, "prop", V, b);
|
|
564
564
|
} else if (C.PropTypes !== void 0 && !tn) {
|
|
565
565
|
tn = !0;
|
|
566
566
|
var ei = W(C);
|
|
@@ -569,31 +569,31 @@ Check the top-level render call using <` + M + ">.");
|
|
|
569
569
|
typeof C.getDefaultProps == "function" && !C.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
function ao(
|
|
572
|
+
function ao(b) {
|
|
573
573
|
{
|
|
574
|
-
for (var C = Object.keys(
|
|
574
|
+
for (var C = Object.keys(b.props), M = 0; M < C.length; M++) {
|
|
575
575
|
var V = C[M];
|
|
576
576
|
if (V !== "children" && V !== "key") {
|
|
577
|
-
|
|
577
|
+
Li(b), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", V), Li(null);
|
|
578
578
|
break;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
|
|
581
|
+
b.ref !== null && (Li(b), x("Invalid attribute `ref` supplied to `React.Fragment`."), Li(null));
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
var $n = {};
|
|
585
|
-
function Qn(
|
|
585
|
+
function Qn(b, C, M, V, ei, ai) {
|
|
586
586
|
{
|
|
587
|
-
var Q = z(
|
|
587
|
+
var Q = z(b);
|
|
588
588
|
if (!Q) {
|
|
589
589
|
var Y = "";
|
|
590
|
-
(
|
|
590
|
+
(b === void 0 || typeof b == "object" && b !== null && Object.keys(b).length === 0) && (Y += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
591
591
|
var fi = no();
|
|
592
592
|
fi ? Y += fi : Y += Jn();
|
|
593
593
|
var ri;
|
|
594
|
-
|
|
594
|
+
b === null ? ri = "null" : dn(b) ? ri = "array" : b !== void 0 && b.$$typeof === e ? (ri = "<" + (W(b.type) || "Unknown") + " />", Y = " Did you accidentally export a JSX literal instead of a component?") : ri = typeof b, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ri, Y);
|
|
595
595
|
}
|
|
596
|
-
var bi = io(
|
|
596
|
+
var bi = io(b, C, M, ei, ai);
|
|
597
597
|
if (bi == null)
|
|
598
598
|
return bi;
|
|
599
599
|
if (Q) {
|
|
@@ -602,15 +602,15 @@ Check the top-level render call using <` + M + ">.");
|
|
|
602
602
|
if (V)
|
|
603
603
|
if (dn(Ni)) {
|
|
604
604
|
for (var Pi = 0; Pi < Ni.length; Pi++)
|
|
605
|
-
Zn(Ni[Pi],
|
|
605
|
+
Zn(Ni[Pi], b);
|
|
606
606
|
Object.freeze && Object.freeze(Ni);
|
|
607
607
|
} else
|
|
608
608
|
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
609
609
|
else
|
|
610
|
-
Zn(Ni,
|
|
610
|
+
Zn(Ni, b);
|
|
611
611
|
}
|
|
612
612
|
if (Ki.call(C, "key")) {
|
|
613
|
-
var Bi = W(
|
|
613
|
+
var Bi = W(b), yi = Object.keys(C).filter(function(ro) {
|
|
614
614
|
return ro !== "key";
|
|
615
615
|
}), rn = yi.length > 0 ? "{key: someKey, " + yi.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
616
616
|
if (!$n[Bi + rn]) {
|
|
@@ -623,14 +623,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
623
623
|
<%s key={someKey} {...props} />`, rn, Bi, co, Bi), $n[Bi + rn] = !0;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
return
|
|
626
|
+
return b === s ? ao(bi) : oo(bi), bi;
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
function so(
|
|
630
|
-
return Qn(
|
|
629
|
+
function so(b, C, M) {
|
|
630
|
+
return Qn(b, C, M, !0);
|
|
631
631
|
}
|
|
632
|
-
function lo(
|
|
633
|
-
return Qn(
|
|
632
|
+
function lo(b, C, M) {
|
|
633
|
+
return Qn(b, C, M, !1);
|
|
634
634
|
}
|
|
635
635
|
var uo = lo, to = so;
|
|
636
636
|
Hi.Fragment = s, Hi.jsx = uo, Hi.jsxs = to;
|
|
@@ -649,16 +649,16 @@ const gi = mo(void 0), oe = {
|
|
|
649
649
|
disabled: !1,
|
|
650
650
|
isHidden: !1
|
|
651
651
|
}, Se = ({ children: i }) => {
|
|
652
|
-
const [e, o] = P(!
|
|
652
|
+
const [e, o] = P(!0), [s, a] = P({}), [l, u] = P({}), [t, d] = P([oe]), [r, c] = P(!1), [v, h] = P(null), [p, y] = P([
|
|
653
653
|
0
|
|
654
|
-
]), [f,
|
|
654
|
+
]), [f, g] = P(""), m = mi.useCallback(() => {
|
|
655
655
|
}, []), x = mi.useCallback(() => {
|
|
656
656
|
const I = Ai();
|
|
657
|
-
d((G) => [...G, { ...oe, id: I }]),
|
|
657
|
+
d((G) => [...G, { ...oe, id: I }]), h(I), y([t.length]);
|
|
658
658
|
}, [t]), j = mi.useCallback((I) => {
|
|
659
659
|
d(
|
|
660
660
|
(G) => G.filter((H) => H.id !== I)
|
|
661
|
-
),
|
|
661
|
+
), h(null);
|
|
662
662
|
}, []), S = mi.useCallback(
|
|
663
663
|
(I, G) => {
|
|
664
664
|
const H = t.find((T) => T.id === G), R = H == null ? void 0 : H.questionData.find(
|
|
@@ -695,10 +695,10 @@ const gi = mo(void 0), oe = {
|
|
|
695
695
|
if (T.type === "grid") {
|
|
696
696
|
const hi = (si = ni == null ? void 0 : ni.map((li, pi) => ({ e: li, i: pi })).filter(
|
|
697
697
|
({ e: li }) => li.id === T.id || li.gridId === T.id
|
|
698
|
-
)) == null ? void 0 : si.map(({ i: li }) => li), vi = hi.length ? Math.max(...hi) + 1 : R + 1,
|
|
699
|
-
K.id =
|
|
698
|
+
)) == null ? void 0 : si.map(({ i: li }) => li), vi = hi.length ? Math.max(...hi) + 1 : R + 1, L = Ai(), K = E(T, {});
|
|
699
|
+
K.id = L;
|
|
700
700
|
const X = ni.filter((li) => li.gridId === T.id), ui = X == null ? void 0 : X.map(
|
|
701
|
-
(li) => E(li, { gridId:
|
|
701
|
+
(li) => E(li, { gridId: L })
|
|
702
702
|
), J = [
|
|
703
703
|
...ni.slice(0, vi),
|
|
704
704
|
K,
|
|
@@ -812,12 +812,12 @@ const gi = mo(void 0), oe = {
|
|
|
812
812
|
d(
|
|
813
813
|
(ci) => ci.map((ni) => {
|
|
814
814
|
if (ni.id !== H) return ni;
|
|
815
|
-
const si = [...ni.questionData], hi = si.findIndex((
|
|
815
|
+
const si = [...ni.questionData], hi = si.findIndex((L) => L.id === G);
|
|
816
816
|
if (hi === -1) return ni;
|
|
817
817
|
const vi = { ...si[hi] };
|
|
818
818
|
if (E !== void 0 && U !== void 0) {
|
|
819
819
|
if (vi.type === "grid") return ni;
|
|
820
|
-
const
|
|
820
|
+
const L = si.findIndex(
|
|
821
821
|
(X) => {
|
|
822
822
|
var ui;
|
|
823
823
|
return X.id !== G && X.gridId === E && ((ui = X.gridPosition) == null ? void 0 : ui.col) === U;
|
|
@@ -830,33 +830,33 @@ const gi = mo(void 0), oe = {
|
|
|
830
830
|
gridPosition: { col: U }
|
|
831
831
|
} : X
|
|
832
832
|
);
|
|
833
|
-
return
|
|
834
|
-
if (ui !==
|
|
833
|
+
return L !== -1 && (K = K.map((X, ui) => {
|
|
834
|
+
if (ui !== L) return X;
|
|
835
835
|
const J = { ...X };
|
|
836
836
|
return delete J.gridId, delete J.gridPosition, J;
|
|
837
837
|
})), { ...ni, questionData: K };
|
|
838
838
|
}
|
|
839
839
|
if (vi.gridId && R !== void 0 && E === void 0) {
|
|
840
|
-
const
|
|
841
|
-
delete
|
|
840
|
+
const L = { ...vi };
|
|
841
|
+
delete L.gridId, delete L.gridPosition;
|
|
842
842
|
const K = si.filter((ui) => ui.id !== G), X = Math.min(R, K.length);
|
|
843
|
-
return K.splice(X, 0,
|
|
843
|
+
return K.splice(X, 0, L), { ...ni, questionData: K };
|
|
844
844
|
}
|
|
845
845
|
if (!vi.gridId && R !== void 0 && E === void 0 && !T) {
|
|
846
846
|
si.splice(hi, 1);
|
|
847
|
-
const
|
|
848
|
-
return si.splice(
|
|
847
|
+
const L = Math.min(R, si.length);
|
|
848
|
+
return si.splice(L, 0, vi), { ...ni, questionData: si };
|
|
849
849
|
}
|
|
850
850
|
if (T) {
|
|
851
|
-
const
|
|
852
|
-
return
|
|
851
|
+
const L = si.findIndex((K) => K.id === T);
|
|
852
|
+
return L === -1 ? ni : (si.splice(hi, 1), si.splice(L, 0, vi), { ...ni, questionData: si });
|
|
853
853
|
}
|
|
854
854
|
return ni;
|
|
855
855
|
})
|
|
856
856
|
);
|
|
857
857
|
},
|
|
858
858
|
[]
|
|
859
|
-
),
|
|
859
|
+
), w = mi.useCallback((I, G) => {
|
|
860
860
|
d(
|
|
861
861
|
(H) => H == null ? void 0 : H.map(
|
|
862
862
|
(R) => R.id === G ? {
|
|
@@ -869,7 +869,7 @@ const gi = mo(void 0), oe = {
|
|
|
869
869
|
() => ({
|
|
870
870
|
formData: t,
|
|
871
871
|
setFormData: d,
|
|
872
|
-
handleDragStop:
|
|
872
|
+
handleDragStop: m,
|
|
873
873
|
removeElement: S,
|
|
874
874
|
elementData: l,
|
|
875
875
|
setElementData: u,
|
|
@@ -879,18 +879,18 @@ const gi = mo(void 0), oe = {
|
|
|
879
879
|
updateElement: z,
|
|
880
880
|
addSection: x,
|
|
881
881
|
removeSection: j,
|
|
882
|
-
updateSection:
|
|
882
|
+
updateSection: w,
|
|
883
883
|
isDragging: r,
|
|
884
884
|
setIsDragging: c,
|
|
885
885
|
selectedSection: v,
|
|
886
|
-
setSelectedSection:
|
|
887
|
-
activeSections:
|
|
886
|
+
setSelectedSection: h,
|
|
887
|
+
activeSections: p,
|
|
888
888
|
setActiveSections: y,
|
|
889
889
|
updateGridElement: ii,
|
|
890
890
|
answerData: s,
|
|
891
891
|
setAnswerData: a,
|
|
892
892
|
uploadUrl: f,
|
|
893
|
-
setUploadUrl:
|
|
893
|
+
setUploadUrl: g,
|
|
894
894
|
duplicateElement: N,
|
|
895
895
|
moveElement: Z,
|
|
896
896
|
showPreview: e,
|
|
@@ -898,7 +898,7 @@ const gi = mo(void 0), oe = {
|
|
|
898
898
|
}),
|
|
899
899
|
[
|
|
900
900
|
t,
|
|
901
|
-
|
|
901
|
+
m,
|
|
902
902
|
S,
|
|
903
903
|
l,
|
|
904
904
|
A,
|
|
@@ -907,10 +907,10 @@ const gi = mo(void 0), oe = {
|
|
|
907
907
|
z,
|
|
908
908
|
x,
|
|
909
909
|
j,
|
|
910
|
-
|
|
910
|
+
w,
|
|
911
911
|
r,
|
|
912
912
|
v,
|
|
913
|
-
|
|
913
|
+
p,
|
|
914
914
|
ii,
|
|
915
915
|
s,
|
|
916
916
|
f,
|
|
@@ -1120,13 +1120,13 @@ const Nn = ({
|
|
|
1120
1120
|
}) => {
|
|
1121
1121
|
const r = i ? new Date(i) : null, [c, v] = P(r);
|
|
1122
1122
|
D(() => {
|
|
1123
|
-
const
|
|
1124
|
-
(
|
|
1123
|
+
const p = i ? new Date(i) : null;
|
|
1124
|
+
(p && c && p.getTime() !== c.getTime() || !p && c || p && !c) && v(p);
|
|
1125
1125
|
}, [i]), D(() => {
|
|
1126
1126
|
e && e(a, c);
|
|
1127
1127
|
}, [c, e, a]);
|
|
1128
|
-
const
|
|
1129
|
-
v(
|
|
1128
|
+
const h = (p) => {
|
|
1129
|
+
v(p);
|
|
1130
1130
|
};
|
|
1131
1131
|
return /* @__PURE__ */ n.jsx("div", { className: "builder_date__picker", children: /* @__PURE__ */ n.jsx(
|
|
1132
1132
|
bo,
|
|
@@ -1137,7 +1137,7 @@ const Nn = ({
|
|
|
1137
1137
|
dateFormat: s,
|
|
1138
1138
|
disabled: o,
|
|
1139
1139
|
selected: c,
|
|
1140
|
-
onChange:
|
|
1140
|
+
onChange: h,
|
|
1141
1141
|
className: "field-control",
|
|
1142
1142
|
portalId: "root-portal",
|
|
1143
1143
|
placeholderText: l,
|
|
@@ -1195,7 +1195,7 @@ function bn({
|
|
|
1195
1195
|
}
|
|
1196
1196
|
) });
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function wo(i, e) {
|
|
1199
1199
|
const o = i.icons, s = i.aliases || /* @__PURE__ */ Object.create(null), a = /* @__PURE__ */ Object.create(null);
|
|
1200
1200
|
function l(u) {
|
|
1201
1201
|
if (o[u]) return a[u] = [];
|
|
@@ -1225,14 +1225,14 @@ const je = Object.freeze({
|
|
|
1225
1225
|
body: "",
|
|
1226
1226
|
hidden: !1
|
|
1227
1227
|
});
|
|
1228
|
-
function
|
|
1228
|
+
function Lo(i, e) {
|
|
1229
1229
|
const o = {};
|
|
1230
1230
|
!i.hFlip != !e.hFlip && (o.hFlip = !0), !i.vFlip != !e.vFlip && (o.vFlip = !0);
|
|
1231
1231
|
const s = ((i.rotate || 0) + (e.rotate || 0)) % 4;
|
|
1232
1232
|
return s && (o.rotate = s), o;
|
|
1233
1233
|
}
|
|
1234
1234
|
function ae(i, e) {
|
|
1235
|
-
const o =
|
|
1235
|
+
const o = Lo(i, e);
|
|
1236
1236
|
for (const s in jn) s in nn ? s in i && !(s in o) && (o[s] = nn[s]) : s in e ? o[s] = e[s] : s in i && (o[s] = i[s]);
|
|
1237
1237
|
return o;
|
|
1238
1238
|
}
|
|
@@ -1250,7 +1250,7 @@ function ke(i, e) {
|
|
|
1250
1250
|
i.not_found instanceof Array && i.not_found.forEach((a) => {
|
|
1251
1251
|
e(a, null), o.push(a);
|
|
1252
1252
|
});
|
|
1253
|
-
const s =
|
|
1253
|
+
const s = wo(i);
|
|
1254
1254
|
for (const a in s) {
|
|
1255
1255
|
const l = s[a];
|
|
1256
1256
|
l && (e(a, Po(i, a, l)), o.push(a));
|
|
@@ -1379,7 +1379,7 @@ function Ko(i, e) {
|
|
|
1379
1379
|
const Ee = Object.freeze({
|
|
1380
1380
|
width: null,
|
|
1381
1381
|
height: null
|
|
1382
|
-
}),
|
|
1382
|
+
}), we = Object.freeze({
|
|
1383
1383
|
...Ee,
|
|
1384
1384
|
...nn
|
|
1385
1385
|
}), Go = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Ho = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
@@ -1428,7 +1428,7 @@ function zo(i, e) {
|
|
|
1428
1428
|
...En,
|
|
1429
1429
|
...i
|
|
1430
1430
|
}, s = {
|
|
1431
|
-
...
|
|
1431
|
+
...we,
|
|
1432
1432
|
...e
|
|
1433
1433
|
}, a = {
|
|
1434
1434
|
left: o.left,
|
|
@@ -1438,38 +1438,38 @@ function zo(i, e) {
|
|
|
1438
1438
|
};
|
|
1439
1439
|
let l = o.body;
|
|
1440
1440
|
[o, s].forEach((f) => {
|
|
1441
|
-
const
|
|
1441
|
+
const g = [], m = f.hFlip, x = f.vFlip;
|
|
1442
1442
|
let j = f.rotate;
|
|
1443
|
-
|
|
1443
|
+
m ? x ? j += 2 : (g.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), g.push("scale(-1 1)"), a.top = a.left = 0) : x && (g.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), g.push("scale(1 -1)"), a.top = a.left = 0);
|
|
1444
1444
|
let S;
|
|
1445
1445
|
switch (j < 0 && (j -= Math.floor(j / 4) * 4), j = j % 4, j) {
|
|
1446
1446
|
case 1:
|
|
1447
|
-
S = a.height / 2 + a.top,
|
|
1447
|
+
S = a.height / 2 + a.top, g.unshift("rotate(90 " + S.toString() + " " + S.toString() + ")");
|
|
1448
1448
|
break;
|
|
1449
1449
|
case 2:
|
|
1450
|
-
|
|
1450
|
+
g.unshift("rotate(180 " + (a.width / 2 + a.left).toString() + " " + (a.height / 2 + a.top).toString() + ")");
|
|
1451
1451
|
break;
|
|
1452
1452
|
case 3:
|
|
1453
|
-
S = a.width / 2 + a.left,
|
|
1453
|
+
S = a.width / 2 + a.left, g.unshift("rotate(-90 " + S.toString() + " " + S.toString() + ")");
|
|
1454
1454
|
break;
|
|
1455
1455
|
}
|
|
1456
|
-
j % 2 === 1 && (a.left !== a.top && (S = a.left, a.left = a.top, a.top = S), a.width !== a.height && (S = a.width, a.width = a.height, a.height = S)),
|
|
1456
|
+
j % 2 === 1 && (a.left !== a.top && (S = a.left, a.left = a.top, a.top = S), a.width !== a.height && (S = a.width, a.width = a.height, a.height = S)), g.length && (l = Wo(l, '<g transform="' + g.join(" ") + '">', "</g>"));
|
|
1457
1457
|
});
|
|
1458
1458
|
const u = s.width, t = s.height, d = a.width, r = a.height;
|
|
1459
1459
|
let c, v;
|
|
1460
1460
|
u === null ? (v = t === null ? "1em" : t === "auto" ? r : t, c = de(v, d / r)) : (c = u === "auto" ? d : u, v = t === null ? de(c, r / d) : t === "auto" ? r : t);
|
|
1461
|
-
const
|
|
1462
|
-
Uo(
|
|
1461
|
+
const h = {}, p = (f, g) => {
|
|
1462
|
+
Uo(g) || (h[f] = g.toString());
|
|
1463
1463
|
};
|
|
1464
|
-
|
|
1464
|
+
p("width", c), p("height", v);
|
|
1465
1465
|
const y = [
|
|
1466
1466
|
a.left,
|
|
1467
1467
|
a.top,
|
|
1468
1468
|
d,
|
|
1469
1469
|
r
|
|
1470
1470
|
];
|
|
1471
|
-
return
|
|
1472
|
-
attributes:
|
|
1471
|
+
return h.viewBox = y.join(" "), {
|
|
1472
|
+
attributes: h,
|
|
1473
1473
|
viewBox: y,
|
|
1474
1474
|
body: l
|
|
1475
1475
|
};
|
|
@@ -1494,7 +1494,7 @@ function Zo(i, e) {
|
|
|
1494
1494
|
function Cn(i) {
|
|
1495
1495
|
return kn[i] || kn[""];
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function wn(i) {
|
|
1498
1498
|
let e;
|
|
1499
1499
|
if (typeof i.resources == "string") e = [i.resources];
|
|
1500
1500
|
else if (e = i.resources, !(e instanceof Array) || !e.length) return null;
|
|
@@ -1509,15 +1509,15 @@ function Ln(i) {
|
|
|
1509
1509
|
dataAfterTimeout: i.dataAfterTimeout !== !1
|
|
1510
1510
|
};
|
|
1511
1511
|
}
|
|
1512
|
-
const
|
|
1512
|
+
const Ln = /* @__PURE__ */ Object.create(null), Vi = ["https://api.simplesvg.com", "https://api.unisvg.com"], Qi = [];
|
|
1513
1513
|
for (; Vi.length > 0; ) Vi.length === 1 || Math.random() > 0.5 ? Qi.push(Vi.shift()) : Qi.push(Vi.pop());
|
|
1514
|
-
|
|
1514
|
+
Ln[""] = wn({ resources: ["https://api.iconify.design"].concat(Qi) });
|
|
1515
1515
|
function $o(i, e) {
|
|
1516
|
-
const o =
|
|
1517
|
-
return o === null ? !1 : (
|
|
1516
|
+
const o = wn(e);
|
|
1517
|
+
return o === null ? !1 : (Ln[i] = o, !0);
|
|
1518
1518
|
}
|
|
1519
1519
|
function Pn(i) {
|
|
1520
|
-
return
|
|
1520
|
+
return Ln[i];
|
|
1521
1521
|
}
|
|
1522
1522
|
const Qo = () => {
|
|
1523
1523
|
let i;
|
|
@@ -1617,7 +1617,7 @@ const oa = (i, e, o) => {
|
|
|
1617
1617
|
prepare: na,
|
|
1618
1618
|
send: oa
|
|
1619
1619
|
};
|
|
1620
|
-
function
|
|
1620
|
+
function Le(i, e) {
|
|
1621
1621
|
i.forEach((o) => {
|
|
1622
1622
|
const s = o.loaderCallbacks;
|
|
1623
1623
|
s && (o.loaderCallbacks = s.filter((a) => a.id !== e));
|
|
@@ -1648,13 +1648,13 @@ function sa(i) {
|
|
|
1648
1648
|
else
|
|
1649
1649
|
return o = !0, !0;
|
|
1650
1650
|
return !1;
|
|
1651
|
-
}), u.pending.length !== t && (o ||
|
|
1651
|
+
}), u.pending.length !== t && (o || Le([i], l.id), l.callback(u.loaded.slice(0), u.missing.slice(0), u.pending.slice(0), l.abort));
|
|
1652
1652
|
});
|
|
1653
1653
|
}));
|
|
1654
1654
|
}
|
|
1655
1655
|
let la = 0;
|
|
1656
1656
|
function da(i, e, o) {
|
|
1657
|
-
const s = la++, a =
|
|
1657
|
+
const s = la++, a = Le.bind(null, o, s);
|
|
1658
1658
|
if (!e.pending.length) return a;
|
|
1659
1659
|
const l = {
|
|
1660
1660
|
id: s,
|
|
@@ -1719,43 +1719,43 @@ function ra(i, e, o, s) {
|
|
|
1719
1719
|
u = u.concat(A);
|
|
1720
1720
|
} else u = i.resources.slice(l).concat(i.resources.slice(0, l));
|
|
1721
1721
|
const t = Date.now();
|
|
1722
|
-
let d = "pending", r = 0, c, v = null,
|
|
1723
|
-
typeof s == "function" &&
|
|
1722
|
+
let d = "pending", r = 0, c, v = null, h = [], p = [];
|
|
1723
|
+
typeof s == "function" && p.push(s);
|
|
1724
1724
|
function y() {
|
|
1725
1725
|
v && (clearTimeout(v), v = null);
|
|
1726
1726
|
}
|
|
1727
1727
|
function f() {
|
|
1728
|
-
d === "pending" && (d = "aborted"), y(),
|
|
1728
|
+
d === "pending" && (d = "aborted"), y(), h.forEach((A) => {
|
|
1729
1729
|
A.status === "pending" && (A.status = "aborted");
|
|
1730
|
-
}),
|
|
1730
|
+
}), h = [];
|
|
1731
1731
|
}
|
|
1732
|
-
function
|
|
1733
|
-
k && (
|
|
1732
|
+
function g(A, k) {
|
|
1733
|
+
k && (p = []), typeof A == "function" && p.push(A);
|
|
1734
1734
|
}
|
|
1735
|
-
function
|
|
1735
|
+
function m() {
|
|
1736
1736
|
return {
|
|
1737
1737
|
startTime: t,
|
|
1738
1738
|
payload: e,
|
|
1739
1739
|
status: d,
|
|
1740
1740
|
queriesSent: r,
|
|
1741
|
-
queriesPending:
|
|
1742
|
-
subscribe:
|
|
1741
|
+
queriesPending: h.length,
|
|
1742
|
+
subscribe: g,
|
|
1743
1743
|
abort: f
|
|
1744
1744
|
};
|
|
1745
1745
|
}
|
|
1746
1746
|
function x() {
|
|
1747
|
-
d = "failed",
|
|
1747
|
+
d = "failed", p.forEach((A) => {
|
|
1748
1748
|
A(void 0, c);
|
|
1749
1749
|
});
|
|
1750
1750
|
}
|
|
1751
1751
|
function j() {
|
|
1752
|
-
|
|
1752
|
+
h.forEach((A) => {
|
|
1753
1753
|
A.status === "pending" && (A.status = "aborted");
|
|
1754
|
-
}),
|
|
1754
|
+
}), h = [];
|
|
1755
1755
|
}
|
|
1756
1756
|
function S(A, k, O) {
|
|
1757
1757
|
const ii = k !== "success";
|
|
1758
|
-
switch (
|
|
1758
|
+
switch (h = h.filter((z) => z !== A), d) {
|
|
1759
1759
|
case "pending":
|
|
1760
1760
|
break;
|
|
1761
1761
|
case "failed":
|
|
@@ -1769,14 +1769,14 @@ function ra(i, e, o, s) {
|
|
|
1769
1769
|
return;
|
|
1770
1770
|
}
|
|
1771
1771
|
if (ii) {
|
|
1772
|
-
c = O,
|
|
1772
|
+
c = O, h.length || (u.length ? N() : x());
|
|
1773
1773
|
return;
|
|
1774
1774
|
}
|
|
1775
1775
|
if (y(), j(), !i.random) {
|
|
1776
1776
|
const z = i.resources.indexOf(A.resource);
|
|
1777
1777
|
z !== -1 && z !== i.index && (i.index = z);
|
|
1778
1778
|
}
|
|
1779
|
-
d = "completed",
|
|
1779
|
+
d = "completed", p.forEach((z) => {
|
|
1780
1780
|
z(O);
|
|
1781
1781
|
});
|
|
1782
1782
|
}
|
|
@@ -1785,7 +1785,7 @@ function ra(i, e, o, s) {
|
|
|
1785
1785
|
y();
|
|
1786
1786
|
const A = u.shift();
|
|
1787
1787
|
if (A === void 0) {
|
|
1788
|
-
if (
|
|
1788
|
+
if (h.length) {
|
|
1789
1789
|
v = setTimeout(() => {
|
|
1790
1790
|
y(), d === "pending" && (j(), x());
|
|
1791
1791
|
}, i.timeout);
|
|
@@ -1801,9 +1801,9 @@ function ra(i, e, o, s) {
|
|
|
1801
1801
|
S(k, O, ii);
|
|
1802
1802
|
}
|
|
1803
1803
|
};
|
|
1804
|
-
|
|
1804
|
+
h.push(k), r++, v = setTimeout(N, i.rotate), o(A, e, k.callback);
|
|
1805
1805
|
}
|
|
1806
|
-
return setTimeout(N),
|
|
1806
|
+
return setTimeout(N), m;
|
|
1807
1807
|
}
|
|
1808
1808
|
function Pe(i) {
|
|
1809
1809
|
const e = {
|
|
@@ -1815,8 +1815,8 @@ function Pe(i) {
|
|
|
1815
1815
|
o = o.filter((t) => t().status === "pending");
|
|
1816
1816
|
}
|
|
1817
1817
|
function a(t, d, r) {
|
|
1818
|
-
const c = ra(e, t, d, (v,
|
|
1819
|
-
s(), r && r(v,
|
|
1818
|
+
const c = ra(e, t, d, (v, h) => {
|
|
1819
|
+
s(), r && r(v, h);
|
|
1820
1820
|
});
|
|
1821
1821
|
return o.push(c), c;
|
|
1822
1822
|
}
|
|
@@ -1858,7 +1858,7 @@ function ba(i, e, o) {
|
|
|
1858
1858
|
const u = ma(i);
|
|
1859
1859
|
u && (s = u.redundancy);
|
|
1860
1860
|
} else {
|
|
1861
|
-
const l =
|
|
1861
|
+
const l = wn(i);
|
|
1862
1862
|
if (l) {
|
|
1863
1863
|
s = Pe(l);
|
|
1864
1864
|
const u = i.resources ? i.resources[0] : "", t = Cn(u);
|
|
@@ -1922,12 +1922,12 @@ function pa(i, e) {
|
|
|
1922
1922
|
if (l) {
|
|
1923
1923
|
a.forEach((c) => {
|
|
1924
1924
|
const v = l(c, s, o);
|
|
1925
|
-
re(v, (
|
|
1926
|
-
const
|
|
1925
|
+
re(v, (h) => {
|
|
1926
|
+
const p = h ? {
|
|
1927
1927
|
prefix: s,
|
|
1928
|
-
icons: { [c]:
|
|
1928
|
+
icons: { [c]: h }
|
|
1929
1929
|
} : null;
|
|
1930
|
-
Fi(i, [c],
|
|
1930
|
+
Fi(i, [c], p);
|
|
1931
1931
|
});
|
|
1932
1932
|
});
|
|
1933
1933
|
return;
|
|
@@ -1965,8 +1965,8 @@ const ga = (i, e) => {
|
|
|
1965
1965
|
const v = a[r] || (a[r] = /* @__PURE__ */ Object.create(null));
|
|
1966
1966
|
v[c] || (v[c] = []);
|
|
1967
1967
|
}), s.pending.forEach((d) => {
|
|
1968
|
-
const { provider: r, prefix: c, name: v } = d,
|
|
1969
|
-
|
|
1968
|
+
const { provider: r, prefix: c, name: v } = d, h = Oi(r, c), p = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
|
|
1969
|
+
p.has(v) || (p.add(v), a[r][c].push(v));
|
|
1970
1970
|
}), l.forEach((d) => {
|
|
1971
1971
|
const r = a[d.provider][d.prefix];
|
|
1972
1972
|
r.length && pa(d, r);
|
|
@@ -2044,7 +2044,7 @@ function Ma(i) {
|
|
|
2044
2044
|
return Wi === void 0 && Ca(), Wi ? Wi.createHTML(i) : i;
|
|
2045
2045
|
}
|
|
2046
2046
|
const Re = {
|
|
2047
|
-
...
|
|
2047
|
+
...we,
|
|
2048
2048
|
inline: !1
|
|
2049
2049
|
}, Ta = {
|
|
2050
2050
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2078,26 +2078,26 @@ const Ea = {
|
|
|
2078
2078
|
function ve(i) {
|
|
2079
2079
|
return i + (i.match(/^[-0-9.]+$/) ? "px" : "");
|
|
2080
2080
|
}
|
|
2081
|
-
const
|
|
2081
|
+
const wa = (i, e, o) => {
|
|
2082
2082
|
const s = e.inline ? Ea : Re, a = fa(s, e), l = e.mode || "svg", u = {}, t = e.style || {}, d = {
|
|
2083
2083
|
...l === "svg" ? Ta : {}
|
|
2084
2084
|
};
|
|
2085
2085
|
if (o) {
|
|
2086
|
-
const
|
|
2087
|
-
if (
|
|
2088
|
-
const
|
|
2086
|
+
const g = ln(o, !1, !0);
|
|
2087
|
+
if (g) {
|
|
2088
|
+
const m = ["iconify"], x = [
|
|
2089
2089
|
"provider",
|
|
2090
2090
|
"prefix"
|
|
2091
2091
|
];
|
|
2092
2092
|
for (const j of x)
|
|
2093
|
-
|
|
2094
|
-
d.className =
|
|
2093
|
+
g[j] && m.push("iconify--" + g[j]);
|
|
2094
|
+
d.className = m.join(" ");
|
|
2095
2095
|
}
|
|
2096
2096
|
}
|
|
2097
|
-
for (let
|
|
2098
|
-
const
|
|
2099
|
-
if (
|
|
2100
|
-
switch (
|
|
2097
|
+
for (let g in e) {
|
|
2098
|
+
const m = e[g];
|
|
2099
|
+
if (m !== void 0)
|
|
2100
|
+
switch (g) {
|
|
2101
2101
|
// Properties to ignore
|
|
2102
2102
|
case "icon":
|
|
2103
2103
|
case "style":
|
|
@@ -2109,38 +2109,38 @@ const La = (i, e, o) => {
|
|
|
2109
2109
|
break;
|
|
2110
2110
|
// Forward ref
|
|
2111
2111
|
case "_ref":
|
|
2112
|
-
d.ref =
|
|
2112
|
+
d.ref = m;
|
|
2113
2113
|
break;
|
|
2114
2114
|
// Merge class names
|
|
2115
2115
|
case "className":
|
|
2116
|
-
d[
|
|
2116
|
+
d[g] = (d[g] ? d[g] + " " : "") + m;
|
|
2117
2117
|
break;
|
|
2118
2118
|
// Boolean attributes
|
|
2119
2119
|
case "inline":
|
|
2120
2120
|
case "hFlip":
|
|
2121
2121
|
case "vFlip":
|
|
2122
|
-
a[
|
|
2122
|
+
a[g] = m === !0 || m === "true" || m === 1;
|
|
2123
2123
|
break;
|
|
2124
2124
|
// Flip as string: 'horizontal,vertical'
|
|
2125
2125
|
case "flip":
|
|
2126
|
-
typeof
|
|
2126
|
+
typeof m == "string" && ya(a, m);
|
|
2127
2127
|
break;
|
|
2128
2128
|
// Color: copy to style
|
|
2129
2129
|
case "color":
|
|
2130
|
-
u.color =
|
|
2130
|
+
u.color = m;
|
|
2131
2131
|
break;
|
|
2132
2132
|
// Rotation as string
|
|
2133
2133
|
case "rotate":
|
|
2134
|
-
typeof
|
|
2134
|
+
typeof m == "string" ? a[g] = Aa(m) : typeof m == "number" && (a[g] = m);
|
|
2135
2135
|
break;
|
|
2136
2136
|
// Remove aria-hidden
|
|
2137
2137
|
case "ariaHidden":
|
|
2138
2138
|
case "aria-hidden":
|
|
2139
|
-
|
|
2139
|
+
m !== !0 && m !== "true" && delete d["aria-hidden"];
|
|
2140
2140
|
break;
|
|
2141
2141
|
// Copy missing property if it does not exist in customisations
|
|
2142
2142
|
default:
|
|
2143
|
-
s[
|
|
2143
|
+
s[g] === void 0 && (d[g] = m);
|
|
2144
2144
|
}
|
|
2145
2145
|
}
|
|
2146
2146
|
const r = zo(i, a), c = r.attributes;
|
|
@@ -2149,15 +2149,15 @@ const La = (i, e, o) => {
|
|
|
2149
2149
|
...u,
|
|
2150
2150
|
...t
|
|
2151
2151
|
}, Object.assign(d, c);
|
|
2152
|
-
let
|
|
2153
|
-
return typeof
|
|
2154
|
-
__html: Ma(qo(r.body,
|
|
2152
|
+
let g = 0, m = e.id;
|
|
2153
|
+
return typeof m == "string" && (m = m.replace(/-/g, "_")), d.dangerouslySetInnerHTML = {
|
|
2154
|
+
__html: Ma(qo(r.body, m ? () => m + "ID" + g++ : "iconifyReact"))
|
|
2155
2155
|
}, Sn("svg", d);
|
|
2156
2156
|
}
|
|
2157
|
-
const { body: v, width:
|
|
2157
|
+
const { body: v, width: h, height: p } = i, y = l === "mask" || (l === "bg" ? !1 : v.indexOf("currentColor") !== -1), f = Sa(v, {
|
|
2158
2158
|
...c,
|
|
2159
|
-
width:
|
|
2160
|
-
height:
|
|
2159
|
+
width: h + "",
|
|
2160
|
+
height: p + ""
|
|
2161
2161
|
});
|
|
2162
2162
|
return d.style = {
|
|
2163
2163
|
...u,
|
|
@@ -2204,8 +2204,8 @@ if (typeof document != "undefined" && typeof window != "undefined") {
|
|
|
2204
2204
|
}
|
|
2205
2205
|
function Ie(i) {
|
|
2206
2206
|
const [e, o] = P(!!i.ssr), [s, a] = P({});
|
|
2207
|
-
function l(
|
|
2208
|
-
if (
|
|
2207
|
+
function l(p) {
|
|
2208
|
+
if (p) {
|
|
2209
2209
|
const y = i.icon;
|
|
2210
2210
|
if (typeof y == "object")
|
|
2211
2211
|
return {
|
|
@@ -2225,15 +2225,15 @@ function Ie(i) {
|
|
|
2225
2225
|
}
|
|
2226
2226
|
const [u, t] = P(l(!!i.ssr));
|
|
2227
2227
|
function d() {
|
|
2228
|
-
const
|
|
2229
|
-
|
|
2228
|
+
const p = s.callback;
|
|
2229
|
+
p && (p(), a({}));
|
|
2230
2230
|
}
|
|
2231
|
-
function r(
|
|
2232
|
-
if (JSON.stringify(u) !== JSON.stringify(
|
|
2233
|
-
return d(), t(
|
|
2231
|
+
function r(p) {
|
|
2232
|
+
if (JSON.stringify(u) !== JSON.stringify(p))
|
|
2233
|
+
return d(), t(p), !0;
|
|
2234
2234
|
}
|
|
2235
2235
|
function c() {
|
|
2236
|
-
var
|
|
2236
|
+
var p;
|
|
2237
2237
|
const y = i.icon;
|
|
2238
2238
|
if (typeof y == "object") {
|
|
2239
2239
|
r({
|
|
@@ -2248,19 +2248,19 @@ function Ie(i) {
|
|
|
2248
2248
|
data: f
|
|
2249
2249
|
}))
|
|
2250
2250
|
if (f === void 0) {
|
|
2251
|
-
const
|
|
2251
|
+
const g = ga([y], c);
|
|
2252
2252
|
a({
|
|
2253
|
-
callback:
|
|
2253
|
+
callback: g
|
|
2254
2254
|
});
|
|
2255
|
-
} else f && ((
|
|
2255
|
+
} else f && ((p = i.onLoad) === null || p === void 0 || p.call(i, y));
|
|
2256
2256
|
}
|
|
2257
2257
|
D(() => (o(!0), d), []), D(() => {
|
|
2258
2258
|
e && c();
|
|
2259
2259
|
}, [i.icon, e]);
|
|
2260
|
-
const { name: v, data:
|
|
2261
|
-
return
|
|
2260
|
+
const { name: v, data: h } = u;
|
|
2261
|
+
return h ? wa({
|
|
2262
2262
|
...En,
|
|
2263
|
-
...
|
|
2263
|
+
...h
|
|
2264
2264
|
}, i, v) : i.children ? i.children : i.fallback ? i.fallback : Sn("span", {});
|
|
2265
2265
|
}
|
|
2266
2266
|
const Oe = ye((i, e) => Ie({
|
|
@@ -2297,12 +2297,12 @@ function Rn({
|
|
|
2297
2297
|
l(i.id);
|
|
2298
2298
|
}, [i.id, l]), D(() => {
|
|
2299
2299
|
if (d) {
|
|
2300
|
-
const v = d((
|
|
2301
|
-
a(
|
|
2300
|
+
const v = d((h) => {
|
|
2301
|
+
a(h[i.id]);
|
|
2302
2302
|
});
|
|
2303
2303
|
return () => {
|
|
2304
|
-
var
|
|
2305
|
-
return (
|
|
2304
|
+
var h;
|
|
2305
|
+
return (h = v.unsubscribe) == null ? void 0 : h.call(v);
|
|
2306
2306
|
};
|
|
2307
2307
|
}
|
|
2308
2308
|
}, [d, i.id]), /* @__PURE__ */ n.jsx("div", { className: "custom-select", children: /* @__PURE__ */ n.jsx(
|
|
@@ -2327,29 +2327,29 @@ function Rn({
|
|
|
2327
2327
|
]
|
|
2328
2328
|
}
|
|
2329
2329
|
),
|
|
2330
|
-
/* @__PURE__ */ n.jsx(
|
|
2330
|
+
/* @__PURE__ */ n.jsx(wi, { as: Zi, leave: "custom-select__transition", children: /* @__PURE__ */ n.jsx(
|
|
2331
2331
|
di.Options,
|
|
2332
2332
|
{
|
|
2333
2333
|
anchor: "bottom start",
|
|
2334
2334
|
className: "custom-select__options",
|
|
2335
2335
|
children: (c = i == null ? void 0 : i.options) == null ? void 0 : c.map(
|
|
2336
|
-
(v,
|
|
2336
|
+
(v, h) => /* @__PURE__ */ n.jsx(
|
|
2337
2337
|
di.Option,
|
|
2338
2338
|
{
|
|
2339
2339
|
value: v,
|
|
2340
|
-
className: ({ active:
|
|
2341
|
-
children: ({ selected:
|
|
2340
|
+
className: ({ active: p }) => `custom-select__option ${p ? "custom-select__option--active" : ""}`,
|
|
2341
|
+
children: ({ selected: p }) => /* @__PURE__ */ n.jsxs("div", { className: "custom-select__option-row", children: [
|
|
2342
2342
|
/* @__PURE__ */ n.jsx(
|
|
2343
2343
|
"span",
|
|
2344
2344
|
{
|
|
2345
|
-
className: `custom-select__option-label ${
|
|
2345
|
+
className: `custom-select__option-label ${p ? "custom-select__option--selected" : ""}`,
|
|
2346
2346
|
children: v.label
|
|
2347
2347
|
}
|
|
2348
2348
|
),
|
|
2349
|
-
|
|
2349
|
+
p && /* @__PURE__ */ n.jsx("span", { className: "custom-select__check", children: "✓" })
|
|
2350
2350
|
] })
|
|
2351
2351
|
},
|
|
2352
|
-
|
|
2352
|
+
h
|
|
2353
2353
|
)
|
|
2354
2354
|
)
|
|
2355
2355
|
}
|
|
@@ -2358,7 +2358,7 @@ function Rn({
|
|
|
2358
2358
|
}
|
|
2359
2359
|
) });
|
|
2360
2360
|
}
|
|
2361
|
-
const
|
|
2361
|
+
const La = [
|
|
2362
2362
|
"jpg",
|
|
2363
2363
|
"jpeg",
|
|
2364
2364
|
"png",
|
|
@@ -2370,7 +2370,7 @@ const wa = [
|
|
|
2370
2370
|
], Pa = (i = "") => {
|
|
2371
2371
|
var o;
|
|
2372
2372
|
const e = ((o = i.split(".").pop()) == null ? void 0 : o.toLowerCase()) || "";
|
|
2373
|
-
return
|
|
2373
|
+
return La.includes(e) || i.startsWith("data:image/") ? "image" : e === "pdf" || i.startsWith("data:application/pdf") ? "pdf" : ["doc", "docx"].includes(e) ? "word" : ["xls", "xlsx", "csv"].includes(e) ? "excel" : ["ppt", "pptx"].includes(e) ? "powerpoint" : "other";
|
|
2374
2374
|
}, Ra = {
|
|
2375
2375
|
pdf: "vscode-icons:file-type-pdf2",
|
|
2376
2376
|
word: "vscode-icons:file-type-word",
|
|
@@ -2388,13 +2388,13 @@ function Ke({
|
|
|
2388
2388
|
}, [i]), D(() => {
|
|
2389
2389
|
if (l === "pdf" && (i != null && i.startsWith("data:")))
|
|
2390
2390
|
try {
|
|
2391
|
-
const
|
|
2392
|
-
for (let x = 0; x <
|
|
2393
|
-
f[x] =
|
|
2394
|
-
const
|
|
2395
|
-
return d(
|
|
2396
|
-
} catch (
|
|
2397
|
-
console.error("Error creating blob URL:",
|
|
2391
|
+
const p = atob(i.split(",")[1]), y = new ArrayBuffer(p.length), f = new Uint8Array(y);
|
|
2392
|
+
for (let x = 0; x < p.length; x++)
|
|
2393
|
+
f[x] = p.charCodeAt(x);
|
|
2394
|
+
const g = new Blob([y], { type: "application/pdf" }), m = URL.createObjectURL(g);
|
|
2395
|
+
return d(m), () => URL.revokeObjectURL(m);
|
|
2396
|
+
} catch (p) {
|
|
2397
|
+
console.error("Error creating blob URL:", p);
|
|
2398
2398
|
}
|
|
2399
2399
|
else
|
|
2400
2400
|
d(null);
|
|
@@ -2402,15 +2402,15 @@ function Ke({
|
|
|
2402
2402
|
const r = () => {
|
|
2403
2403
|
l === "image" || l === "pdf" ? a(!0) : window.open(t || i, "_blank");
|
|
2404
2404
|
}, c = () => a(!1), v = e || (i == null ? void 0 : i.split("/").pop()) || "Unknown file";
|
|
2405
|
-
function
|
|
2406
|
-
if (!
|
|
2407
|
-
if (
|
|
2408
|
-
const
|
|
2409
|
-
|
|
2405
|
+
function h(p, y = "download") {
|
|
2406
|
+
if (!p) return;
|
|
2407
|
+
if (p.startsWith("data:")) {
|
|
2408
|
+
const g = document.createElement("a");
|
|
2409
|
+
g.href = p, g.download = y, document.body.appendChild(g), g.click(), document.body.removeChild(g);
|
|
2410
2410
|
return;
|
|
2411
2411
|
}
|
|
2412
2412
|
const f = document.createElement("a");
|
|
2413
|
-
f.href =
|
|
2413
|
+
f.href = p, f.setAttribute("download", y), document.body.appendChild(f), f.click(), document.body.removeChild(f);
|
|
2414
2414
|
}
|
|
2415
2415
|
return /* @__PURE__ */ n.jsxs("div", { className: "mt-2 field-control !py-1 !bg-gray-50 !flex justify-between gap-x-8 items-center", children: [
|
|
2416
2416
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -2432,7 +2432,7 @@ function Ke({
|
|
|
2432
2432
|
{
|
|
2433
2433
|
type: "button",
|
|
2434
2434
|
className: "p-2",
|
|
2435
|
-
onClick: () =>
|
|
2435
|
+
onClick: () => h(t || i, e),
|
|
2436
2436
|
title: `Download ${v}`,
|
|
2437
2437
|
children: /* @__PURE__ */ n.jsx(_, { icon: "streamline-flex:download-tray-solid" })
|
|
2438
2438
|
}
|
|
@@ -2456,7 +2456,7 @@ function Ke({
|
|
|
2456
2456
|
"div",
|
|
2457
2457
|
{
|
|
2458
2458
|
className: "relative bg-white p-8 rounded-lg w-full max-w-[90vw] max-h-[90vh] overflow-auto",
|
|
2459
|
-
onClick: (
|
|
2459
|
+
onClick: (p) => p.stopPropagation(),
|
|
2460
2460
|
children: [
|
|
2461
2461
|
/* @__PURE__ */ n.jsx(
|
|
2462
2462
|
"button",
|
|
@@ -2513,10 +2513,10 @@ function Ia({
|
|
|
2513
2513
|
D(() => {
|
|
2514
2514
|
r(a);
|
|
2515
2515
|
}, [a]);
|
|
2516
|
-
const
|
|
2516
|
+
const h = oi(
|
|
2517
2517
|
() => l == null ? void 0 : l.map((S) => S.value).join(", "),
|
|
2518
2518
|
[l]
|
|
2519
|
-
),
|
|
2519
|
+
), p = oi(
|
|
2520
2520
|
() => l == null ? void 0 : l.map((S) => S.label).join(", "),
|
|
2521
2521
|
[l]
|
|
2522
2522
|
), y = $(
|
|
@@ -2559,10 +2559,10 @@ function Ia({
|
|
|
2559
2559
|
}, k.onerror = () => A(new Error("File read failed")), k.readAsDataURL(S);
|
|
2560
2560
|
}),
|
|
2561
2561
|
[u, y]
|
|
2562
|
-
),
|
|
2562
|
+
), g = $(
|
|
2563
2563
|
(S) => {
|
|
2564
2564
|
var A;
|
|
2565
|
-
const N =
|
|
2565
|
+
const N = h ? (A = h.split(",")) == null ? void 0 : A.map((k) => k.trim()) : [];
|
|
2566
2566
|
for (const k of S) {
|
|
2567
2567
|
if (k.size > Da)
|
|
2568
2568
|
return ki.error(
|
|
@@ -2572,17 +2572,17 @@ function Ia({
|
|
|
2572
2572
|
(O) => k.type === O || k.name.toLowerCase().endsWith(O.replace("*", ""))
|
|
2573
2573
|
))
|
|
2574
2574
|
return ki.error(
|
|
2575
|
-
`File "${k.name}" is not an allowed type. Allowed: ${
|
|
2575
|
+
`File "${k.name}" is not an allowed type. Allowed: ${p || "any"}`
|
|
2576
2576
|
), !1;
|
|
2577
2577
|
}
|
|
2578
2578
|
return !0;
|
|
2579
2579
|
},
|
|
2580
|
-
[
|
|
2581
|
-
),
|
|
2580
|
+
[h, p]
|
|
2581
|
+
), m = $(
|
|
2582
2582
|
async (S) => {
|
|
2583
2583
|
const N = Array.from(S.target.files || []);
|
|
2584
2584
|
if (!(!N.length || c)) {
|
|
2585
|
-
if (!
|
|
2585
|
+
if (!g(N)) {
|
|
2586
2586
|
t.current && (t.current.value = "");
|
|
2587
2587
|
return;
|
|
2588
2588
|
}
|
|
@@ -2597,7 +2597,7 @@ function Ia({
|
|
|
2597
2597
|
}
|
|
2598
2598
|
}
|
|
2599
2599
|
},
|
|
2600
|
-
[c,
|
|
2600
|
+
[c, g, f, i, s, d]
|
|
2601
2601
|
), x = $(
|
|
2602
2602
|
(S) => {
|
|
2603
2603
|
c || (t.current && (t.current.value = ""), r((N) => {
|
|
@@ -2614,10 +2614,10 @@ function Ia({
|
|
|
2614
2614
|
{
|
|
2615
2615
|
ref: t,
|
|
2616
2616
|
type: "file",
|
|
2617
|
-
onChange:
|
|
2617
|
+
onChange: m,
|
|
2618
2618
|
disabled: e || c,
|
|
2619
2619
|
multiple: s,
|
|
2620
|
-
accept:
|
|
2620
|
+
accept: h || "",
|
|
2621
2621
|
className: `w-full text-sm text-gray-500 file:mr-4 flex-1 file:px-4 !py-1 !pl-1\r
|
|
2622
2622
|
file:rounded-[6px] file:py-[6px] file:border-0\r
|
|
2623
2623
|
file:text-sm file:font-semibold\r
|
|
@@ -2666,12 +2666,12 @@ function Oa({ element: i, validationData: e }) {
|
|
|
2666
2666
|
a(i.id);
|
|
2667
2667
|
}, [i.id, a]), D(() => {
|
|
2668
2668
|
if (t) {
|
|
2669
|
-
const v = t((
|
|
2670
|
-
s(
|
|
2669
|
+
const v = t((h) => {
|
|
2670
|
+
s(h[i.id]);
|
|
2671
2671
|
});
|
|
2672
2672
|
return () => {
|
|
2673
|
-
var
|
|
2674
|
-
return (
|
|
2673
|
+
var h;
|
|
2674
|
+
return (h = v.unsubscribe) == null ? void 0 : h.call(v);
|
|
2675
2675
|
};
|
|
2676
2676
|
}
|
|
2677
2677
|
}, [t, i.id]);
|
|
@@ -2695,7 +2695,7 @@ function Oa({ element: i, validationData: e }) {
|
|
|
2695
2695
|
accept: i == null ? void 0 : i.acceptedFiles
|
|
2696
2696
|
}
|
|
2697
2697
|
),
|
|
2698
|
-
o && u && /* @__PURE__ */ n.jsx("div", { className: "relative grid gap-y-1 flex-1 w-full", children: typeof o == "object" && (o == null ? void 0 : o.map((v,
|
|
2698
|
+
o && u && /* @__PURE__ */ n.jsx("div", { className: "relative grid gap-y-1 flex-1 w-full", children: typeof o == "object" && (o == null ? void 0 : o.map((v, h) => /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ke, { fileUrl: v.base64, fileName: v.name }) }, h))) })
|
|
2699
2699
|
] });
|
|
2700
2700
|
}
|
|
2701
2701
|
function Ka({
|
|
@@ -2727,14 +2727,14 @@ const F = ({
|
|
|
2727
2727
|
value: r,
|
|
2728
2728
|
trigger: c,
|
|
2729
2729
|
prefix: v,
|
|
2730
|
-
disabled:
|
|
2731
|
-
watch:
|
|
2730
|
+
disabled: h,
|
|
2731
|
+
watch: p,
|
|
2732
2732
|
min: y,
|
|
2733
2733
|
max: f,
|
|
2734
|
-
description:
|
|
2734
|
+
description: g
|
|
2735
2735
|
}) => {
|
|
2736
2736
|
var x, j, S, N;
|
|
2737
|
-
const
|
|
2737
|
+
const m = o ? { ...o(e) } : {};
|
|
2738
2738
|
if (l === "amount")
|
|
2739
2739
|
return /* @__PURE__ */ n.jsxs("div", { className: "space-y-1.5 relative", children: [
|
|
2740
2740
|
/* @__PURE__ */ n.jsx(
|
|
@@ -2755,27 +2755,27 @@ const F = ({
|
|
|
2755
2755
|
decimalsLimit: 2,
|
|
2756
2756
|
value: r,
|
|
2757
2757
|
prefix: v,
|
|
2758
|
-
disabled:
|
|
2758
|
+
disabled: h
|
|
2759
2759
|
}
|
|
2760
2760
|
),
|
|
2761
2761
|
(s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "mt-1 text-sm text-red-600", children: (x = s[e]) == null ? void 0 : x.message })
|
|
2762
2762
|
] });
|
|
2763
2763
|
if (["checkbox", "radio"].includes(l)) {
|
|
2764
|
-
const A = (
|
|
2764
|
+
const A = (p == null ? void 0 : p(e)) || null;
|
|
2765
2765
|
let k = !1;
|
|
2766
2766
|
return A && (A != null && A.length && l === "checkbox" ? k = A == null ? void 0 : A.includes(r) : k = A == r), /* @__PURE__ */ n.jsxs("div", { className: "space-y-1", children: [
|
|
2767
2767
|
/* @__PURE__ */ n.jsxs(
|
|
2768
2768
|
"label",
|
|
2769
2769
|
{
|
|
2770
|
-
className: `flex gap-3 cursor-pointer select-none ${
|
|
2770
|
+
className: `flex gap-3 cursor-pointer select-none ${g ? "items-start" : "items-center"}`,
|
|
2771
2771
|
children: [
|
|
2772
2772
|
/* @__PURE__ */ n.jsx(
|
|
2773
2773
|
"input",
|
|
2774
2774
|
{
|
|
2775
|
-
...
|
|
2775
|
+
...m,
|
|
2776
2776
|
type: l,
|
|
2777
2777
|
value: r || "",
|
|
2778
|
-
disabled:
|
|
2778
|
+
disabled: h,
|
|
2779
2779
|
className: "peer sr-only"
|
|
2780
2780
|
}
|
|
2781
2781
|
),
|
|
@@ -2802,7 +2802,7 @@ const F = ({
|
|
|
2802
2802
|
),
|
|
2803
2803
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2804
2804
|
/* @__PURE__ */ n.jsx("span", { className: "text-sm leading-none block font-medium text-[#344054] font-onest", children: i }),
|
|
2805
|
-
|
|
2805
|
+
g && /* @__PURE__ */ n.jsx("span", { className: "text-xs font-medium leading-none text-[#5c6c86] font-onest", children: g })
|
|
2806
2806
|
] })
|
|
2807
2807
|
]
|
|
2808
2808
|
}
|
|
@@ -2821,10 +2821,10 @@ const F = ({
|
|
|
2821
2821
|
/* @__PURE__ */ n.jsx(
|
|
2822
2822
|
"textarea",
|
|
2823
2823
|
{
|
|
2824
|
-
...
|
|
2824
|
+
...m,
|
|
2825
2825
|
className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
|
|
2826
2826
|
placeholder: u,
|
|
2827
|
-
disabled:
|
|
2827
|
+
disabled: h
|
|
2828
2828
|
}
|
|
2829
2829
|
),
|
|
2830
2830
|
(s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "mt-1 text-sm text-red-600", children: (S = s[e]) == null ? void 0 : S.message })
|
|
@@ -2839,11 +2839,11 @@ const F = ({
|
|
|
2839
2839
|
/* @__PURE__ */ n.jsx(
|
|
2840
2840
|
"input",
|
|
2841
2841
|
{
|
|
2842
|
-
...
|
|
2842
|
+
...m,
|
|
2843
2843
|
type: l,
|
|
2844
2844
|
className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
|
|
2845
2845
|
placeholder: t ? "" : u,
|
|
2846
|
-
disabled:
|
|
2846
|
+
disabled: h,
|
|
2847
2847
|
min: y,
|
|
2848
2848
|
max: f
|
|
2849
2849
|
}
|
|
@@ -2914,11 +2914,11 @@ const Di = ({
|
|
|
2914
2914
|
isMultiple: r,
|
|
2915
2915
|
isFloatingLabel: c,
|
|
2916
2916
|
subText: v,
|
|
2917
|
-
labelClass:
|
|
2918
|
-
loading:
|
|
2917
|
+
labelClass: h = "text-[10px]",
|
|
2918
|
+
loading: p,
|
|
2919
2919
|
disabled: y
|
|
2920
2920
|
}) => {
|
|
2921
|
-
const [f,
|
|
2921
|
+
const [f, g] = P(r ? [] : null), m = Ci(!1), x = oi(() => !t || !i || i.length === 0 ? r ? [] : null : r ? Array.isArray(t) ? i.filter((N) => t.some(
|
|
2922
2922
|
(A) => {
|
|
2923
2923
|
var k;
|
|
2924
2924
|
return typeof N.value == "object" ? ((k = N.value) == null ? void 0 : k.id) === (A == null ? void 0 : A.id) : N.value === A;
|
|
@@ -2928,23 +2928,23 @@ const Di = ({
|
|
|
2928
2928
|
return typeof N.value == "string" && typeof t == "string" ? N.value.toLowerCase() === t.toLowerCase() : typeof N.value == "object" && typeof t == "object" ? ((A = N.value) == null ? void 0 : A.id) === (t == null ? void 0 : t.id) : N.value === t;
|
|
2929
2929
|
}) || null, [t, i, r]);
|
|
2930
2930
|
D(() => {
|
|
2931
|
-
if (
|
|
2932
|
-
|
|
2931
|
+
if (m.current) {
|
|
2932
|
+
m.current = !1;
|
|
2933
2933
|
return;
|
|
2934
2934
|
}
|
|
2935
2935
|
if (r && Array.isArray(x) && Array.isArray(f)) {
|
|
2936
2936
|
const N = f == null ? void 0 : f.map((k) => k.value), A = x == null ? void 0 : x.map((k) => k.value);
|
|
2937
|
-
JSON.stringify(N) !== JSON.stringify(A) &&
|
|
2938
|
-
} else (x == null ? void 0 : x.value) !== (f == null ? void 0 : f.value) &&
|
|
2937
|
+
JSON.stringify(N) !== JSON.stringify(A) && g(x);
|
|
2938
|
+
} else (x == null ? void 0 : x.value) !== (f == null ? void 0 : f.value) && g(x);
|
|
2939
2939
|
}, [x, r]);
|
|
2940
2940
|
const j = $((N) => {
|
|
2941
2941
|
var A;
|
|
2942
|
-
if (
|
|
2942
|
+
if (m.current = !0, g(N), a) {
|
|
2943
2943
|
const k = r ? Array.isArray(N) ? N == null ? void 0 : N.map((O) => O.value) : [] : (A = N == null ? void 0 : N.value) != null ? A : null;
|
|
2944
2944
|
a(l, k), d == null || d(l);
|
|
2945
2945
|
}
|
|
2946
|
-
s && !
|
|
2947
|
-
}, [a, l, d, s, r]), S = oi(() =>
|
|
2946
|
+
s && !m.current && s(l);
|
|
2947
|
+
}, [a, l, d, s, r]), S = oi(() => p ? "Fetching data..." : f ? r && Array.isArray(f) ? f.length > 0 ? f == null ? void 0 : f.map((N) => N.label).join(", ") : e : (f == null ? void 0 : f.label) || e : e, [f, p, e, r]);
|
|
2948
2948
|
return /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
|
|
2949
2949
|
!c && u && /* @__PURE__ */ n.jsx("label", { className: "block text-sm text-[#686878] darks:text-white/70 mb-2", children: u }),
|
|
2950
2950
|
c && u && /* @__PURE__ */ n.jsx(
|
|
@@ -2952,7 +2952,7 @@ const Di = ({
|
|
|
2952
2952
|
{
|
|
2953
2953
|
className: q(
|
|
2954
2954
|
"z-[40] absolute bg-white py-[2px] px-1 -top-[10px] left-3",
|
|
2955
|
-
|
|
2955
|
+
h
|
|
2956
2956
|
),
|
|
2957
2957
|
children: u
|
|
2958
2958
|
}
|
|
@@ -2963,14 +2963,14 @@ const Di = ({
|
|
|
2963
2963
|
value: f,
|
|
2964
2964
|
onChange: j,
|
|
2965
2965
|
multiple: r,
|
|
2966
|
-
disabled: y ||
|
|
2966
|
+
disabled: y || p,
|
|
2967
2967
|
children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
|
|
2968
|
-
/* @__PURE__ */ n.jsxs(di.Button, { className: "field-control", disabled: y ||
|
|
2968
|
+
/* @__PURE__ */ n.jsxs(di.Button, { className: "field-control", disabled: y || p, children: [
|
|
2969
2969
|
/* @__PURE__ */ n.jsx(
|
|
2970
2970
|
"span",
|
|
2971
2971
|
{
|
|
2972
2972
|
className: q("block text-sm text-left truncate", {
|
|
2973
|
-
"opacity-60": !f ||
|
|
2973
|
+
"opacity-60": !f || p
|
|
2974
2974
|
}),
|
|
2975
2975
|
children: S
|
|
2976
2976
|
}
|
|
@@ -2978,7 +2978,7 @@ const Di = ({
|
|
|
2978
2978
|
/* @__PURE__ */ n.jsx("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n.jsx(_, { icon: "lucide:chevron-down" }) })
|
|
2979
2979
|
] }),
|
|
2980
2980
|
/* @__PURE__ */ n.jsx(
|
|
2981
|
-
|
|
2981
|
+
wi,
|
|
2982
2982
|
{
|
|
2983
2983
|
leave: "transition ease-in duration-100",
|
|
2984
2984
|
leaveFrom: "opacity-100",
|
|
@@ -3013,29 +3013,29 @@ function Tn({
|
|
|
3013
3013
|
name: l
|
|
3014
3014
|
}) {
|
|
3015
3015
|
const [u, t] = P(""), d = oi(() => {
|
|
3016
|
-
const
|
|
3017
|
-
return i.find((y) => y.value ===
|
|
3016
|
+
const p = e != null ? e : o;
|
|
3017
|
+
return i.find((y) => y.value === p || y.label === p) || null;
|
|
3018
3018
|
}, [e, o, i]), [r, c] = P(d);
|
|
3019
3019
|
D(() => {
|
|
3020
3020
|
if (e !== void 0) {
|
|
3021
|
-
const
|
|
3022
|
-
c(
|
|
3021
|
+
const p = i.find((y) => y.value === e || y.label === e) || null;
|
|
3022
|
+
c(p);
|
|
3023
3023
|
}
|
|
3024
3024
|
}, [e, i]);
|
|
3025
3025
|
const v = oi(() => {
|
|
3026
3026
|
if (u === "") return i;
|
|
3027
|
-
const
|
|
3027
|
+
const p = u.toLowerCase();
|
|
3028
3028
|
return i.filter(
|
|
3029
|
-
(y) => y.label.toLowerCase().includes(
|
|
3029
|
+
(y) => y.label.toLowerCase().includes(p)
|
|
3030
3030
|
);
|
|
3031
|
-
}, [u, i]),
|
|
3032
|
-
c(
|
|
3031
|
+
}, [u, i]), h = $((p) => {
|
|
3032
|
+
c(p), s(l, p);
|
|
3033
3033
|
}, [l, s]);
|
|
3034
3034
|
return /* @__PURE__ */ n.jsx("div", { className: "relative w-full", children: /* @__PURE__ */ n.jsxs(
|
|
3035
3035
|
Ri,
|
|
3036
3036
|
{
|
|
3037
3037
|
value: r,
|
|
3038
|
-
onChange:
|
|
3038
|
+
onChange: h,
|
|
3039
3039
|
disabled: a,
|
|
3040
3040
|
children: [
|
|
3041
3041
|
/* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
|
|
@@ -3043,21 +3043,21 @@ function Tn({
|
|
|
3043
3043
|
vo,
|
|
3044
3044
|
{
|
|
3045
3045
|
className: "field-control",
|
|
3046
|
-
displayValue: (
|
|
3047
|
-
onChange: (
|
|
3046
|
+
displayValue: (p) => (p == null ? void 0 : p.label) || "",
|
|
3047
|
+
onChange: (p) => t(p.target.value),
|
|
3048
3048
|
placeholder: "Select an option..."
|
|
3049
3049
|
}
|
|
3050
3050
|
),
|
|
3051
3051
|
/* @__PURE__ */ n.jsx(ho, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n.jsx(_, { icon: "octicon:chevron-down-12" }) })
|
|
3052
3052
|
] }),
|
|
3053
|
-
/* @__PURE__ */ n.jsx(po, { anchor: "bottom start", className: "select-options__combo", children: v.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : v == null ? void 0 : v.map((
|
|
3053
|
+
/* @__PURE__ */ n.jsx(po, { anchor: "bottom start", className: "select-options__combo", children: v.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : v == null ? void 0 : v.map((p) => /* @__PURE__ */ n.jsx(
|
|
3054
3054
|
go,
|
|
3055
3055
|
{
|
|
3056
|
-
value:
|
|
3056
|
+
value: p,
|
|
3057
3057
|
className: ({ active: y, selected: f }) => q("select-option", { active: y, selected: f }),
|
|
3058
|
-
children: ({ selected: y }) => /* @__PURE__ */ n.jsx("div", { className: q("option-text", { selected: y }), children:
|
|
3058
|
+
children: ({ selected: y }) => /* @__PURE__ */ n.jsx("div", { className: q("option-text", { selected: y }), children: p.label })
|
|
3059
3059
|
},
|
|
3060
|
-
|
|
3060
|
+
p.value
|
|
3061
3061
|
)) })
|
|
3062
3062
|
]
|
|
3063
3063
|
}
|
|
@@ -3132,8 +3132,8 @@ function Dn(i, e, o) {
|
|
|
3132
3132
|
if (!u.inner) throw u;
|
|
3133
3133
|
return { values: {}, errors: No((t = u, d = !l.shouldUseNativeValidation && l.criteriaMode === "all", (t.inner || []).reduce(function(r, c) {
|
|
3134
3134
|
if (r[c.path] || (r[c.path] = { message: c.message, type: c.type }), d) {
|
|
3135
|
-
var v = r[c.path].types,
|
|
3136
|
-
r[c.path] = xo(c.path, d, r, c.type,
|
|
3135
|
+
var v = r[c.path].types, h = v && v[c.type];
|
|
3136
|
+
r[c.path] = xo(c.path, d, r, c.type, h ? [].concat(h, c.message) : c.message);
|
|
3137
3137
|
}
|
|
3138
3138
|
return r;
|
|
3139
3139
|
}, {})), l) };
|
|
@@ -3164,7 +3164,7 @@ const Ua = ({
|
|
|
3164
3164
|
), v = q({
|
|
3165
3165
|
"border-gray-500 border-primary border-primary-500 text-primary text-primary-500": d,
|
|
3166
3166
|
"border-transparent text-gray-400 ": !d
|
|
3167
|
-
}),
|
|
3167
|
+
}), h = r > 0 && /* @__PURE__ */ n.jsx("span", { className: "text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80", children: r });
|
|
3168
3168
|
return /* @__PURE__ */ n.jsxs(
|
|
3169
3169
|
"button",
|
|
3170
3170
|
{
|
|
@@ -3175,7 +3175,7 @@ const Ua = ({
|
|
|
3175
3175
|
type: "button",
|
|
3176
3176
|
children: [
|
|
3177
3177
|
t.title,
|
|
3178
|
-
|
|
3178
|
+
h
|
|
3179
3179
|
]
|
|
3180
3180
|
},
|
|
3181
3181
|
t.key
|
|
@@ -3667,10 +3667,10 @@ const ls = () => /* @__PURE__ */ n.jsx("blockquote", { className: "bg-gray-100 p
|
|
|
3667
3667
|
l(d.name);
|
|
3668
3668
|
const r = new FileReader();
|
|
3669
3669
|
d.name.endsWith(".csv") ? (r.onload = (c) => {
|
|
3670
|
-
const v = c.target.result,
|
|
3671
|
-
i(e,
|
|
3670
|
+
const v = c.target.result, h = jo.parse(v, { header: !0 });
|
|
3671
|
+
i(e, h.data);
|
|
3672
3672
|
}, r.readAsText(d)) : d.name.endsWith(".xlsx") || d.name.endsWith(".xls") ? (r.onload = (c) => {
|
|
3673
|
-
const v = new Uint8Array(c.target.result),
|
|
3673
|
+
const v = new Uint8Array(c.target.result), h = Xn.read(v, { type: "array" }), p = h.SheetNames[0], y = h.Sheets[p], f = Xn.utils.sheet_to_json(y);
|
|
3674
3674
|
i(e, f);
|
|
3675
3675
|
}, r.readAsArrayBuffer(d)) : ki.error("Unsupported file type. Please upload a CSV or Excel file.");
|
|
3676
3676
|
};
|
|
@@ -3764,7 +3764,7 @@ function bs({
|
|
|
3764
3764
|
var r;
|
|
3765
3765
|
return (r = rs(l).filter((c) => c.id !== a)) == null ? void 0 : r.map((c) => {
|
|
3766
3766
|
const v = u.find(
|
|
3767
|
-
(
|
|
3767
|
+
(h) => h.id === c.id
|
|
3768
3768
|
);
|
|
3769
3769
|
return {
|
|
3770
3770
|
id: c.id,
|
|
@@ -3777,10 +3777,10 @@ function bs({
|
|
|
3777
3777
|
};
|
|
3778
3778
|
});
|
|
3779
3779
|
}, [l, u, a]), d = (r, c, v) => {
|
|
3780
|
-
const
|
|
3781
|
-
(
|
|
3780
|
+
const h = u == null ? void 0 : u.map(
|
|
3781
|
+
(p, y) => y === r ? { ...p, [c]: v } : p
|
|
3782
3782
|
);
|
|
3783
|
-
e("visibilityDependentFields",
|
|
3783
|
+
e("visibilityDependentFields", h);
|
|
3784
3784
|
};
|
|
3785
3785
|
return /* @__PURE__ */ n.jsxs("div", { className: "visibility-editor", children: [
|
|
3786
3786
|
/* @__PURE__ */ n.jsx("label", { className: "label", children: "Select Dependent Fields" }),
|
|
@@ -3796,7 +3796,7 @@ function bs({
|
|
|
3796
3796
|
}
|
|
3797
3797
|
),
|
|
3798
3798
|
u.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "py-1 bg-gray-100 rounded dependent-fields", children: u == null ? void 0 : u.map((r, c) => {
|
|
3799
|
-
var v,
|
|
3799
|
+
var v, h;
|
|
3800
3800
|
return /* @__PURE__ */ n.jsxs("div", { className: "dependent-field", children: [
|
|
3801
3801
|
/* @__PURE__ */ n.jsx(
|
|
3802
3802
|
"input",
|
|
@@ -3812,11 +3812,11 @@ function bs({
|
|
|
3812
3812
|
di,
|
|
3813
3813
|
{
|
|
3814
3814
|
value: r.fieldType,
|
|
3815
|
-
onChange: (
|
|
3815
|
+
onChange: (p) => d(c, "fieldType", p),
|
|
3816
3816
|
children: /* @__PURE__ */ n.jsxs("div", { className: "listbox-wrapper", children: [
|
|
3817
3817
|
/* @__PURE__ */ n.jsx(di.Button, { className: "listbox-button", children: r.fieldType }),
|
|
3818
3818
|
/* @__PURE__ */ n.jsx(
|
|
3819
|
-
|
|
3819
|
+
wi,
|
|
3820
3820
|
{
|
|
3821
3821
|
as: Zi,
|
|
3822
3822
|
leave: "transition ease-in duration-100",
|
|
@@ -3827,14 +3827,14 @@ function bs({
|
|
|
3827
3827
|
{
|
|
3828
3828
|
className: "listbox-options ",
|
|
3829
3829
|
anchor: "bottom",
|
|
3830
|
-
children: gn == null ? void 0 : gn.map((
|
|
3830
|
+
children: gn == null ? void 0 : gn.map((p) => /* @__PURE__ */ n.jsx(
|
|
3831
3831
|
di.Option,
|
|
3832
3832
|
{
|
|
3833
|
-
value:
|
|
3833
|
+
value: p,
|
|
3834
3834
|
className: "listbox-option",
|
|
3835
|
-
children:
|
|
3835
|
+
children: p
|
|
3836
3836
|
},
|
|
3837
|
-
|
|
3837
|
+
p
|
|
3838
3838
|
))
|
|
3839
3839
|
}
|
|
3840
3840
|
)
|
|
@@ -3847,11 +3847,11 @@ function bs({
|
|
|
3847
3847
|
di,
|
|
3848
3848
|
{
|
|
3849
3849
|
value: r.operator,
|
|
3850
|
-
onChange: (
|
|
3850
|
+
onChange: (p) => d(c, "operator", p),
|
|
3851
3851
|
children: /* @__PURE__ */ n.jsxs("div", { className: "listbox-wrapper", children: [
|
|
3852
3852
|
/* @__PURE__ */ n.jsx(di.Button, { className: "listbox-button", children: r.operator.replace("_", " ") }),
|
|
3853
3853
|
/* @__PURE__ */ n.jsx(
|
|
3854
|
-
|
|
3854
|
+
wi,
|
|
3855
3855
|
{
|
|
3856
3856
|
as: Zi,
|
|
3857
3857
|
leave: "transition ease-in duration-100",
|
|
@@ -3862,14 +3862,14 @@ function bs({
|
|
|
3862
3862
|
{
|
|
3863
3863
|
className: "listbox-options ",
|
|
3864
3864
|
anchor: "bottom",
|
|
3865
|
-
children: (v = r.fieldType === "number" ? [...pe, ...ms] : pe) == null ? void 0 : v.map((
|
|
3865
|
+
children: (v = r.fieldType === "number" ? [...pe, ...ms] : pe) == null ? void 0 : v.map((p) => /* @__PURE__ */ n.jsx(
|
|
3866
3866
|
di.Option,
|
|
3867
3867
|
{
|
|
3868
|
-
value:
|
|
3868
|
+
value: p,
|
|
3869
3869
|
className: "listbox-option",
|
|
3870
|
-
children:
|
|
3870
|
+
children: p.replace("_", " ")
|
|
3871
3871
|
},
|
|
3872
|
-
|
|
3872
|
+
p
|
|
3873
3873
|
))
|
|
3874
3874
|
}
|
|
3875
3875
|
)
|
|
@@ -3883,19 +3883,19 @@ function bs({
|
|
|
3883
3883
|
{
|
|
3884
3884
|
type: r.fieldType,
|
|
3885
3885
|
value: r.fieldValue || "",
|
|
3886
|
-
onChange: (
|
|
3886
|
+
onChange: (p) => d(c, "fieldValue", p.target.value),
|
|
3887
3887
|
placeholder: "Value",
|
|
3888
3888
|
className: "field-value"
|
|
3889
3889
|
}
|
|
3890
3890
|
) : /* @__PURE__ */ n.jsx("div", { className: "field-listbox", children: /* @__PURE__ */ n.jsx(
|
|
3891
3891
|
di,
|
|
3892
3892
|
{
|
|
3893
|
-
value: (
|
|
3894
|
-
onChange: (
|
|
3893
|
+
value: (h = r.fieldValue) != null ? h : "",
|
|
3894
|
+
onChange: (p) => d(c, "fieldValue", p),
|
|
3895
3895
|
children: /* @__PURE__ */ n.jsxs("div", { className: "listbox-wrapper", children: [
|
|
3896
3896
|
/* @__PURE__ */ n.jsx(di.Button, { className: "listbox-button", children: r.fieldValue === !0 ? "True" : r.fieldValue === !1 ? "False" : "Select value" }),
|
|
3897
3897
|
/* @__PURE__ */ n.jsx(
|
|
3898
|
-
|
|
3898
|
+
wi,
|
|
3899
3899
|
{
|
|
3900
3900
|
as: Zi,
|
|
3901
3901
|
leave: "transition ease-in duration-100",
|
|
@@ -4013,14 +4013,14 @@ const vs = B.object().shape({
|
|
|
4013
4013
|
element: o
|
|
4014
4014
|
}) => {
|
|
4015
4015
|
const s = hs.filter(
|
|
4016
|
-
(
|
|
4016
|
+
(L) => !qi.includes(o.inputType) || L.key !== "validation"
|
|
4017
4017
|
), { updateElement: a } = mi.useContext(gi), [l, u] = P("basic"), [t, d] = P(!1), [r, c] = P("manual"), v = xi("config"), {
|
|
4018
|
-
register:
|
|
4019
|
-
handleSubmit:
|
|
4018
|
+
register: h,
|
|
4019
|
+
handleSubmit: p,
|
|
4020
4020
|
control: y,
|
|
4021
4021
|
setValue: f,
|
|
4022
|
-
watch:
|
|
4023
|
-
trigger:
|
|
4022
|
+
watch: g,
|
|
4023
|
+
trigger: m,
|
|
4024
4024
|
formState: { errors: x, isSubmitting: j, isValid: S },
|
|
4025
4025
|
reset: N
|
|
4026
4026
|
} = Bn({
|
|
@@ -4029,13 +4029,13 @@ const vs = B.object().shape({
|
|
|
4029
4029
|
...o,
|
|
4030
4030
|
options: o.options || []
|
|
4031
4031
|
}
|
|
4032
|
-
}), A =
|
|
4032
|
+
}), A = g(), { fields: k, append: O, remove: ii } = mn({
|
|
4033
4033
|
control: y,
|
|
4034
4034
|
name: "options"
|
|
4035
4035
|
}), {
|
|
4036
4036
|
fields: z,
|
|
4037
4037
|
append: Z,
|
|
4038
|
-
remove:
|
|
4038
|
+
remove: w
|
|
4039
4039
|
} = mn({
|
|
4040
4040
|
control: y,
|
|
4041
4041
|
name: "options1"
|
|
@@ -4050,14 +4050,14 @@ const vs = B.object().shape({
|
|
|
4050
4050
|
D(() => {
|
|
4051
4051
|
i || N();
|
|
4052
4052
|
}, [i, N]);
|
|
4053
|
-
const H = (
|
|
4054
|
-
a(
|
|
4053
|
+
const H = (L) => {
|
|
4054
|
+
a(L, o.sectionId), e();
|
|
4055
4055
|
}, T = {
|
|
4056
4056
|
headers: {
|
|
4057
4057
|
Authorization: `Bearer ${xi("token")}`
|
|
4058
4058
|
}
|
|
4059
4059
|
}, E = $(async () => {
|
|
4060
|
-
var
|
|
4060
|
+
var L, K, X;
|
|
4061
4061
|
if (!A.apiUrl || !/^https?:\/\//.test(A.apiUrl)) {
|
|
4062
4062
|
ki.info("Please provide a valid API URL");
|
|
4063
4063
|
return;
|
|
@@ -4074,7 +4074,7 @@ const vs = B.object().shape({
|
|
|
4074
4074
|
ki.error("Expected an array in response (data, record, or result).");
|
|
4075
4075
|
return;
|
|
4076
4076
|
}
|
|
4077
|
-
((
|
|
4077
|
+
((L = o.type) == null ? void 0 : L.toLowerCase()) === "datagrid" ? f("dataColumns", li) : f("options", li);
|
|
4078
4078
|
} catch (ui) {
|
|
4079
4079
|
const J = ((X = (K = ui == null ? void 0 : ui.response) == null ? void 0 : K.data) == null ? void 0 : X.message) || (ui == null ? void 0 : ui.message) || "Unable to load options";
|
|
4080
4080
|
ki.error(J);
|
|
@@ -4086,33 +4086,33 @@ const vs = B.object().shape({
|
|
|
4086
4086
|
r === "api" && E();
|
|
4087
4087
|
}
|
|
4088
4088
|
const ni = () => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col justify-start gap-y-1", children: [
|
|
4089
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: U == null ? void 0 : U.map((
|
|
4089
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: U == null ? void 0 : U.map((L) => /* @__PURE__ */ n.jsxs("label", { className: "items-center text-base capitalize gap-x-3", children: [
|
|
4090
4090
|
/* @__PURE__ */ n.jsx(
|
|
4091
4091
|
"input",
|
|
4092
4092
|
{
|
|
4093
4093
|
type: "radio",
|
|
4094
4094
|
name: "optionType",
|
|
4095
4095
|
onChange: (K) => c(K.target.value),
|
|
4096
|
-
value:
|
|
4096
|
+
value: L
|
|
4097
4097
|
}
|
|
4098
4098
|
),
|
|
4099
4099
|
" ",
|
|
4100
4100
|
/* @__PURE__ */ n.jsxs("span", { children: [
|
|
4101
|
-
|
|
4101
|
+
L,
|
|
4102
4102
|
" options"
|
|
4103
4103
|
] })
|
|
4104
|
-
] },
|
|
4104
|
+
] }, L)) }),
|
|
4105
4105
|
r === "api" && /* @__PURE__ */ n.jsxs("div", { className: "mb-4", children: [
|
|
4106
4106
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
4107
4107
|
/* @__PURE__ */ n.jsxs("div", { className: "relative flex items-center w-full mb-2", children: [
|
|
4108
4108
|
/* @__PURE__ */ n.jsx(
|
|
4109
4109
|
F,
|
|
4110
4110
|
{
|
|
4111
|
-
watch:
|
|
4111
|
+
watch: g,
|
|
4112
4112
|
label: "Load Options from Api",
|
|
4113
4113
|
name: "apiUrl",
|
|
4114
4114
|
errors: x,
|
|
4115
|
-
register:
|
|
4115
|
+
register: h,
|
|
4116
4116
|
className: "!w-full",
|
|
4117
4117
|
placeholder: "https://example.com/options",
|
|
4118
4118
|
isFloating: !0
|
|
@@ -4143,7 +4143,7 @@ const vs = B.object().shape({
|
|
|
4143
4143
|
) }),
|
|
4144
4144
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
4145
4145
|
/* @__PURE__ */ n.jsx("h3", { className: "mb-4 text-sm text-gray-500", children: "Parent Options " }),
|
|
4146
|
-
k == null ? void 0 : k.map((
|
|
4146
|
+
k == null ? void 0 : k.map((L, K) => /* @__PURE__ */ n.jsxs(
|
|
4147
4147
|
"div",
|
|
4148
4148
|
{
|
|
4149
4149
|
className: "flex items-center mb-1 gap-x-4 last:mb-0",
|
|
@@ -4151,10 +4151,10 @@ const vs = B.object().shape({
|
|
|
4151
4151
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4152
4152
|
F,
|
|
4153
4153
|
{
|
|
4154
|
-
watch:
|
|
4154
|
+
watch: g,
|
|
4155
4155
|
label: K === 0 ? "Label" : "",
|
|
4156
4156
|
name: `options.${K}.label`,
|
|
4157
|
-
register:
|
|
4157
|
+
register: h,
|
|
4158
4158
|
errors: x,
|
|
4159
4159
|
element: o,
|
|
4160
4160
|
placeholder: "Label"
|
|
@@ -4163,10 +4163,10 @@ const vs = B.object().shape({
|
|
|
4163
4163
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4164
4164
|
F,
|
|
4165
4165
|
{
|
|
4166
|
-
watch:
|
|
4166
|
+
watch: g,
|
|
4167
4167
|
label: K === 0 ? "Value" : "",
|
|
4168
4168
|
name: `options.${K}.value`,
|
|
4169
|
-
register:
|
|
4169
|
+
register: h,
|
|
4170
4170
|
errors: x,
|
|
4171
4171
|
element: o,
|
|
4172
4172
|
placeholder: "Value"
|
|
@@ -4184,7 +4184,7 @@ const vs = B.object().shape({
|
|
|
4184
4184
|
)
|
|
4185
4185
|
]
|
|
4186
4186
|
},
|
|
4187
|
-
|
|
4187
|
+
L.id
|
|
4188
4188
|
)),
|
|
4189
4189
|
" ",
|
|
4190
4190
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
@@ -4208,7 +4208,7 @@ const vs = B.object().shape({
|
|
|
4208
4208
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
4209
4209
|
" ",
|
|
4210
4210
|
/* @__PURE__ */ n.jsx("h3", { className: "mb-4 text-sm text-gray-500", children: "Child Options " }),
|
|
4211
|
-
z == null ? void 0 : z.map((
|
|
4211
|
+
z == null ? void 0 : z.map((L, K) => /* @__PURE__ */ n.jsxs(
|
|
4212
4212
|
"div",
|
|
4213
4213
|
{
|
|
4214
4214
|
className: "flex items-center mb-1 gap-x-4 last:mb-0",
|
|
@@ -4216,10 +4216,10 @@ const vs = B.object().shape({
|
|
|
4216
4216
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4217
4217
|
F,
|
|
4218
4218
|
{
|
|
4219
|
-
watch:
|
|
4219
|
+
watch: g,
|
|
4220
4220
|
label: "Label",
|
|
4221
4221
|
name: `options1.${K}.label`,
|
|
4222
|
-
register:
|
|
4222
|
+
register: h,
|
|
4223
4223
|
errors: x,
|
|
4224
4224
|
element: o,
|
|
4225
4225
|
placeholder: "Label",
|
|
@@ -4229,10 +4229,10 @@ const vs = B.object().shape({
|
|
|
4229
4229
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4230
4230
|
F,
|
|
4231
4231
|
{
|
|
4232
|
-
watch:
|
|
4232
|
+
watch: g,
|
|
4233
4233
|
label: "Value",
|
|
4234
4234
|
name: `options1.${K}.value`,
|
|
4235
|
-
register:
|
|
4235
|
+
register: h,
|
|
4236
4236
|
errors: x,
|
|
4237
4237
|
element: o,
|
|
4238
4238
|
placeholder: "Value",
|
|
@@ -4242,10 +4242,10 @@ const vs = B.object().shape({
|
|
|
4242
4242
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4243
4243
|
F,
|
|
4244
4244
|
{
|
|
4245
|
-
watch:
|
|
4245
|
+
watch: g,
|
|
4246
4246
|
label: "Key",
|
|
4247
4247
|
name: `options1.${K}.key`,
|
|
4248
|
-
register:
|
|
4248
|
+
register: h,
|
|
4249
4249
|
errors: x,
|
|
4250
4250
|
element: o,
|
|
4251
4251
|
placeholder: "Key",
|
|
@@ -4258,13 +4258,13 @@ const vs = B.object().shape({
|
|
|
4258
4258
|
disabled: z.length === 1,
|
|
4259
4259
|
type: "button",
|
|
4260
4260
|
className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
4261
|
-
onClick: () =>
|
|
4261
|
+
onClick: () => w(K),
|
|
4262
4262
|
children: /* @__PURE__ */ n.jsx(_, { icon: "iconamoon:sign-times-fill" })
|
|
4263
4263
|
}
|
|
4264
4264
|
)
|
|
4265
4265
|
]
|
|
4266
4266
|
},
|
|
4267
|
-
|
|
4267
|
+
L.id
|
|
4268
4268
|
)),
|
|
4269
4269
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
4270
4270
|
" ",
|
|
@@ -4284,34 +4284,34 @@ const vs = B.object().shape({
|
|
|
4284
4284
|
] })
|
|
4285
4285
|
] })
|
|
4286
4286
|
] }), si = () => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col justify-start gap-y-1", children: [
|
|
4287
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: U == null ? void 0 : U.map((
|
|
4287
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: U == null ? void 0 : U.map((L) => /* @__PURE__ */ n.jsxs("label", { className: "items-center text-base capitalize gap-x-3", children: [
|
|
4288
4288
|
/* @__PURE__ */ n.jsx(
|
|
4289
4289
|
"input",
|
|
4290
4290
|
{
|
|
4291
4291
|
type: "radio",
|
|
4292
4292
|
name: "optionType",
|
|
4293
4293
|
onChange: (K) => c(K.target.value),
|
|
4294
|
-
value:
|
|
4295
|
-
checked:
|
|
4294
|
+
value: L,
|
|
4295
|
+
checked: L === r
|
|
4296
4296
|
}
|
|
4297
4297
|
),
|
|
4298
4298
|
" ",
|
|
4299
4299
|
/* @__PURE__ */ n.jsxs("span", { children: [
|
|
4300
|
-
|
|
4300
|
+
L,
|
|
4301
4301
|
" options"
|
|
4302
4302
|
] })
|
|
4303
|
-
] },
|
|
4303
|
+
] }, L)) }),
|
|
4304
4304
|
r === "api" && /* @__PURE__ */ n.jsxs("div", { className: "mb-4", children: [
|
|
4305
4305
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
4306
4306
|
/* @__PURE__ */ n.jsxs("div", { className: "relative flex items-center w-full mb-2", children: [
|
|
4307
4307
|
/* @__PURE__ */ n.jsx(
|
|
4308
4308
|
F,
|
|
4309
4309
|
{
|
|
4310
|
-
watch:
|
|
4310
|
+
watch: g,
|
|
4311
4311
|
label: "Load Columns from Api",
|
|
4312
4312
|
name: "apiUrl",
|
|
4313
4313
|
errors: x,
|
|
4314
|
-
register:
|
|
4314
|
+
register: h,
|
|
4315
4315
|
className: "!w-full",
|
|
4316
4316
|
placeholder: "https://example.com/columns",
|
|
4317
4317
|
isFloating: !0
|
|
@@ -4341,7 +4341,7 @@ const vs = B.object().shape({
|
|
|
4341
4341
|
name: "dataColumns"
|
|
4342
4342
|
}
|
|
4343
4343
|
) }),
|
|
4344
|
-
W == null ? void 0 : W.map((
|
|
4344
|
+
W == null ? void 0 : W.map((L, K) => /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-4 ", children: [
|
|
4345
4345
|
/* @__PURE__ */ n.jsx("div", { className: "min-w-[140px]", children: /* @__PURE__ */ n.jsx(
|
|
4346
4346
|
Di,
|
|
4347
4347
|
{
|
|
@@ -4360,20 +4360,20 @@ const vs = B.object().shape({
|
|
|
4360
4360
|
value: "checkbox"
|
|
4361
4361
|
}
|
|
4362
4362
|
],
|
|
4363
|
-
register:
|
|
4363
|
+
register: h,
|
|
4364
4364
|
name: `dataColumns.${K}.type`,
|
|
4365
4365
|
setValue: f,
|
|
4366
|
-
trigger:
|
|
4366
|
+
trigger: m,
|
|
4367
4367
|
value: A.dataColumns[K].type
|
|
4368
4368
|
}
|
|
4369
4369
|
) }),
|
|
4370
4370
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4371
4371
|
F,
|
|
4372
4372
|
{
|
|
4373
|
-
watch:
|
|
4373
|
+
watch: g,
|
|
4374
4374
|
label: K === 0 ? "Field key" : "",
|
|
4375
4375
|
name: `dataColumns.${K}.field`,
|
|
4376
|
-
register:
|
|
4376
|
+
register: h,
|
|
4377
4377
|
errors: x,
|
|
4378
4378
|
element: o,
|
|
4379
4379
|
placeholder: "fieldKey"
|
|
@@ -4382,10 +4382,10 @@ const vs = B.object().shape({
|
|
|
4382
4382
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4383
4383
|
F,
|
|
4384
4384
|
{
|
|
4385
|
-
watch:
|
|
4385
|
+
watch: g,
|
|
4386
4386
|
label: K === 0 ? "Display header" : "",
|
|
4387
4387
|
name: `dataColumns.${K}.headerName`,
|
|
4388
|
-
register:
|
|
4388
|
+
register: h,
|
|
4389
4389
|
errors: x,
|
|
4390
4390
|
element: o,
|
|
4391
4391
|
placeholder: "header"
|
|
@@ -4401,7 +4401,7 @@ const vs = B.object().shape({
|
|
|
4401
4401
|
children: /* @__PURE__ */ n.jsx(_, { icon: "iconamoon:sign-times-fill" })
|
|
4402
4402
|
}
|
|
4403
4403
|
)
|
|
4404
|
-
] },
|
|
4404
|
+
] }, L.id)),
|
|
4405
4405
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
4406
4406
|
" ",
|
|
4407
4407
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -4425,9 +4425,9 @@ const vs = B.object().shape({
|
|
|
4425
4425
|
)
|
|
4426
4426
|
] })
|
|
4427
4427
|
] }), hi = $(async () => {
|
|
4428
|
-
const
|
|
4428
|
+
const L = xi("token"), { status: K, data: X } = await Ii.get(A.url, {
|
|
4429
4429
|
headers: {
|
|
4430
|
-
Authorization: `Bearer ${
|
|
4430
|
+
Authorization: `Bearer ${L}`
|
|
4431
4431
|
}
|
|
4432
4432
|
});
|
|
4433
4433
|
K === 200 && f("options", (X == null ? void 0 : X.data) || X);
|
|
@@ -4439,10 +4439,10 @@ const vs = B.object().shape({
|
|
|
4439
4439
|
"div",
|
|
4440
4440
|
{
|
|
4441
4441
|
className: "fixed inset-0 bg-gray-800/40 backdrop-blur-sm flex items-center justify-end z-[999] cursor-default",
|
|
4442
|
-
onMouseDown: (
|
|
4443
|
-
onPointerDown: (
|
|
4444
|
-
onDragStart: (
|
|
4445
|
-
|
|
4442
|
+
onMouseDown: (L) => L.stopPropagation(),
|
|
4443
|
+
onPointerDown: (L) => L.stopPropagation(),
|
|
4444
|
+
onDragStart: (L) => {
|
|
4445
|
+
L.preventDefault(), L.stopPropagation();
|
|
4446
4446
|
},
|
|
4447
4447
|
children: /* @__PURE__ */ n.jsxs("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: [
|
|
4448
4448
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4466,7 +4466,7 @@ const vs = B.object().shape({
|
|
|
4466
4466
|
/* @__PURE__ */ n.jsxs(
|
|
4467
4467
|
"form",
|
|
4468
4468
|
{
|
|
4469
|
-
onSubmit:
|
|
4469
|
+
onSubmit: p(H),
|
|
4470
4470
|
className: "w-full flex-1 flex flex-col",
|
|
4471
4471
|
children: [
|
|
4472
4472
|
/* @__PURE__ */ n.jsxs("div", { className: "flex-1", children: [
|
|
@@ -4476,10 +4476,10 @@ const vs = B.object().shape({
|
|
|
4476
4476
|
pn.includes(o.inputType) && /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(
|
|
4477
4477
|
F,
|
|
4478
4478
|
{
|
|
4479
|
-
watch:
|
|
4479
|
+
watch: g,
|
|
4480
4480
|
label: "Value",
|
|
4481
4481
|
name: "value",
|
|
4482
|
-
register:
|
|
4482
|
+
register: h,
|
|
4483
4483
|
errors: x,
|
|
4484
4484
|
element: o
|
|
4485
4485
|
}
|
|
@@ -4488,10 +4488,10 @@ const vs = B.object().shape({
|
|
|
4488
4488
|
/* @__PURE__ */ n.jsx(
|
|
4489
4489
|
F,
|
|
4490
4490
|
{
|
|
4491
|
-
watch:
|
|
4491
|
+
watch: g,
|
|
4492
4492
|
label: "Label",
|
|
4493
4493
|
name: "inputLabel",
|
|
4494
|
-
register:
|
|
4494
|
+
register: h,
|
|
4495
4495
|
errors: x,
|
|
4496
4496
|
element: o
|
|
4497
4497
|
}
|
|
@@ -4500,10 +4500,10 @@ const vs = B.object().shape({
|
|
|
4500
4500
|
o.type.toLowerCase() === "cascadeselect" && /* @__PURE__ */ n.jsx(
|
|
4501
4501
|
F,
|
|
4502
4502
|
{
|
|
4503
|
-
watch:
|
|
4503
|
+
watch: g,
|
|
4504
4504
|
label: "Child Label",
|
|
4505
4505
|
name: "childLabel",
|
|
4506
|
-
register:
|
|
4506
|
+
register: h,
|
|
4507
4507
|
errors: x,
|
|
4508
4508
|
element: o
|
|
4509
4509
|
}
|
|
@@ -4512,10 +4512,10 @@ const vs = B.object().shape({
|
|
|
4512
4512
|
Xa.includes(o.inputType) && /* @__PURE__ */ n.jsx(
|
|
4513
4513
|
F,
|
|
4514
4514
|
{
|
|
4515
|
-
watch:
|
|
4515
|
+
watch: g,
|
|
4516
4516
|
label: "Placeholder",
|
|
4517
4517
|
name: "placeholder",
|
|
4518
|
-
register:
|
|
4518
|
+
register: h,
|
|
4519
4519
|
errors: x,
|
|
4520
4520
|
element: o
|
|
4521
4521
|
}
|
|
@@ -4523,10 +4523,10 @@ const vs = B.object().shape({
|
|
|
4523
4523
|
$a.includes(o.inputType) && /* @__PURE__ */ n.jsx(
|
|
4524
4524
|
F,
|
|
4525
4525
|
{
|
|
4526
|
-
watch:
|
|
4526
|
+
watch: g,
|
|
4527
4527
|
label: "Prefix",
|
|
4528
4528
|
name: "prefix",
|
|
4529
|
-
register:
|
|
4529
|
+
register: h,
|
|
4530
4530
|
errors: x,
|
|
4531
4531
|
element: o
|
|
4532
4532
|
}
|
|
@@ -4536,10 +4536,10 @@ const vs = B.object().shape({
|
|
|
4536
4536
|
/* @__PURE__ */ n.jsx(
|
|
4537
4537
|
F,
|
|
4538
4538
|
{
|
|
4539
|
-
watch:
|
|
4539
|
+
watch: g,
|
|
4540
4540
|
label: "Api Url",
|
|
4541
4541
|
name: "url",
|
|
4542
|
-
register:
|
|
4542
|
+
register: h,
|
|
4543
4543
|
errors: x,
|
|
4544
4544
|
element: o
|
|
4545
4545
|
}
|
|
@@ -4558,11 +4558,11 @@ const vs = B.object().shape({
|
|
|
4558
4558
|
value: "POST"
|
|
4559
4559
|
}
|
|
4560
4560
|
],
|
|
4561
|
-
register:
|
|
4561
|
+
register: h,
|
|
4562
4562
|
name: "method",
|
|
4563
4563
|
setValue: f,
|
|
4564
|
-
trigger:
|
|
4565
|
-
value:
|
|
4564
|
+
trigger: m,
|
|
4565
|
+
value: g("method")
|
|
4566
4566
|
}
|
|
4567
4567
|
),
|
|
4568
4568
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4579,30 +4579,30 @@ const vs = B.object().shape({
|
|
|
4579
4579
|
value: "object"
|
|
4580
4580
|
}
|
|
4581
4581
|
],
|
|
4582
|
-
register:
|
|
4582
|
+
register: h,
|
|
4583
4583
|
name: "responseType",
|
|
4584
4584
|
setValue: f,
|
|
4585
|
-
trigger:
|
|
4586
|
-
value:
|
|
4585
|
+
trigger: m,
|
|
4586
|
+
value: g("responseType")
|
|
4587
4587
|
}
|
|
4588
4588
|
)
|
|
4589
4589
|
] }),
|
|
4590
4590
|
os.includes(o.inputType) && /* @__PURE__ */ n.jsx(
|
|
4591
4591
|
ss,
|
|
4592
4592
|
{
|
|
4593
|
-
onChange: (
|
|
4594
|
-
f("denominators",
|
|
4593
|
+
onChange: (L) => {
|
|
4594
|
+
f("denominators", L);
|
|
4595
4595
|
},
|
|
4596
|
-
value:
|
|
4596
|
+
value: g("denominators")
|
|
4597
4597
|
}
|
|
4598
4598
|
),
|
|
4599
4599
|
!pn.includes(o.inputType) && !qi.includes(o.inputType) && /* @__PURE__ */ n.jsx(
|
|
4600
4600
|
F,
|
|
4601
4601
|
{
|
|
4602
|
-
watch:
|
|
4602
|
+
watch: g,
|
|
4603
4603
|
label: "Short Description",
|
|
4604
4604
|
name: "description",
|
|
4605
|
-
register:
|
|
4605
|
+
register: h,
|
|
4606
4606
|
errors: x,
|
|
4607
4607
|
element: o
|
|
4608
4608
|
}
|
|
@@ -4613,20 +4613,20 @@ const vs = B.object().shape({
|
|
|
4613
4613
|
{
|
|
4614
4614
|
label: "Date Format",
|
|
4615
4615
|
options: Za,
|
|
4616
|
-
register:
|
|
4616
|
+
register: h,
|
|
4617
4617
|
name: "dateFormat",
|
|
4618
4618
|
setValue: f,
|
|
4619
|
-
trigger:
|
|
4620
|
-
value:
|
|
4619
|
+
trigger: m,
|
|
4620
|
+
value: g("dateFormat")
|
|
4621
4621
|
}
|
|
4622
4622
|
),
|
|
4623
4623
|
/* @__PURE__ */ n.jsx(
|
|
4624
4624
|
F,
|
|
4625
4625
|
{
|
|
4626
|
-
watch:
|
|
4626
|
+
watch: g,
|
|
4627
4627
|
label: "Allow Range",
|
|
4628
4628
|
name: "canHaveDateRange",
|
|
4629
|
-
register:
|
|
4629
|
+
register: h,
|
|
4630
4630
|
errors: x,
|
|
4631
4631
|
element: o,
|
|
4632
4632
|
type: "checkbox",
|
|
@@ -4657,10 +4657,10 @@ const vs = B.object().shape({
|
|
|
4657
4657
|
/* @__PURE__ */ n.jsx(
|
|
4658
4658
|
F,
|
|
4659
4659
|
{
|
|
4660
|
-
watch:
|
|
4660
|
+
watch: g,
|
|
4661
4661
|
label: "Allow Year Picker",
|
|
4662
4662
|
name: "allowYearPicker",
|
|
4663
|
-
register:
|
|
4663
|
+
register: h,
|
|
4664
4664
|
errors: x,
|
|
4665
4665
|
element: o,
|
|
4666
4666
|
type: "checkbox",
|
|
@@ -4671,10 +4671,10 @@ const vs = B.object().shape({
|
|
|
4671
4671
|
o.type.toLowerCase() === "country" && /* @__PURE__ */ n.jsx(
|
|
4672
4672
|
F,
|
|
4673
4673
|
{
|
|
4674
|
-
watch:
|
|
4674
|
+
watch: g,
|
|
4675
4675
|
label: "Allow States",
|
|
4676
4676
|
name: "showState",
|
|
4677
|
-
register:
|
|
4677
|
+
register: h,
|
|
4678
4678
|
errors: x,
|
|
4679
4679
|
element: o,
|
|
4680
4680
|
type: "checkbox",
|
|
@@ -4695,20 +4695,20 @@ const vs = B.object().shape({
|
|
|
4695
4695
|
value: "Combobox"
|
|
4696
4696
|
}
|
|
4697
4697
|
],
|
|
4698
|
-
register:
|
|
4698
|
+
register: h,
|
|
4699
4699
|
name: "selectType",
|
|
4700
4700
|
setValue: f,
|
|
4701
|
-
trigger:
|
|
4702
|
-
value:
|
|
4701
|
+
trigger: m,
|
|
4702
|
+
value: g("selectType")
|
|
4703
4703
|
}
|
|
4704
4704
|
),
|
|
4705
4705
|
o.type.toLowerCase() === "grid" && /* @__PURE__ */ n.jsx(
|
|
4706
4706
|
F,
|
|
4707
4707
|
{
|
|
4708
|
-
watch:
|
|
4708
|
+
watch: g,
|
|
4709
4709
|
label: "Number of columns (max: 4)",
|
|
4710
4710
|
name: "columns",
|
|
4711
|
-
register:
|
|
4711
|
+
register: h,
|
|
4712
4712
|
errors: x,
|
|
4713
4713
|
element: o,
|
|
4714
4714
|
max: 4,
|
|
@@ -4720,10 +4720,10 @@ const vs = B.object().shape({
|
|
|
4720
4720
|
/* @__PURE__ */ n.jsx(
|
|
4721
4721
|
F,
|
|
4722
4722
|
{
|
|
4723
|
-
watch:
|
|
4723
|
+
watch: g,
|
|
4724
4724
|
label: "Document Options Url",
|
|
4725
4725
|
name: "url",
|
|
4726
|
-
register:
|
|
4726
|
+
register: h,
|
|
4727
4727
|
errors: x,
|
|
4728
4728
|
element: o
|
|
4729
4729
|
}
|
|
@@ -4735,10 +4735,10 @@ const vs = B.object().shape({
|
|
|
4735
4735
|
/* @__PURE__ */ n.jsx(
|
|
4736
4736
|
F,
|
|
4737
4737
|
{
|
|
4738
|
-
watch:
|
|
4738
|
+
watch: g,
|
|
4739
4739
|
label: "Document Validation Url",
|
|
4740
4740
|
name: "validationUrl",
|
|
4741
|
-
register:
|
|
4741
|
+
register: h,
|
|
4742
4742
|
errors: x,
|
|
4743
4743
|
element: o
|
|
4744
4744
|
}
|
|
@@ -4748,10 +4748,10 @@ const vs = B.object().shape({
|
|
|
4748
4748
|
/* @__PURE__ */ n.jsx("div", { className: "grid gap-y-1", children: /* @__PURE__ */ n.jsx(
|
|
4749
4749
|
F,
|
|
4750
4750
|
{
|
|
4751
|
-
watch:
|
|
4751
|
+
watch: g,
|
|
4752
4752
|
label: "Signature Page Url",
|
|
4753
4753
|
name: "signatureLink",
|
|
4754
|
-
register:
|
|
4754
|
+
register: h,
|
|
4755
4755
|
errors: x,
|
|
4756
4756
|
element: o
|
|
4757
4757
|
}
|
|
@@ -4762,10 +4762,10 @@ const vs = B.object().shape({
|
|
|
4762
4762
|
/* @__PURE__ */ n.jsx(
|
|
4763
4763
|
F,
|
|
4764
4764
|
{
|
|
4765
|
-
watch:
|
|
4765
|
+
watch: g,
|
|
4766
4766
|
label: "Allow Multiple Uploads",
|
|
4767
4767
|
name: "isMultiple",
|
|
4768
|
-
register:
|
|
4768
|
+
register: h,
|
|
4769
4769
|
errors: x,
|
|
4770
4770
|
element: o,
|
|
4771
4771
|
type: "checkbox",
|
|
@@ -4780,7 +4780,7 @@ const vs = B.object().shape({
|
|
|
4780
4780
|
id: "acceptedFiles",
|
|
4781
4781
|
value: A == null ? void 0 : A.acceptedFiles
|
|
4782
4782
|
},
|
|
4783
|
-
validationData: { register:
|
|
4783
|
+
validationData: { register: h, setValue: f, trigger: m, watch: g },
|
|
4784
4784
|
placeholder: "Choose file types"
|
|
4785
4785
|
}
|
|
4786
4786
|
)
|
|
@@ -4790,10 +4790,10 @@ const vs = B.object().shape({
|
|
|
4790
4790
|
/* @__PURE__ */ n.jsx("div", { className: "w-[150px] mb-4", children: /* @__PURE__ */ n.jsx(
|
|
4791
4791
|
F,
|
|
4792
4792
|
{
|
|
4793
|
-
watch:
|
|
4793
|
+
watch: g,
|
|
4794
4794
|
label: "Toggle Visibility",
|
|
4795
4795
|
name: "isHidden",
|
|
4796
|
-
register:
|
|
4796
|
+
register: h,
|
|
4797
4797
|
errors: x,
|
|
4798
4798
|
element: o,
|
|
4799
4799
|
type: "checkbox",
|
|
@@ -4804,10 +4804,10 @@ const vs = B.object().shape({
|
|
|
4804
4804
|
A.isHidden && /* @__PURE__ */ n.jsx(
|
|
4805
4805
|
bs,
|
|
4806
4806
|
{
|
|
4807
|
-
register:
|
|
4807
|
+
register: h,
|
|
4808
4808
|
setValue: f,
|
|
4809
|
-
trigger:
|
|
4810
|
-
watch:
|
|
4809
|
+
trigger: m,
|
|
4810
|
+
watch: g,
|
|
4811
4811
|
id: o == null ? void 0 : o.id
|
|
4812
4812
|
}
|
|
4813
4813
|
)
|
|
@@ -4818,10 +4818,10 @@ const vs = B.object().shape({
|
|
|
4818
4818
|
/* @__PURE__ */ n.jsx("div", { className: "w-[150px]", children: /* @__PURE__ */ n.jsx(
|
|
4819
4819
|
F,
|
|
4820
4820
|
{
|
|
4821
|
-
watch:
|
|
4821
|
+
watch: g,
|
|
4822
4822
|
label: "Required",
|
|
4823
4823
|
name: "isRequired",
|
|
4824
|
-
register:
|
|
4824
|
+
register: h,
|
|
4825
4825
|
errors: x,
|
|
4826
4826
|
element: o,
|
|
4827
4827
|
type: "checkbox",
|
|
@@ -4832,10 +4832,10 @@ const vs = B.object().shape({
|
|
|
4832
4832
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4833
4833
|
F,
|
|
4834
4834
|
{
|
|
4835
|
-
watch:
|
|
4835
|
+
watch: g,
|
|
4836
4836
|
label: "Error message text",
|
|
4837
4837
|
name: "requiredMessage",
|
|
4838
|
-
register:
|
|
4838
|
+
register: h,
|
|
4839
4839
|
errors: x,
|
|
4840
4840
|
element: o
|
|
4841
4841
|
}
|
|
@@ -4846,10 +4846,10 @@ const vs = B.object().shape({
|
|
|
4846
4846
|
/* @__PURE__ */ n.jsx("div", { className: "w-[150px]", children: /* @__PURE__ */ n.jsx(
|
|
4847
4847
|
F,
|
|
4848
4848
|
{
|
|
4849
|
-
watch:
|
|
4849
|
+
watch: g,
|
|
4850
4850
|
label: "Min Length",
|
|
4851
4851
|
name: "minLength",
|
|
4852
|
-
register:
|
|
4852
|
+
register: h,
|
|
4853
4853
|
errors: x,
|
|
4854
4854
|
element: o,
|
|
4855
4855
|
type: "number"
|
|
@@ -4859,10 +4859,10 @@ const vs = B.object().shape({
|
|
|
4859
4859
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4860
4860
|
F,
|
|
4861
4861
|
{
|
|
4862
|
-
watch:
|
|
4862
|
+
watch: g,
|
|
4863
4863
|
label: "Error message text",
|
|
4864
4864
|
name: "minLengthMessage",
|
|
4865
|
-
register:
|
|
4865
|
+
register: h,
|
|
4866
4866
|
errors: x,
|
|
4867
4867
|
element: o
|
|
4868
4868
|
}
|
|
@@ -4872,10 +4872,10 @@ const vs = B.object().shape({
|
|
|
4872
4872
|
/* @__PURE__ */ n.jsx("div", { className: "w-[150px]", children: /* @__PURE__ */ n.jsx(
|
|
4873
4873
|
F,
|
|
4874
4874
|
{
|
|
4875
|
-
watch:
|
|
4875
|
+
watch: g,
|
|
4876
4876
|
label: "Max Length",
|
|
4877
4877
|
name: "maxLength",
|
|
4878
|
-
register:
|
|
4878
|
+
register: h,
|
|
4879
4879
|
errors: x,
|
|
4880
4880
|
element: o,
|
|
4881
4881
|
type: "number"
|
|
@@ -4885,10 +4885,10 @@ const vs = B.object().shape({
|
|
|
4885
4885
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4886
4886
|
F,
|
|
4887
4887
|
{
|
|
4888
|
-
watch:
|
|
4888
|
+
watch: g,
|
|
4889
4889
|
label: "Error message text",
|
|
4890
4890
|
name: "maxLengthMessage",
|
|
4891
|
-
register:
|
|
4891
|
+
register: h,
|
|
4892
4892
|
errors: x,
|
|
4893
4893
|
element: o
|
|
4894
4894
|
}
|
|
@@ -4900,10 +4900,10 @@ const vs = B.object().shape({
|
|
|
4900
4900
|
/* @__PURE__ */ n.jsx("div", { className: "w-[150px]", children: /* @__PURE__ */ n.jsx(
|
|
4901
4901
|
F,
|
|
4902
4902
|
{
|
|
4903
|
-
watch:
|
|
4903
|
+
watch: g,
|
|
4904
4904
|
label: "Min Amount",
|
|
4905
4905
|
name: "minAmount",
|
|
4906
|
-
register:
|
|
4906
|
+
register: h,
|
|
4907
4907
|
errors: x,
|
|
4908
4908
|
element: o,
|
|
4909
4909
|
type: "amount"
|
|
@@ -4913,10 +4913,10 @@ const vs = B.object().shape({
|
|
|
4913
4913
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4914
4914
|
F,
|
|
4915
4915
|
{
|
|
4916
|
-
watch:
|
|
4916
|
+
watch: g,
|
|
4917
4917
|
label: "Error message text",
|
|
4918
4918
|
name: "minAmountMessage",
|
|
4919
|
-
register:
|
|
4919
|
+
register: h,
|
|
4920
4920
|
errors: x,
|
|
4921
4921
|
element: o
|
|
4922
4922
|
}
|
|
@@ -4926,10 +4926,10 @@ const vs = B.object().shape({
|
|
|
4926
4926
|
/* @__PURE__ */ n.jsx("div", { className: "w-[150px]", children: /* @__PURE__ */ n.jsx(
|
|
4927
4927
|
F,
|
|
4928
4928
|
{
|
|
4929
|
-
watch:
|
|
4929
|
+
watch: g,
|
|
4930
4930
|
label: "Max Amount",
|
|
4931
4931
|
name: "maxAmount",
|
|
4932
|
-
register:
|
|
4932
|
+
register: h,
|
|
4933
4933
|
errors: x,
|
|
4934
4934
|
element: o,
|
|
4935
4935
|
type: "amount"
|
|
@@ -4939,10 +4939,10 @@ const vs = B.object().shape({
|
|
|
4939
4939
|
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
|
|
4940
4940
|
F,
|
|
4941
4941
|
{
|
|
4942
|
-
watch:
|
|
4942
|
+
watch: g,
|
|
4943
4943
|
label: "Error message text",
|
|
4944
4944
|
name: "maxAmountMessage",
|
|
4945
|
-
register:
|
|
4945
|
+
register: h,
|
|
4946
4946
|
errors: x,
|
|
4947
4947
|
element: o
|
|
4948
4948
|
}
|
|
@@ -5177,39 +5177,39 @@ function ys({
|
|
|
5177
5177
|
validationData: e
|
|
5178
5178
|
}) {
|
|
5179
5179
|
var A;
|
|
5180
|
-
const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, u] = P(), [t, d] = P(!1), [r, c] = P(!1), [v,
|
|
5180
|
+
const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, u] = P(), [t, d] = P(!1), [r, c] = P(!1), [v, h] = P(""), p = a && a(i == null ? void 0 : i.id);
|
|
5181
5181
|
D(() => {
|
|
5182
|
-
u(
|
|
5183
|
-
}, [
|
|
5182
|
+
u(p);
|
|
5183
|
+
}, [p]);
|
|
5184
5184
|
const [y, f] = P("");
|
|
5185
5185
|
D(() => {
|
|
5186
5186
|
o(i.id);
|
|
5187
5187
|
}, [i.id, o]);
|
|
5188
|
-
const { url:
|
|
5188
|
+
const { url: g, method: m, responseType: x } = i || {}, S = {
|
|
5189
5189
|
headers: {
|
|
5190
5190
|
Authorization: `Bearer ${xi("token")}`
|
|
5191
5191
|
}
|
|
5192
5192
|
}, N = $(
|
|
5193
5193
|
async (k) => {
|
|
5194
|
-
var O, ii, z, Z,
|
|
5195
|
-
if (!(!
|
|
5194
|
+
var O, ii, z, Z, w, W, I, G, H, R, T;
|
|
5195
|
+
if (!(!g || !m)) {
|
|
5196
5196
|
d(!0);
|
|
5197
5197
|
try {
|
|
5198
5198
|
let E;
|
|
5199
|
-
if (
|
|
5200
|
-
const U = `${
|
|
5199
|
+
if (m.toLowerCase() === "get") {
|
|
5200
|
+
const U = `${g}?value=${k}`;
|
|
5201
5201
|
E = await Ii.get(U, S);
|
|
5202
|
-
} else if (
|
|
5203
|
-
E = await Ii.post(
|
|
5202
|
+
} else if (m.toLowerCase() === "post")
|
|
5203
|
+
E = await Ii.post(g, { value: k }, S);
|
|
5204
5204
|
else
|
|
5205
5205
|
throw new Error("Unsupported HTTP method");
|
|
5206
|
-
E.status === 200 && ((((ii = (O = E == null ? void 0 : E.data) == null ? void 0 : O.data) == null ? void 0 : ii.status) || ((z = E == null ? void 0 : E.data) == null ? void 0 : z.status)) === !0 ? (c(!0), x === "string" ?
|
|
5207
|
-
((
|
|
5206
|
+
E.status === 200 && ((((ii = (O = E == null ? void 0 : E.data) == null ? void 0 : O.data) == null ? void 0 : ii.status) || ((z = E == null ? void 0 : E.data) == null ? void 0 : z.status)) === !0 ? (c(!0), x === "string" ? h(
|
|
5207
|
+
((w = (Z = E == null ? void 0 : E.data) == null ? void 0 : Z.data) == null ? void 0 : w.description) || ((W = E == null ? void 0 : E.data) == null ? void 0 : W.description) || "Validation successful"
|
|
5208
5208
|
) : f(
|
|
5209
5209
|
((G = (I = E == null ? void 0 : E.data) == null ? void 0 : I.data) == null ? void 0 : G.description) || ((H = E == null ? void 0 : E.data) == null ? void 0 : H.description) || {}
|
|
5210
|
-
)) : (console.error("Invalid input:", k),
|
|
5210
|
+
)) : (console.error("Invalid input:", k), h("Unable to validate input"), c(!1)));
|
|
5211
5211
|
} catch (E) {
|
|
5212
|
-
console.error("Error validating input:", E),
|
|
5212
|
+
console.error("Error validating input:", E), h(
|
|
5213
5213
|
((T = (R = E == null ? void 0 : E.response) == null ? void 0 : R.data) == null ? void 0 : T.message) || "Unable to validate input"
|
|
5214
5214
|
), c(!1);
|
|
5215
5215
|
} finally {
|
|
@@ -5217,7 +5217,7 @@ function ys({
|
|
|
5217
5217
|
}
|
|
5218
5218
|
}
|
|
5219
5219
|
},
|
|
5220
|
-
[
|
|
5220
|
+
[m, x, g]
|
|
5221
5221
|
);
|
|
5222
5222
|
return D(() => {
|
|
5223
5223
|
if (l) {
|
|
@@ -5303,11 +5303,11 @@ function As({
|
|
|
5303
5303
|
const [a, l] = P([...o]);
|
|
5304
5304
|
function u(r, c) {
|
|
5305
5305
|
l((v) => {
|
|
5306
|
-
const
|
|
5307
|
-
return
|
|
5308
|
-
...
|
|
5306
|
+
const h = [...v];
|
|
5307
|
+
return h[c] = {
|
|
5308
|
+
...h[c],
|
|
5309
5309
|
value: r
|
|
5310
|
-
},
|
|
5310
|
+
}, h;
|
|
5311
5311
|
});
|
|
5312
5312
|
}
|
|
5313
5313
|
function t(r, c) {
|
|
@@ -5337,7 +5337,7 @@ function As({
|
|
|
5337
5337
|
/* @__PURE__ */ n.jsx("div", { className: "px-4 py-2", children: /* @__PURE__ */ n.jsx("span", { children: "Sub total" }) })
|
|
5338
5338
|
] }),
|
|
5339
5339
|
a == null ? void 0 : a.map((r, c) => {
|
|
5340
|
-
var v,
|
|
5340
|
+
var v, h;
|
|
5341
5341
|
return /* @__PURE__ */ n.jsxs(
|
|
5342
5342
|
"div",
|
|
5343
5343
|
{
|
|
@@ -5351,12 +5351,12 @@ function As({
|
|
|
5351
5351
|
className: "border border-gray-100 rounded w-full px-3 py-1 outline-none",
|
|
5352
5352
|
decimalsLimit: 6,
|
|
5353
5353
|
value: r.value,
|
|
5354
|
-
onValueChange: (
|
|
5354
|
+
onValueChange: (p) => u(p, c),
|
|
5355
5355
|
disabled: e,
|
|
5356
5356
|
allowNegativeValue: !1
|
|
5357
5357
|
}
|
|
5358
5358
|
) }) }),
|
|
5359
|
-
/* @__PURE__ */ n.jsx("div", { className: "px-4 py-2 flex justify-between items-center", children: /* @__PURE__ */ n.jsx("span", { children: (
|
|
5359
|
+
/* @__PURE__ */ n.jsx("div", { className: "px-4 py-2 flex justify-between items-center", children: /* @__PURE__ */ n.jsx("span", { children: (h = t(r.key, r.value)) == null ? void 0 : h.toLocaleString() }) })
|
|
5360
5360
|
]
|
|
5361
5361
|
},
|
|
5362
5362
|
c + "index"
|
|
@@ -5429,27 +5429,27 @@ function Ms({
|
|
|
5429
5429
|
return /* @__PURE__ */ n.jsxs("tr", { children: [
|
|
5430
5430
|
e.map((c) => {
|
|
5431
5431
|
var x;
|
|
5432
|
-
const v = i[c.field],
|
|
5433
|
-
let
|
|
5434
|
-
c.validate && ((f == null ? void 0 : f.isValid) === !1 ?
|
|
5435
|
-
const
|
|
5432
|
+
const v = i[c.field], h = c.editable && !o, p = r(c.field), { isValidating: y, result: f } = t(i.id, c.field);
|
|
5433
|
+
let g = "border-gray-300";
|
|
5434
|
+
c.validate && ((f == null ? void 0 : f.isValid) === !1 ? g = "border-red-500 bg-red-50" : (f == null ? void 0 : f.isValid) === !0 && (g = "border-green-500 bg-green-50"));
|
|
5435
|
+
const m = `w-full px-2 py-1 border rounded outline-none ${g}`;
|
|
5436
5436
|
return /* @__PURE__ */ n.jsx(
|
|
5437
5437
|
"td",
|
|
5438
5438
|
{
|
|
5439
5439
|
title: o ? "" : "Double click to edit",
|
|
5440
5440
|
className: "px-3 py-1 border",
|
|
5441
|
-
onDoubleClick: () =>
|
|
5441
|
+
onDoubleClick: () => h && a({
|
|
5442
5442
|
rowId: i.id,
|
|
5443
5443
|
field: c.field
|
|
5444
5444
|
}),
|
|
5445
|
-
children:
|
|
5445
|
+
children: h && p ? /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
|
|
5446
5446
|
c.type === "number" ? /* @__PURE__ */ n.jsx(
|
|
5447
5447
|
sn,
|
|
5448
5448
|
{
|
|
5449
5449
|
value: v,
|
|
5450
5450
|
decimalsLimit: 6,
|
|
5451
5451
|
allowNegativeValue: !1,
|
|
5452
|
-
className:
|
|
5452
|
+
className: m,
|
|
5453
5453
|
onValueChange: (j) => l(j, i.id, c.field),
|
|
5454
5454
|
onBlur: () => {
|
|
5455
5455
|
a(null), u(v, i.id, c.field, c);
|
|
@@ -5490,7 +5490,7 @@ function Ms({
|
|
|
5490
5490
|
onBlur: () => {
|
|
5491
5491
|
a(null), u(v, i.id, c.field, c);
|
|
5492
5492
|
},
|
|
5493
|
-
className:
|
|
5493
|
+
className: m,
|
|
5494
5494
|
autoFocus: !0
|
|
5495
5495
|
}
|
|
5496
5496
|
),
|
|
@@ -5537,40 +5537,40 @@ function Bs({
|
|
|
5537
5537
|
D(() => {
|
|
5538
5538
|
const f = document.getElementById("form");
|
|
5539
5539
|
if (!f) return;
|
|
5540
|
-
const
|
|
5540
|
+
const g = (x) => {
|
|
5541
5541
|
const j = x.getBoundingClientRect().width;
|
|
5542
|
-
c(j ? j -
|
|
5542
|
+
c(j ? j - 48 : 0);
|
|
5543
5543
|
};
|
|
5544
|
-
|
|
5545
|
-
const
|
|
5544
|
+
g(f);
|
|
5545
|
+
const m = new ResizeObserver((x) => {
|
|
5546
5546
|
for (const j of x)
|
|
5547
|
-
|
|
5547
|
+
g(j.target);
|
|
5548
5548
|
});
|
|
5549
|
-
return
|
|
5549
|
+
return m.observe(f), () => m.disconnect();
|
|
5550
5550
|
}, []), D(() => {
|
|
5551
5551
|
l((f) => JSON.stringify(f) !== JSON.stringify(i) ? i : f);
|
|
5552
5552
|
}, [i]), D(() => {
|
|
5553
5553
|
e == null || e(a);
|
|
5554
5554
|
}, [a, e]), D(() => {
|
|
5555
|
-
const f = (
|
|
5556
|
-
d.current && !d.current.contains(
|
|
5555
|
+
const f = (g) => {
|
|
5556
|
+
d.current && !d.current.contains(g.target) && t(null);
|
|
5557
5557
|
};
|
|
5558
5558
|
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
5559
5559
|
}, []);
|
|
5560
5560
|
const v = $(
|
|
5561
|
-
(f,
|
|
5561
|
+
(f, g, m) => {
|
|
5562
5562
|
l(
|
|
5563
5563
|
(x) => x.map(
|
|
5564
|
-
(j) => j.id ===
|
|
5564
|
+
(j) => j.id === g ? { ...j, [m]: f } : j
|
|
5565
5565
|
)
|
|
5566
5566
|
);
|
|
5567
5567
|
},
|
|
5568
5568
|
[]
|
|
5569
|
-
),
|
|
5570
|
-
const f = Ai(),
|
|
5571
|
-
l((
|
|
5572
|
-
}, [s]),
|
|
5573
|
-
l((
|
|
5569
|
+
), h = $(() => {
|
|
5570
|
+
const f = Ai(), g = s.reduce((m, x) => (m[x.field] = x.field === "id" ? f : "", m), {});
|
|
5571
|
+
l((m) => [...m, { id: f, ...g }]);
|
|
5572
|
+
}, [s]), p = $((f) => {
|
|
5573
|
+
l((g) => g.filter((m) => m.id !== f));
|
|
5574
5574
|
}, []), y = $(
|
|
5575
5575
|
() => ({
|
|
5576
5576
|
isValidating: !1,
|
|
@@ -5582,7 +5582,7 @@ function Bs({
|
|
|
5582
5582
|
/* @__PURE__ */ n.jsx("div", { className: "flex justify-end", children: !o && /* @__PURE__ */ n.jsx(
|
|
5583
5583
|
"button",
|
|
5584
5584
|
{
|
|
5585
|
-
onClick:
|
|
5585
|
+
onClick: h,
|
|
5586
5586
|
type: "button",
|
|
5587
5587
|
className: "px-2 py-1 mb-3 text-xs text-white bg-gray-600 rounded hover:bg-gray-700",
|
|
5588
5588
|
children: "Add Row"
|
|
@@ -5595,18 +5595,18 @@ function Bs({
|
|
|
5595
5595
|
style: { maxWidth: `${r}px` },
|
|
5596
5596
|
children: /* @__PURE__ */ n.jsxs("table", { className: "min-w-max w-full text-sm border-collapse rounded table-auto bg-gray-50", children: [
|
|
5597
5597
|
/* @__PURE__ */ n.jsx("thead", { children: /* @__PURE__ */ n.jsxs("tr", { className: "bg-gray-100", children: [
|
|
5598
|
-
s.map((f,
|
|
5599
|
-
var
|
|
5598
|
+
s.map((f, g) => {
|
|
5599
|
+
var m;
|
|
5600
5600
|
return /* @__PURE__ */ n.jsxs(
|
|
5601
5601
|
"th",
|
|
5602
5602
|
{
|
|
5603
5603
|
className: "px-3 py-2 text-xs font-semibold text-left text-gray-600 border whitespace-nowrap",
|
|
5604
5604
|
children: [
|
|
5605
|
-
(
|
|
5605
|
+
(m = f.headerName) != null ? m : String(f.field),
|
|
5606
5606
|
f.validate && /* @__PURE__ */ n.jsx("span", { className: "ml-1 text-blue-600", children: "*" })
|
|
5607
5607
|
]
|
|
5608
5608
|
},
|
|
5609
|
-
`${String(f.id)}-${
|
|
5609
|
+
`${String(f.id)}-${g}`
|
|
5610
5610
|
);
|
|
5611
5611
|
}),
|
|
5612
5612
|
!o && /* @__PURE__ */ n.jsx("th", { className: "w-10 px-2 py-2 border" })
|
|
@@ -5623,7 +5623,7 @@ function Bs({
|
|
|
5623
5623
|
debouncedValidate: () => {
|
|
5624
5624
|
},
|
|
5625
5625
|
getValidationStatus: y,
|
|
5626
|
-
deleteRow:
|
|
5626
|
+
deleteRow: p
|
|
5627
5627
|
},
|
|
5628
5628
|
f.id
|
|
5629
5629
|
)) : /* @__PURE__ */ n.jsx("tr", { children: /* @__PURE__ */ n.jsx(
|
|
@@ -5681,37 +5681,37 @@ const ge = ({
|
|
|
5681
5681
|
trigger: r,
|
|
5682
5682
|
isMultiple: c = !1,
|
|
5683
5683
|
isFloatingLabel: v = !1,
|
|
5684
|
-
subText:
|
|
5685
|
-
labelClass:
|
|
5684
|
+
subText: h,
|
|
5685
|
+
labelClass: p = "",
|
|
5686
5686
|
loading: y,
|
|
5687
5687
|
disabled: f
|
|
5688
5688
|
}) => {
|
|
5689
|
-
const [
|
|
5689
|
+
const [g, m] = P(c ? [] : null), x = q("custom-select__control", i), j = oi(() => e, [e]);
|
|
5690
5690
|
return D(() => {
|
|
5691
5691
|
const S = e == null ? void 0 : e.find((N) => {
|
|
5692
5692
|
var A;
|
|
5693
5693
|
return typeof N.value == "string" && typeof d == "string" ? N.value.toLowerCase() === d.toLowerCase() : typeof N.value == "object" && typeof d == "object" ? ((A = N.value) == null ? void 0 : A.id) === (d == null ? void 0 : d.id) : N.value === d;
|
|
5694
5694
|
});
|
|
5695
|
-
|
|
5695
|
+
m(S || null);
|
|
5696
5696
|
}, [d, e]), D(() => {
|
|
5697
|
-
|
|
5698
|
-
}, [u,
|
|
5697
|
+
g && l && a && (l(u, g == null ? void 0 : g.value), a(u), r == null || r(u));
|
|
5698
|
+
}, [u, g]), /* @__PURE__ */ n.jsxs("div", { className: "custom-select", children: [
|
|
5699
5699
|
t && !v && /* @__PURE__ */ n.jsx("label", { className: "custom-select__label", children: t }),
|
|
5700
|
-
v && t && /* @__PURE__ */ n.jsx("label", { className: q("custom-select__floating-label",
|
|
5700
|
+
v && t && /* @__PURE__ */ n.jsx("label", { className: q("custom-select__floating-label", p), children: t }),
|
|
5701
5701
|
/* @__PURE__ */ n.jsx(
|
|
5702
5702
|
di,
|
|
5703
5703
|
{
|
|
5704
|
-
value:
|
|
5705
|
-
onChange:
|
|
5704
|
+
value: g,
|
|
5705
|
+
onChange: m,
|
|
5706
5706
|
multiple: c,
|
|
5707
5707
|
disabled: f,
|
|
5708
5708
|
children: /* @__PURE__ */ n.jsxs("div", { className: "custom-select__wrapper", children: [
|
|
5709
5709
|
/* @__PURE__ */ n.jsxs(di.Button, { className: x, disabled: f, children: [
|
|
5710
|
-
y ? /* @__PURE__ */ n.jsx("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ n.jsx("span", { className: "custom-select__value", children: (
|
|
5710
|
+
y ? /* @__PURE__ */ n.jsx("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ n.jsx("span", { className: "custom-select__value", children: (g == null ? void 0 : g.label) || /* @__PURE__ */ n.jsx("span", { className: "custom-select__placeholder", children: o }) }),
|
|
5711
5711
|
/* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(_, { icon: "lucide:chevron-down" }) })
|
|
5712
5712
|
] }),
|
|
5713
5713
|
/* @__PURE__ */ n.jsx(
|
|
5714
|
-
|
|
5714
|
+
wi,
|
|
5715
5715
|
{
|
|
5716
5716
|
as: mi.Fragment,
|
|
5717
5717
|
leave: "custom-select__transition",
|
|
@@ -5741,10 +5741,10 @@ const ge = ({
|
|
|
5741
5741
|
] })
|
|
5742
5742
|
}
|
|
5743
5743
|
),
|
|
5744
|
-
|
|
5744
|
+
h && !s && /* @__PURE__ */ n.jsx("p", { className: "custom-select__subtext", children: h }),
|
|
5745
5745
|
s && /* @__PURE__ */ n.jsx("span", { className: "custom-select__error", children: s.message })
|
|
5746
5746
|
] });
|
|
5747
|
-
},
|
|
5747
|
+
}, ws = ({
|
|
5748
5748
|
element: i,
|
|
5749
5749
|
validationData: e
|
|
5750
5750
|
}) => {
|
|
@@ -5755,25 +5755,25 @@ const ge = ({
|
|
|
5755
5755
|
setValue: a,
|
|
5756
5756
|
watch: l,
|
|
5757
5757
|
isReadOnly: u
|
|
5758
|
-
} = e || {}, t = (f = i == null ? void 0 : i.id) != null ? f : "cascadeValue", [d, r] = P(""), [c, v] = P(""),
|
|
5759
|
-
const x =
|
|
5758
|
+
} = e || {}, t = (f = i == null ? void 0 : i.id) != null ? f : "cascadeValue", [d, r] = P(""), [c, v] = P(""), h = (g, m) => {
|
|
5759
|
+
const x = g && m ? `${g}_${m}` : "";
|
|
5760
5760
|
a == null || a(t, x), s == null || s(t);
|
|
5761
|
-
},
|
|
5762
|
-
|
|
5761
|
+
}, p = (g, m) => {
|
|
5762
|
+
g === "first" ? (r(m), v(""), h(m, "")) : (v(m), h(d, m));
|
|
5763
5763
|
};
|
|
5764
5764
|
D(() => {
|
|
5765
5765
|
if (l) {
|
|
5766
|
-
const
|
|
5767
|
-
if (
|
|
5768
|
-
const [
|
|
5769
|
-
r(
|
|
5766
|
+
const g = l(t);
|
|
5767
|
+
if (g != null && g.includes("_")) {
|
|
5768
|
+
const [m, x] = g.split("_");
|
|
5769
|
+
r(m), v(x);
|
|
5770
5770
|
}
|
|
5771
5771
|
}
|
|
5772
5772
|
}, [l, t]);
|
|
5773
5773
|
const y = oi(
|
|
5774
5774
|
() => {
|
|
5775
|
-
var
|
|
5776
|
-
return (
|
|
5775
|
+
var g;
|
|
5776
|
+
return (g = i.options1) == null ? void 0 : g.filter((m) => m.key === d);
|
|
5777
5777
|
},
|
|
5778
5778
|
[i.options1, d]
|
|
5779
5779
|
);
|
|
@@ -5782,7 +5782,7 @@ const ge = ({
|
|
|
5782
5782
|
/* @__PURE__ */ n.jsx("div", { className: "relative", children: /* @__PURE__ */ n.jsx(
|
|
5783
5783
|
ge,
|
|
5784
5784
|
{
|
|
5785
|
-
setValue: (
|
|
5785
|
+
setValue: (g, m) => p("first", m),
|
|
5786
5786
|
options: i.options,
|
|
5787
5787
|
name: `${t}`,
|
|
5788
5788
|
register: o,
|
|
@@ -5794,7 +5794,7 @@ const ge = ({
|
|
|
5794
5794
|
/* @__PURE__ */ n.jsx(
|
|
5795
5795
|
ge,
|
|
5796
5796
|
{
|
|
5797
|
-
setValue: (
|
|
5797
|
+
setValue: (g, m) => p("second", m),
|
|
5798
5798
|
options: y,
|
|
5799
5799
|
name: `${t}`,
|
|
5800
5800
|
register: o,
|
|
@@ -5803,7 +5803,7 @@ const ge = ({
|
|
|
5803
5803
|
)
|
|
5804
5804
|
] })
|
|
5805
5805
|
] });
|
|
5806
|
-
},
|
|
5806
|
+
}, Ls = ({
|
|
5807
5807
|
value: i = 0,
|
|
5808
5808
|
max: e = 5,
|
|
5809
5809
|
readOnly: o = !1,
|
|
@@ -5813,19 +5813,19 @@ const ge = ({
|
|
|
5813
5813
|
element: u,
|
|
5814
5814
|
validationData: t
|
|
5815
5815
|
}) => {
|
|
5816
|
-
var
|
|
5816
|
+
var m;
|
|
5817
5817
|
const {
|
|
5818
5818
|
register: d = () => ({}),
|
|
5819
5819
|
trigger: r,
|
|
5820
5820
|
setValue: c,
|
|
5821
5821
|
watch: v,
|
|
5822
|
-
isReadOnly:
|
|
5823
|
-
} = t || {},
|
|
5822
|
+
isReadOnly: h
|
|
5823
|
+
} = t || {}, p = (m = v == null ? void 0 : v(u.id)) != null ? m : 0, [y, f] = P(null);
|
|
5824
5824
|
D(() => {
|
|
5825
|
-
|
|
5825
|
+
p == null && (c == null || c(u.id, i));
|
|
5826
5826
|
}, []);
|
|
5827
|
-
const
|
|
5828
|
-
if (!o && !
|
|
5827
|
+
const g = (x) => {
|
|
5828
|
+
if (!o && !h) {
|
|
5829
5829
|
const j = x + 1;
|
|
5830
5830
|
c == null || c(u.id, j), r == null || r(u.id), s == null || s(j);
|
|
5831
5831
|
}
|
|
@@ -5833,7 +5833,7 @@ const ge = ({
|
|
|
5833
5833
|
return /* @__PURE__ */ n.jsxs("div", { className: `flex gap-1 ${l}`, children: [
|
|
5834
5834
|
/* @__PURE__ */ n.jsx("input", { type: "hidden", ...d(u.id) }),
|
|
5835
5835
|
Array.from({ length: e }, (x, j) => {
|
|
5836
|
-
const S = y !== null ? j <= y : j <
|
|
5836
|
+
const S = y !== null ? j <= y : j < p;
|
|
5837
5837
|
return /* @__PURE__ */ n.jsx(
|
|
5838
5838
|
Oe,
|
|
5839
5839
|
{
|
|
@@ -5841,9 +5841,9 @@ const ge = ({
|
|
|
5841
5841
|
className: `cursor-pointer transition-colors ${S ? "text-yellow-400" : "text-gray-300"}`,
|
|
5842
5842
|
width: a,
|
|
5843
5843
|
height: a,
|
|
5844
|
-
onMouseEnter: () => !(o ||
|
|
5845
|
-
onMouseLeave: () => !(o ||
|
|
5846
|
-
onClick: () =>
|
|
5844
|
+
onMouseEnter: () => !(o || h) && f(j),
|
|
5845
|
+
onMouseLeave: () => !(o || h) && f(null),
|
|
5846
|
+
onClick: () => g(j)
|
|
5847
5847
|
},
|
|
5848
5848
|
j
|
|
5849
5849
|
);
|
|
@@ -5863,22 +5863,22 @@ function fe({
|
|
|
5863
5863
|
} = e || {}, t = (u == null ? void 0 : u(i.id)) || "", { country: d, state: r } = oi(() => {
|
|
5864
5864
|
var y;
|
|
5865
5865
|
if (typeof t == "string" && t.includes(",")) {
|
|
5866
|
-
const [f,
|
|
5867
|
-
return { country:
|
|
5866
|
+
const [f, g] = (y = t.split(",")) == null ? void 0 : y.map((m) => m.trim());
|
|
5867
|
+
return { country: g, state: f };
|
|
5868
5868
|
}
|
|
5869
5869
|
return { country: t, state: "" };
|
|
5870
5870
|
}, [t]), c = Ci(t), v = oi(() => {
|
|
5871
5871
|
var y, f;
|
|
5872
|
-
return d ? ((f = (y = Xi.find((
|
|
5873
|
-
label:
|
|
5874
|
-
value:
|
|
5872
|
+
return d ? ((f = (y = Xi.find((g) => g.name === d)) == null ? void 0 : y.states) == null ? void 0 : f.map((g) => ({
|
|
5873
|
+
label: g.name,
|
|
5874
|
+
value: g.name
|
|
5875
5875
|
}))) || [] : [];
|
|
5876
|
-
}, [d]),
|
|
5877
|
-
const
|
|
5878
|
-
s &&
|
|
5879
|
-
},
|
|
5880
|
-
const
|
|
5881
|
-
s &&
|
|
5876
|
+
}, [d]), h = (y, f) => {
|
|
5877
|
+
const m = (f == null ? void 0 : f.value) || "";
|
|
5878
|
+
s && m !== c.current && (s(i.id, m), a == null || a(i.id), c.current = m);
|
|
5879
|
+
}, p = (y, f) => {
|
|
5880
|
+
const g = (f == null ? void 0 : f.value) || "", m = g ? `${g}, ${d}` : d;
|
|
5881
|
+
s && m !== c.current && (s(i.id, m), a == null || a(i.id), c.current = m);
|
|
5882
5882
|
};
|
|
5883
5883
|
return D(() => {
|
|
5884
5884
|
c.current = t;
|
|
@@ -5888,7 +5888,7 @@ function fe({
|
|
|
5888
5888
|
Tn,
|
|
5889
5889
|
{
|
|
5890
5890
|
options: i.options,
|
|
5891
|
-
onGetValue:
|
|
5891
|
+
onGetValue: h,
|
|
5892
5892
|
name: `${i.id}-country`,
|
|
5893
5893
|
readOnly: l,
|
|
5894
5894
|
defaultValue: d
|
|
@@ -5901,7 +5901,7 @@ function fe({
|
|
|
5901
5901
|
Tn,
|
|
5902
5902
|
{
|
|
5903
5903
|
options: v,
|
|
5904
|
-
onGetValue:
|
|
5904
|
+
onGetValue: p,
|
|
5905
5905
|
name: `${i.id}-state`,
|
|
5906
5906
|
readOnly: l,
|
|
5907
5907
|
defaultValue: r
|
|
@@ -5915,19 +5915,19 @@ function Ps({
|
|
|
5915
5915
|
element: i,
|
|
5916
5916
|
validationData: e
|
|
5917
5917
|
}) {
|
|
5918
|
-
const { register: o = () => ({}), isReadOnly: s } = e || {}, { validationUrl: a, documentObj: l, signatureLink: u } = i, t = oi(() => xi("config"), []), [d, r] = P(!1), [c, v] = P(!1),
|
|
5919
|
-
var
|
|
5918
|
+
const { register: o = () => ({}), isReadOnly: s } = e || {}, { validationUrl: a, documentObj: l, signatureLink: u } = i, t = oi(() => xi("config"), []), [d, r] = P(!1), [c, v] = P(!1), h = $(async () => {
|
|
5919
|
+
var p, y;
|
|
5920
5920
|
if (!(!a || !l))
|
|
5921
5921
|
try {
|
|
5922
5922
|
v(!0);
|
|
5923
|
-
const
|
|
5923
|
+
const g = {
|
|
5924
5924
|
headers: {
|
|
5925
5925
|
Authorization: `Bearer ${xi("token")}`
|
|
5926
5926
|
}
|
|
5927
|
-
}, { data:
|
|
5927
|
+
}, { data: m } = await Ii.get(
|
|
5928
5928
|
`${a}/${l}`,
|
|
5929
|
-
|
|
5930
|
-
), x = !!((y = (
|
|
5929
|
+
g
|
|
5930
|
+
), x = !!((y = (p = m == null ? void 0 : m.data) == null ? void 0 : p.isSigned) != null ? y : m != null && m.isSigned);
|
|
5931
5931
|
return r(x), x;
|
|
5932
5932
|
} catch (f) {
|
|
5933
5933
|
console.error("Failed to check sign status", f);
|
|
@@ -5936,15 +5936,15 @@ function Ps({
|
|
|
5936
5936
|
}
|
|
5937
5937
|
}, [a, l]);
|
|
5938
5938
|
return D(() => {
|
|
5939
|
-
let
|
|
5939
|
+
let p = null;
|
|
5940
5940
|
return !d && l && a && (async () => {
|
|
5941
|
-
await
|
|
5942
|
-
await
|
|
5941
|
+
await h() || (p = setInterval(async () => {
|
|
5942
|
+
await h() && p && clearInterval(p);
|
|
5943
5943
|
}, 2e3));
|
|
5944
5944
|
})(), () => {
|
|
5945
|
-
|
|
5945
|
+
p && clearInterval(p);
|
|
5946
5946
|
};
|
|
5947
|
-
}, [
|
|
5947
|
+
}, [h, d, l, a]), /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
5948
5948
|
/* @__PURE__ */ n.jsx(
|
|
5949
5949
|
"input",
|
|
5950
5950
|
{
|
|
@@ -5959,7 +5959,7 @@ function Ps({
|
|
|
5959
5959
|
"button",
|
|
5960
5960
|
{
|
|
5961
5961
|
type: "button",
|
|
5962
|
-
onClick:
|
|
5962
|
+
onClick: h,
|
|
5963
5963
|
disabled: c || d,
|
|
5964
5964
|
style: { background: (t == null ? void 0 : t.buttonColor) || "#333" },
|
|
5965
5965
|
className: q(
|
|
@@ -6239,39 +6239,39 @@ function Rs({
|
|
|
6239
6239
|
readOnly: r,
|
|
6240
6240
|
horizontal: c,
|
|
6241
6241
|
description: v,
|
|
6242
|
-
validate:
|
|
6243
|
-
onChange:
|
|
6242
|
+
validate: h,
|
|
6243
|
+
onChange: p,
|
|
6244
6244
|
onError: y
|
|
6245
6245
|
}) {
|
|
6246
|
-
const [f,
|
|
6246
|
+
const [f, g] = P(""), [m, x] = P(null), [j, S] = P(""), N = oi(
|
|
6247
6247
|
() => {
|
|
6248
|
-
var
|
|
6249
|
-
return (
|
|
6248
|
+
var w;
|
|
6249
|
+
return (w = fn == null ? void 0 : fn.slice().sort((W, I) => W.label.localeCompare(I.label))) == null ? void 0 : w.map((W) => ({ ...W, phone: `+${W.phone}` }));
|
|
6250
6250
|
},
|
|
6251
6251
|
[]
|
|
6252
6252
|
), A = oi(() => f ? N.filter(
|
|
6253
|
-
(
|
|
6254
|
-
) : N, [f, N]), k = (
|
|
6255
|
-
if (!
|
|
6256
|
-
const W =
|
|
6253
|
+
(w) => `${w.label} ${w.phone}`.toLowerCase().includes(f.toLowerCase())
|
|
6254
|
+
) : N, [f, N]), k = (m == null ? void 0 : m.min) || 10, O = (m == null ? void 0 : m.max) || 10, ii = () => j ? `${(m == null ? void 0 : m.phone) || "+234"}-${j}` : "", z = (w) => {
|
|
6255
|
+
if (!w) return { code: "+234", number: "" };
|
|
6256
|
+
const W = w.split(/[-\s]/);
|
|
6257
6257
|
return { code: W[0], number: W.slice(1).join(" ") };
|
|
6258
6258
|
};
|
|
6259
6259
|
D(() => {
|
|
6260
6260
|
if (u) {
|
|
6261
|
-
const
|
|
6261
|
+
const w = z(u);
|
|
6262
6262
|
x(
|
|
6263
|
-
N.find((W) => W.phone ===
|
|
6264
|
-
), S(
|
|
6263
|
+
N.find((W) => W.phone === w.code) || N[0]
|
|
6264
|
+
), S(w.number);
|
|
6265
6265
|
}
|
|
6266
6266
|
}, [u, N]);
|
|
6267
6267
|
const Z = oi(() => {
|
|
6268
6268
|
if (t) return t;
|
|
6269
|
-
const
|
|
6270
|
-
return s &&
|
|
6269
|
+
const w = j.length;
|
|
6270
|
+
return s && w === 0 ? "Phone number is required" : w > 0 && !/^\d+$/.test(j) ? "Phone number must contain only digits" : w > 0 && w < k ? `Minimum length is ${k}` : w > O ? `Maximum length is ${O}` : "";
|
|
6271
6271
|
}, [t, j, k, O, s]);
|
|
6272
6272
|
return D(() => {
|
|
6273
|
-
|
|
6274
|
-
}, [j,
|
|
6273
|
+
p == null || p(ii()), y == null || y(Z || null);
|
|
6274
|
+
}, [j, m, Z]), /* @__PURE__ */ n.jsxs(
|
|
6275
6275
|
"div",
|
|
6276
6276
|
{
|
|
6277
6277
|
className: `relative formGroup ${Z && !r ? "has-error" : ""} ${c ? "flex" : ""} ${!Z && j.length > 0 && !r ? "is-valid" : ""}`,
|
|
@@ -6291,29 +6291,29 @@ function Rs({
|
|
|
6291
6291
|
),
|
|
6292
6292
|
/* @__PURE__ */ n.jsxs("div", { className: "relative !flex items-center input-control text-[#667085] !py-0 field-control", children: [
|
|
6293
6293
|
/* @__PURE__ */ n.jsx(_, { icon: "lucide:phone-call" }),
|
|
6294
|
-
/* @__PURE__ */ n.jsx(Ri, { value:
|
|
6294
|
+
/* @__PURE__ */ n.jsx(Ri, { value: m, onChange: x, children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
|
|
6295
6295
|
/* @__PURE__ */ n.jsx(
|
|
6296
6296
|
Ri.Input,
|
|
6297
6297
|
{
|
|
6298
6298
|
className: "pl-3 pr-4 mr-1 text-sm bg-white py-[10px] outline-none whitespace-nowrap max-w-[70px]",
|
|
6299
|
-
displayValue: (
|
|
6299
|
+
displayValue: (w) => (w == null ? void 0 : w.phone) || "+234",
|
|
6300
6300
|
placeholder: "+234",
|
|
6301
|
-
onChange: (
|
|
6301
|
+
onChange: (w) => g(w.target.value)
|
|
6302
6302
|
}
|
|
6303
6303
|
),
|
|
6304
6304
|
/* @__PURE__ */ n.jsx(Ri.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n.jsx(_, { icon: "lucide:chevron-down" }) }),
|
|
6305
|
-
/* @__PURE__ */ n.jsx(Ri.Options, { className: "absolute z-10 w-[250px] left-0 bg-white border rounded-md shadow-lg max-h-[400px] overflow-y-auto", children: A == null ? void 0 : A.map((
|
|
6305
|
+
/* @__PURE__ */ n.jsx(Ri.Options, { className: "absolute z-10 w-[250px] left-0 bg-white border rounded-md shadow-lg max-h-[400px] overflow-y-auto", children: A == null ? void 0 : A.map((w, W) => /* @__PURE__ */ n.jsxs(
|
|
6306
6306
|
Ri.Option,
|
|
6307
6307
|
{
|
|
6308
|
-
value:
|
|
6308
|
+
value: w,
|
|
6309
6309
|
className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
|
|
6310
6310
|
children: [
|
|
6311
|
-
|
|
6311
|
+
w.phone,
|
|
6312
6312
|
" - ",
|
|
6313
|
-
|
|
6313
|
+
w.label
|
|
6314
6314
|
]
|
|
6315
6315
|
},
|
|
6316
|
-
`${
|
|
6316
|
+
`${w.code}+ ${W}`
|
|
6317
6317
|
)) })
|
|
6318
6318
|
] }) }),
|
|
6319
6319
|
/* @__PURE__ */ n.jsxs("div", { className: "relative flex items-center flex-1 z-[1]", children: [
|
|
@@ -6325,8 +6325,8 @@ function Rs({
|
|
|
6325
6325
|
value: j,
|
|
6326
6326
|
disabled: d,
|
|
6327
6327
|
readOnly: r,
|
|
6328
|
-
onChange: (
|
|
6329
|
-
const W =
|
|
6328
|
+
onChange: (w) => {
|
|
6329
|
+
const W = w.target.value.replace(/\D/g, "");
|
|
6330
6330
|
S(W);
|
|
6331
6331
|
},
|
|
6332
6332
|
placeholder: e,
|
|
@@ -6448,8 +6448,8 @@ const He = {
|
|
|
6448
6448
|
header: ks,
|
|
6449
6449
|
basicText: Cs,
|
|
6450
6450
|
phoneField: Ds,
|
|
6451
|
-
cascadeSelect:
|
|
6452
|
-
rating:
|
|
6451
|
+
cascadeSelect: ws,
|
|
6452
|
+
rating: Ls,
|
|
6453
6453
|
country: fe,
|
|
6454
6454
|
bank: fe,
|
|
6455
6455
|
document: Ps,
|
|
@@ -6489,10 +6489,10 @@ const He = {
|
|
|
6489
6489
|
moveElement: r,
|
|
6490
6490
|
isDragging: c,
|
|
6491
6491
|
removeElement: v
|
|
6492
|
-
} = ji(gi),
|
|
6492
|
+
} = ji(gi), h = oi(
|
|
6493
6493
|
() => Array.from({ length: i.columns }),
|
|
6494
6494
|
[i.columns]
|
|
6495
|
-
), [
|
|
6495
|
+
), [p, y] = P(null);
|
|
6496
6496
|
D(() => {
|
|
6497
6497
|
const S = () => {
|
|
6498
6498
|
y(null), d(!1);
|
|
@@ -6504,12 +6504,12 @@ const He = {
|
|
|
6504
6504
|
S.preventDefault(), S.stopPropagation(), S.dataTransfer.dropEffect = "move", y(N);
|
|
6505
6505
|
},
|
|
6506
6506
|
[]
|
|
6507
|
-
),
|
|
6507
|
+
), g = $(
|
|
6508
6508
|
(S, N) => {
|
|
6509
6509
|
S.preventDefault(), S.stopPropagation(), y(N);
|
|
6510
6510
|
},
|
|
6511
6511
|
[]
|
|
6512
|
-
),
|
|
6512
|
+
), m = $(
|
|
6513
6513
|
(S, N) => {
|
|
6514
6514
|
const A = S.relatedTarget;
|
|
6515
6515
|
A && S.currentTarget.contains(A) || y((k) => k === N ? null : k);
|
|
@@ -6534,13 +6534,13 @@ const He = {
|
|
|
6534
6534
|
if (!ii) return;
|
|
6535
6535
|
const z = JSON.parse(ii);
|
|
6536
6536
|
if ((z == null ? void 0 : z.type) === "grid") return;
|
|
6537
|
-
const Z = u.find((I) => I.id === e),
|
|
6537
|
+
const Z = u.find((I) => I.id === e), w = (O = Z == null ? void 0 : Z.questionData) == null ? void 0 : O.find(
|
|
6538
6538
|
(I) => {
|
|
6539
6539
|
var G;
|
|
6540
6540
|
return I.gridId === i.id && ((G = I.gridPosition) == null ? void 0 : G.col) === A;
|
|
6541
6541
|
}
|
|
6542
6542
|
);
|
|
6543
|
-
|
|
6543
|
+
w && v(w.id, e);
|
|
6544
6544
|
const W = {
|
|
6545
6545
|
...z,
|
|
6546
6546
|
id: Ai(),
|
|
@@ -6564,7 +6564,7 @@ const He = {
|
|
|
6564
6564
|
), ii = (R = O == null ? void 0 : O.id) != null ? R : null, z = Array.isArray(o) && o.find((T) => {
|
|
6565
6565
|
var E;
|
|
6566
6566
|
return ((E = T == null ? void 0 : T.props) == null ? void 0 : E.col) === k;
|
|
6567
|
-
}), Z = c &&
|
|
6567
|
+
}), Z = c && p === S, w = !!z, W = c && !!l, I = w && ii && A === "edit" ? {
|
|
6568
6568
|
draggable: !0,
|
|
6569
6569
|
onDragStart: (T) => {
|
|
6570
6570
|
T.stopPropagation(), T.dataTransfer.setData("elementId", ii), T.dataTransfer.setData("properties", ii), T.dataTransfer.effectAllowed = "move", d(!0);
|
|
@@ -6579,29 +6579,29 @@ const He = {
|
|
|
6579
6579
|
id: `grid-cell-${i.id}-${S}`,
|
|
6580
6580
|
...I,
|
|
6581
6581
|
onDrop: (T) => x(T, S),
|
|
6582
|
-
onDragEnter: (T) =>
|
|
6582
|
+
onDragEnter: (T) => g(T, S),
|
|
6583
6583
|
onDragOver: (T) => f(T, S),
|
|
6584
|
-
onDragLeave: (T) =>
|
|
6584
|
+
onDragLeave: (T) => m(T, S),
|
|
6585
6585
|
className: q(
|
|
6586
6586
|
"relative border rounded-lg min-h-[110px]",
|
|
6587
6587
|
"flex items-center justify-center",
|
|
6588
6588
|
"transition-all duration-200 ease-in-out",
|
|
6589
6589
|
A === "edit" ? "py-3 " : "",
|
|
6590
|
-
|
|
6590
|
+
w && A === "edit" && "cursor-grab active:cursor-grabbing border-none",
|
|
6591
6591
|
N,
|
|
6592
6592
|
!W && !Z && "bg-white border-gray-200 text-gray-300",
|
|
6593
|
-
W && !Z && !
|
|
6594
|
-
W && !Z &&
|
|
6595
|
-
Z && !
|
|
6596
|
-
Z &&
|
|
6593
|
+
W && !Z && !w && "bg-blue-50 border-blue-200 border-dashed text-blue-300",
|
|
6594
|
+
W && !Z && w && "bg-white border-orange-200 border-dashed",
|
|
6595
|
+
Z && !w && "bg-blue-100 border-blue-400 border-dashed shadow-inner scale-[1.01] text-blue-500",
|
|
6596
|
+
Z && w && "bg-orange-50 border-orange-400 border-dashed shadow-inner scale-[1.01] text-orange-500"
|
|
6597
6597
|
),
|
|
6598
6598
|
children: [
|
|
6599
|
-
|
|
6600
|
-
Z && !
|
|
6599
|
+
w && A === "edit" && /* @__PURE__ */ n.jsx("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__ */ n.jsx(_, { icon: "ph:dots-six-bold" }) }),
|
|
6600
|
+
Z && !w && /* @__PURE__ */ n.jsxs("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: [
|
|
6601
6601
|
/* @__PURE__ */ n.jsx(_, { icon: "ph:plus-bold" }),
|
|
6602
6602
|
"Drop here"
|
|
6603
6603
|
] }),
|
|
6604
|
-
Z &&
|
|
6604
|
+
Z && w && /* @__PURE__ */ n.jsx("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" }),
|
|
6605
6605
|
/* @__PURE__ */ n.jsx(
|
|
6606
6606
|
"div",
|
|
6607
6607
|
{
|
|
@@ -6623,7 +6623,7 @@ const He = {
|
|
|
6623
6623
|
style: {
|
|
6624
6624
|
gridTemplateColumns: `repeat(${i.columns}, 1fr)`
|
|
6625
6625
|
},
|
|
6626
|
-
children:
|
|
6626
|
+
children: h == null ? void 0 : h.map(
|
|
6627
6627
|
(S, N) => j(N, s, a)
|
|
6628
6628
|
)
|
|
6629
6629
|
}
|
|
@@ -6674,13 +6674,13 @@ function Hs({ elementData: i, sectionId: e }) {
|
|
|
6674
6674
|
moveElement: u
|
|
6675
6675
|
} = ji(gi), [t, d] = P(null), r = oi(
|
|
6676
6676
|
() => {
|
|
6677
|
-
var
|
|
6678
|
-
return ((
|
|
6677
|
+
var m;
|
|
6678
|
+
return ((m = o.find((x) => x.id === e)) == null ? void 0 : m.questionData) || [];
|
|
6679
6679
|
},
|
|
6680
6680
|
[o, e]
|
|
6681
6681
|
), c = $(
|
|
6682
|
-
(
|
|
6683
|
-
|
|
6682
|
+
(m, x) => {
|
|
6683
|
+
m.dataTransfer.setData("elementId", x), m.dataTransfer.setData("properties", x), m.dataTransfer.effectAllowed = "move", d(x), a(!0);
|
|
6684
6684
|
},
|
|
6685
6685
|
[a]
|
|
6686
6686
|
), v = $(() => {
|
|
@@ -6689,10 +6689,10 @@ function Hs({ elementData: i, sectionId: e }) {
|
|
|
6689
6689
|
D(() => {
|
|
6690
6690
|
!s && t && d(null);
|
|
6691
6691
|
}, [s, t]);
|
|
6692
|
-
const
|
|
6693
|
-
(
|
|
6694
|
-
|
|
6695
|
-
const x =
|
|
6692
|
+
const h = $(
|
|
6693
|
+
(m) => {
|
|
6694
|
+
m.preventDefault(), m.stopPropagation();
|
|
6695
|
+
const x = m.dataTransfer.getData("elementId"), j = m.currentTarget.id;
|
|
6696
6696
|
if (!x || !j || x === j) {
|
|
6697
6697
|
v();
|
|
6698
6698
|
return;
|
|
@@ -6703,16 +6703,16 @@ function Hs({ elementData: i, sectionId: e }) {
|
|
|
6703
6703
|
S != null && S.gridId && N !== -1 ? u({ draggedId: x, sectionId: e, targetIndex: N }) : u({ draggedId: x, sectionId: e, targetId: j }), d(null), a(!1);
|
|
6704
6704
|
},
|
|
6705
6705
|
[e, u, a, v, r]
|
|
6706
|
-
),
|
|
6707
|
-
(
|
|
6708
|
-
|
|
6709
|
-
const j =
|
|
6706
|
+
), p = $(
|
|
6707
|
+
(m, x) => {
|
|
6708
|
+
m.preventDefault(), m.stopPropagation(), a(!1);
|
|
6709
|
+
const j = m.dataTransfer.getData("elementId");
|
|
6710
6710
|
if (j) {
|
|
6711
6711
|
u({ draggedId: j, sectionId: e, targetIndex: x }), d(null);
|
|
6712
6712
|
return;
|
|
6713
6713
|
}
|
|
6714
6714
|
try {
|
|
6715
|
-
const S = JSON.parse(
|
|
6715
|
+
const S = JSON.parse(m.dataTransfer.getData("properties"));
|
|
6716
6716
|
if ((S == null ? void 0 : S.type) === "section") return;
|
|
6717
6717
|
const N = { ...S, id: Ai(), sectionId: e };
|
|
6718
6718
|
l(N, e, x), d(null);
|
|
@@ -6722,75 +6722,75 @@ function Hs({ elementData: i, sectionId: e }) {
|
|
|
6722
6722
|
},
|
|
6723
6723
|
[l, e, a, u]
|
|
6724
6724
|
), y = $(
|
|
6725
|
-
(
|
|
6725
|
+
(m, x = !1) => /* @__PURE__ */ n.jsx(
|
|
6726
6726
|
"div",
|
|
6727
6727
|
{
|
|
6728
|
-
id:
|
|
6728
|
+
id: m.id,
|
|
6729
6729
|
draggable: !0,
|
|
6730
|
-
onDragStart: (j) => c(j,
|
|
6730
|
+
onDragStart: (j) => c(j, m.id),
|
|
6731
6731
|
onDragOver: x ? void 0 : (j) => {
|
|
6732
6732
|
j.preventDefault(), j.stopPropagation();
|
|
6733
6733
|
},
|
|
6734
|
-
onDrop: x ? void 0 :
|
|
6734
|
+
onDrop: x ? void 0 : h,
|
|
6735
6735
|
onDragEnd: v,
|
|
6736
6736
|
className: q(
|
|
6737
6737
|
"cursor-grab active:cursor-grabbing border p-4 w-full rounded-lg",
|
|
6738
6738
|
"transition-all duration-200 ease-in-out",
|
|
6739
|
-
t ===
|
|
6739
|
+
t === m.id ? "opacity-40 scale-[0.98] bg-gray-100 border-dashed border-blue-300 shadow-inner" : t ? "bg-white border-dashed border-blue-200 shadow-sm" : "bg-white border-gray-200 shadow-sm hover:border-blue-300 hover:shadow-md"
|
|
6740
6740
|
),
|
|
6741
|
-
children: Os(
|
|
6741
|
+
children: Os(m, e)
|
|
6742
6742
|
},
|
|
6743
|
-
|
|
6743
|
+
m.id
|
|
6744
6744
|
),
|
|
6745
|
-
[t,
|
|
6746
|
-
), f = oi(() => (i == null ? void 0 : i.reduce((
|
|
6745
|
+
[t, h, e, c, v]
|
|
6746
|
+
), f = oi(() => (i == null ? void 0 : i.reduce((m, x) => (x.gridId && (m[x.gridId] = m[x.gridId] || [], m[x.gridId].push(x)), m), {})) || {}, [i]);
|
|
6747
6747
|
if (!(i != null && i.length))
|
|
6748
6748
|
return /* @__PURE__ */ n.jsx(
|
|
6749
6749
|
"div",
|
|
6750
6750
|
{
|
|
6751
|
-
onDragOver: (
|
|
6752
|
-
onDrop: (
|
|
6751
|
+
onDragOver: (m) => m.preventDefault(),
|
|
6752
|
+
onDrop: (m) => p(m, 0),
|
|
6753
6753
|
onDragEnd: v,
|
|
6754
6754
|
className: "w-full h-full flex items-center justify-center text-gray-400 min-h-[200px] p-10 col-span-2 border border-dashed border-gray-300 rounded-lg",
|
|
6755
6755
|
children: "Drag or click an element to display"
|
|
6756
6756
|
}
|
|
6757
6757
|
);
|
|
6758
|
-
const
|
|
6758
|
+
const g = i.filter((m) => !m.gridId);
|
|
6759
6759
|
return /* @__PURE__ */ n.jsxs("div", { className: "relative flex flex-col w-full h-full gap-2", children: [
|
|
6760
6760
|
/* @__PURE__ */ n.jsx(
|
|
6761
6761
|
xn,
|
|
6762
6762
|
{
|
|
6763
6763
|
index: 0,
|
|
6764
6764
|
isDragging: s,
|
|
6765
|
-
onDrop:
|
|
6765
|
+
onDrop: p,
|
|
6766
6766
|
onDragEnd: v
|
|
6767
6767
|
}
|
|
6768
6768
|
),
|
|
6769
|
-
|
|
6770
|
-
const x = r.findIndex((j) => j.id ===
|
|
6771
|
-
if (
|
|
6772
|
-
const j = f[
|
|
6769
|
+
g.map((m) => {
|
|
6770
|
+
const x = r.findIndex((j) => j.id === m.id);
|
|
6771
|
+
if (m.type === "grid") {
|
|
6772
|
+
const j = f[m.id] || [], S = t === m.id, N = !!t && !S;
|
|
6773
6773
|
return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-0", children: [
|
|
6774
6774
|
/* @__PURE__ */ n.jsx(
|
|
6775
6775
|
"div",
|
|
6776
6776
|
{
|
|
6777
|
-
id:
|
|
6777
|
+
id: m.id,
|
|
6778
6778
|
draggable: !0,
|
|
6779
|
-
onDragStart: (A) => c(A,
|
|
6779
|
+
onDragStart: (A) => c(A, m.id),
|
|
6780
6780
|
onDragOver: (A) => {
|
|
6781
6781
|
A.preventDefault(), A.stopPropagation();
|
|
6782
6782
|
},
|
|
6783
|
-
onDrop:
|
|
6783
|
+
onDrop: h,
|
|
6784
6784
|
onDragEnd: v,
|
|
6785
6785
|
className: q(
|
|
6786
6786
|
"w-full p-4 border rounded-lg cursor-grab active:cursor-grabbing",
|
|
6787
6787
|
"transition-all duration-200 ease-in-out",
|
|
6788
6788
|
S ? "opacity-40 scale-[0.98] bg-gray-100 border-dashed border-blue-400 shadow-inner" : N ? "bg-white border-dashed border-blue-200" : "bg-white border-gray-200 shadow-sm hover:border-blue-300 hover:shadow-md"
|
|
6789
6789
|
),
|
|
6790
|
-
children: /* @__PURE__ */ n.jsx(In, { element:
|
|
6790
|
+
children: /* @__PURE__ */ n.jsx(In, { element: m, state: "edit", children: /* @__PURE__ */ n.jsx(
|
|
6791
6791
|
Kn,
|
|
6792
6792
|
{
|
|
6793
|
-
element:
|
|
6793
|
+
element: m,
|
|
6794
6794
|
sectionId: e,
|
|
6795
6795
|
state: Gs,
|
|
6796
6796
|
draggedElementId: t,
|
|
@@ -6809,24 +6809,24 @@ function Hs({ elementData: i, sectionId: e }) {
|
|
|
6809
6809
|
{
|
|
6810
6810
|
index: x + 1,
|
|
6811
6811
|
isDragging: s,
|
|
6812
|
-
onDrop:
|
|
6812
|
+
onDrop: p,
|
|
6813
6813
|
onDragEnd: v
|
|
6814
6814
|
}
|
|
6815
6815
|
)
|
|
6816
|
-
] },
|
|
6816
|
+
] }, m.id);
|
|
6817
6817
|
}
|
|
6818
6818
|
return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-0", children: [
|
|
6819
|
-
y(
|
|
6819
|
+
y(m),
|
|
6820
6820
|
/* @__PURE__ */ n.jsx(
|
|
6821
6821
|
xn,
|
|
6822
6822
|
{
|
|
6823
6823
|
index: x + 1,
|
|
6824
6824
|
isDragging: s,
|
|
6825
|
-
onDrop:
|
|
6825
|
+
onDrop: p,
|
|
6826
6826
|
onDragEnd: v
|
|
6827
6827
|
}
|
|
6828
6828
|
)
|
|
6829
|
-
] },
|
|
6829
|
+
] }, m.id);
|
|
6830
6830
|
})
|
|
6831
6831
|
] });
|
|
6832
6832
|
}
|
|
@@ -6849,9 +6849,9 @@ const Vs = an(Hs), Fs = B.object({
|
|
|
6849
6849
|
if (mi.useEffect(() => {
|
|
6850
6850
|
i || c();
|
|
6851
6851
|
}, [i, c]), !i) return null;
|
|
6852
|
-
const v = (
|
|
6853
|
-
s(
|
|
6854
|
-
},
|
|
6852
|
+
const v = (p) => {
|
|
6853
|
+
s(p, o.id), e();
|
|
6854
|
+
}, h = u();
|
|
6855
6855
|
return /* @__PURE__ */ n.jsx("div", { className: "fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none", children: /* @__PURE__ */ n.jsxs("div", { className: "min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center", children: [
|
|
6856
6856
|
/* @__PURE__ */ n.jsxs("div", { className: "w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6", children: [
|
|
6857
6857
|
/* @__PURE__ */ n.jsx("h2", { className: "text-lg font-semibold text-[#475467] font-onest", children: "Update Section Information" }),
|
|
@@ -6896,7 +6896,7 @@ const Vs = an(Hs), Fs = B.object({
|
|
|
6896
6896
|
errors: t,
|
|
6897
6897
|
watch: u,
|
|
6898
6898
|
type: "checkbox",
|
|
6899
|
-
value:
|
|
6899
|
+
value: h.disabled,
|
|
6900
6900
|
description: "Disables all fields in this section"
|
|
6901
6901
|
}
|
|
6902
6902
|
),
|
|
@@ -6909,7 +6909,7 @@ const Vs = an(Hs), Fs = B.object({
|
|
|
6909
6909
|
errors: t,
|
|
6910
6910
|
watch: u,
|
|
6911
6911
|
type: "checkbox",
|
|
6912
|
-
value:
|
|
6912
|
+
value: h.isHidden,
|
|
6913
6913
|
description: "Hides this section from the form"
|
|
6914
6914
|
}
|
|
6915
6915
|
)
|
|
@@ -6950,15 +6950,15 @@ const Vs = an(Hs), Fs = B.object({
|
|
|
6950
6950
|
onDragOver: r,
|
|
6951
6951
|
setIsDragging: c
|
|
6952
6952
|
}) => {
|
|
6953
|
-
const v = Ci(null),
|
|
6953
|
+
const v = Ci(null), h = Ci(i.questionData.length);
|
|
6954
6954
|
return D(() => {
|
|
6955
|
-
i.questionData.length >
|
|
6956
|
-
var
|
|
6957
|
-
(
|
|
6955
|
+
i.questionData.length > h.current && v.current && requestAnimationFrame(() => {
|
|
6956
|
+
var p;
|
|
6957
|
+
(p = v.current) == null || p.scrollTo({
|
|
6958
6958
|
top: v.current.scrollHeight,
|
|
6959
6959
|
behavior: "smooth"
|
|
6960
6960
|
});
|
|
6961
|
-
}),
|
|
6961
|
+
}), h.current = i.questionData.length;
|
|
6962
6962
|
}, [i.questionData.length]), /* @__PURE__ */ n.jsx(
|
|
6963
6963
|
"div",
|
|
6964
6964
|
{
|
|
@@ -7053,31 +7053,31 @@ const Vs = an(Hs), Fs = B.object({
|
|
|
7053
7053
|
selectedSection: r,
|
|
7054
7054
|
activeSections: c,
|
|
7055
7055
|
setActiveSections: v
|
|
7056
|
-
} = ji(gi),
|
|
7056
|
+
} = ji(gi), h = Ci((u == null ? void 0 : u.length) || 0);
|
|
7057
7057
|
D(() => {
|
|
7058
|
-
var
|
|
7059
|
-
d(((
|
|
7058
|
+
var m;
|
|
7059
|
+
d(((m = u[0]) == null ? void 0 : m.id) || null);
|
|
7060
7060
|
}, []), D(() => {
|
|
7061
|
-
(u == null ? void 0 : u.length) >
|
|
7062
|
-
var
|
|
7063
|
-
(
|
|
7061
|
+
(u == null ? void 0 : u.length) > h.current && s.current && requestAnimationFrame(() => {
|
|
7062
|
+
var m;
|
|
7063
|
+
(m = s.current) == null || m.scrollTo({
|
|
7064
7064
|
top: s.current.scrollHeight,
|
|
7065
7065
|
behavior: "smooth"
|
|
7066
7066
|
});
|
|
7067
|
-
}),
|
|
7067
|
+
}), h.current = (u == null ? void 0 : u.length) || 0;
|
|
7068
7068
|
}, [u == null ? void 0 : u.length]);
|
|
7069
|
-
const
|
|
7070
|
-
|
|
7069
|
+
const p = $((m) => {
|
|
7070
|
+
m.preventDefault(), m.dataTransfer.dropEffect = "move", s.current && (s.current.scrollTop = s.current.scrollHeight);
|
|
7071
7071
|
}, []);
|
|
7072
|
-
function y(
|
|
7073
|
-
c.includes(
|
|
7074
|
-
(x) => x.filter((j) => j !==
|
|
7075
|
-
) : v((x) => [...x,
|
|
7072
|
+
function y(m) {
|
|
7073
|
+
c.includes(m) ? v(
|
|
7074
|
+
(x) => x.filter((j) => j !== m)
|
|
7075
|
+
) : v((x) => [...x, m]);
|
|
7076
7076
|
}
|
|
7077
|
-
function f(
|
|
7078
|
-
o.current =
|
|
7077
|
+
function f(m) {
|
|
7078
|
+
o.current = m, e(!0);
|
|
7079
7079
|
}
|
|
7080
|
-
const
|
|
7080
|
+
const g = xi("config");
|
|
7081
7081
|
return /* @__PURE__ */ n.jsxs(
|
|
7082
7082
|
"div",
|
|
7083
7083
|
{
|
|
@@ -7094,10 +7094,10 @@ const Vs = an(Hs), Fs = B.object({
|
|
|
7094
7094
|
),
|
|
7095
7095
|
/* @__PURE__ */ n.jsxs("div", { className: "relative flex flex-col flex-1 w-full gap-y-3", children: [
|
|
7096
7096
|
u == null ? void 0 : u.map(
|
|
7097
|
-
(
|
|
7097
|
+
(m, x) => /* @__PURE__ */ n.jsx(
|
|
7098
7098
|
Us,
|
|
7099
7099
|
{
|
|
7100
|
-
section:
|
|
7100
|
+
section: m,
|
|
7101
7101
|
index: x,
|
|
7102
7102
|
selectedSection: r,
|
|
7103
7103
|
setSelectedSection: d,
|
|
@@ -7106,10 +7106,10 @@ const Vs = an(Hs), Fs = B.object({
|
|
|
7106
7106
|
handleSectionEdit: f,
|
|
7107
7107
|
removeSection: a,
|
|
7108
7108
|
formDataLength: u.length,
|
|
7109
|
-
onDragOver:
|
|
7109
|
+
onDragOver: p,
|
|
7110
7110
|
setIsDragging: t
|
|
7111
7111
|
},
|
|
7112
|
-
|
|
7112
|
+
m.id
|
|
7113
7113
|
)
|
|
7114
7114
|
),
|
|
7115
7115
|
/* @__PURE__ */ n.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ n.jsxs(
|
|
@@ -7117,7 +7117,7 @@ const Vs = an(Hs), Fs = B.object({
|
|
|
7117
7117
|
{
|
|
7118
7118
|
type: "button",
|
|
7119
7119
|
onClick: () => l(),
|
|
7120
|
-
style: { color: (
|
|
7120
|
+
style: { color: (g == null ? void 0 : g.buttonColor) || "#333" },
|
|
7121
7121
|
className: "text-sm font-medium",
|
|
7122
7122
|
children: [
|
|
7123
7123
|
"+ Add section",
|
|
@@ -7177,7 +7177,7 @@ function Js({
|
|
|
7177
7177
|
}
|
|
7178
7178
|
),
|
|
7179
7179
|
/* @__PURE__ */ n.jsx(
|
|
7180
|
-
|
|
7180
|
+
wi,
|
|
7181
7181
|
{
|
|
7182
7182
|
show: l,
|
|
7183
7183
|
as: "div",
|
|
@@ -7202,38 +7202,38 @@ const An = [
|
|
|
7202
7202
|
{ key: "advancedData", title: "Advanced / Data" }
|
|
7203
7203
|
], Ys = () => {
|
|
7204
7204
|
const [i, e] = P(""), { setIsDragging: o, addElement: s, selectedSection: a } = ji(gi), l = $(
|
|
7205
|
-
(
|
|
7205
|
+
(p, y) => {
|
|
7206
7206
|
if (!a) {
|
|
7207
7207
|
ki.error("Please select a section to add an element.");
|
|
7208
7208
|
return;
|
|
7209
7209
|
}
|
|
7210
|
-
|
|
7210
|
+
p.dataTransfer.setData("properties", JSON.stringify(y)), p.dataTransfer.effectAllowed = "move", o(!0);
|
|
7211
7211
|
},
|
|
7212
7212
|
[o, a]
|
|
7213
7213
|
);
|
|
7214
|
-
function u(
|
|
7214
|
+
function u(p) {
|
|
7215
7215
|
if (!a) {
|
|
7216
7216
|
ki.error("Please select a section to add an element.");
|
|
7217
7217
|
return;
|
|
7218
7218
|
}
|
|
7219
7219
|
const y = {
|
|
7220
|
-
...
|
|
7220
|
+
...p,
|
|
7221
7221
|
id: Ai(),
|
|
7222
7222
|
sectionId: a
|
|
7223
7223
|
};
|
|
7224
7224
|
s(y, a);
|
|
7225
7225
|
}
|
|
7226
7226
|
const t = xi("config") || {}, d = t.elementColor, r = t.elementBgColor, c = t.elementBorderColor, v = Ya.filter(
|
|
7227
|
-
(
|
|
7228
|
-
),
|
|
7229
|
-
title:
|
|
7227
|
+
(p) => p.label.toLowerCase().includes(i.toLowerCase())
|
|
7228
|
+
), h = An == null ? void 0 : An.map((p) => ({
|
|
7229
|
+
title: p.title,
|
|
7230
7230
|
elements: v.filter(
|
|
7231
7231
|
(y) => {
|
|
7232
7232
|
var f;
|
|
7233
|
-
return (f = qa[
|
|
7233
|
+
return (f = qa[p.key]) == null ? void 0 : f.includes(y.type);
|
|
7234
7234
|
}
|
|
7235
7235
|
)
|
|
7236
|
-
})).filter((
|
|
7236
|
+
})).filter((p) => p.elements.length > 0);
|
|
7237
7237
|
return /* @__PURE__ */ n.jsxs("div", { className: "pt-4 flex flex-col gap-y-6", children: [
|
|
7238
7238
|
/* @__PURE__ */ n.jsx("div", { className: "px-5", children: /* @__PURE__ */ n.jsx(
|
|
7239
7239
|
"input",
|
|
@@ -7241,21 +7241,21 @@ const An = [
|
|
|
7241
7241
|
className: "field-control",
|
|
7242
7242
|
placeholder: "Search",
|
|
7243
7243
|
value: i,
|
|
7244
|
-
onChange: (
|
|
7244
|
+
onChange: (p) => e(p.target.value),
|
|
7245
7245
|
name: "search",
|
|
7246
7246
|
id: "search"
|
|
7247
7247
|
}
|
|
7248
7248
|
) }),
|
|
7249
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex-1 overflow-y-auto no-scrollbar max-h-[calc(100vh-100px)]", children: /* @__PURE__ */ n.jsx("ul", { className: "grid gap-y-5 mt-3 px-5 ", children:
|
|
7249
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex-1 overflow-y-auto no-scrollbar max-h-[calc(100vh-100px)]", children: /* @__PURE__ */ n.jsx("ul", { className: "grid gap-y-5 mt-3 px-5 ", children: h == null ? void 0 : h.map((p, y) => {
|
|
7250
7250
|
var f;
|
|
7251
7251
|
return /* @__PURE__ */ n.jsxs("li", { children: [
|
|
7252
|
-
/* @__PURE__ */ n.jsx("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children:
|
|
7253
|
-
/* @__PURE__ */ n.jsx("ul", { className: "grid grid-cols-2 gap-y-3 gap-x-4 mb-3", children: (f =
|
|
7252
|
+
/* @__PURE__ */ n.jsx("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children: p.title }),
|
|
7253
|
+
/* @__PURE__ */ n.jsx("ul", { className: "grid grid-cols-2 gap-y-3 gap-x-4 mb-3", children: (f = p.elements) == null ? void 0 : f.map((g) => /* @__PURE__ */ n.jsx(
|
|
7254
7254
|
"li",
|
|
7255
7255
|
{
|
|
7256
|
-
onDragStart: (
|
|
7256
|
+
onDragStart: (m) => l(m, g),
|
|
7257
7257
|
onDragEnd: () => o(!1),
|
|
7258
|
-
onClick: () => u(
|
|
7258
|
+
onClick: () => u(g),
|
|
7259
7259
|
style: {
|
|
7260
7260
|
borderColor: c,
|
|
7261
7261
|
backgroundColor: r
|
|
@@ -7266,18 +7266,18 @@ const An = [
|
|
|
7266
7266
|
active:opacity-50 element_class`,
|
|
7267
7267
|
draggable: !0,
|
|
7268
7268
|
children: /* @__PURE__ */ n.jsxs("span", { className: "flex flex-col items-center justify-center w-full gap-2", children: [
|
|
7269
|
-
/* @__PURE__ */ n.jsx("span", { style: { color: d }, children: /* @__PURE__ */ n.jsx(_, { icon:
|
|
7269
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: d }, children: /* @__PURE__ */ n.jsx(_, { icon: g.icon, iconClass: "w-6 h-6" }) }),
|
|
7270
7270
|
/* @__PURE__ */ n.jsx(
|
|
7271
7271
|
"span",
|
|
7272
7272
|
{
|
|
7273
7273
|
style: { color: d },
|
|
7274
7274
|
className: "text-xs font-medium ",
|
|
7275
|
-
children:
|
|
7275
|
+
children: g.label
|
|
7276
7276
|
}
|
|
7277
7277
|
)
|
|
7278
7278
|
] })
|
|
7279
7279
|
},
|
|
7280
|
-
|
|
7280
|
+
g.type
|
|
7281
7281
|
)) })
|
|
7282
7282
|
] }, y);
|
|
7283
7283
|
}) }) })
|
|
@@ -7295,9 +7295,9 @@ const An = [
|
|
|
7295
7295
|
div: r = !1,
|
|
7296
7296
|
type: c = "button",
|
|
7297
7297
|
style: v,
|
|
7298
|
-
onClick:
|
|
7298
|
+
onClick: h
|
|
7299
7299
|
}) => {
|
|
7300
|
-
const
|
|
7300
|
+
const p = q(
|
|
7301
7301
|
"btn inline-flex justify-center",
|
|
7302
7302
|
{
|
|
7303
7303
|
"pointer-events-none": o,
|
|
@@ -7341,14 +7341,14 @@ const An = [
|
|
|
7341
7341
|
i && /* @__PURE__ */ n.jsx("span", { children: i }),
|
|
7342
7342
|
a && l === "right" && /* @__PURE__ */ n.jsx("span", { className: `ml-[6px] ${u}`, children: /* @__PURE__ */ n.jsx(_, { icon: a }) })
|
|
7343
7343
|
] });
|
|
7344
|
-
return r ? /* @__PURE__ */ n.jsx("div", { className:
|
|
7344
|
+
return r ? /* @__PURE__ */ n.jsx("div", { className: p, children: y() }) : d ? /* @__PURE__ */ n.jsx(ko, { to: d, className: p, children: y() }) : /* @__PURE__ */ n.jsx(
|
|
7345
7345
|
"button",
|
|
7346
7346
|
{
|
|
7347
7347
|
disabled: e,
|
|
7348
7348
|
type: c,
|
|
7349
|
-
className:
|
|
7349
|
+
className: p,
|
|
7350
7350
|
"data-testid": "btn",
|
|
7351
|
-
onClick:
|
|
7351
|
+
onClick: h,
|
|
7352
7352
|
style: v,
|
|
7353
7353
|
children: y()
|
|
7354
7354
|
}
|
|
@@ -7457,15 +7457,15 @@ function Xs({
|
|
|
7457
7457
|
publishLoading: u,
|
|
7458
7458
|
onTitleChange: t
|
|
7459
7459
|
}) {
|
|
7460
|
-
const { formData: d, setShowPreview: r } = ji(gi), [
|
|
7461
|
-
function
|
|
7460
|
+
const { formData: d, setShowPreview: r, showPreview: c } = ji(gi), [v, h] = P(!1), [p, y] = P(!1), [f, g] = P(i || ""), m = xi("config");
|
|
7461
|
+
function x() {
|
|
7462
7462
|
localStorage.setItem("formData", JSON.stringify(d)), o == null || o(d);
|
|
7463
7463
|
}
|
|
7464
|
-
function
|
|
7464
|
+
function j() {
|
|
7465
7465
|
localStorage.setItem("formData", JSON.stringify(d)), s == null || s(d);
|
|
7466
7466
|
}
|
|
7467
|
-
function
|
|
7468
|
-
|
|
7467
|
+
function S() {
|
|
7468
|
+
y(!1), t && f !== i && t(f.trim());
|
|
7469
7469
|
}
|
|
7470
7470
|
return /* @__PURE__ */ n.jsxs("div", { className: "px-[30px] py-3 flex justify-between items-center bg-[#F9F9FB] top_bar border-b h-full", children: [
|
|
7471
7471
|
/* @__PURE__ */ n.jsxs("span", { className: "flex items-center gap-x-2", children: [
|
|
@@ -7474,19 +7474,19 @@ function Xs({
|
|
|
7474
7474
|
{
|
|
7475
7475
|
type: "button",
|
|
7476
7476
|
onClick: () => e(),
|
|
7477
|
-
style: { color: (
|
|
7477
|
+
style: { color: (m == null ? void 0 : m.buttonColor) || "#333" },
|
|
7478
7478
|
className: "flex items-center gap-x-3",
|
|
7479
7479
|
children: /* @__PURE__ */ n.jsx(Qs, {})
|
|
7480
7480
|
}
|
|
7481
7481
|
),
|
|
7482
7482
|
" ",
|
|
7483
|
-
|
|
7483
|
+
p ? /* @__PURE__ */ n.jsx(
|
|
7484
7484
|
"input",
|
|
7485
7485
|
{
|
|
7486
7486
|
type: "text",
|
|
7487
|
-
value:
|
|
7488
|
-
onChange: (
|
|
7489
|
-
onBlur:
|
|
7487
|
+
value: f,
|
|
7488
|
+
onChange: (N) => g(N.target.value),
|
|
7489
|
+
onBlur: S,
|
|
7490
7490
|
autoFocus: !0,
|
|
7491
7491
|
className: "w-48 px-2 py-1 text-sm font-semibold outline-gray-100 input form_title"
|
|
7492
7492
|
}
|
|
@@ -7495,16 +7495,16 @@ function Xs({
|
|
|
7495
7495
|
{
|
|
7496
7496
|
title: "Click to edit",
|
|
7497
7497
|
className: "text-base font-semibold cursor-pointer form_title",
|
|
7498
|
-
onClick: () =>
|
|
7499
|
-
children:
|
|
7498
|
+
onClick: () => y(!0),
|
|
7499
|
+
children: f || "Untitled"
|
|
7500
7500
|
}
|
|
7501
7501
|
)
|
|
7502
7502
|
] }),
|
|
7503
|
-
|
|
7503
|
+
v && /* @__PURE__ */ n.jsx(
|
|
7504
7504
|
$s,
|
|
7505
7505
|
{
|
|
7506
|
-
isOpen:
|
|
7507
|
-
onClose: () =>
|
|
7506
|
+
isOpen: v,
|
|
7507
|
+
onClose: () => h(!1),
|
|
7508
7508
|
element: void 0
|
|
7509
7509
|
}
|
|
7510
7510
|
),
|
|
@@ -7512,12 +7512,12 @@ function Xs({
|
|
|
7512
7512
|
/* @__PURE__ */ n.jsx(
|
|
7513
7513
|
Ei,
|
|
7514
7514
|
{
|
|
7515
|
-
onClick: () => r((
|
|
7516
|
-
text: "Preview",
|
|
7515
|
+
onClick: () => r((N) => !N),
|
|
7516
|
+
text: c ? "Hide Preview" : "Preview",
|
|
7517
7517
|
btnClass: "px-2 bg-transparent font-medium text-sm form_preview",
|
|
7518
|
-
icon: "solar:eye-bold-duotone",
|
|
7518
|
+
icon: c ? "iconamoon:eye-off-duotone" : "solar:eye-bold-duotone",
|
|
7519
7519
|
iconClass: "text-base",
|
|
7520
|
-
style: { color: (
|
|
7520
|
+
style: { color: (m == null ? void 0 : m.buttonColor) || "#333" },
|
|
7521
7521
|
isDisabled: a,
|
|
7522
7522
|
isLoading: a
|
|
7523
7523
|
}
|
|
@@ -7525,12 +7525,12 @@ function Xs({
|
|
|
7525
7525
|
/* @__PURE__ */ n.jsx(
|
|
7526
7526
|
Ei,
|
|
7527
7527
|
{
|
|
7528
|
-
onClick:
|
|
7528
|
+
onClick: x,
|
|
7529
7529
|
text: "Save",
|
|
7530
7530
|
btnClass: "px-2 bg-transparent font-medium text-sm form_save__btn",
|
|
7531
7531
|
icon: "lets-icons:save-duotone",
|
|
7532
7532
|
iconClass: "text-base",
|
|
7533
|
-
style: { color: (
|
|
7533
|
+
style: { color: (m == null ? void 0 : m.buttonColor) || "#333" },
|
|
7534
7534
|
isDisabled: l,
|
|
7535
7535
|
isLoading: l
|
|
7536
7536
|
}
|
|
@@ -7538,9 +7538,9 @@ function Xs({
|
|
|
7538
7538
|
/* @__PURE__ */ n.jsx(
|
|
7539
7539
|
Ei,
|
|
7540
7540
|
{
|
|
7541
|
-
onClick:
|
|
7541
|
+
onClick: j,
|
|
7542
7542
|
text: "Publish",
|
|
7543
|
-
style: { background: (
|
|
7543
|
+
style: { background: (m == null ? void 0 : m.buttonColor) || "#333" },
|
|
7544
7544
|
btnClass: "border-[#98A2B3] font-medium text-sm py-2 px-6 text-white rounded-lg form_publish__btn",
|
|
7545
7545
|
isDisabled: u,
|
|
7546
7546
|
isLoading: u
|
|
@@ -7610,7 +7610,7 @@ const Nl = ({
|
|
|
7610
7610
|
saveLoading: r,
|
|
7611
7611
|
publishLoading: c,
|
|
7612
7612
|
onTitleChange: v,
|
|
7613
|
-
uploadUrl:
|
|
7613
|
+
uploadUrl: h
|
|
7614
7614
|
}) => (D(() => {
|
|
7615
7615
|
s && Ge("config", s);
|
|
7616
7616
|
}, [s]), /* @__PURE__ */ n.jsx(
|
|
@@ -7627,7 +7627,7 @@ const Nl = ({
|
|
|
7627
7627
|
saveLoading: r,
|
|
7628
7628
|
publishLoading: c,
|
|
7629
7629
|
onTitleChange: v,
|
|
7630
|
-
uploadUrl:
|
|
7630
|
+
uploadUrl: h
|
|
7631
7631
|
}
|
|
7632
7632
|
)), Ti = {
|
|
7633
7633
|
required: "This field is required",
|
|
@@ -7901,8 +7901,8 @@ const tl = ({
|
|
|
7901
7901
|
hideFooter: d = !1,
|
|
7902
7902
|
uploadUrl: r
|
|
7903
7903
|
}) => {
|
|
7904
|
-
var ni, si, hi, vi,
|
|
7905
|
-
const { setAnswerData: c, setUploadUrl: v } = ji(gi), [
|
|
7904
|
+
var ni, si, hi, vi, L, K, X, ui;
|
|
7905
|
+
const { setAnswerData: c, setUploadUrl: v } = ji(gi), [h, p] = P(0), y = oi(
|
|
7906
7906
|
() => i.filter((J) => !J.isHidden).map((J) => {
|
|
7907
7907
|
var pi;
|
|
7908
7908
|
return J.isDisabled || J.disabled ? {
|
|
@@ -7914,11 +7914,11 @@ const tl = ({
|
|
|
7914
7914
|
} : J;
|
|
7915
7915
|
}),
|
|
7916
7916
|
[i]
|
|
7917
|
-
), f = (ni = y == null ? void 0 : y.length) != null ? ni : 0,
|
|
7917
|
+
), f = (ni = y == null ? void 0 : y.length) != null ? ni : 0, g = xi("config"), m = oi(
|
|
7918
7918
|
() => sl(y),
|
|
7919
7919
|
[y]
|
|
7920
7920
|
), x = Bn({
|
|
7921
|
-
resolver: Dn(
|
|
7921
|
+
resolver: Dn(m),
|
|
7922
7922
|
mode: "onSubmit",
|
|
7923
7923
|
defaultValues: {}
|
|
7924
7924
|
}), {
|
|
@@ -7930,7 +7930,7 @@ const tl = ({
|
|
|
7930
7930
|
getValues: O,
|
|
7931
7931
|
watch: ii,
|
|
7932
7932
|
formState: { errors: z, isSubmitting: Z },
|
|
7933
|
-
trigger:
|
|
7933
|
+
trigger: w,
|
|
7934
7934
|
setError: W,
|
|
7935
7935
|
clearErrors: I
|
|
7936
7936
|
} = x, G = yo({ control: N }), H = oi(
|
|
@@ -7992,21 +7992,21 @@ const tl = ({
|
|
|
7992
7992
|
), E = $(async () => {
|
|
7993
7993
|
var J, li;
|
|
7994
7994
|
if (!o) {
|
|
7995
|
-
const pi = (li = (J = y == null ? void 0 : y[
|
|
7995
|
+
const pi = (li = (J = y == null ? void 0 : y[h]) == null ? void 0 : J.questionData) == null ? void 0 : li.map(
|
|
7996
7996
|
(Mi) => Mi.id
|
|
7997
7997
|
);
|
|
7998
|
-
if (!await
|
|
7998
|
+
if (!await w(pi)) return;
|
|
7999
7999
|
}
|
|
8000
|
-
|
|
8001
|
-
}, [
|
|
8002
|
-
|
|
8000
|
+
p((pi) => pi + 1);
|
|
8001
|
+
}, [h, y, o, w]), U = $(() => {
|
|
8002
|
+
p((J) => J - 1);
|
|
8003
8003
|
}, []), ci = oi(
|
|
8004
8004
|
() => ({
|
|
8005
8005
|
register: j,
|
|
8006
8006
|
setValue: S,
|
|
8007
8007
|
watch: ii,
|
|
8008
8008
|
errors: z,
|
|
8009
|
-
trigger:
|
|
8009
|
+
trigger: w,
|
|
8010
8010
|
isSubmitting: Z,
|
|
8011
8011
|
isReadOnly: l,
|
|
8012
8012
|
getValues: O,
|
|
@@ -8018,7 +8018,7 @@ const tl = ({
|
|
|
8018
8018
|
S,
|
|
8019
8019
|
ii,
|
|
8020
8020
|
z,
|
|
8021
|
-
|
|
8021
|
+
w,
|
|
8022
8022
|
Z,
|
|
8023
8023
|
l,
|
|
8024
8024
|
O,
|
|
@@ -8031,6 +8031,7 @@ const tl = ({
|
|
|
8031
8031
|
/* @__PURE__ */ n.jsxs(
|
|
8032
8032
|
"form",
|
|
8033
8033
|
{
|
|
8034
|
+
id: "form",
|
|
8034
8035
|
onSubmit: A(T),
|
|
8035
8036
|
className: "container h-full mx-auto",
|
|
8036
8037
|
children: [
|
|
@@ -8039,16 +8040,16 @@ const tl = ({
|
|
|
8039
8040
|
{
|
|
8040
8041
|
className: "multi_section__box",
|
|
8041
8042
|
children: [
|
|
8042
|
-
u === "multi" && (((si = y == null ? void 0 : y[
|
|
8043
|
-
((vi = y[
|
|
8044
|
-
((K = y[
|
|
8043
|
+
u === "multi" && (((si = y == null ? void 0 : y[h]) == null ? void 0 : si.title) || ((hi = y == null ? void 0 : y[h]) == null ? void 0 : hi.description)) && /* @__PURE__ */ n.jsxs("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
|
|
8044
|
+
((vi = y[h]) == null ? void 0 : vi.title) && /* @__PURE__ */ n.jsx("h2", { className: "text-lg font-semibold mb-[6px]", children: (L = y[h]) == null ? void 0 : L.title }),
|
|
8045
|
+
((K = y[h]) == null ? void 0 : K.description) && /* @__PURE__ */ n.jsx("p", { className: "text-sm", children: (X = y[h]) == null ? void 0 : X.description })
|
|
8045
8046
|
] }),
|
|
8046
8047
|
u === "multi" ? /* @__PURE__ */ n.jsx(
|
|
8047
8048
|
dl,
|
|
8048
8049
|
{
|
|
8049
8050
|
form_data: y,
|
|
8050
8051
|
options: ci,
|
|
8051
|
-
current:
|
|
8052
|
+
current: h
|
|
8052
8053
|
}
|
|
8053
8054
|
) : /* @__PURE__ */ n.jsx(
|
|
8054
8055
|
ll,
|
|
@@ -8059,13 +8060,13 @@ const tl = ({
|
|
|
8059
8060
|
)
|
|
8060
8061
|
]
|
|
8061
8062
|
},
|
|
8062
|
-
(ui = y == null ? void 0 : y[
|
|
8063
|
+
(ui = y == null ? void 0 : y[h]) == null ? void 0 : ui.id
|
|
8063
8064
|
) }),
|
|
8064
8065
|
!d && /* @__PURE__ */ n.jsx("footer", { className: "flex items-center justify-end gap-4 footer flex-wrap", children: u === "multi" ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
8065
8066
|
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-x-4 justify-between navigation_container w-full", children: [
|
|
8066
8067
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
8067
8068
|
" ",
|
|
8068
|
-
|
|
8069
|
+
h > 0 && /* @__PURE__ */ n.jsx(
|
|
8069
8070
|
Ei,
|
|
8070
8071
|
{
|
|
8071
8072
|
type: "button",
|
|
@@ -8075,25 +8076,25 @@ const tl = ({
|
|
|
8075
8076
|
}
|
|
8076
8077
|
)
|
|
8077
8078
|
] }),
|
|
8078
|
-
|
|
8079
|
+
h < f - 1 && /* @__PURE__ */ n.jsx(
|
|
8079
8080
|
Ei,
|
|
8080
8081
|
{
|
|
8081
8082
|
type: "button",
|
|
8082
8083
|
text: "Next",
|
|
8083
8084
|
onClick: E,
|
|
8084
|
-
style: { background: (
|
|
8085
|
+
style: { background: (g == null ? void 0 : g.buttonColor) || "#333" },
|
|
8085
8086
|
btnClass: "text-gray-700 next_btn text-sm border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg continue_btn"
|
|
8086
8087
|
}
|
|
8087
8088
|
)
|
|
8088
8089
|
] }),
|
|
8089
|
-
(
|
|
8090
|
+
(h === f - 1 || l) && !o && (t != null ? t : /* @__PURE__ */ n.jsx(
|
|
8090
8091
|
Ei,
|
|
8091
8092
|
{
|
|
8092
8093
|
isDisabled: Z || Object.keys(z).length > 0,
|
|
8093
8094
|
isLoading: Z,
|
|
8094
8095
|
type: "submit",
|
|
8095
8096
|
text: "Submit",
|
|
8096
|
-
style: { background: (
|
|
8097
|
+
style: { background: (g == null ? void 0 : g.buttonColor) || "#333" },
|
|
8097
8098
|
btnClass: "text-gray-700 border-[#98A2B3] submit_btn !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg submit_btn"
|
|
8098
8099
|
}
|
|
8099
8100
|
))
|
|
@@ -8104,7 +8105,7 @@ const tl = ({
|
|
|
8104
8105
|
isLoading: Z,
|
|
8105
8106
|
type: "submit",
|
|
8106
8107
|
text: "Submit",
|
|
8107
|
-
style: { background: (
|
|
8108
|
+
style: { background: (g == null ? void 0 : g.buttonColor) || "#333" },
|
|
8108
8109
|
btnClass: "text-gray-700 border-[#98A2B3] submit_btn !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg submit_btn"
|
|
8109
8110
|
}
|
|
8110
8111
|
)) })
|
|
@@ -8130,9 +8131,9 @@ function Fe({
|
|
|
8130
8131
|
D(() => {
|
|
8131
8132
|
u && Ge("config", u);
|
|
8132
8133
|
}, [u]);
|
|
8133
|
-
const
|
|
8134
|
-
(
|
|
8135
|
-
c && c(
|
|
8134
|
+
const h = $(
|
|
8135
|
+
(p) => {
|
|
8136
|
+
c && c(p);
|
|
8136
8137
|
},
|
|
8137
8138
|
[c]
|
|
8138
8139
|
);
|
|
@@ -8148,7 +8149,7 @@ function Fe({
|
|
|
8148
8149
|
isReadOnly: a,
|
|
8149
8150
|
renderType: t,
|
|
8150
8151
|
hideFooter: r,
|
|
8151
|
-
onGetValues:
|
|
8152
|
+
onGetValues: h,
|
|
8152
8153
|
uploadUrl: v,
|
|
8153
8154
|
children: d
|
|
8154
8155
|
}
|