@levo-so/react 0.1.18 → 0.1.22

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.
Files changed (47) hide show
  1. package/dist/{CheckboxWidget-Dp9IAz5Q.js → CheckboxWidget-nJO8XlGD.js} +1 -1
  2. package/dist/{CollectionFormBuilder-DpTePTDd.js → CollectionFormBuilder-DeGyMEXJ.js} +162 -166
  3. package/dist/{CurrencyWidget-BfnmQP9S.js → CurrencyWidget-BaMho9Pw.js} +1 -1
  4. package/dist/{DateTimeWidget-CqjC2iYx.js → DateTimeWidget-VCmX__cv.js} +1 -1
  5. package/dist/{DefaultFormVariant-CG7WUPV3.js → DefaultFormVariant-fTWKRYI_.js} +7 -7
  6. package/dist/{DropdownWidget-15oYGYnv.js → DropdownWidget-zAr9v_IY.js} +18 -18
  7. package/dist/{EmailWidget-mGeLzigY.js → EmailWidget-d3hSxbAS.js} +2 -2
  8. package/dist/{FormCaptcha-CbLdFHHY.js → FormCaptcha-YeElu90S.js} +16 -16
  9. package/dist/{GeocoderWidget-BXv8P8Y1.js → GeocoderWidget-BOqaJMm1.js} +2 -2
  10. package/dist/{MultiGeocoderWidget-eCOGwc1m.js → MultiGeocoderWidget-BTffSkJX.js} +3 -3
  11. package/dist/{MultiTextWidget-DpT1gLmr.js → MultiTextWidget-L2Eoz2Zv.js} +1 -1
  12. package/dist/{PhoneWidget-DisB02Ll.js → PhoneWidget-CnDhiovx.js} +1 -1
  13. package/dist/{RadioWidget-DjWXEZQx.js → RadioWidget-CG01ys9E.js} +2 -2
  14. package/dist/{RichTextWidget-BnqTjA-v.js → RichTextWidget-DCX1Vpw4.js} +2 -2
  15. package/dist/{Spinner-Bzu2xCFZ.js → Spinner-BnrQ9e_i.js} +58 -57
  16. package/dist/{StepsFormVariant-BYzPBT2c.js → StepsFormVariant-eW9O8rik.js} +22 -22
  17. package/dist/{SwitchWidget-DQ2OHpuP.js → SwitchWidget-CstjQ_nx.js} +1 -1
  18. package/dist/{TextWidget-qHY9_hkz.js → TextWidget-D4uLMuLS.js} +1 -1
  19. package/dist/{TextareaWidget-BP5mJR7j.js → TextareaWidget-CHgyJUuy.js} +1 -1
  20. package/dist/{ToggleCheckboxWidget-CzXZ9l_k.js → ToggleCheckboxWidget-Cfwlrjn7.js} +1 -1
  21. package/dist/{Tooltip-DEBnSqlo.js → Tooltip-DPzkfrjl.js} +15 -14
  22. package/dist/{URLWidget-BcZQVzW7.js → URLWidget-CZE68DgS.js} +2 -2
  23. package/dist/UploadWidget-Dstuk_qo.js +656 -0
  24. package/dist/audience/components/page.d.ts.map +1 -1
  25. package/dist/audience/index.js +1 -1
  26. package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts.map +1 -1
  27. package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts +11 -0
  28. package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts.map +1 -0
  29. package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts.map +1 -1
  30. package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts.map +1 -1
  31. package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts.map +1 -1
  32. package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts.map +1 -1
  33. package/dist/collection/index.js +1 -1
  34. package/dist/components/Dialog.d.ts +3 -1
  35. package/dist/components/Dialog.d.ts.map +1 -1
  36. package/dist/components/Sonner.d.ts +1 -1
  37. package/dist/components/Sonner.d.ts.map +1 -1
  38. package/dist/components/Tooltip.d.ts +1 -0
  39. package/dist/components/Tooltip.d.ts.map +1 -1
  40. package/dist/components/index.js +29 -28
  41. package/dist/index.css +1 -1
  42. package/dist/index.js +50 -49
  43. package/dist/membership/components/Popup.d.ts.map +1 -1
  44. package/dist/page-sR2SWtb2.js +189 -0
  45. package/package.json +4 -4
  46. package/dist/UploadWidget-BNdydN68.js +0 -616
  47. package/dist/page-BKyDlf0z.js +0 -212
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { j as s } from "./jsx-runtime-B6kdoens.js";
3
3
  import { FieldInterfaces as l, defaultByKinds as ue, formatsByInterface as we, interfaceKinds as ke, FieldInterfacesList as We } from "@levo-so/core";
4
- import * as A from "react";
4
+ import * as I from "react";
5
5
  import E, { useState as w, useEffect as ge, lazy as v, Suspense as _e } from "react";
6
6
  import { useFieldArray as Ne, useController as me } from "react-hook-form";
7
- import { G as H, T as Re, k as Le, l as Te, B as W, m as Me, A as Ae, C as Ie, j as De, n as Be, S as Se } from "./Spinner-Bzu2xCFZ.js";
7
+ import { G as P, T as Re, l as Le, m as Te, B as W, n as Me, C as Ie, E as Ae, k as De, o as Be, S as Se } from "./Spinner-BnrQ9e_i.js";
8
8
  import { X as Fe } from "lucide-react";
9
9
  import { u as X } from "./LevoProvider-BAZy7_tP.js";
10
- import { Snowflake as Pe } from "@theinternetfolks/snowflake";
11
- import Ee from "google-libphonenumber";
10
+ import { Snowflake as Ee } from "@theinternetfolks/snowflake";
11
+ import Pe from "google-libphonenumber";
12
12
  import re from "validator";
13
13
  import z from "validatorjs";
14
14
  import { c as b } from "./cn-C9QoOYNG.js";
