Skip to content

Commit 54560d2

Browse files
nickgrosheath-freenomeAbdallah Al-SoqatriburnettkMarekBodinger
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 3b54a43 commit 54560d2

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
@@ -868,6 +868,148 @@ should change the heading of the (upcoming) version to include a major version b
868868
- add missing typescript project reference for `utils` in `validator-ajv6` and `validator-ajv8` packages tsconfigs
869869
- Added a dropdown for changing the `experimental_defaultFormStateBehavior.allOf` behaviour in the playground
870870

871+
872+
# 5.18.2
873+
874+
## @rjsf/core
875+
876+
- Fixed Programmatic submit not working properly in Firefox [#3121](https://github.com/rjsf-team/react-jsonschema-form/issues/3121)
877+
878+
## @rjsf/utils
879+
880+
- [#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))
881+
882+
# 5.18.0
883+
884+
## @rjsf/antd
885+
- 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)
886+
887+
## @rjsf/core
888+
889+
- Fix Error state not resetting when schema changes [#4079](https://github.com/rjsf-team/react-jsonschema-form/issues/4079)
890+
891+
## @rjsf/mui
892+
893+
- 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)
894+
895+
## @rjsf/utils
896+
897+
- Added a new `skipEmptyDefault` option in `emptyObjectFields`, fixing [#3880](https://github.com/rjsf-team/react-jsonschema-form/issues/3880)
898+
- 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).
899+
- 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).
900+
901+
## Dev / docs / playground
902+
903+
- Updated the documentation to describe how to use the `skipEmptyDefault` option.
904+
- Fixed missing import of `Form` in usage documentation - fixing [#4127](https://github.com/rjsf-team/react-jsonschema-form/issues/4127)
905+
906+
# 5.17.1
907+
908+
## @rjsf/chakra-ui
909+
910+
- Added support for `UiSchema` `"ui:rows"` option for `textarea` elements, fixing [#4070](https://github.com/rjsf-team/react-jsonschema-form/issues/4070).
911+
912+
## @rjsf/core
913+
914+
- [#4091](https://github.com/rjsf-team/react-jsonschema-form/issues/4091) Added `errorSchema` to `ArrayFieldTemplate` props.
915+
916+
## @rjsf/utils
917+
918+
- [#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.
919+
- [#4091](https://github.com/rjsf-team/react-jsonschema-form/issues/4091) Added `errorSchema` to the `ArrayFieldTemplateProps` type.
920+
921+
## Dev / docs / playground
922+
923+
- [#4080](https://github.com/rjsf-team/react-jsonschema-form/issues/4080) - Moved the `base64` encoder/decoder object to the Playground package.
924+
- Added test configuration and script to the Playground.
925+
926+
# 5.17.0
927+
928+
## @rjsf/core
929+
930+
- Added support for `anyOf`/`oneOf` in `uiSchema`s in the `MultiSchemaField`, fixing [#4039](https://github.com/rjsf-team/react-jsonschema-form/issues/4039)
931+
- Fix potential XSS vulnerability in the preview button of FileWidget, fixing [#4057](https://github.com/rjsf-team/react-jsonschema-form/issues/4057)
932+
933+
## @rjsf/utils
934+
935+
- [#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.
936+
- 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)
937+
- Changes the way of parsing the data URL, to fix [#4057](https://github.com/rjsf-team/react-jsonschema-form/issues/4057)
938+
939+
## Dev / docs / playground
940+
941+
- [#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`.
942+
- Updated the `uiSchema.md` documentation to describe how to use the new `anyOf`/`oneOf` support
943+
944+
# 5.16.1
945+
946+
## Dev / docs / playground
947+
948+
- Bumped peer dependencies due to new utils function
949+
950+
# 5.16.0
951+
952+
## @rjsf/core
953+
954+
- Pass indexed title from array into its items, adding enhancement asked in [#3983](https://github.com/rjsf-team/react-jsonschema-form/issues/3983)
955+
- Removed `dateElementProps` function implementation, and replaced it with `getDateElementProps` from `@rjsf/utils`.
956+
- Modify submit method to make it a public method, fixing [#4015](https://github.com/rjsf-team/react-jsonschema-form/issues/4015)
957+
- Support file deletion for `format: "data-url"` in `FileWidget`, fixing [#3957](https://github.com/rjsf-team/react-jsonschema-form/issues/3957).
958+
959+
## @rjsf/antd
960+
961+
- Removed `dateElementProps` function implementation, and replaced it with `getDateElementProps` from `@rjsf/utils`.
962+
963+
## @rjsf/chakra-ui
964+
965+
- Removed `dateElementProps` function implementation, and replaced it with `getDateElementProps` from `@rjsf/utils`.
966+
967+
## @rjsf/mui
968+
969+
- 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)
970+
971+
## @rjsf/utils
972+
973+
- 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)
974+
975+
## Dev / docs / playground
976+
977+
- Updated docs and playground with the implementation guide of newly added date re-order feature.
978+
979+
# 5.15.1
980+
981+
## @rjsf/core
982+
983+
- fix `getFieldNames`. Now correctly defines an array of primitives.
984+
985+
## @rjsf/validator-ajv6
986+
987+
- 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)
988+
989+
## @rjsf/validator-ajv8
990+
991+
- 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)
992+
993+
## Dev / docs / playground
994+
995+
- Updated the documentation to describe how to use the newly exposed `ajv` variable
996+
997+
# 5.15.0
998+
999+
## @rjsf/mui
1000+
1001+
- fix gap in text and select widget outlines when `"ui:label": false` is specified.
1002+
1003+
## @rjsf/utils
1004+
1005+
- Updated `resolveAllReferences()` to use own recurse list for each object properties, fixing [#3961](https://github.com/rjsf-team/react-jsonschema-form/issues/3961)
1006+
- 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)
1007+
1008+
## Dev / playground
1009+
1010+
- add missing typescript project reference for `utils` in `validator-ajv6` and `validator-ajv8` packages tsconfigs
1011+
- Added a dropdown for changing the `experimental_defaultFormStateBehavior.allOf` behaviour in the playground
1012+
8711013
# 5.14.3
8721014

8731015
## @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)