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

Forward main changes #4487

Merged
merged 171 commits into from
Feb 6, 2025
Merged

Forward main changes #4487

merged 171 commits into from
Feb 6, 2025

Conversation

heath-freenome
Copy link
Member

@heath-freenome heath-freenome commented Feb 6, 2025

Reasons for making this change

Rolled in main, dropped Node 14, 16, 18 adding 20 and 22
Changed node engine >=20
Dropped MUI 5 support

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

JonaszJestem and others added 30 commits November 27, 2023 09:38
* fix: resolve all recurse list for object properties

* update test

* simplfy logic

* revert

* update change log
* 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

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
* - Fixup `CHANGELOG.md` to merge 5.14.4 into 5.15.0

* v5.15.0
…on 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
* 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
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@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]>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@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]>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@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]>
* [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
* 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
* 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]>
…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`
* Merged the `5.15.2` change up into the `5.16.0` change since `5.15.2` was never released

* v5.16.0
* Releasing 5.16.1 with bumped peer dependencies

* v5.16.1
…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
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: 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 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]>
* - 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
abdalla-rko and others added 20 commits January 3, 2025 12:57
…#4425)

* Fixed issue with assigning values to deeply nested required properties

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <[email protected]>
* 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]>
…id 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]>
…lt/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

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 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]>
…erformance (#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 86570fe.

* use precompiledValidator @rjsf/utils.deepEquals

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

* fix changelog and remove unnecessary comment
* 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
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]>
…t. (#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]>
…est (#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]>
* Fixed issue with oneOf selector can be modified in readonly mode

* update based on feedback
)

* Validator should not refresh on clicking a Selector in playground

* Updated change log

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <[email protected]>
Fixed #4475 by rolling back #4446
- In `@rjsf/utils` rolled back the changes made by #4446
- Updated the `CHANGELOG.md` accordingly
@heath-freenome heath-freenome merged commit 21fdaa6 into rjsf-v6 Feb 6, 2025
4 checks passed
@heath-freenome heath-freenome deleted the forward-main-changes branch February 6, 2025 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.