@remoteoss/json-schema-form 0.7.0-beta.0 → 0.7.1-dev.20231025070834

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.7.0-beta.0
5
- Generated: Mon, 23 Oct 2023 10:15:24 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.7.1-dev.20231025070834
5
+ Generated: Wed, 25 Oct 2023 07:08:56 GMT
6
6
 
7
7
  MIT License
8
8
 
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.0-beta.0
5
- Generated: Mon, 23 Oct 2023 10:15:24 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.7.1-dev.20231025070834
5
+ Generated: Wed, 25 Oct 2023 07:08:56 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -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.0-beta.0
5
- Generated: Mon, 23 Oct 2023 10:15:24 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.7.1-dev.20231025070834
5
+ Generated: Wed, 25 Oct 2023 07:08:56 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -3577,7 +3577,7 @@ var require_property_expr = __commonJS({
3577
3577
  );
3578
3578
  }
3579
3579
  function split2(path) {
3580
- return path.match(SPLIT_REGEX) || [""];
3580
+ return path.match(SPLIT_REGEX);
3581
3581
  }
3582
3582
  function forEach2(parts, iter, thisArg) {
3583
3583
  var len = parts.length, part, idx, isArray2, isBracket;
@@ -6898,13 +6898,13 @@ function _extends() {
6898
6898
  }
6899
6899
 
6900
6900
  // node_modules/@babel/runtime/helpers/esm/typeof.js
6901
- function _typeof(o) {
6901
+ function _typeof(obj) {
6902
6902
  "@babel/helpers - typeof";
6903
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
6904
- return typeof o2;
6905
- } : function(o2) {
6906
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
6907
- }, _typeof(o);
6903
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
6904
+ return typeof obj2;
6905
+ } : function(obj2) {
6906
+ return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
6907
+ }, _typeof(obj);
6908
6908
  }
6909
6909
 
6910
6910
  // node_modules/@babel/runtime/helpers/esm/toPrimitive.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/json-schema-form",
3
- "version": "0.7.0-beta.0",
3
+ "version": "0.7.1-dev.20231025070834",
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",
@@ -463,6 +463,12 @@ export const mockCheckboxInput = {
463
463
  })
464
464
  .build();
465
465
  */
466
+
467
+ /**
468
+ * @deprecated in favor of normal JSON schema.
469
+ * Why? This adds extra complexity to read and to
470
+ * copy-paste into the Playground, validators, etc
471
+ * */
466
472
  export function JSONSchemaBuilder() {
467
473
  return {
468
474
  addInput: function addInput(input) {
@@ -658,15 +664,15 @@ export const schemaWithoutTypes = {
658
664
  },
659
665
  };
660
666
 
661
- export const schemaInputTypeText = JSONSchemaBuilder()
662
- .addInput({
667
+ export const schemaInputTypeText = {
668
+ properties: {
663
669
  id_number: mockTextInput,
664
- })
665
- .setRequiredFields(['id_number'])
666
- .build();
670
+ },
671
+ required: ['id_number'],
672
+ };
667
673
 
668
- export const schemaInputWithStatement = JSONSchemaBuilder()
669
- .addInput({
674
+ export const schemaInputWithStatement = {
675
+ properties: {
670
676
  bonus: {
671
677
  title: 'Bonus',
672
678
  'x-jsf-presentation': {
@@ -678,71 +684,10 @@ export const schemaInputWithStatement = JSONSchemaBuilder()
678
684
  },
679
685
  },
680
686
  },
681
- })
682
- .addInput({
683
- a_or_b: {
684
- title: 'A dropdown',
685
- description: 'Some options to chose from',
686
- items: {
687
- enum: ['A', 'B'],
688
- },
687
+ role: {
688
+ title: 'Role',
689
689
  'x-jsf-presentation': {
690
- inputType: 'select',
691
- options: [
692
- {
693
- label: 'A',
694
- value: 'A',
695
- },
696
- {
697
- label: 'B',
698
- value: 'B',
699
- },
700
- ],
701
- placeholder: 'Select...',
702
- statement: {
703
- description: 'This is another statement message, but more severe.',
704
- inputType: 'statement',
705
- severity: 'warning',
706
- },
707
- },
708
- },
709
- })
710
- .build();
711
-
712
- export const schemaInputWithStatementDeprecated = JSONSchemaBuilder()
713
- .addInput({
714
- bonus: {
715
- title: 'Bonus',
716
- presentation: {
717
690
  inputType: 'text',
718
- statement: {
719
- description: 'This is a custom statement message.',
720
- inputType: 'statement',
721
- severity: 'info',
722
- },
723
- },
724
- },
725
- })
726
- .addInput({
727
- a_or_b: {
728
- title: 'A dropdown',
729
- description: 'Some options to chose from',
730
- items: {
731
- enum: ['A', 'B'],
732
- },
733
- presentation: {
734
- inputType: 'select',
735
- options: [
736
- {
737
- label: 'A',
738
- value: 'A',
739
- },
740
- {
741
- label: 'B',
742
- value: 'B',
743
- },
744
- ],
745
- placeholder: 'Select...',
746
691
  statement: {
747
692
  description: 'This is another statement message, but more severe.',
748
693
  inputType: 'statement',
@@ -750,11 +695,11 @@ export const schemaInputWithStatementDeprecated = JSONSchemaBuilder()
750
695
  },
751
696
  },
752
697
  },
753
- })
754
- .build();
698
+ },
699
+ };
755
700
 
756
- export const schemaInputWithExtra = JSONSchemaBuilder()
757
- .addInput({
701
+ export const schemaInputWithExtra = {
702
+ properties: {
758
703
  bonus: {
759
704
  title: 'Bonus',
760
705
  'x-jsf-presentation': {
@@ -772,11 +717,11 @@ export const schemaInputWithExtra = JSONSchemaBuilder()
772
717
  `,
773
718
  },
774
719
  },
775
- })
776
- .build();
720
+ },
721
+ };
777
722
 
778
- export const schemaInputWithCustomDescription = JSONSchemaBuilder()
779
- .addInput({
723
+ export const schemaInputWithCustomDescription = {
724
+ properties: {
780
725
  other: {
781
726
  title: 'Other',
782
727
  'x-jsf-presentation': {
@@ -785,8 +730,8 @@ export const schemaInputWithCustomDescription = JSONSchemaBuilder()
785
730
  },
786
731
  type: 'string',
787
732
  },
788
- })
789
- .build();
733
+ },
734
+ };
790
735
 
791
736
  export const schemaInputDeprecated = JSONSchemaBuilder()
792
737
  .addInput({