@remoteoss/json-schema-form 0.4.1-dev.20230703203242 → 0.5.0-dev.20230705093926

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ #### 0.4.1-beta.0 (2023-07-03)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **fieldset:** support root conditionals for fieldsets ([#23](https://github.com/remoteoss/json-schema-form/pull/23)) ([65d87b3a](https://github.com/remoteoss/json-schema-form/commit/65d87b3a93018f0729aed565000eb2a2ce1f2ce7))
6
+ * **select/radio:** Accept just the values in options (plus `''` and `null` for backward-compatibility) ([#18](https://github.com/remoteoss/json-schema-form/pull/18)) ([37501d2d](https://github.com/remoteoss/json-schema-form/commit/37501d2ddafdd5e207b34d2ca3f6b7b7a1006e9d))
7
+
1
8
  #### 0.4.0-beta.0 (2023-06-22)
2
9
 
3
10
  ##### New Features
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.20230703203242
5
- Generated: Mon, 03 Jul 2023 20:32:50 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.5.0-dev.20230705093926
5
+ Generated: Wed, 05 Jul 2023 09:39:42 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -914,10 +914,8 @@ function extractParametersFromNode(schemaNode) {
914
914
  },
915
915
  // Handle [name].presentation
916
916
  ...presentation,
917
- description: containsHTML(description) ? wrapWithSpan(description, {
918
- class: "jsf-description"
919
- }) : description,
920
- extra: containsHTML(presentation.extra) ? wrapWithSpan(presentation.extra, { class: "jsf-extra" }) : presentation.extra,
917
+ description,
918
+ extra: presentation.extra,
921
919
  statement: presentation.statement && {
922
920
  ...presentation.statement,
923
921
  description: statementDescription
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.20230703203242
5
- Generated: Mon, 03 Jul 2023 20:32:50 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.5.0-dev.20230705093926
5
+ Generated: Wed, 05 Jul 2023 09:39:42 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -878,10 +878,8 @@ function extractParametersFromNode(schemaNode) {
878
878
  },
879
879
  // Handle [name].presentation
880
880
  ...presentation,
881
- description: containsHTML(description) ? wrapWithSpan(description, {
882
- class: "jsf-description"
883
- }) : description,
884
- extra: containsHTML(presentation.extra) ? wrapWithSpan(presentation.extra, { class: "jsf-extra" }) : presentation.extra,
881
+ description,
882
+ extra: presentation.extra,
885
883
  statement: presentation.statement && {
886
884
  ...presentation.statement,
887
885
  description: statementDescription
@@ -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.20230703203242
5
- Generated: Mon, 03 Jul 2023 20:32:50 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.5.0-dev.20230705093926
5
+ Generated: Wed, 05 Jul 2023 09:39:42 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -11854,10 +11854,8 @@ function extractParametersFromNode(schemaNode) {
11854
11854
  },
11855
11855
  // Handle [name].presentation
11856
11856
  ...presentation,
11857
- description: containsHTML(description) ? wrapWithSpan(description, {
11858
- class: "jsf-description"
11859
- }) : description,
11860
- extra: containsHTML(presentation.extra) ? wrapWithSpan(presentation.extra, { class: "jsf-extra" }) : presentation.extra,
11857
+ description,
11858
+ extra: presentation.extra,
11861
11859
  statement: presentation.statement && {
11862
11860
  ...presentation.statement,
11863
11861
  description: statementDescription
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/json-schema-form",
3
- "version": "0.4.1-dev.20230703203242",
3
+ "version": "0.5.0-dev.20230705093926",
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",
@@ -439,23 +439,15 @@ describe('createHeadlessForm', () => {
439
439
 
440
440
  // All allowed options are valid
441
441
  validOptions.forEach((value) => {
442
- expect(
443
- validateForm({
444
- [fieldName]: value,
445
- })
446
- ).toBeUndefined();
442
+ expect(validateForm({ [fieldName]: value })).toBeUndefined();
447
443
  });
448
444
 
449
445
  // Any other arbitrary value is not valid.
450
- expect(
451
- validateForm({
452
- [fieldName]: 'blah-blah',
453
- })
454
- ).toEqual({
446
+ expect(validateForm({ [fieldName]: 'blah-blah' })).toEqual({
455
447
  [fieldName]: 'The option "blah-blah" is not valid.',
456
448
  });
457
449
 
458
- // This is a required field:
450
+ // Given undefined, it says it's a required field.
459
451
  expect(validateForm({})).toEqual({
460
452
  [fieldName]: 'Required field',
461
453
  });
@@ -831,6 +823,9 @@ describe('createHeadlessForm', () => {
831
823
 
832
824
  describe('support "radio" optional field - more examples @BUG RMT-518', () => {
833
825
  function assertCommonBehavior(validateForm) {
826
+ // Note: Very similar to assertOptionsAllowed()
827
+ // We could reuse it in a next iteration.
828
+
834
829
  // Happy path
835
830
  expect(validateForm({ has_car: 'yes' })).toBeUndefined();
836
831