@sphereon/ui-components.ssi-react 0.4.1-unstable.62 → 0.4.1-unstable.63

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.
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { JsonForms } from '@jsonforms/react';
3
3
  import { materialCells } from '@jsonforms/material-renderers';
4
4
  import { jsonFormsMaterialRenderers } from '../../../renders/jsonFormsRenders';
5
+ import Ajv from 'ajv';
5
6
  import { formatDateToISO } from '../../../helpers';
6
7
  const initializeDefaultValues = (schema, currentData = {}) => {
7
8
  const result = { ...currentData };
@@ -37,10 +38,13 @@ const initializeDefaultValues = (schema, currentData = {}) => {
37
38
  return result;
38
39
  };
39
40
  const FormView = (props) => {
40
- const { data, schema, uiSchema, validationMode = 'ValidateAndShow', renderers = jsonFormsMaterialRenderers, cells = materialCells, style, middleware, ajv, onFormStateChange, readonly = false, config, } = props;
41
+ const { data, schema, uiSchema, validationMode = 'ValidateAndShow', renderers = jsonFormsMaterialRenderers, cells = materialCells, style, middleware, ajv = new Ajv({
42
+ useDefaults: true,
43
+ allErrors: true
44
+ }), onFormStateChange, readonly = false, config, } = props;
41
45
  const onFormStateChanged = (state) => {
42
46
  void onFormStateChange?.(state);
43
47
  };
44
- return (_jsx("div", { style: style, children: _jsx(JsonForms, { schema: schema, uischema: uiSchema, data: data, renderers: renderers, onChange: onFormStateChanged }) }));
48
+ return (_jsx("div", { style: style, children: _jsx(JsonForms, { schema: schema, uischema: uiSchema, data: data, renderers: renderers, onChange: onFormStateChanged, ajv: ajv }) }));
45
49
  };
46
50
  export default FormView;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.ssi-react",
3
3
  "private": false,
4
- "version": "0.4.1-unstable.62+bb961c4",
4
+ "version": "0.4.1-unstable.63+6597aef",
5
5
  "description": "SSI UI components for React",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -50,7 +50,7 @@
50
50
  "@mui/x-date-pickers": "^6.19.5",
51
51
  "@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.45.94",
52
52
  "@sphereon/ssi-types": "0.34.1-feature.SSISDK.45.94",
53
- "@sphereon/ui-components.core": "0.4.1-unstable.62+bb961c4",
53
+ "@sphereon/ui-components.core": "0.4.1-unstable.63+6597aef",
54
54
  "@tanstack/react-table": "^8.9.3",
55
55
  "react-dom": "npm:react-dom@18.3.1",
56
56
  "react-json-tree": "^0.18.0",
@@ -70,5 +70,5 @@
70
70
  "peerDependencies": {
71
71
  "react": ">= 18"
72
72
  },
73
- "gitHead": "bb961c42496a4acb2551ff66186ec2db44a41f84"
73
+ "gitHead": "6597aef9236ea7eda4b6e702673666e6240b1397"
74
74
  }