@overmap-ai/forms 1.0.36-add-utils.13 → 1.0.36-add-utils.14

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 (84) hide show
  1. package/dist/form/fields/BaseField/BaseField.d.ts +2 -2
  2. package/dist/form/fields/BaseStringField/BaseStringField.d.ts +2 -2
  3. package/dist/form/fields/BooleanField/BooleanField.d.ts +2 -2
  4. package/dist/form/fields/BooleanField/BooleanField.test.d.ts +1 -0
  5. package/dist/form/fields/BooleanField/BooleanFieldInput.d.ts +7 -0
  6. package/dist/form/fields/BooleanField/index.d.ts +1 -1
  7. package/dist/form/fields/CheckboxListField/CheckboxListField.d.ts +2 -2
  8. package/dist/form/fields/CheckboxListField/CheckboxListField.test.d.ts +1 -0
  9. package/dist/form/fields/CheckboxListField/CheckboxListFieldInput.d.ts +7 -0
  10. package/dist/form/fields/CheckboxListField/index.d.ts +1 -1
  11. package/dist/form/fields/DateField/DateField.d.ts +2 -2
  12. package/dist/form/fields/DateField/DateField.test.d.ts +1 -0
  13. package/dist/form/fields/DateField/DateFieldInput.d.ts +7 -0
  14. package/dist/form/fields/DateField/index.d.ts +1 -1
  15. package/dist/form/fields/MultiSelectField/MultiSelectField.d.ts +2 -2
  16. package/dist/form/fields/MultiSelectField/MultiSelectField.test.d.ts +1 -0
  17. package/dist/form/fields/MultiSelectField/MultiSelectFieldInput.d.ts +6 -0
  18. package/dist/form/fields/MultiSelectField/index.d.ts +1 -1
  19. package/dist/form/fields/MultiStringField/MultiStringField.d.ts +2 -2
  20. package/dist/form/fields/MultiStringField/MultiStringField.test.d.ts +1 -0
  21. package/dist/form/fields/MultiStringField/MultiStringFieldInput.d.ts +7 -0
  22. package/dist/form/fields/MultiStringField/index.d.ts +1 -1
  23. package/dist/form/fields/NumberField/NumberField.d.ts +2 -2
  24. package/dist/form/fields/NumberField/NumberField.test.d.ts +1 -0
  25. package/dist/form/fields/NumberField/NumberFieldInput.d.ts +7 -0
  26. package/dist/form/fields/NumberField/index.d.ts +1 -1
  27. package/dist/form/fields/{OneTimePasswordField → OTPField}/OTPField.d.ts +2 -2
  28. package/dist/form/fields/OTPField/OTPField.test.d.ts +1 -0
  29. package/dist/form/fields/OTPField/OTPFieldInput.d.ts +7 -0
  30. package/dist/form/fields/{OneTimePasswordField → OTPField}/index.d.ts +1 -1
  31. package/dist/form/fields/PassFailField/PassFailField.d.ts +2 -2
  32. package/dist/form/fields/PassFailField/PassFailField.test.d.ts +1 -0
  33. package/dist/form/fields/PassFailField/PassFailFieldInput.d.ts +7 -0
  34. package/dist/form/fields/PassFailField/index.d.ts +1 -1
  35. package/dist/form/fields/RadioField/RadioField.d.ts +2 -2
  36. package/dist/form/fields/RadioField/RadioField.test.d.ts +1 -0
  37. package/dist/form/fields/RadioField/RadioFieldInput.d.ts +7 -0
  38. package/dist/form/fields/RadioField/index.d.ts +1 -1
  39. package/dist/form/fields/RatingField/RatingField.d.ts +2 -2
  40. package/dist/form/fields/RatingField/RatingField.test.d.ts +1 -0
  41. package/dist/form/fields/RatingField/RatingFieldInput.d.ts +7 -0
  42. package/dist/form/fields/RatingField/index.d.ts +1 -1
  43. package/dist/form/fields/ScanField/ScanField.d.ts +2 -2
  44. package/dist/form/fields/ScanField/ScanField.test.d.ts +1 -0
  45. package/dist/form/fields/ScanField/ScanFieldInput.d.ts +7 -0
  46. package/dist/form/fields/ScanField/index.d.ts +1 -1
  47. package/dist/form/fields/SelectField/SelectField.d.ts +2 -2
  48. package/dist/form/fields/SelectField/SelectField.test.d.ts +1 -0
  49. package/dist/form/fields/SelectField/SelectFieldInput.d.ts +7 -0
  50. package/dist/form/fields/SelectField/index.d.ts +1 -1
  51. package/dist/form/fields/StringField/StringField.test.d.ts +1 -0
  52. package/dist/form/fields/StringField/StringFieldInput.d.ts +7 -0
  53. package/dist/form/fields/StringField/index.d.ts +1 -1
  54. package/dist/form/fields/TextField/TextField.test.d.ts +1 -0
  55. package/dist/form/fields/TextField/TextFieldInput.d.ts +7 -0
  56. package/dist/form/fields/TextField/index.d.ts +1 -1
  57. package/dist/form/fields/UploadField/UploadField.d.ts +2 -2
  58. package/dist/form/fields/UploadField/UploadField.test.d.ts +1 -0
  59. package/dist/form/fields/UploadField/UploadFieldInput.d.ts +7 -0
  60. package/dist/form/fields/UploadField/index.d.ts +1 -1
  61. package/dist/form/fields/constants.d.ts +1 -1
  62. package/dist/form/fields/index.d.ts +1 -1
  63. package/dist/form/fields/typings.d.ts +1 -1
  64. package/dist/form/schema/FieldSchema.d.ts +3 -1
  65. package/dist/form/schema/FieldSchema.test.d.ts +1 -0
  66. package/dist/forms.js +120 -114
  67. package/dist/forms.umd.cjs +41 -41
  68. package/package.json +4 -2
  69. package/dist/form/fields/BooleanField/BooleanInput.d.ts +0 -7
  70. package/dist/form/fields/CheckboxListField/CheckboxListInput.d.ts +0 -7
  71. package/dist/form/fields/DateField/DateInput.d.ts +0 -7
  72. package/dist/form/fields/MultiSelectField/MultiSelectInput.d.ts +0 -6
  73. package/dist/form/fields/MultiStringField/MultiStringInput.d.ts +0 -7
  74. package/dist/form/fields/NumberField/NumberInput.d.ts +0 -7
  75. package/dist/form/fields/OneTimePasswordField/OTPInput.d.ts +0 -7
  76. package/dist/form/fields/PassFailField/PassFailInput.d.ts +0 -7
  77. package/dist/form/fields/RadioField/RadioInput.d.ts +0 -7
  78. package/dist/form/fields/RatingField/RatingInput.d.ts +0 -7
  79. package/dist/form/fields/ScanField/ScanInput.d.ts +0 -7
  80. package/dist/form/fields/SelectField/SelectInput.d.ts +0 -7
  81. package/dist/form/fields/StringField/StringInput.d.ts +0 -7
  82. package/dist/form/fields/TextField/TextInput.d.ts +0 -7
  83. package/dist/form/fields/UploadField/UploadInput.d.ts +0 -7
  84. /package/dist/form/fields/{OneTimePasswordField → OTPField}/typings.d.ts +0 -0
