@overmap-ai/forms 1.0.36-add-utils.8 → 1.0.36-add-utils.10

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.
@@ -25,7 +25,7 @@ export declare class RatingField extends BaseField<"rating", number | null, numb
25
25
  serializeValue(value: number | null): number | null;
26
26
  deserializeValue(value: number | null): number | null;
27
27
  render(props: FieldRenderProps): ReactNode;
28
- isSerializedValueValid(value: unknown): value is number;
28
+ isSerializedValueValid(value: unknown): value is number | null;
29
29
  isValueValid(value: unknown): value is number | null;
30
30
  areValuesEqual(value1: number | null, value2: number | null): boolean;
31
31
  blankValue(): number | null;
package/dist/forms.js CHANGED
@@ -1354,10 +1354,10 @@ const _t = class _t extends Je {
1354
1354
  return /* @__PURE__ */ p(fo, { field: this, ...t });
1355
1355
  }
1356
1356
  isSerializedValueValid(t) {
1357
- return typeof t == "number" || t === null;
1357
+ return this.isValueValid(t);
1358
1358
  }
1359
1359
  isValueValid(t) {
1360
- return typeof t == "number" || t === null;
1360
+ return typeof t == "number" && !isNaN(t) || t === null;
1361
1361
  }
1362
1362
  areValuesEqual(t, n) {
1363
1363
  return t === n;
@@ -2763,10 +2763,10 @@ const Jt = class Jt extends Je {
2763
2763
  return /* @__PURE__ */ p(Ao, { field: this, ...t });
2764
2764
  }
2765
2765
  isSerializedValueValid(t) {
2766
- return typeof t == "number" || t === null;
2766
+ return this.isValueValid(t);
2767
2767
  }
2768
2768
  isValueValid(t) {
2769
- return typeof t == "number" || t === null;
2769
+ return typeof t == "number" && !isNaN(t) || t === null;
2770
2770
  }
2771
2771
  areValuesEqual(t, n) {
2772
2772
  return t === n;
@@ -25522,7 +25522,7 @@ const $1 = (r, e) => {
25522
25522
  for (const i of r)
25523
25523
  if (i instanceof ot) {
25524
25524
  const a = n.filter((s) => i.identifier in s.conditions);
25525
- if (a.length >= 0 && !a.some((s) => {
25525
+ if (a.length > 0 && !a.some((s) => {
25526
25526
  const l = s.getConditions(i.identifier);
25527
25527
  return new Vi(l).applyConditions(e);
25528
25528
  }))