@@ -74,15 +74,15 @@ const Ve = [
74
74
  ...$.document,
75
75
  ...$.image,
76
76
  ...$.video
77
- }, { PhoneNumberUtil: Xe } = Ee, Je = (e) => {
77
+ }, { PhoneNumberUtil: Xe } = Pe, Je = (e) => {
78
78
  const n = [];
79
79
  for (const t of Object.keys(e))
80
80
  for (const r of (e == null ? void 0 : e[t]) || [])
81
81
  n.push({ message: r, name: t });
82
82
  return n;
83
- }, oe = Xe.getInstance(), Qe = (e) => {
83
+ }, ae = Xe.getInstance(), Qe = (e) => {
84
84
  try {
85
- return oe.isValidNumber(oe.parseAndKeepRawInput(e));
85
+ return ae.isValidNumber(ae.parseAndKeepRawInput(e));
86
86
  } catch {
87
87
  return !1;
88
88
  }
@@ -115,14 +115,14 @@ const Ve = [
115
115
  };
116
116
  }, Kt = (e, n) => {
117
117
  const t = {};
118
- for (const a of e.sections)
119
- for (const o of a.fields) {
118
+ for (const o of e.sections)
119
+ for (const a of o.fields) {
120
120
  const i = [];
121
- switch (o.required && i.push("required"), typeof o.max < "u" && o.max !== null && i.push({
122
- max: [o.max]
123
- }), typeof o.min < "u" && o.min !== null && i.push({
124
- min: [o.min]
125
- }), o.field_interface) {
121
+ switch (a.required && i.push("required"), typeof a.max < "u" && a.max !== null && i.push({
122
+ max: [a.max]
123
+ }), typeof a.min < "u" && a.min !== null && i.push({
124
+ min: [a.min]
125
+ }), a.field_interface) {
126
126
  case l.EmailWidget:
127
127
  i.push("email");
128
128
  break;
@@ -133,11 +133,11 @@ const Ve = [
133
133
  i.push("url");
134
134
  break;
135
135
  }
136
- t[o.key] = i;
136
+ t[a.key] = i;
137
137
  }
138
138
  const r = pe(n, t), { errors: c } = r, g = {};
139
- return c && c.map((a) => {
140
- g[a.name] = a.message;
139
+ return c && c.map((o) => {
140
+ g[o.name] = o.message;
141
141
  }), g;
142
142
  }, U = (e) => {
143
143
  var t, r;
@@ -155,18 +155,18 @@ const Ve = [
155
155
  ...U(r.fields)
156
156
  });
157
157
  return n;
158
- }, ae = (e) => typeof e < "u" ? e : null, Jt = (e, n) => {
158
+ }, oe = (e) => typeof e < "u" ? e : null, Jt = (e, n) => {
159
159
  var r, c;
160
160
  if (!(e != null && e.sections)) return {};
161
161
  const t = {};
162
162
  for (const g of e.sections) {
163
- const a = U(g.fields ?? []);
164
- for (const o of g.fields) {
165
- let i = ae(n == null ? void 0 : n[o == null ? void 0 : o.key]);
166
- Array.isArray(i) && (i == null ? void 0 : i.length) > 0 && Array.isArray(o == null ? void 0 : o.values) && ((r = o == null ? void 0 : o.values) == null ? void 0 : r.length) > 0 && !((c = o == null ? void 0 : o.options) != null && c.custom_input) && (i = i == null ? void 0 : i.filter((m) => {
163
+ const o = U(g.fields ?? []);
164
+ for (const a of g.fields) {
165
+ let i = oe(n == null ? void 0 : n[a == null ? void 0 : a.key]);
166
+ Array.isArray(i) && (i == null ? void 0 : i.length) > 0 && Array.isArray(a == null ? void 0 : a.values) && ((r = a == null ? void 0 : a.values) == null ? void 0 : r.length) > 0 && !((c = a == null ? void 0 : a.options) != null && c.custom_input) && (i = i == null ? void 0 : i.filter((m) => {
167
167
  var x;
168
- return (x = o == null ? void 0 : o.values) == null ? void 0 : x.includes(m);
169
- })), t[o.key] = i ?? ae(o == null ? void 0 : o.default_value) ?? a[o.key];
168
+ return (x = a == null ? void 0 : a.values) == null ? void 0 : x.includes(m);
169
+ })), t[a.key] = i ?? oe(a == null ? void 0 : a.default_value) ?? o[a.key];
170
170
  }
171
171
  }
172
172
  return t;
@@ -176,7 +176,7 @@ const Ve = [
176
176
  let r = null;
177
177
  return (t.field_interface === l.ArrayWidget && n !== l.ArrayWidget || t.field_interface === l.RecordWidget && n !== l.RecordWidget) && (t.fields = []), (n !== l.MultiDropdownWidget || n !== l.DropdownWidget || n !== l.RadioWidget || n !== l.CheckboxWidget) && t.field_interface !== l.MultiDropdownWidget && t.field_interface !== l.DropdownWidget && t.field_interface !== l.RadioWidget && t.field_interface !== l.CheckboxWidget && ((c = t.values) == null ? void 0 : c.length) !== 0 && (t.values = []), (n === l.MultiDropdownWidget && t.field_interface !== l.MultiDropdownWidget || n === l.DropdownWidget && t.field_interface !== l.DropdownWidget || n === l.RadioWidget && t.field_interface !== l.RadioWidget || n === l.CheckboxWidget && t.field_interface !== l.CheckboxWidget) && (t.values = [""], r = `${t.id}-option-0`), [l.RecordWidget, l.ArrayWidget].includes(
178
178
  n
179
- ) && (r = `field-${Pe.generate()}`, t.kind = n === l.RecordWidget ? "record" : "group", t.fields = [
179
+ ) && (r = `field-${Ee.generate()}`, t.kind = n === l.RecordWidget ? "record" : "group", t.fields = [
180
180
  ...(t == null ? void 0 : t.fields) || [],
181
181
  {
182
182
  id: r,
@@ -203,13 +203,13 @@ const Ve = [
203
203
  var g;
204
204
  const t = { ...e }, r = [], c = "_id";
205
205
  if (delete t.__captcha, n)
206
- for (const a of n.sections ?? [])
207
- for (const o of a.fields)
208
- o.field_interface === "CollectionWidget" && r.push(o.key);
209
- for (const a of r)
210
- t[a] && typeof t[a] == "object" && (Array.isArray(t[a]) ? t[a] = (g = t[a]) == null ? void 0 : g.filter(
211
- (o) => o
212
- ) : t[a] = t[a][c]);
206
+ for (const o of n.sections ?? [])
207
+ for (const a of o.fields)
208
+ a.field_interface === "CollectionWidget" && r.push(a.key);
209
+ for (const o of r)
210
+ t[o] && typeof t[o] == "object" && (Array.isArray(t[o]) ? t[o] = (g = t[o]) == null ? void 0 : g.filter(
211
+ (a) => a
212
+ ) : t[o] = t[o][c]);
213
213
  return t;
214
214
  }, es = (e, n) => {
215
215
  if (Array.isArray(e) && e.length > 0) {
@@ -233,10 +233,10 @@ const Ve = [
233
233
  )) == null ? void 0 : n[0];
234
234
  };
235
235
  function ss(e) {
236
- return H({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M9.243 3.03a1 1 0 01.727 1.213L9.53 6h2.94l.56-2.243a1 1 0 111.94.486L14.53 6H17a1 1 0 110 2h-2.97l-1 4H15a1 1 0 110 2h-2.47l-.56 2.242a1 1 0 11-1.94-.485L10.47 14H7.53l-.56 2.242a1 1 0 11-1.94-.485L5.47 14H3a1 1 0 110-2h2.97l1-4H5a1 1 0 110-2h2.47l.56-2.243a1 1 0 011.213-.727zM9.03 8l-1 4h2.938l1-4H9.031z", clipRule: "evenodd" }, child: [] }] })(e);
236
+ return P({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M9.243 3.03a1 1 0 01.727 1.213L9.53 6h2.94l.56-2.243a1 1 0 111.94.486L14.53 6H17a1 1 0 110 2h-2.97l-1 4H15a1 1 0 110 2h-2.47l-.56 2.242a1 1 0 11-1.94-.485L10.47 14H7.53l-.56 2.242a1 1 0 11-1.94-.485L5.47 14H3a1 1 0 110-2h2.97l1-4H5a1 1 0 110-2h2.47l.56-2.243a1 1 0 011.213-.727zM9.03 8l-1 4h2.938l1-4H9.031z", clipRule: "evenodd" }, child: [] }] })(e);
237
237
  }
238
238
  function le(e) {
239
- return H({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z", clipRule: "evenodd" }, child: [] }] })(e);
239
+ return P({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z", clipRule: "evenodd" }, child: [] }] })(e);
240
240
  }
241
241
  const q = ({
242
242
  children: e,
@@ -262,12 +262,12 @@ const q = ({
262
262
  field: e,
263
263
  isInternal: n
264
264
  }) => {
265
- const { key: t = "", label: r = "", field_interface: c = "", fields: g = [] } = e, [a, o] = w("0"), { fields: i, ...m } = Ne({
265
+ const { key: t = "", label: r = "", field_interface: c = "", fields: g = [] } = e, [o, a] = w("0"), { fields: i, ...m } = Ne({
266
266
  name: t
267
267
  });
268
268
  return !c || !t ? null : /* @__PURE__ */ s.jsxs("div", { className: "w-full max-w-full", children: [
269
269
  /* @__PURE__ */ s.jsx(q, { children: r }),
270
- i && Array.isArray(i) ? /* @__PURE__ */ s.jsxs(Re, { value: a, onValueChange: o, className: "w-full", children: [
270
+ i && Array.isArray(i) ? /* @__PURE__ */ s.jsxs(Re, { value: o, onValueChange: a, className: "w-full", children: [
271
271
  /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
272
272
  i.length ? /* @__PURE__ */ s.jsx(Le, { className: "h-11 overflow-y-hidden overflow-x-auto flex-1 w-1 justify-start", children: i == null ? void 0 : i.map((x, d) => /* @__PURE__ */ s.jsx(
273
273
  Te,
@@ -285,7 +285,7 @@ const q = ({
285
285
  size: "xs",
286
286
  className: "shrink-0 grow-0",
287
287
  onClick: () => {
288
- m.append(U(g)), o(((i == null ? void 0 : i.length) ?? 0).toString());
288
+ m.append(U(g)), a(((i == null ? void 0 : i.length) ?? 0).toString());
289
289
  },
290
290
  children: [
291
291
  /* @__PURE__ */ s.jsx(le, { className: "inline-block mr-1", size: "14px" }),
@@ -300,10 +300,10 @@ const q = ({
300
300
  className: "space-y-4 border rounded bg-secondary/40",
301
301
  value: d.toString(),
302
302
  children: [
303
- /* @__PURE__ */ s.jsx("div", { className: "flex flex-col px-3 py-2 gap-3", children: g.map((f) => {
303
+ /* @__PURE__ */ s.jsx("div", { className: "flex flex-col px-3 py-2 gap-3", children: g.map((y) => {
304
304
  const k = {
305
- ...f,
306
- key: `${t}.${d}.${f == null ? void 0 : f.key}`
305
+ ...y,
306
+ key: `${t}.${d}.${y == null ? void 0 : y.key}`
307
307
  };
308
308
  return /* @__PURE__ */ s.jsx(
309
309
  ve,
@@ -311,7 +311,7 @@ const q = ({
311
311
  field: k,
312
312
  isInternal: n
313
313
  },
314
- `common-fields-${f == null ? void 0 : f.id}`
314
+ `common-fields-${y == null ? void 0 : y.id}`
315
315
  );
316
316
  }) }),
317
317
  /* @__PURE__ */ s.jsxs("div", { className: "flex p-2 items-center border-t", children: [
@@ -319,12 +319,12 @@ const q = ({
319
319
  W,
320
320
  {
321
321
  onClick: () => {
322
- o((d - 1).toString()), m.move(d, d - 1);
322
+ a((d - 1).toString()), m.move(d, d - 1);
323
323
  },
324
324
  disabled: d === 0,
325
325
  size: "icon",
326
326
  className: "rounded-full w-8 h-8",
327
- children: /* @__PURE__ */ s.jsx(Ae, { size: "24px" })
327
+ children: /* @__PURE__ */ s.jsx(Ie, { size: "24px" })
328
328
  }
329
329
  ),
330
330
  /* @__PURE__ */ s.jsx(
@@ -333,7 +333,7 @@ const q = ({
333
333
  className: "text-red-500",
334
334
  variant: "link",
335
335
  onClick: () => {
336
- o((d - 1).toString()), m.remove(d);
336
+ a((d - 1).toString()), m.remove(d);
337
337
  },
338
338
  children: "Remove Item"
339
339
  }
@@ -343,11 +343,11 @@ const q = ({
343
343
  {
344
344
  className: "rounded-full w-8 h-8",
345
345
  onClick: () => {
346
- o((d + 1).toString()), m.move(d, d + 1);
346
+ a((d + 1).toString()), m.move(d, d + 1);
347
347
  },
348
348
  disabled: d >= i.length - 1,
349
349
  size: "icon",
350
- children: /* @__PURE__ */ s.jsx(Ie, { size: "24px" })
350
+ children: /* @__PURE__ */ s.jsx(Ae, { size: "24px" })
351
351
  }
352
352
  )
353
353
  ] })
@@ -361,7 +361,7 @@ const q = ({
361
361
  variant: "ghost",
362
362
  size: "xs",
363
363
  onClick: () => {
364
- m.append(U(g)), o("0");
364
+ m.append(U(g)), a("0");
365
365
  },
366
366
  children: [
367
367
  /* @__PURE__ */ s.jsx(le, { className: "inline-block mr-1", size: "14px" }),
@@ -372,16 +372,16 @@ const q = ({
372
372
  ] });
373
373
  };
374
374
  function et(e) {
375
- return H({ tag: "svg", attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z", fill: "currentColor" }, child: [] }] })(e);
375
+ return P({ tag: "svg", attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z", fill: "currentColor" }, child: [] }] })(e);
376
376
  }
377
377
  function tt(e) {
378
- return H({ tag: "svg", attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z", fill: "currentColor" }, child: [] }] })(e);
378
+ return P({ tag: "svg", attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z", fill: "currentColor" }, child: [] }] })(e);
379
379
  }
380
380
  function st(e) {
381
- return H({ tag: "svg", attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z", fill: "currentColor" }, child: [] }] })(e);
381
+ return P({ tag: "svg", attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z", fill: "currentColor" }, child: [] }] })(e);
382
382
  }
383
383
  function nt(e) {
384
- return H({ tag: "svg", attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z", fill: "currentColor" }, child: [] }] })(e);
384
+ return P({ tag: "svg", attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z", fill: "currentColor" }, child: [] }] })(e);
385
385
  }
386
386
  const xe = (e) => {
387
387
  const n = e == null ? void 0 : e.key;
@@ -412,8 +412,8 @@ const xe = (e) => {
412
412
  message: `The ${t} field is required`
413
413
  },
414
414
  validate: (c) => {
415
- var o, i;
416
- if ((o = e == null ? void 0 : e.options) != null && o.disableValidation || !c)
415
+ var a, i;
416
+ if ((a = e == null ? void 0 : e.options) != null && a.disableValidation || !c)
417
417
  return !0;
418
418
  const g = pe(
419
419
  {
@@ -422,15 +422,15 @@ const xe = (e) => {
422
422
  {
423
423
  [e.key]: r
424
424
  }
425
- ), { errors: a } = g;
426
- return a && (a == null ? void 0 : a.length) > 0 ? (i = a == null ? void 0 : a[0]) == null ? void 0 : i.message : !0;
425
+ ), { errors: o } = g;
426
+ return o && (o == null ? void 0 : o.length) > 0 ? (i = o == null ? void 0 : o[0]) == null ? void 0 : i.message : !0;
427
427
  }
428
428
  };
429
429
  }, rt = ({
430
430
  children: e
431
- }) => /* @__PURE__ */ s.jsx("p", { className: "text-xs font-normal text-red-400 text-wrap", children: e }), ot = ({
431
+ }) => /* @__PURE__ */ s.jsx("p", { className: "text-xs font-normal text-red-400 text-wrap", children: e }), at = ({
432
432
  children: e
433
- }) => /* @__PURE__ */ s.jsx("p", { className: b("text-xs font-normal text-gray-600"), children: e }), J = E.forwardRef(({ error: e, helperText: n, containerStyles: t, readOnly: r, children: c }, g) => /* @__PURE__ */ s.jsx(
433
+ }) => /* @__PURE__ */ s.jsx("p", { className: b("text-xs font-normal text-text-1"), children: e }), J = E.forwardRef(({ error: e, helperText: n, containerStyles: t, readOnly: r, children: c }, g) => /* @__PURE__ */ s.jsx(
434
434
  "div",
435
435
  {
436
436
  className: b(
@@ -442,12 +442,12 @@ const xe = (e) => {
442
442
  children: /* @__PURE__ */ s.jsxs("div", { className: b("w-full shrink-0", "sm:flex-1"), children: [
443
443
  c,
444
444
  e && /* @__PURE__ */ s.jsx("div", { className: b("w-full mt-3"), children: /* @__PURE__ */ s.jsx(rt, { children: e }) }),
445
- n && /* @__PURE__ */ s.jsx("div", { className: b("w-full mt-3"), children: /* @__PURE__ */ s.jsx(ot, { children: n }) })
445
+ n && /* @__PURE__ */ s.jsx("div", { className: b("w-full mt-3"), children: /* @__PURE__ */ s.jsx(at, { children: n }) })
446
446
  ] })
447
447
  }
448
448
  ));
449
449
  J.displayName = "FieldWrapper";
450
- const he = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
450
+ const he = I.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
451
451
  "table",
452
452
  {
453
453
  ref: t,
@@ -456,9 +456,9 @@ const he = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
456
456
  }
457
457
  ));
458
458
  he.displayName = "Table";
459
- const at = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx("thead", { ref: t, className: b("[&_tr]:border-b", e), ...n }));
460
- at.displayName = "TableHeader";
461
- const ye = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
459
+ const ot = I.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx("thead", { ref: t, className: b("[&_tr]:border-b", e), ...n }));
460
+ ot.displayName = "TableHeader";
461
+ const ye = I.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
462
462
  "tbody",
463
463
  {
464
464
  ref: t,
@@ -467,7 +467,7 @@ const ye = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
467
467
  }
468
468
  ));
469
469
  ye.displayName = "TableBody";
470
- const lt = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
470
+ const lt = I.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
471
471
  "tfoot",
472
472
  {
473
473
  ref: t,
@@ -476,7 +476,7 @@ const lt = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
476
476
  }
477
477
  ));
478
478
  lt.displayName = "TableFooter";
479
- const fe = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
479
+ const fe = I.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
480
480
  "tr",
481
481
  {
482
482
  ref: t,
@@ -488,7 +488,7 @@ const fe = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
488
488
  }
489
489
  ));
490
490
  fe.displayName = "TableRow";
491
- const it = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
491
+ const it = I.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
492
492
  "th",
493
493
  {
494
494
  ref: t,
@@ -500,7 +500,7 @@ const it = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
500
500
  }
501
501
  ));
502
502
  it.displayName = "TableHead";
503
- const je = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
503
+ const je = I.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
504
504
  "td",
505
505
  {
506
506
  ref: t,
@@ -509,7 +509,7 @@ const je = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
509
509
  }
510
510
  ));
511
511
  je.displayName = "TableCell";
512
- const ct = A.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
512
+ const ct = I.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ s.jsx(
513
513
  "caption",
514
514
  {
515
515
  ref: t,
@@ -566,18 +566,18 @@ const dt = E.lazy(
566
566
  value: n,
567
567
  onChange: t
568
568
  }) => {
569
- var S, y;
570
- const { collection: r } = X(), [c, g] = w(!1), [a, o] = w([]), [i, m] = w(!1), {
569
+ var B, f;
570
+ const { collection: r } = X(), [c, g] = w(!1), [o, a] = w([]), [i, m] = w(!1), {
571
571
  key: x = "",
572
572
  label: d = "items",
573
- helper_text: f = "",
573
+ helper_text: y = "",
574
574
  readonly: k = !1
575
- } = e, C = x, B = ((S = e == null ? void 0 : e.options) == null ? void 0 : S.collection_key) || "", _ = ((y = e == null ? void 0 : e.options) == null ? void 0 : y.label_field_key) || "", I = async (j, N, { page: R = 1 }) => {
576
- var F;
575
+ } = e, C = x, D = ((B = e == null ? void 0 : e.options) == null ? void 0 : B.collection_key) || "", _ = ((f = e == null ? void 0 : e.options) == null ? void 0 : f.label_field_key) || "", A = async (j, N, { page: R = 1 }) => {
576
+ var S;
577
577
  g(!0);
578
578
  try {
579
579
  const L = await (r == null ? void 0 : r.getCollectionContentList({
580
- collection_key: B,
580
+ collection_key: D,
581
581
  page: R,
582
582
  search: j,
583
583
  limit: 10,
@@ -586,19 +586,19 @@ const dt = E.lazy(
586
586
  not_in: n
587
587
  }
588
588
  }
589
- })), h = (F = L == null ? void 0 : L.content) == null ? void 0 : F.data, O = (h || []).map((p) => {
590
- const P = p != null && p[_] ? p == null ? void 0 : p[_] : Q.toTitle((p == null ? void 0 : p.slug) || "");
589
+ })), h = (S = L == null ? void 0 : L.content) == null ? void 0 : S.data, H = (h || []).map((p) => {
590
+ const F = p != null && p[_] ? p == null ? void 0 : p[_] : Q.toTitle((p == null ? void 0 : p.slug) || "");
591
591
  return {
592
592
  value: {
593
593
  _id: p == null ? void 0 : p._id,
594
594
  slug: p == null ? void 0 : p.slug,
595
595
  [_]: p == null ? void 0 : p[_]
596
596
  },
597
- label: P
597
+ label: F
598
598
  };
599
599
  });
600
600
  return {
601
- options: Array.isArray(O) ? O : [],
601
+ options: Array.isArray(H) ? H : [],
602
602
  hasMore: h && !((h == null ? void 0 : h.length) < 10),
603
603
  additional: {
604
604
  page: R + 1
@@ -629,18 +629,18 @@ const dt = E.lazy(
629
629
  onClose: () => m(!1),
630
630
  contentClassName: "max-w-96",
631
631
  children: [
632
- /* @__PURE__ */ s.jsxs(J, { helperText: f, readOnly: k, children: [
632
+ /* @__PURE__ */ s.jsxs(J, { helperText: y, readOnly: k, children: [
633
633
  d && /* @__PURE__ */ s.jsx(q, { htmlFor: C, children: d }),
634
634
  /* @__PURE__ */ s.jsx(
635
635
  be,
636
636
  {
637
637
  id: C,
638
- value: a,
638
+ value: o,
639
639
  onChange: (j) => {
640
- o(j);
640
+ a(j);
641
641
  },
642
642
  isMulti: !0,
643
- loadOptions: I,
643
+ loadOptions: A,
644
644
  debounceTimeout: 500,
645
645
  getOptionLabel: (j) => j == null ? void 0 : j.label,
646
646
  getOptionValue: (j) => j == null ? void 0 : j.value,
@@ -648,7 +648,7 @@ const dt = E.lazy(
648
648
  additional: {
649
649
  page: 1
650
650
  },
651
- cacheUniqs: [B],
651
+ cacheUniqs: [D],
652
652
  minMenuHeight: 250
653
653
  }
654
654
  )
@@ -660,7 +660,7 @@ const dt = E.lazy(
660
660
  onClick: () => {
661
661
  t([
662
662
  ...n,
663
- ...(a ?? []).map((j) => {
663
+ ...(o ?? []).map((j) => {
664
664
  var N;
665
665
  return (N = j == null ? void 0 : j.value) == null ? void 0 : N._id;
666
666
  })
@@ -676,67 +676,63 @@ const dt = E.lazy(
676
676
  }, gt = ({
677
677
  field: e
678
678
  }) => {
679
- var T, M, V;
680
- const { collection: n } = X(), [t, r] = w(!1), [c, g] = w([]), [a, o] = w(1), [i, m] = w(0), [x, d] = w(0), { key: f = "", label: k = "", helper_text: C = "", readonly: B = !1 } = e, _ = f, I = ((T = e == null ? void 0 : e.options) == null ? void 0 : T.collection_key) || "", S = ((M = e == null ? void 0 : e.options) == null ? void 0 : M.label_field_key) || "", {
681
- field: { value: y, onBlur: j, onChange: N, ref: R, disabled: F, ...L },
679
+ var T, M, O;
680
+ const { collection: n } = X(), [t, r] = w(!1), [c, g] = w([]), [o, a] = w(1), [i, m] = w(0), [x, d] = w(0), { key: y = "", label: k = "", helper_text: C = "", readonly: D = !1 } = e, _ = y, A = ((T = e == null ? void 0 : e.options) == null ? void 0 : T.collection_key) || "", B = ((M = e == null ? void 0 : e.options) == null ? void 0 : M.label_field_key) || "", {
681
+ field: { value: f, onBlur: j, onChange: N, ref: R, disabled: S, ...L },
682
682
  fieldState: h
683
683
  } = me({
684
684
  name: _,
685
685
  rules: xe(e)
686
- }), O = !!(e != null && e.required), p = (V = h == null ? void 0 : h.error) == null ? void 0 : V.message, P = async () => {
686
+ }), H = !!(e != null && e.required), p = (O = h == null ? void 0 : h.error) == null ? void 0 : O.message, F = async () => {
687
687
  var Y, ee, te, se, ne;
688
688
  r(!0);
689
689
  const u = await (n == null ? void 0 : n.getCollectionContentList({
690
- collection_key: I,
691
- page: a,
690
+ collection_key: A,
691
+ page: o,
692
692
  limit: 5,
693
693
  where: {
694
694
  _id: {
695
- in: y
695
+ in: f
696
696
  }
697
697
  }
698
- })), D = ((Y = u == null ? void 0 : u.content) == null ? void 0 : Y.data) ?? [], G = ((te = (ee = u == null ? void 0 : u.content) == null ? void 0 : ee.meta) == null ? void 0 : te.pages) ?? 0;
699
- m(((ne = (se = u == null ? void 0 : u.content) == null ? void 0 : se.meta) == null ? void 0 : ne.total) ?? 0), d(G), a > G && o(G), g(D), r(!1);
698
+ })), V = ((Y = u == null ? void 0 : u.content) == null ? void 0 : Y.data) ?? [], G = ((te = (ee = u == null ? void 0 : u.content) == null ? void 0 : ee.meta) == null ? void 0 : te.pages) ?? 0;
699
+ m(((ne = (se = u == null ? void 0 : u.content) == null ? void 0 : se.meta) == null ? void 0 : ne.total) ?? 0), d(G), o > G && a(G), g(V), r(!1);
700
700
  };
701
701
  return ge(() => {
702
- (y == null ? void 0 : y.length) > 0 && P();
703
- }, [y, a]), /* @__PURE__ */ s.jsxs(
702
+ (f == null ? void 0 : f.length) > 0 && F();
703
+ }, [f, o]), /* @__PURE__ */ s.jsxs(
704
704
  J,
705
705
  {
706
706
  ref: R,
707
707
  error: p,
708
708
  helperText: C,
709
- readOnly: B,
709
+ readOnly: D,
710
710
  children: [
711
- k && /* @__PURE__ */ s.jsx(q, { htmlFor: _, isRequired: O, children: k }),
711
+ k && /* @__PURE__ */ s.jsx(q, { htmlFor: _, isRequired: H, children: k }),
712
712
  /* @__PURE__ */ s.jsx(
713
713
  ut,
714
714
  {
715
715
  onChange: N,
716
- value: y ?? [],
716
+ value: f ?? [],
717
717
  field: e
718
718
  }
719
719
  ),
720
- y != null && y.length ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
720
+ f != null && f.length ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
721
721
  /* @__PURE__ */ s.jsxs("div", { className: "relative overflow-hidden", children: [
722
722
  t ? /* @__PURE__ */ s.jsx("div", { className: "z-10 absolute top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-[rgba(0,0,0,0.05)]", children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center", children: [
723
723
  /* @__PURE__ */ s.jsx(Be, { className: "h-8 w-8 animate-spin mr-2" }),
724
724
  "Fetching"
725
725
  ] }) }) : null,
726
- /* @__PURE__ */ s.jsx(he, { className: y.length > 5 ? "min-h-72" : "", children: /* @__PURE__ */ s.jsx(ye, { children: c.map((u) => /* @__PURE__ */ s.jsx(fe, { children: /* @__PURE__ */ s.jsxs(je, { className: "flex justify-between", children: [
727
- u == null ? void 0 : u[S],
726
+ /* @__PURE__ */ s.jsx(he, { className: f.length > 5 ? "min-h-72" : "", children: /* @__PURE__ */ s.jsx(ye, { children: c.map((u) => /* @__PURE__ */ s.jsx(fe, { children: /* @__PURE__ */ s.jsxs(je, { className: "flex justify-between", children: [
727
+ u == null ? void 0 : u[B],
728
728
  /* @__PURE__ */ s.jsx(
729
729
  Fe,
730
730
  {
731
731
  className: "cursor-pointer",
732
732
  size: 20,
733
733
  onClick: () => {
734
- console.log(
735
- y,
736
- y == null ? void 0 : y.filter((D) => D !== (u == null ? void 0 : u._id)),
737
- u
738
- ), N(
739
- y == null ? void 0 : y.filter((D) => D !== (u == null ? void 0 : u._id))
734
+ N(
735
+ f == null ? void 0 : f.filter((V) => V !== (u == null ? void 0 : u._id))
740
736
  );
741
737
  }
742
738
  }
@@ -748,9 +744,9 @@ const dt = E.lazy(
748
744
  "Showing",
749
745
  " ",
750
746
  i ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
751
- 5 * (a - 1) + 1,
747
+ 5 * (o - 1) + 1,
752
748
  "-",
753
- Math.min(5 * a, i),
749
+ Math.min(5 * o, i),
754
750
  " of",
755
751
  " "
756
752
  ] }) : null,
@@ -761,7 +757,7 @@ const dt = E.lazy(
761
757
  /* @__PURE__ */ s.jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
762
758
  /* @__PURE__ */ s.jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
763
759
  "Page ",
764
- a,
760
+ o,
765
761
  " of ",
766
762
  x
767
763
  ] }),
@@ -769,8 +765,8 @@ const dt = E.lazy(
769
765
  /* @__PURE__ */ s.jsxs(
770
766
  W,
771
767
  {
772
- onClick: () => o(1),
773
- disabled: a === 1,
768
+ onClick: () => a(1),
769
+ disabled: o === 1,
774
770
  variant: "outline",
775
771
  className: "hidden h-8 w-8 p-0 lg:flex",
776
772
  children: [
@@ -782,8 +778,8 @@ const dt = E.lazy(
782
778
  /* @__PURE__ */ s.jsxs(
783
779
  W,
784
780
  {
785
- disabled: a === 1,
786
- onClick: () => o(a - 1),
781
+ disabled: o === 1,
782
+ onClick: () => a(o - 1),
787
783
  variant: "outline",
788
784
  className: "h-8 w-8 p-0",
789
785
  children: [
@@ -795,8 +791,8 @@ const dt = E.lazy(
795
791
  /* @__PURE__ */ s.jsxs(
796
792
  W,
797
793
  {
798
- onClick: () => o(a + 1),
799
- disabled: a === x,
794
+ onClick: () => a(o + 1),
795
+ disabled: o === x,
800
796
  variant: "outline",
801
797
  className: "h-8 w-8 p-0",
802
798
  children: [
@@ -808,8 +804,8 @@ const dt = E.lazy(
808
804
  /* @__PURE__ */ s.jsxs(
809
805
  W,
810
806
  {
811
- onClick: () => o(x),
812
- disabled: a === x,
807
+ onClick: () => a(x),
808
+ disabled: o === x,
813
809
  variant: "outline",
814
810
  className: "hidden h-8 w-8 p-0 lg:flex",
815
811
  children: [
@@ -828,15 +824,15 @@ const dt = E.lazy(
828
824
  }, mt = ({
829
825
  field: e
830
826
  }) => {
831
- var R, F, L;
832
- const { collection: n } = X(), [t, r] = w(!1), { key: c = "", label: g = "", helper_text: a = "", readonly: o = !1 } = e, i = c, m = ((R = e == null ? void 0 : e.options) == null ? void 0 : R.collection_key) || "", x = ((F = e == null ? void 0 : e.options) == null ? void 0 : F.label_field_key) || "", {
833
- field: { value: d, onBlur: f, onChange: k, ref: C, disabled: B, ..._ },
834
- fieldState: I
827
+ var R, S, L;
828
+ const { collection: n } = X(), [t, r] = w(!1), { key: c = "", label: g = "", helper_text: o = "", readonly: a = !1 } = e, i = c, m = ((R = e == null ? void 0 : e.options) == null ? void 0 : R.collection_key) || "", x = ((S = e == null ? void 0 : e.options) == null ? void 0 : S.label_field_key) || "", {
829
+ field: { value: d, onBlur: y, onChange: k, ref: C, disabled: D, ..._ },
830
+ fieldState: A
835
831
  } = me({
836
832
  name: i,
837
833
  rules: xe(e)
838
- }), S = !!(e != null && e.required), y = (L = I == null ? void 0 : I.error) == null ? void 0 : L.message, j = async (h, O, { page: p = 1 }) => {
839
- var P;
834
+ }), B = !!(e != null && e.required), f = (L = A == null ? void 0 : A.error) == null ? void 0 : L.message, j = async (h, H, { page: p = 1 }) => {
835
+ var F;
840
836
  r(!0);
841
837
  try {
842
838
  const T = await (n == null ? void 0 : n.getCollectionContentList({
@@ -844,19 +840,19 @@ const dt = E.lazy(
844
840
  page: p,
845
841
  search: h,
846
842
  limit: 10
847
- })), M = (P = T == null ? void 0 : T.content) == null ? void 0 : P.data, V = (M || []).map((u) => {
848
- const D = u != null && u[x] ? u == null ? void 0 : u[x] : Q.toTitle((u == null ? void 0 : u.slug) || "");
843
+ })), M = (F = T == null ? void 0 : T.content) == null ? void 0 : F.data, O = (M || []).map((u) => {
844
+ const V = u != null && u[x] ? u == null ? void 0 : u[x] : Q.toTitle((u == null ? void 0 : u.slug) || "");
849
845
  return {
850
846
  value: {
851
847
  _id: u == null ? void 0 : u._id,
852
848
  slug: u == null ? void 0 : u.slug,
853
849
  [x]: u == null ? void 0 : u[x]
854
850
  },
855
- label: D
851
+ label: V
856
852
  };
857
853
  });
858
854
  return {
859
- options: Array.isArray(V) ? V : [],
855
+ options: Array.isArray(O) ? O : [],
860
856
  hasMore: M && !((M == null ? void 0 : M.length) < 10),
861
857
  additional: {
862
858
  page: p + 1
@@ -885,11 +881,11 @@ const dt = E.lazy(
885
881
  J,
886
882
  {
887
883
  ref: C,
888
- error: y,
889
- helperText: a,
890
- readOnly: o,
884
+ error: f,
885
+ helperText: o,
886
+ readOnly: a,
891
887
  children: [
892
- g && /* @__PURE__ */ s.jsx(q, { htmlFor: i, isRequired: S, children: g }),
888
+ g && /* @__PURE__ */ s.jsx(q, { htmlFor: i, isRequired: B, children: g }),
893
889
  /* @__PURE__ */ s.jsx(
894
890
  be,
895
891
  {
@@ -899,7 +895,7 @@ const dt = E.lazy(
899
895
  k((h == null ? void 0 : h.value) || null);
900
896
  },
901
897
  onBlur: () => {
902
- f();
898
+ y();
903
899
  },
904
900
  loadOptions: j,
905
901
  debounceTimeout: 500,
@@ -911,7 +907,7 @@ const dt = E.lazy(
911
907
  },
912
908
  cacheUniqs: [m],
913
909
  minMenuHeight: 250,
914
- isDisabled: B,
910
+ isDisabled: D,
915
911
  ..._
916
912
  }
917
913
  )
@@ -919,30 +915,30 @@ const dt = E.lazy(
919
915
  }
920
916
  );
921
917
  }, pt = v(
922
- () => import("./MultiTextWidget-DpT1gLmr.js")
923
- ), ie = v(() => import("./TextWidget-qHY9_hkz.js")), xt = v(
924
- () => import("./CurrencyWidget-BfnmQP9S.js")
918
+ () => import("./MultiTextWidget-L2Eoz2Zv.js")
919
+ ), ie = v(() => import("./TextWidget-D4uLMuLS.js")), xt = v(
920
+ () => import("./CurrencyWidget-BaMho9Pw.js")
925
921
  ), ht = v(
926
- () => import("./CheckboxWidget-Dp9IAz5Q.js")
922
+ () => import("./CheckboxWidget-nJO8XlGD.js")
927
923
  ), ce = v(
928
- () => import("./DateTimeWidget-CqjC2iYx.js")
924
+ () => import("./DateTimeWidget-VCmX__cv.js")
929
925
  ), de = v(
930
- () => import("./DropdownWidget-15oYGYnv.js")
931
- ), yt = v(() => import("./EmailWidget-mGeLzigY.js")), ft = v(
932
- () => import("./GeocoderWidget-BXv8P8Y1.js")
926
+ () => import("./DropdownWidget-zAr9v_IY.js")
927
+ ), yt = v(() => import("./EmailWidget-d3hSxbAS.js")), ft = v(
928
+ () => import("./GeocoderWidget-BOqaJMm1.js")
933
929
  ), jt = v(
934
- () => import("./MultiGeocoderWidget-eCOGwc1m.js")
935
- ), bt = v(() => import("./PhoneWidget-DisB02Ll.js")), vt = v(() => import("./RadioWidget-DjWXEZQx.js")), Ct = v(
936
- () => import("./RichTextWidget-BnqTjA-v.js")
937
- ), wt = v(() => import("./SwitchWidget-DQ2OHpuP.js")), kt = v(
938
- () => import("./TextareaWidget-BP5mJR7j.js")
930
+ () => import("./MultiGeocoderWidget-BTffSkJX.js")
931
+ ), bt = v(() => import("./PhoneWidget-CnDhiovx.js")), vt = v(() => import("./RadioWidget-CG01ys9E.js")), Ct = v(
932
+ () => import("./RichTextWidget-DCX1Vpw4.js")
933
+ ), wt = v(() => import("./SwitchWidget-CstjQ_nx.js")), kt = v(
934
+ () => import("./TextareaWidget-CHgyJUuy.js")
939
935
  ), Wt = v(
940
- () => import("./ToggleCheckboxWidget-CzXZ9l_k.js")
941
- ), _t = v(() => import("./URLWidget-BcZQVzW7.js")), K = v(() => import("./UploadWidget-BNdydN68.js")), Nt = ({
936
+ () => import("./ToggleCheckboxWidget-Cfwlrjn7.js")
937
+ ), _t = v(() => import("./URLWidget-CZE68DgS.js")), K = v(() => import("./UploadWidget-Dstuk_qo.js")), Nt = ({
942
938
  field: e,
943
939
  isInternal: n
944
940
  }) => {
945
- var c, g, a, o, i, m;
941
+ var c, g, o, a, i, m;
946
942
  const { field_interface: t, key: r } = e;
947
943
  if (!t || !r)
948
944
  return null;
@@ -1048,7 +1044,7 @@ const dt = E.lazy(
1048
1044
  * and on clicking which actually opens a modal or a drawer widget which renders a table with a multi-row select
1049
1045
  *
1050
1046
  */
1051
- (a = e == null ? void 0 : e.options) != null && a.current_have_many_connected && !((o = e == null ? void 0 : e.options) != null && o.connected_have_many_current) ? (console.error("[LevoCollection]: O2M is not supported"), null) : (i = e == null ? void 0 : e.options) != null && i.current_have_many_connected && ((m = e == null ? void 0 : e.options) != null && m.connected_have_many_current) ? /* @__PURE__ */ s.jsx(gt, { field: e }) : /* @__PURE__ */ s.jsx(mt, { field: e })
1047
+ (o = e == null ? void 0 : e.options) != null && o.current_have_many_connected && !((a = e == null ? void 0 : e.options) != null && a.connected_have_many_current) ? (console.error("[LevoCollection]: O2M is not supported"), null) : (i = e == null ? void 0 : e.options) != null && i.current_have_many_connected && ((m = e == null ? void 0 : e.options) != null && m.connected_have_many_current) ? /* @__PURE__ */ s.jsx(gt, { field: e }) : /* @__PURE__ */ s.jsx(mt, { field: e })
1052
1048
  );
1053
1049
  default:
1054
1050
  return null;
@@ -1060,18 +1056,18 @@ const dt = E.lazy(
1060
1056
  const { key: t = "", label: r = "", field_interface: c = "", fields: g = [] } = e;
1061
1057
  return !c || !t ? null : /* @__PURE__ */ s.jsxs("div", { className: "w-full", children: [
1062
1058
  /* @__PURE__ */ s.jsx(q, { children: r }),
1063
- /* @__PURE__ */ s.jsx("div", { className: "border rounded bg-secondary/40 flex flex-col px-3 py-4 gap-3", children: g.map((a) => {
1064
- const o = {
1065
- ...a,
1066
- key: `${t}.${a == null ? void 0 : a.key}`
1059
+ /* @__PURE__ */ s.jsx("div", { className: "border rounded bg-secondary/40 flex flex-col px-3 py-4 gap-3", children: g.map((o) => {
1060
+ const a = {
1061
+ ...o,
1062
+ key: `${t}.${o == null ? void 0 : o.key}`
1067
1063
  };
1068
1064
  return /* @__PURE__ */ s.jsx(
1069
1065
  ve,
1070
1066
  {
1071
- field: o,
1067
+ field: a,
1072
1068
  isInternal: n
1073
1069
  },
1074
- `common-fields-${e == null ? void 0 : e.id}-${a == null ? void 0 : a.id}`
1070
+ `common-fields-${e == null ? void 0 : e.id}-${o == null ? void 0 : o.id}`
1075
1071
  );
1076
1072
  }) })
1077
1073
  ] });
@@ -1107,10 +1103,10 @@ const dt = E.lazy(
1107
1103
  e
1108
1104
  ] });
1109
1105
  }, ns = () => E.useContext(Ce), Tt = E.lazy(
1110
- () => import("./DefaultFormVariant-CG7WUPV3.js")
1106
+ () => import("./DefaultFormVariant-fTWKRYI_.js")
1111
1107
  ), Mt = E.lazy(
1112
- () => import("./StepsFormVariant-BYzPBT2c.js")
1113
- ), At = ({
1108
+ () => import("./StepsFormVariant-eW9O8rik.js")
1109
+ ), It = ({
1114
1110
  formVariant: e,
1115
1111
  ...n
1116
1112
  }) => {
@@ -1136,7 +1132,7 @@ const dt = E.lazy(
1136
1132
  hiddenFields: n,
1137
1133
  ...t
1138
1134
  }) => {
1139
- const { collection: r } = X(), [c, g] = w(!0), [a, o] = w(null);
1135
+ const { collection: r } = X(), [c, g] = w(!0), [o, a] = w(null);
1140
1136
  return ge(() => {
1141
1137
  e ? r == null || r.getCollectionByIDExpanded(e, {
1142
1138
  headers: {
@@ -1147,11 +1143,11 @@ const dt = E.lazy(
1147
1143
  const m = (x = i == null ? void 0 : i.content) == null ? void 0 : x.data;
1148
1144
  if (m)
1149
1145
  m.sections = (d = m == null ? void 0 : m.sections) == null ? void 0 : d.map(
1150
- (f) => {
1146
+ (y) => {
1151
1147
  var k;
1152
- return f.fields = (k = f == null ? void 0 : f.fields) == null ? void 0 : k.map((C) => (n != null && n.includes(C == null ? void 0 : C.key) && (C.hidden = !0), C)), f;
1148
+ return y.fields = (k = y == null ? void 0 : y.fields) == null ? void 0 : k.map((C) => (n != null && n.includes(C == null ? void 0 : C.key) && (C.hidden = !0), C)), y;
1153
1149
  }
1154
- ), o(m);
1150
+ ), a(m);
1155
1151
  else
1156
1152
  throw new Error(`API response invalid: ${m}`);
1157
1153
  }).catch((i) => {
@@ -1161,7 +1157,7 @@ const dt = E.lazy(
1161
1157
  }) : (console.error(
1162
1158
  "[CollectionFormBuilder] Collection ID or Workspace ID is missing."
1163
1159
  ), g(!1));
1164
- }, [e]), /* @__PURE__ */ s.jsx("div", { className: "w-full h-auto", children: c ? /* @__PURE__ */ s.jsx("div", { className: "min-h-[400px] w-full flex justify-center items-center bg-white rounded-md", children: /* @__PURE__ */ s.jsx(Se, {}) }) : a ? /* @__PURE__ */ s.jsx(At, { schema: a, ...t }) : null });
1160
+ }, [e]), /* @__PURE__ */ s.jsx("div", { className: "w-full h-auto", children: c ? /* @__PURE__ */ s.jsx("div", { className: "min-h-[400px] w-full flex justify-center items-center rounded-md", children: /* @__PURE__ */ s.jsx(Se, {}) }) : o ? /* @__PURE__ */ s.jsx(It, { schema: o, ...t }) : null });
1165
1161
  };
1166
1162
  export {
1167
1163
  J as A,
@@ -1173,7 +1169,7 @@ export {
1173
1169
  pe as a,
1174
1170
  U as b,
1175
1171
  Xt as c,
1176
- ae as d,
1172
+ oe as d,
1177
1173
  Je as e,
1178
1174
  Jt as f,
1179
1175
  ts as g,
@@ -1185,7 +1181,7 @@ export {
1185
1181
  Ue as m,
1186
1182
  qe as n,
1187
1183
  Ge as o,
1188
- oe as p,
1184
+ ae as p,
1189
1185
  Ze as q,
1190
1186
  Ke as r,
1191
1187
  Yt as s,