package/dist/forms.js CHANGED
@@ -824,7 +824,7 @@ const qe = X((r) => {
824
824
  }), $e = (r) => {
825
825
  const { children: e, ...t } = r;
826
826
  return /* @__PURE__ */ p(hi, { ...t, children: e });
827
- }, _0 = (r, e) => oe(() => !e || !r ? null : r.render(e), [r, e]), rn = (r, e) => /* @__PURE__ */ p("div", { className: "flex flex-col gap-4", children: r.map((t) => /* @__PURE__ */ p(Xa, { children: t.render(e) }, t.identifier)) }), je = (r) => {
827
+ }, S0 = (r, e) => oe(() => !e || !r ? null : r.render(e), [r, e]), rn = (r, e) => /* @__PURE__ */ p("div", { className: "flex flex-col gap-4", children: r.map((t) => /* @__PURE__ */ p(Xa, { children: t.render(e) }, t.identifier)) }), je = (r) => {
828
828
  const { field: e, size: t, showInputOnly: n, onValuesChange: i, ...a } = r, [o, s, l] = _r(e.identifier), { touched: c } = s, u = s.error ?? e.description, f = s.error ? "danger" : void 0, h = e.identifier, d = `${h}-label`, v = e.required ? `${e.label} *` : e.label, g = oe(() => ({
829
829
  ...o,
830
830
  // name and value not being overridden
@@ -988,7 +988,7 @@ const qe = X((r) => {
988
988
  ) })
989
989
  ] }) });
990
990
  });
