Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript broken in latest release ElementType requires between 0-1 type arguments #40427

Closed
benjdlambert opened this issue Jan 4, 2024 · 29 comments · Fixed by #41500 or mui/mui-x#12479
Assignees
Labels
component: Popper The React component. See <Popup> for the latest version. package: material-ui Specific to @mui/material typescript

Comments

@benjdlambert
Copy link

benjdlambert commented Jan 4, 2024

Steps to reproduce

yarn install && yarn tsc --skipLibCheck=false

Current behavior

node_modules/@mui/base/Unstable_Popup/Popup.d.ts:13:70 - error TS2707: Generic type 'ElementType' requires between 0 and 1 type arguments.

13 declare const Popup: React.ForwardRefExoticComponent<Omit<PopupProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<Element>>;
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/material/Popper/Popper.d.ts:46:17 - error TS2707: Generic type 'ElementType' requires between 0 and 1 type arguments.

46     component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/material/Popper/Popper.d.ts:53:16 - error TS2707: Generic type 'ElementType' requires between 0 and 1 type arguments.

53         Root?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 3 errors in 2 files.

Errors  Files
     1  node_modules/@mui/base/Unstable_Popup/Popup.d.ts:13
     2  node_modules/@mui/material/Popper/Popper.d.ts:46

Expected behavior

No typescript errors

Context

looks like this error started from the release yesterday.

Your environment

npx @mui/envinfo
   System:
    OS: macOS 14.2.1
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.1/bin/npm
  Browsers:
    Chrome: 120.0.6099.129
    Edge: 120.0.2210.91
    Safari: 17.2.1
  npmPackages:
    @emotion/react:  11.11.3
    @emotion/styled:  11.11.0
    @mui/base:  5.0.0-beta.30
    @mui/core-downloads-tracker:  5.15.3
    @mui/material:  5.15.3
    @mui/private-theming:  5.15.3
    @mui/styled-engine:  5.15.3
    @mui/system:  5.15.3
    @mui/types:  7.2.12
    @mui/utils:  5.15.3
    @types/react:  17.0.74
    react:  17.0.2
    react-dom:  17.0.2
    typescript: ~5.2.0 => 5.2.2

Search keywords: Typescript tsc GenericType

@benjdlambert benjdlambert added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 4, 2024
@garyjohnson
Copy link

We're seeing the same issue, and have pinned to @mui/material: "5.15.2" and "@mui/base": "5.0.0-beta.28" as a workaround.

Order ID 72484

`npx @mui/envinfo`

``` System: OS: macOS 14.2.1 Binaries: Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node Yarn: 1.22.21 - ~/.nvm/versions/node/v18.15.0/bin/yarn npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm Browsers: Chrome: 120.0.6099.199 Edge: 120.0.2210.91 Safari: 17.2.1 npmPackages: @emotion/react: 11.11.1 @emotion/styled: 11.11.0 @mui/base: 5.0.0-beta.30 @mui/core-downloads-tracker: 5.15.3 @mui/lab: 5.0.0-alpha.159 @mui/material: 5.15.3 @mui/private-theming: 5.15.3 @mui/styled-engine: 5.15.3 @mui/system: 5.15.3 @mui/types: 7.2.12 @mui/utils: 5.15.3 @mui/x-charts: 6.18.3 @mui/x-data-grid: 6.18.6 @mui/x-data-grid-pro: 6.18.6 @mui/x-date-pickers: 6.18.6 @mui/x-date-pickers-pro: 6.18.6 @mui/x-license-pro: 6.10.2 @types/react: 18.2.42 => 18.2.42 react: ^18.2.0 => 18.2.0 react-dom: ^18.2.0 => 18.2.0 typescript: 5.2.2 => 5.2.2 ```

@heath-freenome
Copy link
Contributor

Same here

heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Jan 7, 2024
- Temporarily locked down "@mui/material": "5.15.2" and "@mui/base": "5.0.0-beta.28" due to mui/material-ui#40427
@hfanzaou
Copy link

hfanzaou commented Jan 7, 2024

i have the same problem

@jonystn
Copy link

jonystn commented Jan 8, 2024

Same problem here.

heath-freenome added a commit to rjsf-team/react-jsonschema-form that referenced this issue Jan 8, 2024
* Fix: Bumped packages using `npm run bump-all-packages`

- Temporarily locked down "@mui/material": "5.15.2" and "@mui/base": "5.0.0-beta.28" due to mui/material-ui#40427

* - Responded to reviewer feedback by removing an added dev-dependency that seems unnecessary
@medchedli
Copy link

medchedli commented Jan 10, 2024

I temporarily bypassed the error by changing <React.ElementType<any, keyof React.JSX.IntrinsicElements> with React.ElementType<any> in Popper and Popup declarations.

React.ElementType is being given two arguments: any and keyof React.JSX.IntrinsicElements. However, React.ElementType is designed to take only one argument or none at all.

In your MUI package, go to the following files :

  • node_modules/@mui/material/Popper/Popper.d.ts

  • node_modules/@mui/base/Unstable_Popup/Popup.d.ts

and update the declarations in both files

I think the root cause is related to this PR on @Types/react :
DefinitelyTyped/DefinitelyTyped#67430

@jonystn
Copy link

jonystn commented Jan 10, 2024 via email

@raphaelbp12
Copy link

@jonystn could you please specify from which version to which version did you update? thanks!

@jonystn
Copy link

jonystn commented Jan 11, 2024

@raphaelbp12
"typescript": "^5.3.3"
"@mui/base": "5.0.0-beta.30",
"@mui/lab": "^5.0.0-alpha.159",
"@mui/material": "^5.15.3",
"@mui/system": "^5.15.3",
"@mui/x-data-grid": "^6.18.6",
"@mui/x-date-pickers": "^6.18.6",
"date-fns": "^2.30.0",
"@date-io/date-fns": "^2.17.0",

@mj12albert
Copy link
Member

mj12albert commented Jan 15, 2024

As of the current version v5.15.4 the typescript version is already ^5.3.3: https://github.com/mui/material-ui/blob/v5.15.4/package.json#L182

However we also changed the package manager to pnpm... does pnpm tsc work for anyone?

jamieklassen pushed a commit to jamieklassen/backstage that referenced this issue Jan 15, 2024
This seems to work around mui/material-ui#40427; `yarn tsc:full` no longer fails
in a freshly-scaffolded test app.

Signed-off-by: Jamie Klassen <[email protected]>
@marcossilvestrini
Copy link

marcossilvestrini commented Jan 22, 2024

