@remoteoss/json-schema-form 0.7.4-dev.20231107125305 → 0.7.5-beta.0

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,14 +1,26 @@
1
+ #### 0.7.5-beta.0 (2023-11-15)
2
+
3
+ ##### Chores
4
+
5
+ - Follow-up of #57. Ignore internal attributes from conditional attributes removal (`visibilityCondition`) ([#59](https://github.com/remoteoss/json-schema-form/pull/59)) ([57fe4468](https://github.com/remoteoss/json-schema-form/commit/57fe446834636d727a5da5a91f7e5f3cc4eab8f8))
6
+
7
+ #### 0.7.4-beta.0 (2023-11-07)
8
+
9
+ ##### Chores
10
+
11
+ - Follow-up of #57. Ignore internal attributes from conditional attributes removal (`Component`, `calculateDynamicProperties`) ([#58](https://github.com/remoteoss/json-schema-form/pull/58)) ([ee762c2e](https://github.com/remoteoss/json-schema-form/commit/ee762c2e90834a9ec0d7b88af47cefe1e3a03dd1))
12
+
1
13
  #### 0.7.3-beta.0 (2023-11-07)
2
14
 
3
15
  ##### Bug Fixes
4
16
 
5
- * Remove conditional attributes after the condition is unmatched ([#57](https://github.com/remoteoss/json-schema-form/pull/57)) ([8bac7145](https://github.com/remoteoss/json-schema-form/commit/8bac7145dfdd4136c0613044389666a614eb12f7))
17
+ - Remove conditional attributes after the condition is unmatched ([#57](https://github.com/remoteoss/json-schema-form/pull/57)) ([8bac7145](https://github.com/remoteoss/json-schema-form/commit/8bac7145dfdd4136c0613044389666a614eb12f7))
6
18
 
7
19
  #### 0.7.2-beta.0 (2023-11-06)
8
20
 
9
21
  ##### Bug Fixes
10
22
 
11
- * **select/radio:** Support oneOf[].pattern validation ([#47](https://github.com/remoteoss/json-schema-form/pull/47)) ([5a4bb592](https://github.com/remoteoss/json-schema-form/commit/5a4bb59266ff595a9cb65f5b261a4ae2f3ad279f))
23
+ - **select/radio:** Support oneOf[].pattern validation ([#47](https://github.com/remoteoss/json-schema-form/pull/47)) ([5a4bb592](https://github.com/remoteoss/json-schema-form/commit/5a4bb59266ff595a9cb65f5b261a4ae2f3ad279f))
12
24
 
13
25
  #### 0.7.1-beta.0 (2023-10-31)
14
26
 
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.7.4-dev.20231107125305
5
- Generated: Tue, 07 Nov 2023 12:53:20 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.7.5-beta.0
5
+ Generated: Wed, 15 Nov 2023 07:53:09 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -1078,7 +1078,8 @@ var dynamicInternalJsfAttrs = [
1078
1078
  // The respective JSON Schema
1079
1079
  // HOTFIX/TODO Internal customizations, check test conditions.test.js for more info.
1080
1080
  "Component",
1081
- "calculateDynamicProperties"
1081
+ "calculateDynamicProperties",
1082
+ "visibilityCondition"
1082
1083
  ];
1083
1084
  var dynamicInternalJsfAttrsObj = Object.fromEntries(
1084
1085
  dynamicInternalJsfAttrs.map((k) => [k, true])
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.7.4-dev.20231107125305
5
- Generated: Tue, 07 Nov 2023 12:53:20 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.7.5-beta.0
5
+ Generated: Wed, 15 Nov 2023 07:53:09 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -1042,7 +1042,8 @@ var dynamicInternalJsfAttrs = [
1042
1042
  // The respective JSON Schema
1043
1043
  // HOTFIX/TODO Internal customizations, check test conditions.test.js for more info.
1044
1044
  "Component",
1045
- "calculateDynamicProperties"
1045
+ "calculateDynamicProperties",
1046
+ "visibilityCondition"
1046
1047
  ];
1047
1048
  var dynamicInternalJsfAttrsObj = Object.fromEntries(
1048
1049
  dynamicInternalJsfAttrs.map((k) => [k, true])
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2023 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.7.4-dev.20231107125305
5
- Generated: Tue, 07 Nov 2023 12:53:20 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.7.5-beta.0
5
+ Generated: Wed, 15 Nov 2023 07:53:09 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -12396,7 +12396,8 @@ var dynamicInternalJsfAttrs = [
12396
12396
  // The respective JSON Schema
12397
12397
  // HOTFIX/TODO Internal customizations, check test conditions.test.js for more info.
12398
12398
  "Component",
12399
- "calculateDynamicProperties"
12399
+ "calculateDynamicProperties",
12400
+ "visibilityCondition"
12400
12401
  ];
12401
12402
  var dynamicInternalJsfAttrsObj = Object.fromEntries(
12402
12403
  dynamicInternalJsfAttrs.map((k) => [k, true])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/json-schema-form",
3
- "version": "0.7.4-dev.20231107125305",
3
+ "version": "0.7.5-beta.0",
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",
@@ -293,7 +293,7 @@ describe('Conditional attributes updated', () => {
293
293
  expect(fields[1].isVisible).toBe(false);
294
294
  });
295
295
 
296
- it('Keeps internal attributes (fieldAttrsFromJsf)', () => {
296
+ it('Keeps internal attributes (dynamicInternalJsfAttrs)', () => {
297
297
  // This is necessary while we keep supporting "type", even if deprecated
298
298
  // otherwise our Remote app will break because it didn't migrate
299
299
  // from "type" to "inputType" yet.
@@ -359,7 +359,7 @@ describe('Conditional attributes updated', () => {
359
359
  });
360
360
  });
361
361
 
362
- it('Keeps custom attribute Component (fieldAttrsFromJsf) (hotfix temporary)', () => {
362
+ it('Keeps custom attributes (dynamicInternalJsfAttrs) (hotfix temporary)', () => {
363
363
  // This is necessary as hotfix because we (Remote) use it internally.
364
364
  // Not cool, we'll need a better solution asap.
365
365
  const { fields, handleValidation } = createHeadlessForm(
@@ -415,5 +415,11 @@ describe('Conditional attributes updated', () => {
415
415
  handleValidation({ is_full_time: 'no' });
416
416
  expect(fields[1].Component).toBe('<A React Component>');
417
417
  expect(fields[1].calculateDynamicProperties).toEqual(expect.any(Function));
418
+
419
+ expect(fields[1].visibilityCondition).toEqual(undefined);
420
+ // visibilityCondition can be externally changed/updated/added, it stays there too;
421
+ fields[1].visibilityCondition = () => false;
422
+ handleValidation({ is_full_time: 'no' });
423
+ expect(fields[1].visibilityCondition).toEqual(expect.any(Function));
418
424
  });
419
425
  });