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

Merge changes in main to rjsf-v6 #4276

Merged
merged 101 commits into from
Aug 18, 2024
Merged

Conversation

nickgros
Copy link
Contributor

No description provided.

JonaszJestem and others added 30 commits November 27, 2023 09:38
…jsf-team#3981)

* 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 (rjsf-team#3991)

* Fix: Expose the internal `ajv` variable in the validator implementation classes
Fixes: rjsf-team#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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
* [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 <51679588+heath-freenome@users.noreply.github.com>
…jsf-team#4032)

Fixes rjsf-team#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. (rjsf-team#4024) (rjsf-team#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. (rjsf-team#4024)

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

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

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

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

* Enhancement(Share): Add test to test the platform behavior (rjsf-team#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 rjsf-team#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
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] <support@github.com>
* fix: Added support for anyOf/oneOf in uiSchema
Fixes rjsf-team#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 rjsf-team#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 <51679588+heath-freenome@users.noreply.github.com>

---------

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
* - 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
dependabot bot and others added 28 commits June 21, 2024 19:38
Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@7.5.9...7.5.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
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](micromatch/braces@3.0.2...3.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
…rjsf-team#4203) (rjsf-team#4204)

* Fixed performance issue rjsf-team#4203

* code improvement based on feedback

---------

Co-authored-by: Abdallah Al-Soqatri <abdallah.al-soqatri@aspentech.com>
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
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

* docs(root): changelog

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
* - Fixed spelling mistake for `rjsf` in `CHANGELOG.md`

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

* chore: update CHANGELOG.md for rjsf-team#4216

* chore: update formTests

* chore: update PULL_REQUEST_TEMPLATE.md for test

* Update CHANGELOG.md

---------

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
* fix: omitExtraData on submit and on validateForm

* test: update tests for omitExtraData

* ci: update changelog

* Update CHANGELOG.md

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>

* docs: update changelog

---------

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
* Fix IdSchema and PathSchema types

* Simplify type assertions

---------

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
…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 <nickgrosenbacher@gmail.com>

---------

Co-authored-by: Nick Grosenbacher <nickgrosenbacher@gmail.com>
…sf-team#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
* - Fixed peer deps package-lock.json

* v5.19.1
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
* Fixed `CHANGELOG.md` to restore 5.19.2

* v5.19.3
…or option turned on (rjsf-team#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: 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 <51679588+heath-freenome@users.noreply.github.com>
…) (rjsf-team#4188)

* rjsf-team#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 <abdallah.al-soqatri@aspentech.com>
Co-authored-by: Abdallah Al-Soqatri <abdallah.al-soqatri@inmation.com>
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
…team#4263)

* fix 4215 and 4260 by updating optionsList() to take a uiSchema
Fixes rjsf-team#4215 and rjsf-team#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 <nickgrosenbacher@gmail.com>
* Release 5.20.1
- Updated the peer dependencies to 5.20.x

* v5.20.1
@nickgros nickgros changed the base branch from main to rjsf-v6 August 18, 2024 13:32
@nickgros nickgros merged commit 94b54dc into rjsf-team:rjsf-v6 Aug 18, 2024
5 checks passed
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.