Same problem here. Workaround not working. I get this error after enabled techdoc mermaid addon. Version 1.21.1 and version 1.22.1

@antoniocanelas
Copy link

Also with the same issue!

@AnX1001
Copy link

AnX1001 commented Jan 24, 2024

Likewise.

@antoniocanelas
Copy link

Hi, some information regarding this topic?

@mcintoac-aws
Copy link

Any updates on this issue? Running yarn tsc in our projects pre-commit is causing pre-commit to consistently fail and no work-around has solved the problem for us.

@antoniocanelas
Copy link

Hi, not being able to find a solution. Is there any idea how to solve this?

@raphaelbp12
Copy link

I solved this issue by putting specific versions on our resolutions in package.json file.

"resolutions": {
    "@mui/material": "5.15.2",
    "@mui/base": "5.0.0-beta.28",
  },

@mcintoac-aws
Copy link

@raphaelbp12 This worked for me as a temporary fix. Hopefully mui will resolve the issue soon.

@midhilkari
Copy link

midhilkari commented Mar 14, 2024

The workaround targeting older versions of @mui/material & @mui/base isn't working for me when using package @mui/x-data-grid: ^6.19.6 but works fine when not using data-grid package

@mj12albert

This comment was marked as outdated.

@midhilkari
Copy link

Update: Downgrading @mui/x-data-grid to version 6.19.1" helped resolved the types issue

@siriwatknp siriwatknp added external dependency Blocked by external dependency, we can’t do anything about it and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 14, 2024
@siriwatknp
Copy link
Member

This issue happens to start at https://www.npmjs.com/package/@types/react/v/18.2.44

- type ElementType<P = any> =
+ type ElementType<P = any, Tag extends keyof JSX.IntrinsicElements = keyof JSX.IntrinsicElements> =

I wonder why our build process replaces the use of declared PopperProps with its value.

See the implementation:

type PopperProps = Omit<BasePopperProps, 'direction'> & {
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component?: React.ElementType;
  /**
   * The components used for each slot inside the Popper.
   * Either a string to use a HTML element or a component.
   * @default {}
   */
  components?: {
    Root?: React.ElementType;
  };
  /**
   * The props used for each slot inside the Popper.
   * @default {}
   */
  componentsProps?: BasePopperProps['slotProps'];
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx?: SxProps<Theme>;
};

const Popper = React.forwardRef() as React.ForwardRefExoticComponent<PopperProps & React.RefAttributes<HTMLDivElement>>;

Here is the build result:

declare const Popper: React.ForwardRefExoticComponent<Omit<BasePopperProps, "direction"> &
// the object below should just be PopperProps
{
    /**
     * The component used for the root node.
     * Either a string to use a HTML element or a component.
     */
    component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
    /**
     * The components used for each slot inside the Popper.
     * Either a string to use a HTML element or a component.
     * @default {}
     */
    components?: {
        Root?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
    } | undefined;
    /**
     * The props used for each slot inside the Popper.
     * @default {}
     */
    componentsProps?: BasePopperProps['slotProps'];
    /**
     * The system prop that allows defining system overrides as well as additional CSS styles.
     */
    sx?: SxProps<Theme> | undefined;
} & React.RefAttributes<HTMLDivElement>>;

@sam-glendenning
Copy link

This issue happens to start at https://www.npmjs.com/package/@types/react/v/18.2.44

I wouldn't pay too close attention to that. I've been experiencing this with @types/react 17.0.65

@siriwatknp
Copy link
Member

siriwatknp commented Mar 14, 2024

This issue happens to start at https://www.npmjs.com/package/@types/react/v/18.2.44

I wouldn't pay too close attention to that. I've been experiencing this with @types/react 17.0.65

It's related. Because we built with the latest @types/react, the *.d.ts got the new React.ElementType<any, ...>. However, your project's @types/react does not receive 2 arguments that's why it causes an error. https://app.renovatebot.com/package-diff?name=@types%2freact&from=18.2.43&to=18.2.44

This will fix the issue including future proof if the build process does not use the generic. In meanwhile, how about reverting the #40146 back to @types/[email protected]?

cc @mui/code-infra

@antoniocanelas
Copy link

We are blocked on this for future updates.

@siriwatknp
Copy link
Member

@benjdlambert @antoniocanelas Can you try this fix?

// package.json
  "@mui/material": "https://pkg.csb.dev/mui/material-ui/commit/738da163/@mui/material",
  

@siriwatknp siriwatknp added component: Popper The React component. See <Popup> for the latest version. package: material-ui Specific to @mui/material and removed external dependency Blocked by external dependency, we can’t do anything about it labels Mar 15, 2024
@antoniocanelas
Copy link

This solution didn't fix. :(

@mnajdova
Copy link
Member

This solution didn't fix. :(

Did you tested the version shared in #40427 (comment)?

@antoniocanelas
Copy link

Error testing it
image

@cherniavskii
Copy link
Member

I can confirm there's still an issue with Popper:

