@remoteoss/json-schema-form 0.4.1-dev.20230703161935 → 0.4.1-dev.20230703195833

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/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2023 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.4.1-dev.20230703161935
5
- Generated: Mon, 03 Jul 2023 16:19:50 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.4.1-dev.20230703195833
5
+ Generated: Mon, 03 Jul 2023 19:58:43 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -665,8 +665,17 @@ function checkIfConditionMatches(node, formValues, formFields) {
665
665
  if (currentProperty.enum) {
666
666
  return currentProperty.enum.includes(value);
667
667
  }
668
- const { inputType } = getField(name, formFields);
669
- return validateFieldSchema({ ...currentProperty, inputType, required: true }, value);
668
+ const field = getField(name, formFields);
669
+ return validateFieldSchema(
670
+ {
671
+ options: field.options,
672
+ // @TODO/CODE SMELL. We are passing the property (raw field), but buildYupSchema() expected the output field.
673
+ ...currentProperty,
674
+ inputType: field.inputType,
675
+ required: true
676
+ },
677
+ value
678
+ );
670
679
  });
671
680
  }
672
681
  function isFieldFilled(fieldValue) {
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2023 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.4.1-dev.20230703161935
5
- Generated: Mon, 03 Jul 2023 16:19:50 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.4.1-dev.20230703195833
5
+ Generated: Mon, 03 Jul 2023 19:58:43 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -629,8 +629,17 @@ function checkIfConditionMatches(node, formValues, formFields) {
629
629
  if (currentProperty.enum) {
630
630
  return currentProperty.enum.includes(value);
631
631
  }
632
- const { inputType } = getField(name, formFields);
633
- return validateFieldSchema({ ...currentProperty, inputType, required: true }, value);
632
+ const field = getField(name, formFields);
633
+ return validateFieldSchema(
634
+ {
635
+ options: field.options,
636
+ // @TODO/CODE SMELL. We are passing the property (raw field), but buildYupSchema() expected the output field.
637
+ ...currentProperty,
638
+ inputType: field.inputType,
639
+ required: true
640
+ },
641
+ value
642
+ );
634
643
  });
635
644
  }
636
645
  function isFieldFilled(fieldValue) {
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2023 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.4.1-dev.20230703161935
5
- Generated: Mon, 03 Jul 2023 16:19:50 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.4.1-dev.20230703195833
5
+ Generated: Mon, 03 Jul 2023 19:58:43 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -11605,8 +11605,17 @@ function checkIfConditionMatches(node, formValues, formFields) {
11605
11605
  if (currentProperty.enum) {
11606
11606
  return currentProperty.enum.includes(value);
11607
11607
  }
11608
- const { inputType } = getField(name, formFields);
11609
- return validateFieldSchema({ ...currentProperty, inputType, required: true }, value);
11608
+ const field = getField(name, formFields);
11609
+ return validateFieldSchema(
11610
+ {
11611
+ options: field.options,
11612
+ // @TODO/CODE SMELL. We are passing the property (raw field), but buildYupSchema() expected the output field.
11613
+ ...currentProperty,
11614
+ inputType: field.inputType,
11615
+ required: true
11616
+ },
11617
+ value
11618
+ );
11610
11619
  });
11611
11620
  }
11612
11621
  function isFieldFilled(fieldValue) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/json-schema-form",
3
- "version": "0.4.1-dev.20230703161935",
3
+ "version": "0.4.1-dev.20230703195833",
4
4
  "description": "Headless UI form powered by JSON Schemas",
5
5
  "author": "Remote.com <engineering@remote.com> (https://remote.com/)",
6
6
  "license": "MIT",