991
- co.displayName = "MultiStringInput";
991
+ co.displayName = "MultiStringFieldInput";
992
992
  const Xt = class Xt extends Je {
993
993
  constructor(t) {
994
994
  const { minimum_length: n, maximum_length: i, placeholder: a, ...o } = t;
@@ -1048,10 +1048,10 @@ const Xt = class Xt extends Je {
1048
1048
  static deserialize(t) {
1049
1049
  return new Xt(t);
1050
1050
  }
1051
- isSerializedValueValid(t) {
1051
+ isSerializedValue(t) {
1052
1052
  return tn(t);
1053
1053
  }
1054
- isValueValid(t) {
1054
+ isValue(t) {
1055
1055
  return tn(t);
1056
1056
  }
1057
1057
  blankValue() {
@@ -1148,7 +1148,7 @@ const uo = X((r) => {
1148
1148
  }
1149
1149
  ) });
1150
1150
  });
1151
- uo.displayName = "BooleanInput";
1151
+ uo.displayName = "BooleanFieldInput";
1152
1152
  const Wt = class Wt extends Je {
1153
1153
  constructor(t) {
1154
1154
  super(t);
@@ -1182,10 +1182,10 @@ const Wt = class Wt extends Je {
1182
1182
  render(t) {
1183
1183
  return /* @__PURE__ */ p(uo, { ...t, field: this });
1184
1184
  }
1185
- isSerializedValueValid(t) {
1185
+ isSerializedValue(t) {
1186
1186
  return typeof t == "boolean";
1187
1187
  }
1188
- isValueValid(t) {
1188
+ isValue(t) {
1189
1189
  return typeof t == "boolean";
1190
1190
  }
1191
1191
  blankValue() {
@@ -1251,7 +1251,7 @@ const fo = X((r) => {
1251
1251
  }
1252
1252
  ) });
1253
1253
  });
1254
- fo.displayName = "NumberInput";
1254
+ fo.displayName = "NumberFieldInput";
1255
1255
  const _t = class _t extends Je {
1256
1256
  constructor(t) {
1257
1257
  const {
@@ -1356,10 +1356,10 @@ const _t = class _t extends Je {
1356
1356
  render(t) {
1357
1357
  return /* @__PURE__ */ p(fo, { field: this, ...t });
1358
1358
  }
1359
- isSerializedValueValid(t) {
1360
- return this.isValueValid(t);
1359
+ isSerializedValue(t) {
1360
+ return this.isValue(t);
1361
1361
  }
1362
- isValueValid(t) {
1362
+ isValue(t) {
1363
1363
  return typeof t == "number" && !isNaN(t) || t === null;
1364
1364
  }
1365
1365
  areValuesEqual(t, n) {
@@ -1454,10 +1454,10 @@ class ho extends Je {
1454
1454
  deserializeValue(t) {
1455
1455
  return t;
1456
1456
  }
1457
- isSerializedValueValid(t) {
1457
+ isSerializedValue(t) {
1458
1458
  return typeof t == "string";
1459
1459
  }
1460
- isValueValid(t) {
1460
+ isValue(t) {
1461
1461
  return typeof t == "string";
1462
1462
  }
1463
1463
  blankValue() {
@@ -1510,7 +1510,7 @@ const po = X((r) => {
1510
1510
  }
1511
1511
  ) });
1512
1512
  });
1513
- po.displayName = "CheckboxListInput";
1513
+ po.displayName = "CheckboxListFieldInput";
1514
1514
  const qt = class qt extends fn {
1515
1515
  constructor(t) {
1516
1516
  super(t);
@@ -1541,13 +1541,13 @@ const qt = class qt extends fn {
1541
1541
  render(t) {
1542
1542
  return /* @__PURE__ */ p(po, { field: this, ...t });
1543
1543
  }
1544
- isSerializedValueValid(t) {
1544
+ isSerializedValue(t) {
1545
1545
  if (!tn(t)) return !1;
1546
1546
  const n = new Set(this.options.map(({ value: i }) => i));
1547
1547
  return t.every((i) => n.has(i));
1548
1548
  }
1549
- isValueValid(t) {
1550
- return this.isSerializedValueValid(t);
1549
+ isValue(t) {
1550
+ return this.isSerializedValue(t);
1551
1551
  }
1552
1552
  blankValue() {
1553
1553
  return [];
@@ -1624,7 +1624,7 @@ const vo = X((r) => {
1624
1624
  }
1625
1625
  ) });
1626
1626
  });
1627
- vo.displayName = "DateInput";
1627
+ vo.displayName = "DateFieldInput";
1628
1628
  const $t = class $t extends Je {
1629
1629
  constructor(t) {
1630
1630
  super(t);
@@ -1658,10 +1658,10 @@ const $t = class $t extends Je {
1658
1658
  render(t) {
1659
1659
  return /* @__PURE__ */ p(vo, { field: this, ...t });
1660
1660
  }
1661
- isSerializedValueValid(t) {
1662
- return typeof t != "string" && t !== null ? !1 : this.isValueValid(this.deserializeValue(t));
1661
+ isSerializedValue(t) {
1662
+ return typeof t != "string" && t !== null ? !1 : this.isValue(this.deserializeValue(t));
1663
1663
  }
1664
- isValueValid(t) {
1664
+ isValue(t) {
1665
1665
  return !(!(t instanceof Date) && t !== null || t instanceof Date && isNaN(t.getTime()));
1666
1666
  }
1667
1667
  blankValue() {
@@ -1739,7 +1739,7 @@ const go = X((r) => {
1739
1739
  }
1740
1740
  ) });
1741
1741
  });
1742
- go.displayName = "MultiSelectInput";
1742
+ go.displayName = "MultiSelectFieldInput";
1743
1743
  const jt = class jt extends fn {
1744
1744
  constructor(t) {
1745
1745
  const { placeholder: n, ...i } = t;
@@ -1779,13 +1779,13 @@ const jt = class jt extends fn {
1779
1779
  render(t) {
1780
1780
  return /* @__PURE__ */ p(go, { field: this, ...t });
1781
1781
  }
1782
- isSerializedValueValid(t) {
1782
+ isSerializedValue(t) {
1783
1783
  if (!tn(t)) return !1;
1784
1784
  const n = new Set(this.options.map(({ value: i }) => i));
1785
1785
  return t.every((i) => n.has(i));
1786
1786
  }
1787
- isValueValid(t) {
1788
- return this.isSerializedValueValid(t);
1787
+ isValue(t) {
1788
+ return this.isSerializedValue(t);
1789
1789
  }
1790
1790
  blankValue() {
1791
1791
  return [];
@@ -1846,7 +1846,7 @@ const xo = X((r) => {
1846
1846
  }
1847
1847
  ) });
1848
1848
  });
1849
- xo.displayName = "SelectInput";
1849
+ xo.displayName = "SelectFieldInput";
1850
1850
  const Yt = class Yt extends fn {
1851
1851
  constructor(t) {
1852
1852
  const { placeholder: n, ...i } = t;
@@ -1886,11 +1886,11 @@ const Yt = class Yt extends fn {
1886
1886
  render(t) {
1887
1887
  return /* @__PURE__ */ p(xo, { field: this, ...t });
1888
1888
  }
1889
- isSerializedValueValid(t) {
1889
+ isSerializedValue(t) {
1890
1890
  return typeof t != "string" && t !== null ? !1 : (/* @__PURE__ */ new Set([null, ...this.options.map(({ value: i }) => i)])).has(t);
1891
1891
  }
1892
- isValueValid(t) {
1893
- return this.isSerializedValueValid(t);
1892
+ isValue(t) {
1893
+ return this.isSerializedValue(t);
1894
1894
  }
1895
1895
  blankValue() {
1896
1896
  return null;
@@ -1962,7 +1962,7 @@ const yo = X((r) => {
1962
1962
  }
1963
1963
  ) });
1964
1964
  });
1965
- yo.displayName = "NumberInput";
1965
+ yo.displayName = "OTPFieldInput";
1966
1966
  const Zt = class Zt extends Je {
1967
1967
  constructor(t) {
1968
1968
  const { length: n, validationType: i, ...a } = t;
@@ -2058,10 +2058,10 @@ const Zt = class Zt extends Je {
2058
2058
  render(t) {
2059
2059
  return /* @__PURE__ */ p(yo, { field: this, ...t });
2060
2060
  }
2061
- isSerializedValueValid(t) {
2061
+ isSerializedValue(t) {
2062
2062
  return typeof t == "string";
2063
2063
  }
2064
- isValueValid(t) {
2064
+ isValue(t) {
2065
2065
  return typeof t == "string";
2066
2066
  }
2067
2067
  blankValue() {
@@ -2419,7 +2419,7 @@ const mo = X((r) => {
2419
2419
  }
2420
2420
  ) });
2421
2421
  });
2422
- mo.displayName = "PassFailInput";
2422
+ mo.displayName = "PassFailFieldInput";
2423
2423
  const wo = (r) => typeof r == "string" && Or.includes(r), gc = (r) => !(r === null || typeof r != "object" || !("status" in r) || !wo(r.status) || !("notes" in r) || typeof r.notes != "string" || !("files" in r) || !(Array.isArray(r.files) && r.files.length === 0)), xc = (r) => !(r === null || typeof r != "object" || !("status" in r) || !wo(r.status) || !("notes" in r) || typeof r.notes != "string" || !("files" in r) || !hc(r.files)), yc = (r) => ({
2424
2424
  status: r.status,
2425
2425
  notes: r.notes,
@@ -2505,10 +2505,10 @@ const wo = (r) => typeof r == "string" && Or.includes(r), gc = (r) => !(r === nu
2505
2505
  render(t) {
2506
2506
  return /* @__PURE__ */ p(mo, { field: this, ...t });
2507
2507
  }
2508
- isSerializedValueValid(t) {
2508
+ isSerializedValue(t) {
2509
2509
  return gc(t);
2510
2510
  }
2511
- isValueValid(t) {
2511
+ isValue(t) {
2512
2512
  return xc(t);
2513
2513
  }
2514
2514
  areValuesEqual(t, n) {
@@ -2600,7 +2600,7 @@ const Co = X((r) => {
2600
2600
  }
2601
2601
  ) });
2602
2602
  });
2603
- Co.displayName = "SelectInput";
2603
+ Co.displayName = "RadioFieldInput";
2604
2604
  const Qt = class Qt extends fn {
2605
2605
  constructor(t) {
2606
2606
  super(t);
@@ -2634,11 +2634,11 @@ const Qt = class Qt extends fn {
2634
2634
  render(t) {
2635
2635
  return /* @__PURE__ */ p(Co, { field: this, ...t });
2636
2636
  }
2637
- isSerializedValueValid(t) {
2637
+ isSerializedValue(t) {
2638
2638
  return typeof t != "string" && t !== null ? !1 : (/* @__PURE__ */ new Set([null, ...this.options.map(({ value: i }) => i)])).has(t);
2639
2639
  }
2640
- isValueValid(t) {
2641
- return this.isSerializedValueValid(t);
2640
+ isValue(t) {
2641
+ return this.isSerializedValue(t);
2642
2642
  }
2643
2643
  blankValue() {
2644
2644
  return null;
@@ -2699,7 +2699,7 @@ const Ao = X((r) => {
2699
2699
  }
2700
2700
  ) });
2701
2701
  });
2702
- Ao.displayName = "RatingInput";
2702
+ Ao.displayName = "RatingFieldInput";
2703
2703
  const Jt = class Jt extends Je {
2704
2704
  constructor(t) {
2705
2705
  const { maxRating: n, ...i } = t;
@@ -2766,10 +2766,10 @@ const Jt = class Jt extends Je {
2766
2766
  render(t) {
2767
2767
  return /* @__PURE__ */ p(Ao, { field: this, ...t });
2768
2768
  }
2769
- isSerializedValueValid(t) {
2770
- return this.isValueValid(t);
2769
+ isSerializedValue(t) {
2770
+ return this.isValue(t);
2771
2771
  }
2772
- isValueValid(t) {
2772
+ isValue(t) {
2773
2773
  return typeof t == "number" && !isNaN(t) || t === null;
2774
2774
  }
2775
2775
  areValuesEqual(t, n) {
@@ -2789,7 +2789,7 @@ I(Jt, "fieldTypeName", "Rating"), I(Jt, "fieldTypeDescription", "Allows users to
2789
2789
  let Dr = Jt;
2790
2790
  const _o = Fr(() => {
2791
2791
  throw new Error("No ScannerProvider found");
2792
- }), E0 = () => dt(_o);
2792
+ }), b0 = () => dt(_o);
2793
2793
  function Ac(r, e) {
2794
2794
  var t = Object.setPrototypeOf;
2795
2795
  t ? t(r, e) : r.__proto__ = e;
@@ -22928,7 +22928,7 @@ const ko = X((r) => {
22928
22928
  }
22929
22929
  ) });
22930
22930
  });
22931
- ko.displayName = "QrInput";
22931
+ ko.displayName = "ScanFieldInput";
22932
22932
  const er = class er extends Je {
22933
22933
  constructor(t) {
22934
22934
  super(t);
@@ -22962,10 +22962,10 @@ const er = class er extends Je {
22962
22962
  render(t) {
22963
22963
  return /* @__PURE__ */ p(ko, { ...t, field: this });
22964
22964
  }
22965
- isSerializedValueValid(t) {
22965
+ isSerializedValue(t) {
22966
22966
  return typeof t == "string";
22967
22967
  }
22968
- isValueValid(t) {
22968
+ isValue(t) {
22969
22969
  return typeof t == "string";
22970
22970
  }
22971
22971
  blankValue() {
@@ -23029,7 +23029,7 @@ const $n = 500, zo = X((r) => {
23029
23029
  }
23030
23030
  ) });
23031
23031
  });
23032
- zo.displayName = "StringInput";
23032
+ zo.displayName = "StringFieldInput";
23033
23033
  const tr = class tr extends ho {
23034
23034
  constructor(t) {
23035
23035
  const { ...n } = t, i = t.maxLength ? Math.min($n, t.maxLength) : $n, a = t.minLength ? Math.min(t.minLength, i) : void 0;
@@ -23112,7 +23112,7 @@ const Uo = X((r) => {
23112
23112
  }
23113
23113
  ) });
23114
23114
  });
23115
- Uo.displayName = "TextInput";
23115
+ Uo.displayName = "TextFieldInput";
23116
23116
  const rr = class rr extends ho {
23117
23117
  constructor(t) {
23118
23118
  const n = t.maxLength ? Math.min(mr, t.maxLength) : mr, i = t.minLength ? Math.min(t.minLength, n) : void 0;
@@ -23243,7 +23243,7 @@ const Ho = X((r) => {
23243
23243
  )) })
23244
23244
  ] });
23245
23245
  });
23246
- Ho.displayName = "UploadInput";
23246
+ Ho.displayName = "UploadFieldInput";
23247
23247
  const nr = class nr extends Je {
23248
23248
  constructor(t) {
23249
23249
  const { extensions: n, maximum_files: i, maximum_size: a, ...o } = t;
@@ -23363,10 +23363,10 @@ const nr = class nr extends Je {
23363
23363
  render(t) {
23364
23364
  return /* @__PURE__ */ p(Ho, { field: this, ...t });
23365
23365
  }
23366
- isSerializedValueValid(t) {
23366
+ isSerializedValue(t) {
23367
23367
  return Array.isArray(t) && t.length === 0;
23368
23368
  }
23369
- isValueValid(t) {
23369
+ isValue(t) {
23370
23370
  return Array.isArray(t) ? t.every((n) => n instanceof zr || n instanceof Ft) : !1;
23371
23371
  }
23372
23372
  areValuesEqual(t, n) {
@@ -24164,7 +24164,7 @@ class Vi extends un {
24164
24164
  return this.conditions.length === 0 ? !0 : this.conditions.map((i) => [i.getApplyFn(), i.accessorFn]).every(([i, a]) => i(a(t)));
24165
24165
  }
24166
24166
  }
24167
- const S0 = (r, e) => oe(() => {
24167
+ const I0 = (r, e) => oe(() => {
24168
24168
  const t = new Vi(r);
24169
24169
  return t.observe((n) => e(n.getConditions())), t;
24170
24170
  }, [r, e]), I1 = (r) => {
@@ -25350,11 +25350,11 @@ const z1 = {
25350
25350
  (n) => U1(t[n.fieldId], n)
25351
25351
  );
25352
25352
  }, Fi = (r) => bi[r.type].deserialize(r);
25353
- function b0(r) {
25353
+ function O0(r) {
25354
25354
  return r.map(H1);
25355
25355
  }
25356
25356
  const H1 = (r) => r.type === "section" ? ot.deserialize(r) : Fi(r);
25357
- function I0(r) {
25357
+ function N0(r) {
25358
25358
  return r.map(Fi);
25359
25359
  }
25360
25360
  function G1(r) {
@@ -25396,7 +25396,7 @@ function Bi(r, e) {
25396
25396
  for (const n of r) {
25397
25397
  if (!(n.identifier in e)) continue;
25398
25398
  const i = e[n.identifier];
25399
- n.isValueValid(i) && (t[n.identifier] = n.cleanValue(i));
25399
+ n.isValue(i) && (t[n.identifier] = n.cleanValue(i));
25400
25400
  }
25401
25401
  return t;
25402
25402
  }
@@ -25405,22 +25405,22 @@ function is(r, e) {
25405
25405
  for (const n of r) {
25406
25406
  if (!(n.identifier in e)) continue;
25407
25407
  const i = e[n.identifier];
25408
- n.isSerializedValueValid(i) && (t[n.identifier] = n.cleanSerializedValue(i));
25408
+ n.isSerializedValue(i) && (t[n.identifier] = n.cleanSerializedValue(i));
25409
25409
  }
25410
25410
  return t;
25411
25411
  }
25412
- function O0(r, e) {
25412
+ function $1(r, e) {
25413
25413
  const t = Bi(r, e), n = {}, i = {};
25414
25414
  for (const a of r) {
25415
25415
  if (!(a.identifier in t)) continue;
25416
25416
  const o = t[a.identifier];
25417
25417
  switch (a.type) {
25418
25418
  case "upload":
25419
- if (!a.isValueValid(o)) break;
25419
+ if (!a.isValue(o)) break;
25420
25420
  i[a.identifier] = o, n[a.identifier] = [];
25421
25421
  break;
25422
25422
  case "pass-fail":
25423
- if (!a.isValueValid(o)) break;
25423
+ if (!a.isValue(o)) break;
25424
25424
  i[a.identifier] = o.files, n[a.identifier] = {
25425
25425
  ...o,
25426
25426
  files: []
@@ -25432,45 +25432,45 @@ function O0(r, e) {
25432
25432
  }
25433
25433
  return [n, i];
25434
25434
  }
25435
- function N0(r, e, t) {
25435
+ function j1(r, e, t) {
25436
25436
  const n = {};
25437
25437
  for (const i of r) {
25438
25438
  if (!(i.identifier in e)) continue;
25439
25439
  const a = e[i.identifier];
25440
25440
  switch (i.type) {
25441
25441
  case "upload":
25442
- if (!i.isValueValid(a)) break;
25442
+ if (!i.isValue(a)) break;
25443
25443
  n[i.identifier] = t[i.identifier] ?? [];
25444
25444
  break;
25445
25445
  case "pass-fail":
25446
- if (!i.isValueValid(a)) break;
25446
+ if (!i.isValue(a)) break;
25447
25447
  n[i.identifier] = {
25448
25448
  ...a,
25449
25449
  files: t[i.identifier] ?? []
25450
25450
  };
25451
25451
  break;
25452
25452
  default:
25453
- if (!i.isValueValid(a)) break;
25453
+ if (!i.isValue(a)) break;
25454
25454
  n[i.identifier] = a;
25455
25455
  }
25456
25456
  }
25457
25457
  return n;
25458
25458
  }
25459
- const $1 = (r, e) => {
25459
+ const Y1 = (r, e) => {
25460
25460
  const t = {};
25461
25461
  for (const n of r) {
25462
25462
  const i = e[n.identifier];
25463
25463
  t[n.identifier] = i !== void 0 ? i : n.blankValue();
25464
25464
  }
25465
25465
  return t;
25466
- }, j1 = (r, e, t) => {
25466
+ }, Z1 = (r, e, t) => {
25467
25467
  const n = {};
25468
25468
  for (const i of r) {
25469
25469
  const a = e[i.identifier], o = t[i.identifier];
25470
25470
  i.areValuesEqual(a, o) || (n[i.identifier] = o);
25471
25471
  }
25472
25472
  return n;
25473
- }, Y1 = (r, e, t) => {
25473
+ }, K1 = (r, e, t) => {
25474
25474
  const n = {};
25475
25475
  for (const i of r) {
25476
25476
  const a = e[i.identifier], o = t[i.identifier];
@@ -25485,7 +25485,7 @@ const $1 = (r, e) => {
25485
25485
  for (const t of r)
25486
25486
  e[t.identifier] = t.blankValue();
25487
25487
  return e;
25488
- }, Z1 = (r, e) => as(r, e, os(r)), K1 = (r, e, t = {}) => {
25488
+ }, Q1 = (r, e) => as(r, e, os(r)), J1 = (r, e, t = {}) => {
25489
25489
  const { conditions: n = !1 } = t, i = r.get(e.identifier);
25490
25490
  if (!i)
25491
25491
  throw new Error(
@@ -25518,11 +25518,11 @@ const $1 = (r, e) => {
25518
25518
  conditions: s,
25519
25519
  fields: o
25520
25520
  };
25521
- }, Q1 = (r, e = {}) => {
25521
+ }, e0 = (r, e = {}) => {
25522
25522
  const t = new Map(
25523
25523
  r.map((n) => [n.identifier, W()])
25524
25524
  );
25525
- return r.map((n) => K1(t, n, e));
25525
+ return r.map((n) => J1(t, n, e));
25526
25526
  }, ss = (r, e) => {
25527
25527
  const t = {}, n = r.filter((i) => i instanceof ot);
25528
25528
  console.debug("validateFields", r, e);
@@ -25592,7 +25592,7 @@ class Lt extends un {
25592
25592
  return new Lt(t.map(ot.deserialize));
25593
25593
  }
25594
25594
  static reseedFieldSections(t, n) {
25595
- return Q1(t, n);
25595
+ return e0(t, n);
25596
25596
  }
25597
25597
  getFields() {
25598
25598
  return this.fieldSections.flatMap((t) => t.getFields());
@@ -25648,7 +25648,7 @@ class Lt extends un {
25648
25648
  return W1(this.getFields(), t, n);
25649
25649
  }
25650
25650
  initializeValues(t) {
25651
- return $1(this.getFields(), t);
25651
+ return Y1(this.getFields(), t);
25652
25652
  }
25653
25653
  validateValues(t) {
25654
25654
  return ss(this.getFieldSections(), t);
@@ -25657,20 +25657,26 @@ class Lt extends un {
25657
25657
  return ns(this.getFields(), t);
25658
25658
  }
25659
25659
  changedFieldValues(t, n) {
25660
- return j1(this.getFields(), t, n);
25660
+ return Z1(this.getFields(), t, n);
25661
25661
  }
25662
25662
  unchangedFieldValues(t, n) {
25663
- return Y1(this.getFields(), t, n);
25663
+ return K1(this.getFields(), t, n);
25664
25664
  }
25665
25665
  areValuesEqual(t, n) {
25666
25666
  return as(this.getFields(), t, n);
25667
25667
  }
25668
25668
  areValuesBlank(t) {
25669
- return Z1(this.getFields(), t);
25669
+ return Q1(this.getFields(), t);
25670
25670
  }
25671
25671
  blankValues() {
25672
25672
  return os(this.getFields());
25673
25673
  }
25674
+ extractFilesAndPromisesFromFieldValues(t) {
25675
+ return $1(this.getFields(), t);
25676
+ }
25677
+ insertFilesAndPromisesToFieldValues(t, n) {
25678
+ return j1(this.getFields(), t, n);
25679
+ }
25674
25680
  }
25675
25681
  const ls = Fr({}), cs = X((r) => {
25676
25682
  const { fieldSection: e, ...t } = r, { label: n, description: i } = e, { values: a } = Lr(), o = dt(ls), s = oe(() => o.getFieldSections(), [o]), l = oe(() => s.filter((f) => e.identifier in f.conditions), [s, e.identifier]), c = oe(() => l.length === 0 ? !0 : l.some((f) => {
@@ -25828,7 +25834,7 @@ I(Dt, "fieldTypeName", "Section"), I(Dt, "fieldTypeDescription", "Sections can b
25828
25834
  return new Dt({ ...t, fields: n, conditions: i });
25829
25835
  });
25830
25836
  let ot = Dt;
25831
- const zt = Fr(new Lt([])), ln = "form-builder", Rn = Fr({}), J1 = (r = () => null) => oe(() => Object.entries(bi).map(([t, n]) => ({
25837
+ const zt = Fr(new Lt([])), ln = "form-builder", Rn = Fr({}), t0 = (r = () => null) => oe(() => Object.entries(bi).map(([t, n]) => ({
25832
25838
  children: n.fieldTypeName,
25833
25839
  icon: /* @__PURE__ */ p(D, { icon: me[t] }),
25834
25840
  value: t,
@@ -25836,7 +25842,7 @@ const zt = Fr(new Lt([])), ln = "form-builder", Rn = Fr({}), J1 = (r = () => nul
25836
25842
  r(t);
25837
25843
  }
25838
25844
  })), [r]), Mn = X((r) => {
25839
- const { children: e, variant: t, size: n, accentColor: i, onSelectFieldType: a, ...o } = r, s = J1(a);
25845
+ const { children: e, variant: t, size: n, accentColor: i, onSelectFieldType: a, ...o } = r, s = t0(a);
25840
25846
  return /* @__PURE__ */ _(V.Root, { ...o, children: [
25841
25847
  /* @__PURE__ */ p(V.ClickTrigger, { children: e }),
25842
25848
  /* @__PURE__ */ p(V.Content, { variant: t, size: n, accentColor: i, children: /* @__PURE__ */ p(V.Scroll, { children: s.flat().map((l) => /* @__PURE__ */ _(V.Item, { onSelect: l.onSelect, children: [
@@ -26460,11 +26466,11 @@ const gs = X((r) => {
26460
26466
  );
26461
26467
  });
26462
26468
  gs.displayName = "CustomNode";
26463
- const e0 = {
26469
+ const r0 = {
26464
26470
  fieldSection: gs
26465
- }, t0 = {
26471
+ }, n0 = {
26466
26472
  fieldSectionCondition: vs
26467
- }, r0 = (r, e, t) => {
26473
+ }, i0 = (r, e, t) => {
26468
26474
  const n = new Gi.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
26469
26475
  return n.setGraph({ rankdir: t, nodesep: 200, edgesep: 500, ranksep: 500 }), e.forEach(
26470
26476
  (i) => n.setEdge(i.source, i.target, {
@@ -26490,7 +26496,7 @@ const e0 = {
26490
26496
  }),
26491
26497
  e
26492
26498
  ];
26493
- }, n0 = {
26499
+ }, a0 = {
26494
26500
  hideAttribution: !0
26495
26501
  }, xs = X(() => {
26496
26502
  const { handleSubmit: r, errors: e } = Lr(), { hideTitle: t, hideDescription: n, onCancel: i } = dt(Rn), a = dt(zt), o = Br(null), [s, l] = ye(), [c, u] = ye("TB");
@@ -26539,7 +26545,7 @@ const e0 = {
26539
26545
  }, [f, v]), ke(() => {
26540
26546
  m(h);
26541
26547
  }, [h, m]);
26542
- const [C, A] = oe(() => r0(d, x, c), [x, c, d]), E = T(() => {
26548
+ const [C, A] = oe(() => i0(d, x, c), [x, c, d]), E = T(() => {
26543
26549
  a.addFieldSection(new ot({ identifier: W(), fields: [] }));
26544
26550
  }, [a]), b = T(
26545
26551
  (H) => {
@@ -26603,14 +26609,14 @@ const e0 = {
26603
26609
  onNodesChange: g,
26604
26610
  edges: A,
26605
26611
  onEdgesChange: w,
26606
- nodeTypes: e0,
26607
- edgeTypes: t0,
26612
+ nodeTypes: r0,
26613
+ edgeTypes: n0,
26608
26614
  onConnect: b,
26609
26615
  attributionPosition: "bottom-left",
26610
26616
  fitView: !0,
26611
26617
  minZoom: 0,
26612
26618
  isValidConnection: N,
26613
- proOptions: n0
26619
+ proOptions: a0
26614
26620
  }
26615
26621
  ),
26616
26622
  /* @__PURE__ */ p(Bn, { position: "top-left", children: /* @__PURE__ */ p(he, { className: "flex items-center justify-end gap-2", size: "sm", children: /* @__PURE__ */ _(z, { type: "button", variant: "surface", onClick: E, children: [
@@ -27016,7 +27022,7 @@ const Cs = X(() => {
27016
27022
  ] });
27017
27023
  });
27018
27024
  Cs.displayName = "FormBuilderListBuilder";
27019
- const i0 = X(
27025
+ const o0 = X(
27020
27026
  Pr((r, e) => {
27021
27027
  const {
27022
27028
  title: t,
@@ -27111,7 +27117,7 @@ const i0 = X(
27111
27117
  ), As = X((r) => {
27112
27118
  const { showFormTitle: e } = r, { values: t } = Lr(), n = dt(zt);
27113
27119
  return /* @__PURE__ */ p(
27114
- i0,
27120
+ o0,
27115
27121
  {
27116
27122
  fieldSchema: n,
27117
27123
  title: t.title,
@@ -27202,12 +27208,12 @@ export {
27202
27208
  Sr as BooleanField,
27203
27209
  xn as BooleanFieldCondition,
27204
27210
  S1 as BooleanFieldConditionCell,
27205
- uo as BooleanInput,
27211
+ uo as BooleanFieldInput,
27206
27212
  d1 as BooleanNotEqualsConditionModifier,
27207
27213
  br as CheckboxListField,
27208
27214
  yn as CheckboxListFieldCondition,
27209
27215
  b1 as CheckboxListFieldConditionCell,
27210
- po as CheckboxListInput,
27216
+ po as CheckboxListFieldInput,
27211
27217
  Vi as ConditionManager,
27212
27218
  g1 as DateAfterConditionModifier,
27213
27219
  v1 as DateBeforeConditionModifier,
@@ -27215,7 +27221,7 @@ export {
27215
27221
  nn as DateField,
27216
27222
  mn as DateFieldCondition,
27217
27223
  I1 as DateFieldConditionCell,
27218
- vo as DateInput,
27224
+ vo as DateFieldInput,
27219
27225
  p1 as DateNotEqualsConditionModifier,
27220
27226
  x1 as DateRangeInConditionModifier,
27221
27227
  y1 as DateRangeNotInConditionModifier,
@@ -27226,7 +27232,7 @@ export {
27226
27232
  bi as FieldTypeToClsMapping,
27227
27233
  ao as FileCard,
27228
27234
  R0 as FormBuilder,
27229
- i0 as FormRenderer,
27235
+ o0 as FormRenderer,
27230
27236
  m1 as HasFilesConditionModifier,
27231
27237
  pc as ImageCard,
27232
27238
  lo as ImageViewer,
@@ -27238,18 +27244,18 @@ export {
27238
27244
  Pt as MultiSelectField,
27239
27245
  wn as MultiSelectFieldCondition,
27240
27246
  O1 as MultiSelectFieldConditionCell,
27241
- go as MultiSelectInput,
27247
+ go as MultiSelectFieldInput,
27242
27248
  Er as MultiStringField,
27243
27249
  Cn as MultiStringFieldCondition,
27244
27250
  N1 as MultiStringFieldConditionCell,
27245
- co as MultiStringInput,
27251
+ co as MultiStringFieldInput,
27246
27252
  Xo as NumberEqualsConditionModifier,
27247
27253
  pt as NumberField,
27248
27254
  An as NumberFieldCondition,
27249
27255
  T1 as NumberFieldConditionCell,
27256
+ fo as NumberFieldInput,
27250
27257
  jo as NumberGreaterThanConditionModifier,
27251
27258
  Yo as NumberGreaterThanOrEqualsConditionModifier,
27252
- fo as NumberInput,
27253
27259
  qo as NumberLessThanConditionModifier,
27254
27260
  $o as NumberLessThanOrEqualsConditionModifier,
27255
27261
  Wo as NumberNotEqualsConditionModifier,
@@ -27258,7 +27264,7 @@ export {
27258
27264
  Ir as OTPField,
27259
27265
  _n as OTPFieldCondition,
27260
27266
  D1 as OTPFieldConditionCell,
27261
- yo as OTPInput,
27267
+ yo as OTPFieldInput,
27262
27268
  un as Observable,
27263
27269
  E1 as PassFailArrayExcludesConditionModifier,
27264
27270
  _1 as PassFailArrayIncludesConditionModifier,
@@ -27266,28 +27272,28 @@ export {
27266
27272
  Nr as PassFailField,
27267
27273
  En as PassFailFieldCondition,
27268
27274
  R1 as PassFailFieldConditionCell,
27269
- mo as PassFailInput,
27275
+ mo as PassFailFieldInput,
27270
27276
  A1 as PassFailNotEqualsConditionModifier,
27271
27277
  Tr as RadioField,
27272
27278
  Sn as RadioFieldCondition,
27273
27279
  M1 as RadioFieldConditionCell,
27274
- Co as RadioInput,
27280
+ Co as RadioFieldInput,
27275
27281
  Dr as RatingField,
27276
27282
  bn as RatingFieldCondition,
27277
27283
  V1 as RatingFieldConditionCell,
27278
- Ao as RatingInput,
27284
+ Ao as RatingFieldInput,
27279
27285
  kr as SEVERITY_COLOR_MAPPING,
27280
27286
  $n as SHORT_TEXT_FIELD_MAX_LENGTH,
27281
27287
  sn as ScanField,
27282
27288
  In as ScanFieldCondition,
27283
27289
  P1 as ScanFieldConditionCell,
27284
- ko as ScanInput,
27290
+ ko as ScanFieldInput,
27285
27291
  Si as Scanner,
27286
27292
  l1 as ScannerProvider,
27287
27293
  or as SelectField,
27288
27294
  On as SelectFieldCondition,
27289
27295
  F1 as SelectFieldConditionCell,
27290
- xo as SelectInput,
27296
+ xo as SelectFieldInput,
27291
27297
  Ti as StringArrayEqualsConditionModifier,
27292
27298
  Ii as StringArrayEveryConditionModifier,
27293
27299
  Jo as StringArrayExcludesConditionModifier,
@@ -27300,13 +27306,13 @@ export {
27300
27306
  Rr as StringField,
27301
27307
  Nn as StringFieldCondition,
27302
27308
  B1 as StringFieldConditionCell,
27309
+ zo as StringFieldInput,
27303
27310
  vn as StringIncludesConditionModifier,
27304
- zo as StringInput,
27305
27311
  ur as StringNotEqualsConditionModifier,
27306
27312
  Mr as TextField,
27307
27313
  Tn as TextFieldCondition,
27308
27314
  L1 as TextFieldConditionCell,
27309
- Uo as TextInput,
27315
+ Uo as TextFieldInput,
27310
27316
  Ue as UNLABELLED_FIELD_LABEL,
27311
27317
  Go as UNLABELLED_SECTION_LABEL,
27312
27318
  Ft as UUIDFile,
@@ -27314,15 +27320,15 @@ export {
27314
27320
  Vr as UploadField,
27315
27321
  Dn as UploadFieldCondition,
27316
27322
  k1 as UploadFieldConditionCell,
27317
- Ho as UploadInput,
27318
- Z1 as areFieldValuesBlank,
27323
+ Ho as UploadFieldInput,
27324
+ Q1 as areFieldValuesBlank,
27319
27325
  as as areFieldValuesEqual,
27320
27326
  vi as areFileAndPromiseArraysEqual,
27321
27327
  wc as arePassFieldValuesEqual,
27322
27328
  Cc as areSerializedPassFailFieldValuesEqual,
27323
27329
  D0 as awaitFilesAndPromises,
27324
27330
  os as blankFieldValues,
27325
- j1 as changedFieldValues,
27331
+ Z1 as changedFieldValues,
27326
27332
  Bi as cleanFieldValues,
27327
27333
  is as cleanSerializedFieldValues,
27328
27334
  us as createCondition,
@@ -27333,15 +27339,15 @@ export {
27333
27339
  ns as deserializeConditions,
27334
27340
  Fi as deserializeField,
27335
27341
  q1 as deserializeFieldValues,
27336
- b0 as deserializeFields,
27337
- I0 as deserializeOnlyFields,
27342
+ O0 as deserializeFields,
27343
+ N0 as deserializeOnlyFields,
27338
27344
  mc as deserializePassFailFieldValue,
27339
- O0 as extractFilesAndPromisesFromFieldValues,
27345
+ $1 as extractFilesAndPromisesFromFieldValues,
27340
27346
  me as fieldIcons,
27341
27347
  G1 as flattenFields,
27342
27348
  X1 as getFieldsMapping,
27343
- $1 as initializeFieldValues,
27344
- N0 as insertFilesAndPromisesToFieldValues,
27349
+ Y1 as initializeFieldValues,
27350
+ j1 as insertFilesAndPromisesToFieldValues,
27345
27351
  hc as isFileAndPromiseArray,
27346
27352
  wo as isPassFailFieldStatus,
27347
27353
  xc as isPassFailFieldValue,
@@ -27355,12 +27361,12 @@ export {
27355
27361
  T0 as separateImagesFromFields,
27356
27362
  W1 as serializeFieldValues,
27357
27363
  yc as serializePassFailFieldValue,
27358
- Y1 as unchangedFieldValues,
27359
- S0 as useConditionManager,
27360
- _0 as useFieldInput,
27364
+ K1 as unchangedFieldValues,
27365
+ I0 as useConditionManager,
27366
+ S0 as useFieldInput,
27361
27367
  rn as useFieldInputs,
27362
27368
  je as useFormikInput,
27363
27369
  pi as useImageViewer,
27364
- E0 as useScanner,
27370
+ b0 as useScanner,
27365
27371
  ss as validateFields
27366
27372
  };