heath-freenome added a commit to rjsf-team/react-jsonschema-form that referenced this issue Feb 6, 2025
* fix(utils): direct lodash function import to improve bundling on library client side (#3976)

* v5.14.3 (#3979)

* add missing typescript project reference for utils in validator-ajv6 and validator-ajv8 (#3982)

* fix: #3961 resolve all recurse list for object properties (#3981)

* fix: resolve all recurse list for object properties

* update test

* simplfy logic

* revert

* update change log

* Add the ability to parse defaults from `allOf` schema (#3969)

* feat: support default values in anyOf format

* feat: add `skipDefaults` and `populateDefaults` options for `allOf` parsing

* docs: add examples

* chore: ammending chanelog

* mui: fix gap in outline when label is hidden (#3984)

* mui: fix gap in outline when label is hidden

Passing `label={false}` to the MUI text/select widgets results in a
gap in the widget outline where the label would be.  Instead, to hide
the label without a gap, we must pass `label={undefined}`.

This commit changes the calls to `labelValue(...)` for
BaseInputTemplatea and SelectWidget to return `undefined` when
`"ui:label": false` was specified.

* mui: update test snapshots

* Release 5.15.0 (#3986)

* - Fixup `CHANGELOG.md` to merge 5.14.4 into 5.15.0

* v5.15.0

* Make getFieldNames correctly defines array of primitives (#3990)

* Fix: Expose the internal `ajv` variable in the validator implementation classes (#3991)

* Fix: Expose the internal `ajv` variable in the validator implementation classes
Fixes: #3972 indirectly by exposing the `ajv` variable for use in the issue
- In `@rjsf/ajv6`, updated `AJV6Validator` to make the `ajv` variable public and changed the return of the `customizeValidator()` function to remove the interface return
- In `@rjsf/ajv8`, updated `AJV8Validator` to make the `ajv` variable public and changed the return of the `customizeValidator()` function to remove the interface return
  - Also removed some `@ts-expect-error` tags that are no longer needed due to the exposed variable
- Updated the `CHANGELOG.md` accordingly

* - Responded to reviewer feedback

* v5.15.1 (#3997)

* feat: pass down indexed title from array field (#4002)

* feat: pass indexed title from array field to use as title in children if present

* docs: add changelog

* test: add test for checkbox widget

* test: add test for remaining widgets

* test: add test for object, array, oneof and anyof fields

* test: add test for allof field

* refactor: move repetitive task to one function and run it on array data

* chore: change version changelog according to the changes made

* test: fix allof field test case

* chore(deps): bump actions/download-artifact from 3 to 4

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps): bump actions/setup-python from 3 to 5

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps): bump actions/upload-artifact from 3 to 4

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps-dev): bump vite from 4.4.9 to 4.4.12

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.9 to 4.4.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.4.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.4.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>

* Feat: Implements #297 request (#4004)

* [Feat] Add Date re-order option

* Added tests for date re-order

* Updated docs and example

* Update changelog

* Added documentation for getDateElementProps function

* Fix: test failing due to year change

* Removed redundant parameters info

* chore: Bumped packages using `npm run bump-all-packages` (#4006)

* Fix: Bumped packages using `npm run bump-all-packages`

- Temporarily locked down "@mui/material": "5.15.2" and "@mui/base": "5.0.0-beta.28" due to https://github.com/mui/material-ui/issues/40427

* - Responded to reviewer feedback by removing an added dev-dependency that seems unnecessary

* Update Form.tsx and make submit method public (#4029)

* Update Form.tsx and make submit method public

* Update Form.tsx and make submit public

* Update CHANGELOG.md and add an entry for submit method changes

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <[email protected]>

* Fix: Change FormHelperText usage with @mui/material to render divs (#4032)

Fixes #4031 by switching the render component for `FormHelperText` to be `div`
- In `@rjsf/mui`, updated `FieldErrorTemplate` and `FieldHelpTemplate` to use the `div` component for `FormHelperText`

* Support file deletion for data-url (#4030)

* Release 5.16.0 (#4037)

* Merged the `5.15.2` change up into the `5.16.0` change since `5.15.2` was never released

* v5.16.0

* Release 5.16.1 (#4041)

* Releasing 5.16.1 with bumped peer dependencies

* v5.16.1

* Enhancement(Share): Enhancement base64 encoding/decoding using UTF-8 charset to support the characters outside the latin1 range. (#4024) (#4034)

* Enhancement(Share): Declare and export an object that provides base64 encoding and decoding functions using the utf-8 charset to support the characters outside the latin1 range. (#4024)

* Enhancement(Share): Add the 'base64.test.ts' to test the base64. (#4024)

* Enhancement(Share): Update the base64 reference in 'Playground' to the new customized base64 in 'utils' (#4024).

* Enhancement(Share): Update 'CHANGELOG.md' (#4024).

* Enhancement(Share): Update 'CHANGELOG.md' (#4024).

* Enhancement(Share): Add test to test the platform behavior (#4024).

* Enhancement: Fix comments and updating utility-functions.md to add introduction of base64 object

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update base64.ts

* fix: Added support for anyOf/oneOf in uiSchema (#4055)

Fixes #4039 by updating `MultiSchemaField` to properly support `anyOf`/`oneOf` arrays in the `uiSchema`
- In `@rjsf/utils`: Improved documentation and typescript ignores in tests related to `base64` from previous PR
- In `@rjsf/core`: Updated `MultiSchemaField` to support `anyOf`/`oneOf` arrays in the `uiSchema`
  - Updated the tests to verify the new feature
- In `docs`: Added documentation to the `uiSchema.md` file describing how to use the new feature
- Updated the `CHANGELOG.md` accordingly

* chore(deps-dev): bump vite from 4.5.1 to 4.5.2

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.1 to 4.5.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix checkbox with 0 as a value was unselectable in antd (#4068)

* fix: Added support for anyOf/oneOf in uiSchema
Fixes #4039 by updating `MultiSchemaField` to properly support `anyOf`/`oneOf` arrays in the `uiSchema`
- In `@rjsf/utils`: Improved documentation and typescript ignores in tests related to `base64` from previous PR
- In `@rjsf/core`: Updated `MultiSchemaField` to support `anyOf`/`oneOf` arrays in the `uiSchema`
  - Updated the tests to verify the new feature
- In `docs`: Added documentation to the `uiSchema.md` file describing how to use the new feature
- Updated the `CHANGELOG.md` accordingly

* Fix checkbox with 0 as a value was unselectable in antd
Fixed #4067 by properly dealing with enums that have 0 as a value
- In `@rjsf/utils`: Updated `enumOptionsValueForIndex()` to filter against `emptyValue` rather than just truthy
  - Updated the tests to verify the bug and then validate the fix
- Updated the `CHANGELOG.md` accordingly

* Fix potential XSS in the preview button of FileWidget (#4065)

* fix dataURI parsing mechanism

* Restrict image preview file types

* Make broken files be ignored

* Update changelog

* Refactor image preview whitelist, add comments, and fix tests

* fix the way of error handling

to pass the coverage test

* Update packages/core/src/components/widgets/FileWidget.tsx

Co-authored-by: Heath C <[email protected]>

---------

Co-authored-by: Heath C <[email protected]>

* docs: update link to markdown-to-jsx homepage (#4071)

Co-authored-by: Heath C <[email protected]>

* Release 5.17.0 (#4073)

* - Fixed `CHANGELOG.md` to make it a minor version update
- Bumped the packages using `bump-all-packages`
  - Updated the tests for `antd` and `fluentui-rc` due to packages bump

* v5.17.0

* Fix: Make 'ui:rows' option work with chakra-ui for textarea elements #4070 (#4078)

* Fix typo in ErrorsListTemplate example (#4087)

Co-authored-by: Heath C <[email protected]>

* Fix #4080 by moving `base64` encoder/decoder from `@rjsf/utils` to playground (#4093)

* Pass errorSchema from ArrayField to ArrayFieldTemplate (#4094)

* Pass errorSchema from ArrayField to ArrayFieldTemplate

* Update CHANGELOG.md

* v5.17.1 (#4096)

* Feat: don't assign a default value of an empty field. (#3880) (#4085)

* Added skipEmptyDefaults feature

* Fixed an issue where the skipEmptyDefault option was not displaying default values for fields that are not required.

* Updated tests and the changelog

* Updated changelog: moved chakra-ui changes above utils.

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>

* chore(deps-dev): bump ip from 2.0.0 to 2.0.1

Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix: Error state not resetting when schema changes (#4079) (#4103)

* #4079 Fixed the issue where the error state was not resetting when the schema changed.

* #4079 Updated the changelog

* #4079 Improved previous and new schema check

* #4079 Added test

* #4079 improved test

* #4079 removing console.log

* Apply suggestions from code review

- Accepted reviewer feedback

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Heath C <[email protected]>

* Fix noImplicitAny error (#4106)

Co-authored-by: Heath C <[email protected]>

* Update validation docs with correct require statement (#4108)

Co-authored-by: Heath C <[email protected]>

* Fixes: [WARNING] Duplicate key "include" in object literal [duplicate-object-key] (#4114)

* Fixes: Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>. (#4117)

* give instructions for material ui 5, not 4 (#4126)

* Fix documentation to add missing Form imports (#4131)

Fix #4127 to add missing `Form` import in documentation
- Updated many of the documentation files to add missing imports of `Form`
- Updated the `CHANGELOG.md` accordingly

Co-authored-by: Kevin Burnett <[email protected]>

* Fix: filename should be bold (#4125)

* Fix: filename should be bold

Also prevents horrible looking "\</strong>" from being printed on screen.

* Update CHANGELOG.md

* Skip populate function proposal in Experimental_ArrayMinItems (#4121)

* skip populate draft

* Added a new `computeSkipPopulate` option in `arrayMinItems`, allowing custom logic to skip populating arrays with default values

* Add example in documentation of computeSkipPopulate

* Update packages/docs/docs/api-reference/form-props.md

Co-authored-by: Heath C <[email protected]>

* Update packages/utils/src/types.ts

Co-authored-by: Heath C <[email protected]>

* Update packages/docs/docs/api-reference/form-props.md

Co-authored-by: Heath C <[email protected]>

---------

Co-authored-by: Marek Bodinger <[email protected]>
Co-authored-by: Heath C <[email protected]>

* Fix: use correct ConfigProvider context by using named imports (#4132)

Co-authored-by: Mehdi Salem <[email protected]>
Co-authored-by: Heath C <[email protected]>

* Fix 4134 by filtering out bad DOM props (#4140)

Fixes: #4134 by updating the spreading of props onto the `TextField` to remove bad DOM fields
- In `@rjsf/mui`, updated `SelectField` and `BaseInputTemplate` to filter out `errorSchema` and `autocomplete` from the `textFieldProps` before they are spread onto `TextField`
- Updated `CHANGELOG.md` accordingly, moving `@rjsf/antd` above `@rjsf/core`

* v5.18.0 (#4141)

* chore(deps): bump follow-redirects from 1.15.5 to 1.15.6

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Release 5.18.1 (#4145)

* - Bumped peer dependencies due to new feature

* v5.18.1

* - Removed unnecessary `package-lock.json` in `fluentui-rc` theme

* chore(deps-dev): bump vite from 4.5.2 to 4.5.3

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.2 to 4.5.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps): bump express from 4.18.2 to 4.19.2

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* #3121 Fixed Programmatic submit not working properly in Firefox (#4150)

Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Heath C <[email protected]>

* Fix Maximum call stack size exceeded in findSchemaDefinition (#4123)

* Add tests for circular and deeply circular refs in definitions

* Fix Maximum call stack size exceeded in findSchemaDefinition

* Update CHANGELOG

* Add tests for findSchemaDefinitionRecursive

* v5.18.2 (#4157)

* Upgrades React  (#4107)

* Upgrades react packages

* Updates semantic-ui-react

* Add support back for semantic version 1 via peerdependencies (#4169)

- In `@rjsf/semantic-ui` - added back `semantic-ui-react` version `^1.3.1` to the peer dependencies
  - Also made `semantic-ui-react` a devDependency for `^2.1.3`
- In the playground, added `[email protected]` due to the transition of `semantic-ui-react` as a devDependency
- Updated `CHANGELOG.md` accordlingly

* Create codeql.yml (#4170)

* Update LICENSE.md (#4174)

* Update LICENSE.md

Dear rsjf-team, I have a request. We are using the great rjsf packages to build a forms solution for a company. This company requires a copyright notice in the license file. Could you please replace the example copyright notice by a copyright of your team. I know it is strange at that location, but it would solve our problems.

Examples where they added names at that location in the license file:

- https://github.com/eisberg-labs/actix-actor-expect/blob/c28e751d219535c3d4d2b5579ddd281440e5ea87/LICENSE-APACHE#L4
- https://github.com/Swiftify-Corp/Swift-30-Projects/blob/5140f35ca0cb3767807bc518084809030a77139a/License.md?plain=1#L4

* Update LICENSE.md

- Added the start date from when the repo was created

---------

Co-authored-by: Heath C <[email protected]>

* Update custom-widgets-fields.md (#4171)

Co-authored-by: Heath C <[email protected]>

* chore(deps-dev): bump gh-pages from 3.2.3 to 5.0.0

Bumps [gh-pages](https://github.com/tschaub/gh-pages) from 3.2.3 to 5.0.0.
- [Release notes](https://github.com/tschaub/gh-pages/releases)
- [Changelog](https://github.com/tschaub/gh-pages/blob/main/changelog.md)
- [Commits](https://github.com/tschaub/gh-pages/compare/v3.2.3...v5.0.0)

---
updated-dependencies:
- dependency-name: gh-pages
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>

* Release 5.18.3 (#4175)

* - Updated `CHANGELOG.md` to account for a few PRs

* v5.18.3

* Add missing angle bracket (#4178)

* fix typos in constants.ts, Form.tsx (#4185)

* fix typos in constants.ts, Form.tsx

* keep the constants to for backwards compatibility

Co-authored-by: Heath C <[email protected]>

---------

Co-authored-by: Heath C <[email protected]>

* chore(deps): bump mkdocs from 1.5.3 to 1.6.0

Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.5.3 to 1.6.0.
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](https://github.com/mkdocs/mkdocs/compare/1.5.3...1.6.0)

---
updated-dependencies:
- dependency-name: mkdocs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps-dev): bump ejs from 3.1.9 to 3.1.10

Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* v5.18.4 (#4195)

* feat: treat default field in additionalProperties (#4199)

* feat: treat "default" in additionalProperties

* test: add test cases for the case there's a default in additionalProperties

* Passes missing uiSchema prop to Form component. (#4219)

* Remove duplicate mention of hideError (#4211)

Co-authored-by: Nick Grosenbacher <[email protected]>

* Fix mui imports in docs (#4218)

Co-authored-by: Nick Grosenbacher <[email protected]>

* [fix] Resetting number fields should check the entire string when deciding to leave the input text alone (#4202) (#4220)

* chore(deps): bump ws from 7.5.9 to 7.5.10

Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps): bump braces from 3.0.2 to 3.0.3

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bug: Fixed performance issue with large schema dependencies and oneOf (#4203) (#4204)

* Fixed performance issue #4203

* code improvement based on feedback

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Heath C <[email protected]>

* Handle undefined target in onBlur and onFocus handlers (#4227)

There are some instances where the `onBlur` and `onFocus` handlers are receiving an undefined `target`, causing the following type error:
```
Cannot read properties of undefined (reading 'value')
```
- Updated all of the `onBlur()` and `onFocus()` handlers in all libraries to fix this
- Updated the `CHANGELOG.md` accordingly

* fix(core): field ui-options higher priority (#4212)

* fix(core): field ui-options higher priority

* docs(root): changelog

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <[email protected]>

* Release 5.18.5 (#4230)

* - Fixed spelling mistake for `rjsf` in `CHANGELOG.md`

* v5.18.5

* fix(antd): disabled property of options of antd theme (#4216)

* fix: disabled property of options in CheckboxesWidget and RadioWidget of antd theme

* chore: update CHANGELOG.md for #4216

* chore: update formTests

* chore: update PULL_REQUEST_TEMPLATE.md for test

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <[email protected]>

* fix: omitExtraData on submit and on validateForm (#4228)

* fix: omitExtraData on submit and on validateForm

* test: update tests for omitExtraData

* ci: update changelog

* Update CHANGELOG.md

Co-authored-by: Heath C <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heath C <[email protected]>

* docs: update changelog

---------

Co-authored-by: Heath C <[email protected]>

* Fix IdSchema and PathSchema types (#4196)

* Fix IdSchema and PathSchema types

* Simplify type assertions

---------

Co-authored-by: Heath C <[email protected]>

* SchemaField: Only use nullish coalescing with uiOptions when computing readonly (#4238)

fixes #4236

* v5.18.6 (#4237)

* (feature) Add new relative Years feature to AltDateWidget (#4239)

* (feature) Add new relative Years feature to AltDateWidget
Added a new feature supporting relate Years and reversing Years ordering to `AltDateWidget`
- In `@rjsf/utils`
  - Refactored and improved the `dateRangeOptions()` function from all implementations of `AltDateWidget`
  - Added 100% unit tests for the new function
- In `@rjsf/antd`, `@rjsf/chakra-ui` and `@rjsf/core` replaced `rangeOptions()` with `dateRangeOptions()`
- In `docs`, added documentation for `dateRangeOptions()` to the `utility-functions.md` and feature documentation to `widgets.md`
- Updated the `CHANGELOG.md` accordingly

* Update packages/core/test/StringField.test.jsx

- Responded to reviewer feedback

Co-authored-by: Nick Grosenbacher <[email protected]>

---------

Co-authored-by: Nick Grosenbacher <[email protected]>

* v5.19.0 (#4240)

* Bumped peer dependencies to 5.19.x due to new API used from utils (#4241)

Since other repos required a new API in `utils` we need to bump peer dependencies
- Ran `npm run bump-peer-deps` and committed changes
- Updated the `CHANGELOG.md` accordingly

* Release 5.19.1 (#4242)

* - Fixed peer deps package-lock.json

* v5.19.1

* Removed .only on a core test (#4243)

One of the `core` tests was accidentally left as `.only`, undoing that as well as bumping most of the minor and patch package updates
- Updated `StringField.test.jsx` to remove a `.only`
- Centralized `esbuild` down to the main `package.json`
- Updated the `CHANGELOG.md` accordingly

* v5.19.2 (#4245)

* Fix #4197 in various themes by showing empty option in SelectWidget when appropriate (#4200)

* Release 5.19.3 (#4247)

* Fixed `CHANGELOG.md` to restore 5.19.2

* v5.19.3

* feature: Added better support for testing with AJV having discriminator option turned on (#4257)

* feature: Added better support for testing with AJV having discriminator option turned on
A recent issue made it clear that we didn't make it easy for users to turn on `discriminator` support from AJV
- In `@rjsf/utils` improved support for `discriminator` as follows:
  - Updated the `ValidatorType` to add support for an optional `reset()` method
  - Updated the `ParserValidator` to implement `reset()` to clear the schema map, including a test to verify that
  - Updated the tests that used `discriminator` to remove the `mapping` block that AJV doesn't support
  - Updated the `getFirstMatchingOption()` test to deal with the situation where AJV doesn't support discriminator for array types
  - Updated the `retrieveSchema()` test to call `reset()` on validators that have it in an `afterEach()`
  - Updated the `getTestValidator()` implementation to implement a `reset()` that empties the arrays
- In `@rjsf/validator-ajv8` improved support for `discriminator` as follows:
  - Updated the `createAjvInstance()` function to denote that we want to make `discriminator: true` the default in v6
  - Updated the `AJV8Validator` to make reset do `ajv.removeSchema()` to clear the cached schemas
  - Updated the `getTestValidator() implementation to call `reset()` on the validator if it exists
  - Updated the `schema.test.ts` file to run a set of test with `discriminator: true` set on the `AJV8Validator`
- Updated the `CHANGELOG.md` file accordingly

* - Added required for `code` to all of the schemas

* - Switched the default Translatable strings to use Markdown

* fix: xss when rendering schema errors (#4256)

* fix: stop rendering config errors as html

* Update CHANGELOG.md

* Update UnsupportedField.tsx

* Fix formatting

* Update packages/core/src/components/templates/UnsupportedField.tsx

* Update CHANGELOG.md

* Update <SchemaField> to match

* - Fix lint error

* Update CHANGELOG.md

- Updating to mention potential breaking change

---------

Co-authored-by: Heath C <[email protected]>

* v5.19.4 (#4258)

* Feat: Allow raising errors from within a custom whatever(#2718) (#4188)

* #2718 feature - raise errors from within fields

* fixed failing tests

* Fixed failing build

* Removing raiseError message and errorSchema is updated now using the onChange.

* reverting tests

* Filtering errors based on your retrieved schema to only show errors for properties in the selected branch.

* fixed issue with typing causing build failures.

* Improvement based on feedback

* improvement based on feedback and written test for custom widget

* documenting the feature

* docs improvement base on feedback

* removed empty line

* fixed lodash import

* Update packages/core/src/components/Form.tsx

Ordered lodash import

* Update packages/core/src/components/Form.tsx

* Update CHANGELOG.md

Added missing packages

* Update CHANGELOG.md

Added missing space

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Heath C <[email protected]>

* fix 4215 and 4260 by updating optionsList() to take a uiSchema (#4263)

* fix 4215 and 4260 by updating optionsList() to take a uiSchema
Fixes #4215 and #4260 by supporting alternate titles for enums and anyOf/oneOf lists via the uiSchema

- In `@rjsf/utils` added support for alternate option labels from the `UiSchema` as follows:
  - Updated `UIOptionsBaseType` to add the new `enumNames` prop to support an alternate way to provide labels for `enum`s in a schema
  - Updated `optionsList()` to take an optional `uiSchema` that is used to extract alternate labels for `enum`s or `oneOf`/`anyOf` in a schema
    - NOTE: The generics for `optionsList()` were expanded to add `T = any, F extends FormContextType = any` to support the `UiSchema`
    - Added unit tests to maintain 100% coverage
- In `@rjsf/core` updated `ArrayField`, `BooleanField` and `StringField` to call `optionsList()` with the additional `UiSchema` parameter
- In `docs` added documentation about the new `ui:enumNames` property, fixing up the `enumNames` documentation to indicate it WILL be removed
  - Also updated the `optionsList()` function's documentation to add the new `uiSchema` prop
- Updated the `CHANGELOG.md` accordingly

* Update packages/utils/test/optionsList.test.ts

Fix typo in test name

---------

Co-authored-by: Nick Grosenbacher <[email protected]>

* v5.20.0 (#4264)

* Release 5.20.1 (#4268)

* Release 5.20.1
- Updated the peer dependencies to 5.20.x

* v5.20.1

* Fixed Changelog (#4269)

* Bug: issue with dependencies computeDefaults (#4271) (#4282)

* Fixed issue with dependencies computedDefaults

* update changelog

* refactoring based on feedback

* created tests for the new created methods

* organized file based on feedback

* Update CHANGELOG.md

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Heath C <[email protected]>

* feat: improve deepEquals performance (#4292)

* Change fast-deep-equal to fast-equals

* Add changelog and change deepEquals depscription

* run cs-format

* Add JSDocs for isFunctions and customDeepEqual

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <[email protected]>

* fix querySelector in Form focusOnError when id includes dots (#4280)

Co-authored-by: Heath C <[email protected]>

* Fix 4283 by adding support for MUI v6 (#4294)

* Fix 4285 by adding support for MUI v6
- Updated `@rjsf/mui` to update the dev dependencies for `@mui/*` to v6 and the peer dependencies to add MUI v6
- Updated the playground to update `@mui/*` to v6
  - Also changed the dropdown name from `material-ui-5` to `mui` and switched `Layout` to use the `PropsWithChildren` for its props
  - Updated the `Form.test.tsx` to add information to the fake node to allow the tests to work with v6
  - Ran `npm run test:update` to update the snapshots due to the v6 and emotion upgrades
- Updated the test snapshots for `@rjsf/chakra-ui` which also uses emotion
- Updated `CHANGELOG.md` accordingly, bumping to `5.21.0`

* - Fixed the load of shared links to convert `material-ui-5` to `mui`

* chore(deps): bump mkdocs from 1.6.0 to 1.6.1

Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](https://github.com/mkdocs/mkdocs/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: mkdocs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* v5.21.0 (#4295)

* Revert "feat: improve deepEquals performance (#4292)" (#4300)

* Revert "feat: improve deepEquals performance (#4292)"

This reverts commit 514ea85826ebfe48f5827b44f9daced5bff0bc47.

* package.json

* v5.21.1 (#4301)

* fix: Improved the widget/field customization docs (#4302)

* fix Improved the widget/field customization docs
Updated the widget and field customization docs to add examples of wrapping a widget/field to adjust props

* Apply suggestions from code review

- Responded to reviewer feedback

Co-authored-by: Nick Grosenbacher <[email protected]>

---------

Co-authored-by: Nick Grosenbacher <[email protected]>

* Fix: Pass required props to anyof/oneof field components (#4303)

* Chore: Updating changelog with missing info (#4309)

Updated `CHANGELOG.md` to add details for the simple fix provided in #4303

* fix: deal with null objects in errors in Form.filterErrorsBasedOnSchema() (#4310)

* fix: deal with null objects in errors in Form.filterErrorsBasedOnSchema()
Fixes #4306 by using `lodash.isNil()` instead of comparing to `undefined`
- Updated `Form.filterErrorsBasedOnSchema()` to use lodash `isNil()` to check if the key is either null or undefined
- Updated the `CHANGELOG.md` accordingly

* - Made name more correct

* fix: not merge the `allOf.contains` schemas

* feat: Support array numbers in pathOfError for ErrorSchemaBuilder

* Update CHANGELOG.md (#4317)

* Refactor: delete unused variable (#4320)

Co-authored-by: Dmitry Khomichenko <[email protected]>

* v5.21.2 (#4323)

* Fix typo L12n -> L10n (#4332)

* experimental_customMergeAllOf (#4308)

* experimental_customMergeAllOf draft

* Add test for experimental_customMergeAllOf

* Add documentation for experimental_customMergeAllOf

* Changelog update

* Add changelog v2

---------

Co-authored-by: Marek Bodinger <[email protected]>

* Make fields with const pre-fiiled and readonly #3843 (#4326)

* Make fields with const pre-fiiled and readonl

* fixed issue with default on root level.

* fixed array const populate values

* fixed array issue and written tests to cover the behavior

* updated changeLog

* fixed issue with core failing tests.

* changed changeLog to rerun tests

* improvement based on feedback

* Update packages/utils/test/schema/getDefaultFormStateTest.ts

Adding default that should not be used

* Update packages/utils/test/schema/getDefaultFormStateTest.ts

Fix linter

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Heath C <[email protected]>

* Fix: made small changes to utility functions to fix #3997, #4314 and #4322 (#4329)

* Fix: made small changes to utility functions to fix #3997 and #4322
Fixes #3997 and #4322
- In `@rjsf/utils`, made the following changes:
  - Updated `mergeDefaultsWithFormData()` to not overwrite a default when the formData has an undefined value
  - Updated `getClosestMatchingOption()` to improve the scoring function so that an object container that matches a key gets an extra point
- In `@rjsf/core`, updated `MultiSchemaField` to call `onChange` after setting the new option in state rather than before
- Updated the `CHANGELOG.md` accordingly

* - In order to avoid regressions, added a new `mergeDefaultsWithFormData` prop to the `Experimental_DefaultFormStateBehavior`
- Updated `mergeDefaultsWithFormData()` to add new optional `defaultSupercedesUndefined` that when true uses the defaults rather than `undefined` formData
- Updated `getDefaultFormState()` to pass true to `mergeDefaultsWithFormData` for `defaultSupercedesUndefined` when `mergeDefaultsIntoFormData` has the value `useDefaultIfFormDataUndefined`
- Updated the documentation for the new capabilities
- Updated the playground to add controls for the new `mergeDefaultsIntoFormData` option
  - moved the `Show Error List` component over one column, making it inline radio buttons rather than a select

* - Improved documentation a teeny bit

* - More doc improvements

* - Responded to reviewer feedback

* - Fixed broken links

* - Added section header for wrapping BaseInputTemplate

* - Updated CHANGELOG.md

* v5.22.0 (#4341)

* Release 5.22.1 (#4342)

* Release 5.22.1 with bumped peer deps

* v5.22.1

* Bug: Validation regression Form not revalidating after formData change (#4343) (#4345)

* fixed regression

* Updating changelog

* improvement based on feedback

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>

* fix: Validation error messages are inconsistent #4348 (#4349)

* fix: replace message field with title or ui:title correctly

* fix: add new changelog section & add description

* chore: removed extra empty line

---------

Co-authored-by: Heath C <[email protected]>

* fix: multiple file upload issue (#4347)

* fix: multiple file upload issue

Resolved a bug where only the first file was uploaded when multiple files were selected. Now, all selected files are uploaded as expected.

* feature: Added test to check the expected behaviour

* Fix: Move entry of changelog to version 5.22.2

---------

Co-authored-by: Heath C <[email protected]>

* v5.22.2 (#4353)

* Bug: Deep nested dependencies issue with assigning values to formData (#4356)

* Fix deep nested dependencies issue with formData

* update changelog

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>

* v5.22.3 (#4358)

* chore(deps): bump crazy-max/ghaction-github-pages from 4.0.0 to 4.1.0

Bumps [crazy-max/ghaction-github-pages](https://github.com/crazy-max/ghaction-github-pages) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/crazy-max/ghaction-github-pages/releases)
- [Commits](https://github.com/crazy-max/ghaction-github-pages/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: crazy-max/ghaction-github-pages
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bug: Issue 'Maximum call stack size exceeded' with playground share. (#4370)

* Fix issue 'Maximum call stack size exceeded' with playground share with large content.

* update changelog

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>

* Bug: Issue with array schema defaults not applying properly when formData is an empty array (#4359)

* Fixed issue with array schema defaults not applying properly when formData is an empty array.

* improvement based on feedback

* fixed docs error

---------

Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Heath C <[email protected]>

* v5.22.4 (#4373)

* Adding feature to support const as default bug fix seeming like a regression (#4381)

Fixes #4344, #4361 and #4377
- In `@rjsf/utils`:
  - Updated the `Experimental_DefaultFormStateBehavior` type to add new optional `constAsDefaults` prop with three choices
  - Updated `getDefaultFormState()` to respond to the new `constAsDefaults` feature to limit `const` as defaults based on the `never` or `skipOneOf` choices
  - Added tests for `getDefaultFormState()` to verify the new feature
- In `@rjsf/core`:
  - Updated `SchemaField` to remove making the field readonly when const
- In `playground`:
  - Updated `Header` to add support for `constAsDefaults`
- Updated the `CHANGELOG.md` accordingly

* experimental_customMergeAllOf v2 (#4383)

* Pass experimental_customMergeAllOf to missing code branches

* Add experimental_customMergeAllOf parameter to documentation, fix link with anchor

* Changelog

---------

Co-authored-by: Marek Bodinger <[email protected]>

* Fixed issue where error messages do not have title or ui:title if a Localizer function is used. Fixes #4387. (#4391)

* fix: Update schema builder add/set actions to have unique errors (#4386)

* fix: update schema builder add/set actions to have unique errors

* docs: add fix description to changelog

---------

Co-authored-by: Heath C <[email protected]>

* v5.23.0 (#4392)

* Chakra-UI must be <3.0.0

fixes #4390

* Fix 4382 by passing errorSchema and id through in NumberField's onChange (#4395)

Fixes #4382

- Updated `NumberField`'s `handleChange` callback to pass through the `errorSchema` and `id`
- Updated the peerDependencies for the packages to be `5.23.x`
- Updated `CHANGELOG.md` accordingly

* v5.23.1 (#4396)

* Use default values when switching anyOf option (#4375)

* Use default values when switching anyOf option

* review

* Update changelog

* review: add oneOf test

* Move changelog entry to 5.23.1

* Update CHANGELOG.md

Fixed up release

---------

Co-authored-by: Heath C <[email protected]>

* Fix issue where ui:title in anyOf/oneOf is not shown in error messages (#4398)

* Fixed issue where ui:title in anyOf/oneOf is not shown in error messages. Fixes #4368.

* Use replace() instead of replaceAll() to support Node v14.

* fix: Short-circuit File and Date constructor access in isObject (#4413)

* fix: short-circuit File and Date constructor access in isObject if thing is missing required property

* chore: update changelog with isObject short-circuiting fix

---------

Co-authored-by: Jonathan Sun <[email protected]>

* v5.23.2

* Bug: issue with assigning values to deeply nested required properties (#4425)

* Fixed issue with assigning values to deeply nested required properties

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <[email protected]>

* Bug: Issue with formData not updating when dependencies change (#4388)

* Fixing issue with formData value not changing when dependencies are updated.

* refactoring tests and added test to test non-valid formData

* update changeLog

* added test for getValidFormData method

* fixed failing issue because of type change

* changes based on feedback

* changes based on feedback

* fixed test coverage

* Override the formData with the const if the constAsDefaults is set to always

* Fixed issue with validator-ajv6 ignoring oneOf in dependencies because it thinks there isn't exactly one subschema that is valid.

* improvement based on feedback

* Fixed failing tests

* removed unnecessary code

* improvement based on feedback.

---------

Co-authored-by: Heath C <[email protected]>

* Bug: schema with conditions where switching to then/else subschemas did not reflect the actual validation errors in the onChange event. (#4432)

* Fixed issue with schema if/then/else conditions where switching to then/else subschemas did not reflect the actual validation errors in the onChange event.

* improvement based on feedback

---------

Co-authored-by: Heath C <[email protected]>

* Bug:  AJV $data reference in const property in schema treated as default/const value. (#4431)

* Validator to support AJV $data reference and saving validator state in ShareURL.

* Fix for AJV $data reference in const property in schema treated as default/const value.

* written a test for consIsAjvDataReference.

* Update CHANGELOG.md

Moving the change to the end of the existing list

---------

Co-authored-by: Heath C <[email protected]>

* fix: formData change clear errorMessage (#4429)

* fix: formData change clear errorMessage

fix: merge errorSchema

fix: merge errorSchema

* test: add tests for getChangedFields and update CHANGELOG

* fix: core test and error message when formData is a string
not cleared

* feat: modify CHANGELOG

---------

Co-authored-by: Heath C <[email protected]>

* Partially fixed dependency error messages (#4417)

* Partially fixed issue where dependency errors do not show title or ui:title. This fix only applicable if we use an ajv-i18n localizer. Ref. #4402.

* Add comments.

* Update packages/validator-ajv8/src/processRawValidationErrors.ts

---------

Co-authored-by: Heath C <[email protected]>

* feat: switch `lodash.isEqual` to `fast-equals.deepEqual` to improve performance (#4438)

* switch lodash.isEqual to fast-equals.deepEqual to improve performance

* Revert "switch lodash.isEqual to fast-equals.deepEqual to improve performance"

This reverts commit 86570fe6cc49899ef8828667c5b05cdbcc3bc8f7.

* use precompiledValidator @rjsf/utils.deepEquals

* switch lodash.isEqual to @rjsf/utils.deepEquals at utils package

* fix changelog and remove unnecessary comment

* v5.24.0 (#4443)

* Release 5.24.1 (#4445)

* Bump peer dependencies due to new API in utils

* v5.24.1

* - Updated `CHANGELOG.md` to indicate the bumping of peer dependencies

* - Fixed the peer deps version

* - Added documentation for `getChangedFields()`

* Update packages/docs/docs/api-reference/utility-functions.md

* Switch lodash.isEqualWith to fast-equals (#4446)

* Fixed file accept attribute not working on mui and chakra-ui. (#4457)

* Update validation.md (#4458)

schema is not a variable here, and yourSchema is unused. I believe the form input here should be schema={yourSchema}

Co-authored-by: Heath C <[email protected]>

* Bug : Fields inside an array can't be set to empty when default is set. (#4461)

* Fixed issue with fields inside an array can't be set to empty when a default is set

* Update packages/utils/src/mergeDefaultsWithFormData.ts

- Reviewer feedback

* Update packages/utils/src/mergeDefaultsWithFormData.ts

- Fix linting

---------

Co-authored-by: Heath C <[email protected]>

* Refactor: remove unnecessary indirectness in get default form state test (#4462)

* refactor `getDefaultFormState` tests

* refactor `computeDefaults` tests

* refactor `getDefaultBasedOnSchemaType` tests

* refactor `getObjectDefaults` tests

* refactor `getArrayDefaults` tests

* replace original `getDefaultFormStateTest` test with refactored

* clarify expected value for array test

* remove unused type

---------

Co-authored-by: Heath C <[email protected]>

* Bug: The oneOf selector can be modified in readonly mode (#4463)

* Fixed issue with oneOf selector can be modified in readonly mode

* update based on feedback

* v5.24.2 (#4468)

* Validator should not refresh on clicking a Selector in playground (#4472)

* Validator should not refresh on clicking a Selector in playground

* Updated change log

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <[email protected]>

* Revert #4446 due to regression (#4478)

Fixed #4475 by rolling back #4446
- In `@rjsf/utils` rolled back the changes made by #4446
- Updated the `CHANGELOG.md` accordingly

* v5.24.3 (#4480)

* - Drop node 14, 16 and 18 support, adding 20 and 22

* - More `ci` clean for builds

* - Make code-ql work for rjsf-v6 branch

* - Fixed build by using correct version of MUI as well as removing MUI 5 support

* - Updated node engine >= 20

* - Fix package-lock.json

---------

Signed-off-by: dependabot[bot] <[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: Nick Grosenbacher <[email protected]>
Co-authored-by: Appie <[email protected]>
Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Oren Forer <[email protected]>
Co-authored-by: Marcus Penn <[email protected]>
Co-authored-by: Kevin Burnett <[email protected]>
Co-authored-by: joachimhagheim <[email protected]>
Co-authored-by: MarekBodingerBA <[email protected]>
Co-authored-by: Marek Bodinger <[email protected]>
Co-authored-by: momesana <[email protected]>
Co-authored-by: Mehdi Salem <[email protected]>
Co-authored-by: Martti Roitto <[email protected]>
Co-authored-by: Serge van den Oever <[email protected]>
Co-authored-by: Enzo Ferey <[email protected]>
Co-authored-by: Skyf0l <[email protected]>
Co-authored-by: Jaejoon Han <[email protected]>
Co-authored-by: とまとみ <[email protected]>
Co-authored-by: Daniel Todd <[email protected]>
Co-authored-by: Dmitry Dzhus <[email protected]>
Co-authored-by: Alexander Kachkaev <[email protected]>
Co-authored-by: shaddollxz <[email protected]>
Co-authored-by: Changyu Geng <[email protected]>
Co-authored-by: Helen Lin <[email protected]>
Co-authored-by: solimant <[email protected]>
Co-authored-by: David Li <[email protected]>
Co-authored-by: Abdallah Al-Soqatri <[email protected]>
Co-authored-by: Igor Brasileiro <[email protected]>
Co-authored-by: Jonathan Roebuck <[email protected]>
Co-authored-by: Tomasz Durka <[email protected]>
Co-authored-by: Sergey Alimov <[email protected]>
Co-authored-by: Kylie Marshall <[email protected]>
Co-authored-by: Dmitry Khomichenko <[email protected]>
Co-authored-by: Dmitry Khomichenko <[email protected]>
Co-authored-by: Salvatore Testa <[email protected]>
Co-authored-by: Guilherme Castro <[email protected]>
Co-authored-by: BorjaDV <[email protected]>
Co-authored-by: Yasunobu Chiba <[email protected]>
Co-authored-by: Quentin Sommer <[email protected]>
Co-authored-by: Jonathan Sun <[email protected]>
Co-authored-by: Jonathan Sun <[email protected]>
Co-authored-by: 邵瑾瑜 <[email protected]>
Co-authored-by: Petar Gligic <[email protected]>
Co-authored-by: Roman Krasilnikov <[email protected]>
Co-authored-by: deepeshmi26 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Popper The React component. See <Popup> for the latest version. package: material-ui Specific to @mui/material typescript
Projects
None yet