Skip to content

Commit 6b1e345

Browse files
nickgrosheath-freenomeabdalla-rkoburnettkMarekBodinger
authored andcommitted
Merge changes in main to rjsf-v6 (rjsf-team#4164)
Co-authored-by: Heath C <[email protected]> Co-authored-by: Abdallah Al-Soqatri <[email protected]> Co-authored-by: Kevin Burnett <[email protected]> Co-authored-by: Marek Bodinger <[email protected]> Co-authored-by: Mehdi Salem <[email protected]> Co-authored-by: Jonasz Wiącek <[email protected]> Co-authored-by: Bogdan Savluk <[email protected]> Co-authored-by: Christian Wendt <[email protected]> Co-authored-by: Ben Lambert <[email protected]> Co-authored-by: David R. Bild <[email protected]> Co-authored-by: Ariqun <[email protected]> Co-authored-by: Shivam Anand Murmu <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shubham Biswas <[email protected]> Co-authored-by: popmanhe <[email protected]> Co-authored-by: Yuki Aoki <[email protected]> Co-authored-by: Xiangcheng Kuo <[email protected]> Co-authored-by: Bart van Andel <[email protected]> Co-authored-by: Laurent Direr <[email protected]> Co-authored-by: Vegard Stenvik <[email protected]> Co-authored-by: Appie <[email protected]> Co-authored-by: Oren Forer <[email protected]> Co-authored-by: Marcus Penn <[email protected]> Co-authored-by: joachimhagheim <[email protected]> Co-authored-by: MarekBodingerBA <[email protected]> Co-authored-by: momesana <[email protected]> Co-authored-by: Martti Roitto <[email protected]> fix(utils): direct lodash function import to improve bundling on library client side (rjsf-team#3976) fix: rjsf-team#3961 resolve all recurse list for object properties (rjsf-team#3981) fix gap in outline when label is hidden (rjsf-team#3984) Fix: Expose the internal `ajv` variable in the validator implementation classes (rjsf-team#3991) Fixes: rjsf-team#3972 indirectly by exposing the `ajv` variable for use in the issue Fix: Change FormHelperText usage with @mui/material to render divs (rjsf-team#4032) Fixes rjsf-team#4031 by switching the render component for `FormHelperText` to be `div` fix: Added support for anyOf/oneOf in uiSchema (rjsf-team#4055) Fixes rjsf-team#4039 by updating `MultiSchemaField` to properly support `anyOf`/`oneOf` arrays in the `uiSchema` Fix checkbox with 0 as a value was unselectable in antd (rjsf-team#4068) Fixed rjsf-team#4067 by properly dealing with enums that have 0 as a value Fix potential XSS in the preview button of FileWidget (rjsf-team#4065) Fix: Make 'ui:rows' option work with chakra-ui for textarea elements rjsf-team#4070 (rjsf-team#4078) Fix typo in ErrorsListTemplate example (rjsf-team#4087) Fix rjsf-team#4080 by moving `base64` encoder/decoder from `@rjsf/utils` to playground (rjsf-team#4093) Fix: Error state not resetting when schema changes (rjsf-team#4079) (rjsf-team#4103) Fix noImplicitAny error (rjsf-team#4106) Fixes: [WARNING] Duplicate key "include" in object literal [duplicate-object-key] (rjsf-team#4114) Fixes: Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>. (rjsf-team#4117) Fix documentation to add missing Form imports (rjsf-team#4131) Fix rjsf-team#4127 to add missing `Form` import in documentation Fix: filename should be bold (rjsf-team#4125) Fix: use correct ConfigProvider context by using named imports (rjsf-team#4132) Fix 4134 by filtering out bad DOM props (rjsf-team#4140) Fixes: rjsf-team#4134 by updating the spreading of props onto the `TextField` to remove bad DOM fields Fixed Programmatic submit not working properly in Firefox (rjsf-team#4150) Fix Maximum call stack size exceeded in findSchemaDefinition (rjsf-team#4123)
1 parent 9a8aea2 commit 6b1e345

File tree

5 files changed

+157
-0
lines changed

5 files changed

+157
-0
lines changed

CHANGELOG.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,148 @@ should change the heading of the (upcoming) version to include a major version b
847847
- add missing typescript project reference for `utils` in `validator-ajv6` and `validator-ajv8` packages tsconfigs
848848
- Added a dropdown for changing the `experimental_defaultFormStateBehavior.allOf` behaviour in the playground
849849

850+
851+
# 5.18.2
852+
853+
## @rjsf/core
854+
855+
- Fixed Programmatic submit not working properly in Firefox [#3121](https://github.com/rjsf-team/react-jsonschema-form/issues/3121)
856+
857+
## @rjsf/utils
858+
859+
- [#4116](https://github.com/rjsf-team/react-jsonschema-form/issues/4116) Fix Maximum call stack size exceeded when encountering circular definitions ([Link to PR](https://github.com/rjsf-team/react-jsonschema-form/pull/4123))
860+
861+
# 5.18.0
862+
863+
## @rjsf/antd
864+
- Fix issue where the theme provided by the ConfigProvider under antd v5 wasn't respected thereby rendering the form items unusable under dark themes [#4129](https://github.com/rjsf-team/react-jsonschema-form/issues/4129)
865+
866+
## @rjsf/core
867+
868+
- Fix Error state not resetting when schema changes [#4079](https://github.com/rjsf-team/react-jsonschema-form/issues/4079)
869+
870+
## @rjsf/mui
871+
872+
- Fixed the `SelectWidget` and `BaseInputTemplate` to filter out `errorSchema` and `autocomplete` from the `textFieldProps` being spread onto the `TextField`, fixing [#4134](https://github.com/rjsf-team/react-jsonschema-form/issues/4134)
873+
874+
## @rjsf/utils
875+
876+
- Added a new `skipEmptyDefault` option in `emptyObjectFields`, fixing [#3880](https://github.com/rjsf-team/react-jsonschema-form/issues/3880)
877+
- Added a new `computeSkipPopulate` option in `arrayMinItems`, allowing custom logic to skip populating arrays with default values, implementing [#4121](https://github.com/rjsf-team/react-jsonschema-form/pull/4121).
878+
- Fixed bug where the string `"\</strong>"` would get printed next to filenames when uploading files, and restored intended bolding of filenames fixing [#4120](https://github.com/rjsf-team/react-jsonschema-form/issues/4120).
879+
880+
## Dev / docs / playground
881+
882+
- Updated the documentation to describe how to use the `skipEmptyDefault` option.
883+
- Fixed missing import of `Form` in usage documentation - fixing [#4127](https://github.com/rjsf-team/react-jsonschema-form/issues/4127)
884+
885+
# 5.17.1
886+
887+
## @rjsf/chakra-ui
888+
889+
- Added support for `UiSchema` `"ui:rows"` option for `textarea` elements, fixing [#4070](https://github.com/rjsf-team/react-jsonschema-form/issues/4070).
890+
891+
## @rjsf/core
892+
893+
- [#4091](https://github.com/rjsf-team/react-jsonschema-form/issues/4091) Added `errorSchema` to `ArrayFieldTemplate` props.
894+
895+
## @rjsf/utils
896+
897+
- [#4080](https://github.com/rjsf-team/react-jsonschema-form/issues/4080) - BREAKING CHANGE: Removed the `base64` object from the `@rjsf/utils` package. Note that this is a breaking change if you relied on the `base64` object exported by `@rjsf/utils`. Since this change caused [#4080](https://github.com/rjsf-team/react-jsonschema-form/issues/4080), and was only internally used by playground code, we are shipping this change in a patch release.
898+
- [#4091](https://github.com/rjsf-team/react-jsonschema-form/issues/4091) Added `errorSchema` to the `ArrayFieldTemplateProps` type.
899+
900+
## Dev / docs / playground
901+
902+
- [#4080](https://github.com/rjsf-team/react-jsonschema-form/issues/4080) - Moved the `base64` encoder/decoder object to the Playground package.
903+
- Added test configuration and script to the Playground.
904+
905+
# 5.17.0
906+
907+
## @rjsf/core
908+
909+
- Added support for `anyOf`/`oneOf` in `uiSchema`s in the `MultiSchemaField`, fixing [#4039](https://github.com/rjsf-team/react-jsonschema-form/issues/4039)
910+
- Fix potential XSS vulnerability in the preview button of FileWidget, fixing [#4057](https://github.com/rjsf-team/react-jsonschema-form/issues/4057)
911+
912+
## @rjsf/utils
913+
914+
- [#4024](https://github.com/rjsf-team/react-jsonschema-form/issues/4024) Added `base64` to support `encoding` and `decoding` using the `UTF-8` charset to support the characters out of the `Latin1` range.
915+
- Updated `enumOptionsValueForIndex()` to fix issue that filtered enum options with a value that was 0, fixing [#4067](https://github.com/rjsf-team/react-jsonschema-form/issues/4067)
916+
- Changes the way of parsing the data URL, to fix [#4057](https://github.com/rjsf-team/react-jsonschema-form/issues/4057)
917+
918+
## Dev / docs / playground
919+
920+
- [#4024](https://github.com/rjsf-team/react-jsonschema-form/issues/4024) Updated the base64 references from (`atob` and `btoa`) to invoke the functions from the new `base64` object in `@rjsf/utils`.
921+
- Updated the `uiSchema.md` documentation to describe how to use the new `anyOf`/`oneOf` support
922+
923+
# 5.16.1
924+
925+
## Dev / docs / playground
926+
927+
- Bumped peer dependencies due to new utils function
928+
929+
# 5.16.0
930+
931+
## @rjsf/core
932+
933+
- Pass indexed title from array into its items, adding enhancement asked in [#3983](https://github.com/rjsf-team/react-jsonschema-form/issues/3983)
934+
- Removed `dateElementProps` function implementation, and replaced it with `getDateElementProps` from `@rjsf/utils`.
935+
- Modify submit method to make it a public method, fixing [#4015](https://github.com/rjsf-team/react-jsonschema-form/issues/4015)
936+
- Support file deletion for `format: "data-url"` in `FileWidget`, fixing [#3957](https://github.com/rjsf-team/react-jsonschema-form/issues/3957).
937+
938+
## @rjsf/antd
939+
940+
- Removed `dateElementProps` function implementation, and replaced it with `getDateElementProps` from `@rjsf/utils`.
941+
942+
## @rjsf/chakra-ui
943+
944+
- Removed `dateElementProps` function implementation, and replaced it with `getDateElementProps` from `@rjsf/utils`.
945+
946+
## @rjsf/mui
947+
948+
- Updated the `FieldErrorTemplate` and `FieldHelpTemplate` to support html-based errors that cause `<xxxx> cannot appear as a descendant of <p>` browser warnings, fixing [#4031](https://github.com/rjsf-team/react-jsonschema-form/issues/4031)
949+
950+
## @rjsf/utils
951+
952+
- Added `getDateElementProps()` to refactor duplicate function in `core`, `antd` & `chakra-ui` AltDateWidget's source code. The same function, implements the feature requested in [#297](https://github.com/rjsf-team/react-jsonschema-form/issues/297)
953+
954+
## Dev / docs / playground
955+
956+
- Updated docs and playground with the implementation guide of newly added date re-order feature.
957+
958+
# 5.15.1
959+
960+
## @rjsf/core
961+
962+
- fix `getFieldNames`. Now correctly defines an array of primitives.
963+
964+
## @rjsf/validator-ajv6
965+
966+
- Updated the `AJV6Validator` class to expose the internal `ajv` object, allowing access to support a fix related to [#3972](https://github.com/rjsf-team/react-jsonschema-form/issues/3972)
967+
968+
## @rjsf/validator-ajv8
969+
970+
- Updated the `AJV8Validator` class to expose the internal `ajv` object, allowing access to support a fix related to [#3972](https://github.com/rjsf-team/react-jsonschema-form/issues/3972)
971+
972+
## Dev / docs / playground
973+
974+
- Updated the documentation to describe how to use the newly exposed `ajv` variable
975+
976+
# 5.15.0
977+
978+
## @rjsf/mui
979+
980+
- fix gap in text and select widget outlines when `"ui:label": false` is specified.
981+
982+
## @rjsf/utils
983+
984+
- Updated `resolveAllReferences()` to use own recurse list for each object properties, fixing [#3961](https://github.com/rjsf-team/react-jsonschema-form/issues/3961)
985+
- Added an experimental flag `allOf` to `experimental_defaultFormStateBehavior` for populating defaults when using `allOf` schemas [#3969](https://github.com/rjsf-team/react-jsonschema-form/pull/3969)
986+
987+
## Dev / playground
988+
989+
- add missing typescript project reference for `utils` in `validator-ajv6` and `validator-ajv8` packages tsconfigs
990+
- Added a dropdown for changing the `experimental_defaultFormStateBehavior.allOf` behaviour in the playground
991+
850992
# 5.14.3
851993

852994
## @rjsf/core

packages/docs/docs/usage/widgets.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ It's also possible to remove the `Now` and `Clear` buttons with the `hideNowButt
9696

9797
You can also, customize the order in which date input fields are displayed by providing `format` property to `ui:options` in your uiSchema, available values are `YMD`(default), `MDY` and `DMY`.
9898

99+
You can also, customize the order in which date input fields are displayed by providing `format` property to `ui:options` in your uiSchema, available values are `YMD`(default), `MDY` and `DMY`.
100+
99101
```tsx
100102
import Form from '@rjsf/core';
101103
import { RJSFSchema, UiSchema } from '@rjsf/utils';

packages/mui/test/__snapshots__/Array.test.tsx.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7118,6 +7118,7 @@ label[data-shrink=false]+.MuiInputBase-formControl .emotion-4:focus::-ms-input-p
71187118
onClick={[Function]}
71197119
>
71207120
<div
7121+
aria-controls="mui-2"
71217122
aria-expanded="false"
71227123
aria-haspopup="listbox"
71237124
aria-labelledby="root-label root"
@@ -10470,6 +10471,7 @@ label[data-shrink=false]+.MuiInputBase-formControl .emotion-4:focus::-ms-input-p
1047010471
onClick={[Function]}
1047110472
>
1047210473
<div
10474+
aria-controls="mui-4"
1047310475
aria-expanded="false"
1047410476
aria-haspopup="listbox"
1047510477
aria-labelledby="root-label root"
@@ -13822,6 +13824,7 @@ label[data-shrink=false]+.MuiInputBase-formControl .emotion-4:focus::-ms-input-p
1382213824
onClick={[Function]}
1382313825
>
1382413826
<div
13827+
aria-controls="mui-3"
1382513828
aria-expanded="false"
1382613829
aria-haspopup="listbox"
1382713830
aria-labelledby="root-label root"
@@ -16905,6 +16908,7 @@ label[data-shrink=false]+.MuiInputBase-formControl .emotion-4:focus::-ms-input-p
1690516908
onClick={[Function]}
1690616909
>
1690716910
<div
16911+
aria-controls="mui-5"
1690816912
aria-expanded="false"
1690916913
aria-haspopup="listbox"
1691016914
aria-labelledby="root-label root"

packages/playground/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const defaultConfig = require('../../babel.config');
2+
3+
module.exports = defaultConfig;

packages/playground/jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
verbose: true,
3+
testEnvironment: 'jsdom',
4+
testMatch: ['**/test/**/*.test.[jt]s?(x)'],
5+
transformIgnorePatterns: [`/node_modules/(?!nanoid)`],
6+
};

0 commit comments

Comments
 (0)