Skip to content

Commit

Permalink
Merge the long-lived RJSF v5 branch to master (#3055)
Browse files Browse the repository at this point in the history
* Packages/utils (#2863)

* Implemented the utils package
- Refactored the `packages/core/src/utils.js` file into separate typescript files in the new `packages/utils/src`

* - More changes

* - Added all of the non-validation-based utilities and many of the tests

* - removed schema related files temporarily

* - Added missing tests to get test coverage up to 100% for all but `getWidget()`
- Also did some cleanup in the `src` files, moving types into `types.ts`, and exporting all the types

* - Fixed getWidget tests

* - Update README.md

* - update the target to  for typescript in

* - revert `package-lock.json` for antd, core and playground

* - fix build issues

* - Added the `rjsf-v5` branch to the `ci.yml`
- Added a new `RJSFSchema` as a redefine of `JSONSchema7` to make changing schemas everywhere else easier
- Updated all the utils and tests to change `JSONSchema7` to `RJSFSchema`
- Fixed test breaks by casting e to Error

* - changed tabs to spaces in package.json, fixed bug in deepEquals

* - Add `tsdx` to `package.json` to enable running `npm run test` inside of the `packages/utils` directory
  - Bumped `@types/jest` to match the version in use by `tsdx`
- Fixed the `utcToLocal()` test by mocking the `getDate()` and `getHours()` functions to be UTC + 2 hours to avoid server vs local timezone issues

* - Began adding documentation to the utility functions
- Reordered the logic in `asNumber` to avoid converting to number until we have to
- Updated `findSchemaDefinition()` to handle the case where a `$ref` in a schema also contains additional props
- Updated `getSubmitButtonOptions()` to export its `DEFAULT_OPTIONS` for testing purposes
- Updated `getUiOptions()` to no longer support `ui:widget` objects as it has been deprecated for years
- Made some other test fixes

* - Finished adding documentation to all of the remaining utils methods

* - Minor documentation changes, and allow `findSchemaDefinition()` to support undefined ref name

* - Responded to self-review comments

* Packages/utils/schema (#2877)

* Implemented the utils package
- Refactored the `packages/core/src/utils.js` file into separate typescript files in the new `packages/utils/src`

* - More changes

* - Added all of the non-validation-based utilities and many of the tests

* - removed schema related files temporarily

* - revert `package-lock.json` for antd, core and playground

* - The schema utilities that require validation

* - More changes

* - completed conversion to Typescript with some changes that were needed

* - Updated various files to make some parameters optional, to add generics typing where missed
- Created an `index.ts` in the `schema` subdirectory that exports all of the schema related functions
- Updated `types.ts` to add the new `SchemaUtilsType` interface
- Implemented a `createSchemaUtils()` function that returns a `SchemaUtilsType` interface given a `ValidatorType` and a `rootSchema`

* - Implemented createSchemaUtils
- Began testing the schema-based utils

* - More fixes and adding missing generics

* - Converted all the schema based tests over still missing 100% coverage

* - Completed 100% unit testing

* - Added documentation for most of the files and cleaned up some optionality on some arguments

* - Completed all of the documentation of the schema-based utils

* - Changed the `_NAME` constants to `_KEY`

* - Added missing generics on a few types

* - Added `ERRORS_KEY` constant for use in validation

* - Fixed types based on implementation of validator

* - Added missing generic to the `ValidationData` type for `ErrorSchema`

* - Fixed tests for the missing generic type

* - Incorporated #2876 by making props for UISchemaSubmitButtonOptions optional

* - Added generic `<T>` to the return value of `toIdSchema()` and `toPathSchema()`

* Refactored schema to support running schema tests from other packages (#2899)

* Refactored schema to support runnings from other packages
- Fixed the import of `types` in `mergeSchemas.ts`
- Renamed all of the `xxx.test.ts` to `xxxTest.ts` and wrapped them in an outer `xxxTest()` function that takes a `TestValidatorType`
- Added a `types.ts` file in the `schema` directory to provide the `TestValidatorType` and `TestValidatorParams` interfaces
- Added an `index.ts` file in the `schema` directory to export all of the `xxxTest` functions
- Updated `getTestValidator()` to import the types from the `schema/types`
- Added a `test/schema.test.ts` to create a `TestValidator` and run all of the `xxxTest()` functions from `schema`

* - Fixed the tests based on using the real validator

* - Removed the use of `xxx.hasOwnProperty('y')` in favor `'y' in xxx` to eliminate lint warnings
- Fixed bug in `stubExistingAdditionalProperties()` related to the `additionalProperties: true` case, adding new test to verify fix

* - Removed console.log statement

* - Moved `stubExistingAdditionalProperties()` into the `retrieveSchema.ts` file to eliminate a circular dependency
  - Did the same for the `stubExistingAdditionalPropertiesTest()` function
- Updated the `index.ts` files to remove the `stubExistingAdditionalProperties[Test]()` functions
- Updated `SchemaUtilsType` and `createSchemaUtils` to remove the `stubExistingAdditionalProperties()` function

* Validator ajv6 (#2891)

* Added new package for validator-ajv6
- Refactored `packages/core/src/validate.js` into this new package

* - Switched to the new `@rjsf/utils` library and types

* - Finished types conversion to @rjsf/utils
- Began adding tests

* - Completed conversion for validator class-based tests. Just need to get to 100%
1

* - Finished 100% test coverage and documentation of the `AJV6Validator`

* - Completed the documentation of the remaining methods and types for the library

* - Responded to self-review feedback and also fixed tests to hopefully get it to pass

* - Fixed the build (this time hopefully)

* - Switched to just passing `stack` instead of the whole empty object

* - Added hacky run of tests from within the utils directory

* - Fixed a few little things

* - Fixed bug in custom validation, including adding a test to detect it

* - Removed schema utils test for `stubExistingAdditionalPropertiesTest()` as it no longer exists

* - Fixed self-review feedback and the import in the `test/createAjvInstance.test.ts`
- Also bumped all the packages that made sense

* Update utils based on core refactor and update package.jsons (#2903)

* Update utils based on core refactor and update package.jsons
- Updated the main `package.json` to bump typescript
- Updated the utils `package.json` to bump everything but react
- Updated `SchemaUtilsType` to add the `getValidator()` and `doesSchemaUtilsDiffer()` functions
  - Updated `createSchemaUtils()` to implement the new functions and the tests to validate them
- Also updated other types to deal with issues found during core refactor
  - Changed `FormValidation` to `ErrorSchema` as needed
  - Updated the `Registry` type to remove `definitions` as it is never used and added the `xxxTemplate` props
  - Updated many interfaces to make previously required props to be optional
  - Switched to using the `React.ComponentType` which incorporates the `FunctionComponent` and `ClassComponent` both
- Fixed a bug in `getDefaultFormState()` by making the `array` defaults use effectively the same logic as it did in `core` but refactored to a function for type safety
  - Updated the tests to add one that verifies the bug is fixed

* - rollback typescript to previous version due to `fluent-ui` issue

* - Fixed bug in `getSchemaType()` related to incorrectly defaulting to `string` when no type exists

* - Made `uiSchema` optional in `canExpand()`, `getSubmitButtonOptions()` and `getUiOptions()`
- Updated the required-ness of a smattering of props in interfaces

* - Made all callbacks be required again

* - Made label required again

* - More updates to make `uiSchema` optional

* - Added new `processSelectValue()` utility, refactored from core's `SelectWidget`, with full tests
- Also updated the `UIOptionsType` to add optional `title` and `description` props, typed to `string` to eliminate the need to type cast them

* - Added documentation for the `[key: string]` prop

* - Responded to reviewer feedback

* Updated semantic-ui theme to use new @rjsf/utils and @rjsf/validator (#2920)

* Updated @rjsf/core to use the new `utils` and `validator-ajv6` libraries
- Removed the `index.d.ts` file since all the types are now exported in `@rjsf/utils`
- Updated `package*.json` to make changes consistent with pulling utils and validator-ajv6 libraries
  - Removed `core-js-pure`, `json-schema-merge-allof`, `jsonpointer` and `react-is` from `dependencies` in favor of `@rjsf/utils`
  - Moved `ajv` and `@types/json-schema` into the `devDependencies`
  - Added `@rjsf/validator-ajv6`, `@types/lodash` and `tsdx`
  - Also, removed all mentions of `index.d.ts`
- Converted `ErrorList` to typescript, pulling types from `@rjsf/utils`
- Converted `Form` to typescript
  - Built `FormProps` and `FormState` props which are exported
  - Pulled in all the types from `@rjsf/utils` functions
  - Removed the `additionalMetaSchemas` and `customFormats` props in favor of the new, required `validator: ValidatorType` prop
  - Updated `getStateFromProps()` to create a `SchemaUtilsType` object and put it into both the state and the registry as `schemaUtils`
  - Switched to using the `schemaUtils.getValidator()` to access the `validateFormData()` and `toErrorList()` calls
  - Switched to using `schemaUtils` to access `getDefaultFormState()`, `toIdSchema()`, `toPathSchema()` and `retrieveSchema()`
- Updated `ArrayField` to use the `@rjsf/utils` functions
  - Also, switched to the `includes` function from `lodash`
  - Pull the `schemaUtils` from the `registry` and used it for `getDefaultFormState()`, `isMultiSelect()`, `isFilesArray()`, `retrieveSchema()` and `toIdSchema()`
  - Switched from `xxx.hadOwnProperty('y')` to `'y' in xxx` to remove an eslint warning
- Updated `BooleanField`, `NumberField`, `CheckboxWidget`, `DateTimeWidget`, `FileWidget`, `RangeWidget`, `SelectWidget` and `UpDownWidget` to pull utility functions from `@rjsf/utils`
- Updated `MultiSchemaField` to use the `@rjsf/utils` functions
  - Pulled the `schemaUtils` from the `registry` and used it for `getDefaultFormState()` and `getMatchingOption()`
  - Switched from `xxx.hadOwnProperty('y')` to `'y' in xxx` to remove an eslint warning
- Updated `ObjectField` to use the `@rjsf/utils` functions
  - Pulled the `schemaUtils` from the `registry` and used it for `retrieveSchema()`
  - Switched from `xxx.hadOwnProperty('y')` to `'y' in xxx` to remove an eslint warning
- Updated `SchemaField` to use the `@rjsf/utils` functions
  - Pulled the `schemaUtils` from the `registry` and used it for `getDisplayLabel()`, `isSelect()`, `retrieveSchema()` and `toIdSchema()`
  - Switched from `xxx.hadOwnProperty('y')` to `'y' in xxx` to remove an eslint warning
- Updated `StringField` to use the `@rjsf/utils` functions
  - Pulled the `schemaUtils` from the `registry` and used it for `isSelect()`
- Updated `AltDateWidget` to use the `@rjsf/utils` functions
  - Removed `prevState` from `componentDidUpdate()` because it is not used, removing lint error
- Updated `TextWidget` to add `bool` as a type for the value to avoid a React error that failed tests
- Converted `SubmitButton` to typescript, pulling types from `@rjsf/utils` and exporting it's props type
- Converted `getDefaultRegistry()` to typescript, pulling types from `@rjsf/utils`
  - Changed the export to be `default`
  - Temporarily needing to cast `fields` and `widgets` to the proper type until they are converted
- Converted `withTheme()` to typescript, pulling types from `@rjsf/utils` and the typescript `Form`
- Converted the `src/index.js` file to Typescript, exporting both the `Form` and its types along with `withTheme()`, `getDefaultRegistry()`
- Updated the `types.js` file to remove `definitions` and add in `schemaUtils` ffor the `registry` type.
- Deleted the `src/utils.js`, `src/validate.js` files since they have been replaced with `@rjsf/utils/` and `@rjsf/validator-ajv6`
  - Removed the `utils_test.js` file entirely and only kept the `Form` integration part of the `validate_test.js`
- Updated the tests as follows to make things work with `@rjsf/utils` and `@rjsf/validator-ajv6`
  - Updated `test_utils.js` to import the default `validator` from `@rjsf/validator-ajv6` and add it to the props for `createFormComponent()`
  - Updated the `Form_test.js` to import the default `validator` and the `customizeValidator()` function and passed `validator` into props for `<Form>...</Form>`
    - Updated the checking of `onChangeProp` to add `schemaValidationErrors`, `schemaValidationErrorSchema` and `schemaUtils` to the `calledWith()` check
    - Updated the checking of `onError` to add `schemaValidationErrors`, `schemaValidationErrorSchema` to the match
    - Deleted any tests that dealt with the now removed deprecated features
    - Replaced tests the used the `customFormats` or `additionalMetaSchemas` props with a customized validator with those values set on it
      - In one place, removed a piece of a test that was reverting the old props since they don't exist anymore
  - Updated the `SchemaField_test.js` file to check the `registry` in the received props to have `schemaUtils` instead of `definitions`
    - Fixed the import of `getDefaultRegistry()`
    - Also removed the test related to `empty definitions` since that isn't in the registry anymore
  - Updated the `StringField_test.js` to import the utility functions from `@rjsf/utils`
  - Updated the `uiSchema_test.js` file to deal with the removal of deprecated `ui:widget: {component, options}` feature in `@rjsf/utils`
    - Switched from `warn` to `error` for spying
    - Removed the deprecated `ui:widget` configurations in the tests, moving the options into the `ui:options` block instead`
    - Verified the proper error (instead of warning) is returned

* - Temporarily restore `index.d.ts` until next PR when it gets removed

* - Export `WithThemeProps` from core

* - Converted `AddButton` to Typescript
- Switched `SubmitButton` to use `WidgetProps`
- Removed `schemaUtils` as a param for `getDefaultRegistry()`
- Set generic defaults on `WithThemeProps`
- Fixed cast of `SubmitButton` in `Form`

* - Updated the type for `withTheme()`

* - Refactored `processValue` out of `SelectWidget` and used the new `processSelectValue()` method in utils

* - Fixed a few more things found while finishing up the themes conversion

* Updated antd theme to use new @rjsf/utils and @rjsf/validator
- Updated `package*.json` to add `@rjsf/utils` and `@rjsf/validator` to dev and peer dependencies
  - Also, Removed a bunch of packages that were never used since the conversion to `tsdx`
  - Finally, bumped most of the dev dependencies that made sense to the latest version, except for those that cause breaking tests
- Removed the `webpack.config.*.js` files since they are no longer needed since the conversion to `tsdx`
- Updated all uses of non-schema utilities methods to `@rjsf/utils` and switched to using `registry.schemaUtils.XXX()` for those schema-based utilities
- Updated the import of `getDefaultRegistry()` to be directly from `@rjsf/core`
- Modified `SelectWidget` to use the new `processSelectValue()` function from `@rjsf/utils`
- Updated the tests to import the `validator` from `@rjsf/validator` to pass to the `Form`
  - Also updated the snapshots via the `test:update` script to deal with the little differences from the conversion

* Updated bootstrap-4 theme to use new @rjsf/utils and @rjsf/validator
- Updated `package*.json` to add `@rjsf/utils` to dev and peer dependencies and `@rjsf/validator-ajv6` to dev dependencies
  - Also, Removed a bunch of packages that were never used since the conversion to `tsdx`
  - Finally, bumped most of the dev dependencies that made sense to the latest version, except for those that cause breaking tests
- Updated all uses of non-schema utilities methods to `@rjsf/utils` and switched to using `registry.schemaUtils.XXX()` for those schema-based utilities
- Updated the import of `getDefaultRegistry()` to be directly from `@rjsf/core`
- Updated components that used the `uiSchema['ui:xxx']` notation to get the `uiOptions` using `getUiOptions(uiSchema)` then doing `uiOptions.xxx` instead
- Updated the use of `React.FC` with `React.ComponentType` in `AddButton` and `SubmitButton`
- Updated `ArrayFieldTitleProps` and `ArrayFieldDescriptionProps` to make `title`, `required` and `description` optional in the `ArrayFieldTemplate.tsx` file
  - Also fixed the indentation of components
- Updated `WrapIfAdditionalProps` to pick props from `FieldTemplateProps` joining it with `children` to fix type issues
- Updated `Form` to use `React.ComponentType`
- Modified `SelectWidget` to use the new `processSelectValue()` function from `@rjsf/utils`
- Updated the tests to change to using `RJSFSchema` rather than `JSON7Schema` and import the `validator` from `@rjsf/validator` to pass to the `Form`
  - Also updated the snapshots via the `test:update` script to deal with the little differences from the conversion

* Updated chakra-ui theme to use new @rjsf/utils and @rjsf/validator
- Updated `package*.json` to add `@rjsf/utils` to dev and peer dependencies and `@rjsf/validator-ajv6` to dev dependencies
  - Also, Removed a bunch of packages that were never used since the conversion to `tsdx`
  - Finally, bumped most of the dev dependencies that made sense to the latest version, except for those that cause breaking tests
- Updated all uses of non-schema utilities methods to `@rjsf/utils` and switched to using `registry.schemaUtils.XXX()` for those schema-based utilities
- Updated the import of `getDefaultRegistry()` to be directly from `@rjsf/core`
- Updated components that used the `uiSchema['ui:xxx']` notation to get the `uiOptions` using `getUiOptions(uiSchema)` then doing `uiOptions.xxx` instead
- Updated the use of `React.FC` with `React.ComponentType` in `AddButton` and `SubmitButton`
- Updated `AltDateWidget` to extend the `AltDateStateType` object from the `DateObject`
- Updated `ArrayFieldTitleProps` and `ArrayFieldDescriptionProps` to make `title`, `required` and `description` optional in the `ArrayFieldTemplate.tsx` file
  - Also fixed the indentation of components
- Updated `WrapIfAdditionalProps` to pick props from `FieldTemplateProps` joining it with `children` to fix type issues
- Updated `Form` to use `React.ComponentType`
- Modified `SelectWidget` to use the new `processSelectValue()` function from `@rjsf/utils`
- Updated `utils.js` to remove the custom `ThemeProps` in favor of the new `WithThemeProps` from `@rjsf/core`
- Updated the tests to change to using `RJSFSchema` rather than `JSON7Schema` and import the `validator` from `@rjsf/validator` to pass to the `Form`
  - Also updated the snapshots via the `test:update` script to deal with the little differences from the conversion

* Updated fluent-ui theme to use new @rjsf/utils and @rjsf/validator
- Updated `package*.json` to add `@rjsf/utils` to dev and peer dependencies and `@rjsf/validator-ajv6` to dev dependencies
  - Also, Removed a bunch of packages that were never used since the conversion to `tsdx`
  - Finally, bumped most of the dev dependencies that made sense to the latest version, except for those that cause breaking tests
- Updated all uses of non-schema utilities methods to `@rjsf/utils` and switched to using `registry.schemaUtils.XXX()` for those schema-based utilities
- Updated the import of `getDefaultRegistry()` to be directly from `@rjsf/core`
- Updated `ArrayFieldTitleProps` and `ArrayFieldDescriptionProps` to make `title`, `required` and `description` optional in the `ArrayFieldTemplate.tsx` file
  - Also fixed the indentation of components
- Updated `WrapIfAdditionalProps` to pick props from `FieldTemplateProps` joining it with `children` to fix type issues
- Updated `FuiForm` to use `React.ComponentType`
- Modified `SelectWidget` to use the new `processSelectValue()` function from `@rjsf/utils`
- Updated the tests to change to using `RJSFSchema` rather than `JSON7Schema` and import the `validator` from `@rjsf/validator` to pass to the `Form`
  - Also updated the snapshots via the `test:update` script to deal with the little differences from the conversion

* Updated material-ui theme to use new @rjsf/utils and @rjsf/validator
- Updated `package*.json` to add `@rjsf/utils` to dev and peer dependencies and `@rjsf/validator-ajv6` to dev dependencies
  - Also, Removed a bunch of packages that were never used since the conversion to `tsdx`
  - Finally, bumped most of the dev dependencies that made sense to the latest version, except for those that cause breaking tests
- Updated all uses of non-schema utilities methods to `@rjsf/utils` and switched to using `registry.schemaUtils.XXX()` for those schema-based utilities
- Updated the import of `getDefaultRegistry()` to be directly from `@rjsf/core`
- Updated components that used the `uiSchema['ui:xxx']` notation to get the `uiOptions` using `getUiOptions(uiSchema)` then doing `uiOptions.xxx` instead
- Updated the use of `React.FC` with `React.ComponentType` in `AddButton` and `SubmitButton`
- Updated `ArrayFieldTitleProps` and `ArrayFieldDescriptionProps` to make `title`, `required` and `description` optional in the `ArrayFieldTemplate.tsx` file
  - Also fixed the indentation of components
- Updated `WrapIfAdditionalProps` to pick props from `FieldTemplateProps` joining it with `children` to fix type issues
- Updated `MuiForm` and `MuiForm5` to use `React.ComponentType`
- Modified `SelectWidget` to use the new `processSelectValue()` function from `@rjsf/utils`
- Updated the tests to change to using `RJSFSchema` rather than `JSON7Schema` and import the `validator` from `@rjsf/validator` to pass to the `Form`
  - Also updated the snapshots via the `test:update` script to deal with the little differences from the conversion

* Updated semantic-ui theme to use new @rjsf/utils and @rjsf/validator
- Bumped the main `package.json` to use the latest version of `Typescript`
- Updated `.eslintrc` with what was needed to support the latest eslint version
- Updated `package*.json` to add `@rjsf/utils` to dev and peer dependencies and `@rjsf/validator-ajv6` to dev dependencies
  - Also, Removed a bunch of packages that were never used since the conversion to `tsdx`
  - Finally, bumped most of the dev dependencies that made sense to the latest version, except for those that cause breaking tests
- Updated all uses of non-schema utilities methods to `@rjsf/utils` and switched to using `registry.schemaUtils.XXX()` for those schema-based utilities
- Updated the import of `getDefaultRegistry()` to be directly from `@rjsf/core`
- Modified `SelectWidget` to use the new `processSelectValue()` function from `@rjsf/utils`
- Updated the tests to import the `validator` from `@rjsf/validator` to pass to the `Form`
  - Also updated the snapshots via the `test:update` script to deal with the little differences from the conversion

* - Fixed material-ui build to no longer generate the v4 and v5 versions since the theme will soon be separated into two packages

* - Update material-ui package-lock.json to match package.json

* Added ajvOptionsOverrides to support user-provided AJV options overriding (#2929)

- Updated `CustomValidatorOptionsType` to add `ajvOptionsOverrides`
- Updated the `createAjvInstance()` function to spread any `ajvOptionsOverrides` on top of the `AJV_CONFIG`
- Updated `AJV6Validator` constructor to pass `ajvOptionsOverrides` to `createAjvInstance()`
- Updated tests to add test-case for the `$data` flag mentioned in #1668

* Optimized and updated imports in core package.json (#2931)

* Optimized and updated imports in core package.json
- Updated `tsdx` build to also run umd, eliminating the need for the one-off webpack version build
- Deleted the `test-old` and `build-umd` scripts
- Added `@rjsf/utils` to `peerDependencies`
- Removed all of the webpack and cross-env related packages no longer needed for the one-off build
- Also removed `express`, `gh-pages`, `estraverse*` and `husky`
- Updated a bunch of the `peerDependencies` package versions to the latest
- Deleted the now unnecessary `webpack.config.dist.js`

* - Removed `prettier` from `package.json` as it differs from the version used in the main `package.json`
- Ran `cs-format` to fix all of the prettier errors reported by `cs-check`

* - Bumped `prettier` to pickup latest typescript support
  - Switched from `jsxBracketSameLine: true` to `bracketSameLine: false`
- Ran `cs-format` over `playground` as well

* Added support for node 16, formatting and linting (validator-ajv6) (#2932)

* Added support for node 16 and linting
- Regenerated the `package-lock.json` file with node-16
- Added the `cs-check`, `cs-format` and `lint` scripts along with `lint-staged` to the `package.json` file

* - Ran `cs-format` on the `validator-ajv6` source to fix build

* - Switched the `no-unused-vars` rule to `@typescript-eslint/no-unused-vars` in `.eslintrc`

* Added support for node 16, formatting and linting (utils) (#2933)

* Added support for node 16, formatting and linting
- Regenerated the `package-lock.json` file with node-16
- Added the `cs-check`, `cs-format` and `lint` scripts along with `lint-staged` to the `package.json` file
- Ran `cs-format` over the `src` and `test` directories to fix the build

* - Switched the `no-unused-vars` rule to `@typescript-eslint/no-unused-vars` in `.eslintrc`

* Added support for node 16, formatting and linting (bootstrap-4) (#2936)

* Added support for node 16, formatting and linting
- Regenerated the `package-lock.json` file with node-16
  - Also added packages to support linting
- Added the `cs-check`, `cs-format` and `lint` scripts along with `lint-staged` to the `package.json` file
- Ran `eslint --fix` and `cs-format` over the `src` and `test` directories to fix the build
- Added a slight adaptation of the `.eslintrc` file from `core` to this package

* - Fixed build

* Added support for node 16, formatting and linting (fluent-ui) (#2938)

* Added support for node 16, formatting and linting
- Regenerated the `package-lock.json` file with node-16
  - Also added packages to support linting
- Added the `cs-check`, `cs-format` and `lint` scripts along with `lint-staged` to the `package.json` file
- Ran `eslint --fix` and `cs-format` over the `src` and `test` directories to fix the build
- Added a slight adaptation of the `.eslintrc` file from `core` to this package

* - Fix build, hopefully

* Added support for node 16, formatting and linting (semantic-ui) (#2939)

- Regenerated the `package-lock.json` file with node-16
- Added the `cs-check`, `cs-format` and `lint` scripts along with `lint-staged` to the `package.json` file
- Ran `cs-format` over the `src` and `test` directories to fix the build

* Added support for node 16, formatting and linting (#2937)

- Regenerated the `package-lock.json` file with node-16
  - Also added packages to support linting
  - Explicity added the latest `prettier` because it in implicitly picking up the wrong one
- Added the `cs-check`, `cs-format` and `lint` scripts along with `lint-staged` to the `package.json` file
- Ran `eslint --fix` and `cs-format` over the `src` and `test` directories to fix the build
- Added a slight adaptation of the `.eslintrc` file from `core` to this package
- Added `.npmrc` to enable `legacy-peer-deps` to allow things to work with node 16
- Deleted `.prettierrc` since the override is no longer needed

* Added support for node 16, formatting and linting (antd) (#2935)

* Added support for node 16, formatting and linting
- Regenerated the `package-lock.json` file with node-16
- Added the `cs-check`, `cs-format` and `lint` scripts along with `lint-staged` to the `package.json` file
  - Added `@babel/eslint-parser` and removed `babel-parser`
- Ran `cs-format` over the `src` and `test` directories to fix the build
- Updated `.eslintrc` to switch to using the `@babel/eslint-parser` with the necessary `parserOptions`

* - Fix `package.json` formatting

* Updated the playground to allow a validator selection (#2941)

* Updated the playground to allow a validator selection
- Defaults to the `ajv6` validator
- Updated `package*.json` to add `@rjsf/utils` and `@rjsf/validator-ajv6`
  - Also removed a bunch of unnecessary packages
  - Bumped a bunch of other packages to the latest minor and patch version
  - Bumped a few select packages to the latest major version
- Updated `.eslintrc` to switch from `babel-eslint` to `@babel/eslint-parser`
- Updated the `index.js` file to add a `validators` object containing the `AJV6` validator choice, passing it into `Playground`
- Updated the `app.js` file to get `shouldRender()` from `@rjsf/utils` instead of copying it from core
  - Also extracted `validators` from the props for `Playground`, storing `validator` in the state, initially set to `AJV6`
  - Added a `ValidatorSelector` component that is used to update the selected `validator` in state
  - Rendered a `ValidagtorSelector` just before the `CopyLink` component
  - Passed `validators[validator]` as the `validator` prop on `FormComponent`

* - Ran `cs-format` to fix formatting issues and fix the build

* Split out material-ui v5 theme as @rjsf/mui (#2948)

* Split out material-ui v5 theme as @rjsf/mui
- Copied the `material-ui` directory and removed the `@material-ui` dependencies
- Deleted the `MuiComponentContext`, `MuiForm5`, `Theme5` and `ThemeCommon` directories (moving the contents of `ThemeCommon/index.js` directly into `Theme`)
- Deleted the `MaterialUIContext` and `MaterialUIContextProps` files and everything in `Theme.tsx` that related to them
- Replaced all fetching of the Material UI components from the `useMuiComponent()` hook with actual imports from `@mui/material` and `@mui/icons-material`
- Regenerated the `package-lock.json` file with node-16
- Added the `cs-check`, `cs-format` and `lint` scripts along with `lint-staged` to the `package.json` file
- Copied the `.eslintrc` file from `core`
  - This involved adding `@typescript-eslint`, `eslint` and `eslint-plugin-*`
- Ran `eslint --fix` and `cs-format` over the `src` and `test` directories to fix the build

* - Fix build by fixing a few little things

* - Fixed playground imports to read from new repo

* Made @rjsf/material-ui only be for Material UI 4 (#2949)

- Deleted the `MuiComponentContext`, `MuiForm5`, `Theme5` and `ThemeCommon` directories (moving the contents of `ThemeCommon/index.js` directly into `Theme`)
- Deleted the `MaterialUIContext` and `MaterialUIContextProps` files and everything in `Theme.tsx` that related to them
- Replaced all fetching of the Material UI components from the `useMuiComponent()` hook with actual imports from `@material-ui/core` and `@material-ui/icons`
- Deleted the `tests/mui-5` directory and fixed up the tests to work with the simple `Form`
- Regenerated the `package-lock.json` file with node-16
- Added the `cs-check`, `cs-format` and `lint` scripts along with `lint-staged` to the `package.json` file
- Copied the `.eslintrc` file from `core`
  - This involved adding `@typescript-eslint`, `eslint` and `eslint-plugin-*`
- Ran `eslint --fix` and `cs-format` over the `src` and `test` directories to fix the build

* Get node 16 build working, centralize lint configs and switch to dts-cli (#2951)

* Get node 16 build working and centralize lint configs
- Added `.eslintrc-javascript` for the common configs needed for `antd`, `playground` and `semantic-ui`
- Added `.eslintrc-typescript` for the common configs needed for the rest of the packages
- Updated `.github/workflows/ci.yml` to add node 16 and to build the playground using it instead of 14
- Updated `.gitignore` to add the few items from the `.gitignore` files in sub-packages
  - Removed the `.gitignore` in the sub-packages, along with the two `.editorconfig` files
- Updated all of the `.eslintrc` files in the packages to extend the appropriate `.eslintrc-*script` file
  - Left the `plugins` array definitions in each `.eslintrc` file
    - Avoids an issue where eslint found the base and sub-package implementation of the plugins and complained when they were in the base
- Updated the main `package*.json` to add the packages needed for linting so that they can be removed in the sub-packages
- Updated each sub-package `package*.json` files to remove all but the `eslint` package (leaving it locally so that it can be run in the subdirectory)
  - Also bumped any out-of-date packages related to `babel` or `eslint`

* - Replaced `tsdx` with its most current forked cousin `dts-cli`
  - This removed the need for the `.npmrc` file in `chakra-ui`

* - Re-ran `npm run cs-format` due to prettier upgrades provided by `dts-cli`
- Also fixed some typescript issues in `fluent-ui` related to object spreading by casting `options.props as object`

* - Fixed tests due to change to `dts-cli`
  - Added `jest-environment-jsdom` and `ts-jest` that matches the jest version `dts-cli` uses in the main `package.json`
  - Updated `package.json`s to remove incompatible jest related packages
  - Updated and/or moved `jest.config.js` files to add `testEnvironment` and `testEnvironmentOptions` for `jsdom`
  - Updated `chakra-ui` and `mui` to add missing libraries for emotion and jest
  - Redid the `mui` snapshots after changes

* - Rollback `semantic-ui` so that it still uses `tsdx` due to test failures using `dts-cli`

* - Bumped `eslint` to 8.20

* Bumped the dependencies for semantic-ui (#2972)

- Fixed react 16.14 adding >=17 in peer dependencies
  - Didn't bump to react 17 officially to avoid peer dependencies issues with `semantic-ui` which is stuck on 16
- Bumped nanoid to the latest minor version

* Bump dependencies for both material-ui themes (#2971)

- In `material-ui`, fixed react 16.14 in peer dependencies
- In `mui`, bumped `@mui/material` to the latest
- Removed `react-dom` and `@types/react` from the peer dependencies
- Bumped eslint to latest release
- Removed the types for jest as it was unnecessary

* Bumped fluent-ui dependencies (#2970)

- Bumped to latest minor version for `fluent-ui`
- Bumped react to 17, fixing react 16.14 in peer dependencies
- Removed unnecessary types for jest
- Updated `SelectWidget` to properly use the right `defaultSelectedKey[s]` prop based on multiple flag
- Updated test snapshots due to dependency bumps

* Bumping dependencies for utils (#2969)

- Bumped react to 17, fixing react 16.14 in peer dependencies
- Removed `react-dom` because it wasn't needed

* Bumping dependencies for core (#2968)

- Bumped nanoid to latest
- Bumped react to 17, fixing react 16.14 in peer dependencies

* Bumped the dependencies for bootstrap-4 (#2967)

- Can't bump to bootstrap-2, so bumped to latest 1.x version
- Bumped react to 17, fixing react 16.14 in peer dependencies
- Bumped `react-icons` to latest
- Updated test snapshots due to changes from bumps

* Bumped some of the dependencies for chakra-ui (#2965)

- Can't upgrade to chakra-ui 2.0 because it requires react 18
- Locked peerDependencies for react to ^16.14.0 or >=17
- Bumped minor versions of `react-select`, `chakra-react-select` and `framer-motion`
- Updated test snapshot as a result

* Upgraded to latest antd code (#2963)

* Upgraded to latest antd code
- Added an additional test for the custom `DatePicker`
- Fixed the `tests` for checkboxes in array that broke with upgrade by implementing a required ref
- Updated all the test snapshots due to upgrade changes

* - Fix build by running `cs-format`

* - Bumped react to 17, fixing react 16.14 in peer dependencies

* Switched playground to webpack 5 and other small fixes (#2958)

* Switched playground to webpack 5 and other small fixes
- Updated `.github/workflows/release.yml` to use node 16
- Updated the main `package.json` to remove `webpack` and `webpack-cli` as they are only needed by `playground`
- Updated all of the `package.json` files for the themes to fix the `build` script to change `--format cjs,es,umd` to `--format cjs,esm,umd`
  - This is because `dts-cli` changed `es` to `esm`
  - Also updated `material-ui` to add that missing flag to `build`
- Updated `.babelrc` to get it working with webpack 5
- Updated `package.json` for playground to update (or remove) `webpack` and all of its plugins and utilities
  - Explicitly added `ajv8` since `webpack-dev-server` uses it and the `validator-ajv6` has an earlier version
- Updated the `webpack.config.*.js` files to support webpack 5
- Updated the `index.js` for playground to organize the themes in alphabetical order (after default)

* - Bumped `antd` libraries to latest

* - Updated theme libraries to match the ones in the updated theme `package.json` files

* Update package-locks (#2973)

- After merging all the package.json cleanups, some of the package-lock.json files were a bit out of date, updating them

* Updated documentation for the v5 release (#2974)

* Updated documentation for the v5 release
- Updated `/latest/` with `/stable` for all `.md` files, mirroring changes made on master
- Changed all uses of `<Form schema={schema} />` in existing documentation to add the required `validator` from `@rjsf/validator-ajv6`
- Updated the `validation.md` docs to cover v5 changes and additions
- Added a new `utility-function.md` to document the `@rjsf/utils` function, constants and types
- Deleted the `customizing-material-ui.md` file since we split apart the two theme versions
- Added the version 5 migration document
- Updated `@rjsf/utils` to add or improve documentation
  - Also refactored out the `TemplateTypes` interfaces to help support future work related to expanding templates
  - Added a utility type, `MakeUIType` and refactored out `UIOptionsBaseType` in order to dry out the `UiOptionsType` and `UiSchema` types
- Updated `Form` in `@rjsf/core` to move the `IChangeEvent` type from `utils` extending it from `FormState`
  - The props `validate` was renamed to `customValidate`
  - Also, updated `FormProps` to extend the new `TemplatesType` interface
- Updated `withTheme` to add the missing generics onto `Form`

* - Added placeholders for `core`'s missing documentation on the Typescript files

* - Completed the documentation of all the Typescript based files in `core`
- Responded to reviewer feedback
- Added a few more constants in `@rjsf/utils`, using them as appropriate in utils and core

* Fix the docs for formElement in Form (#2983)

- Added an explanation for why the `any` type is specified

* fix: core SubmitButton button option props

* chore: remove duplicate settings from semantic-ui package.json

* fix: missing error class on semantic-ui fields

* Consolidate templates into a single location in registry (#2981)

* Consolidate templates into a single location in registry
- Updated `.eslint-typescript` to turn off two warnings that were noisy
- Updated the `@rjsf/utils` types as follows to support a consolidated `templates` object:
  - Updated the `Registry` type to no longer extend `TemplateTypes`, but instead have it as a new `templates` property.
  - Updated the `TemplateTypes` type to consolidate more templates as follows:
    - Made all but `ArrayFieldTemplate` required
    - Refactored `ErrorList` from the `FormProps` as `ErrorListTemplate`
    - Added `TitleFieldTemplate` and `DescriptionFieldTemplate`
  - Updated `TitleFieldProps` to `registry` since all templates require a back-pointer to the `registry`
    - Also added `uiSchema` to support capabilities in use by several themes
  - Updated `DescriptionFieldProps` to add `registry` since all templates require a back-pointer to the `registry`
  - Updated the `ArrayFieldTemplateProps` and `ObjectFieldTemplateProps` to remove `TitleField` and `DescriptionField` since they can now be obtained from the `templates`
  - Also, updated `UiSchema` to add `Partial<>` around `TemplateTypes`, since we want the `ui:` versions to all be optional
- Updated `@rjsf/core` to add `templates` to `Form` and `makeTheme` props
  - Removed the `ErrorList`, `ArrayFieldTemplate`, `ObjectFieldTemplate` and `FieldTemplate` from the props
    - Also modified `Form` to pull `ErrorListTemplate` from the `templates` prop
  - Created a new `templates` directory, moving in `TitleField` and `DescriptionField` from the `fields` directory
    - Created a `templates/FieldTemplate` directory, refactoring out the `FieldTemplate`, `Label` and `WrapIfAdditional` components from the `SchemaField.js` file
      - Converted these components to Typescript
      - Inlined the code from `LabelInput` directly into `WrapIfAdditional`
      - Updated `SchemaField.js` to pull `FieldTemplate` from `registry.templates`
    - Moved the `ErrorList.tsx` file into this directory
    - Refactored `ObjectFieldTemplate` component from the `ObjectField.js` file
      - Converted this to Typescript
      - Updated `ObjectField.js` to pull `DescriptionFieldTemplate`, `ObjectFieldTemplate` and `TitleFieldTemplate` from `registry.templates`, passing in `registry`
  - Updated `ArrayField.ts` to pull `DescriptionFieldTemplate` and `TitleFieldTemplate` from `registry.templates`, passing in `registry`
  - Updated `BooleanField` to no longer pass `DescriptionField` to the `Widget`
  - Updated `CheckboxWidget` to pull `DescriptionFieldTemplate` from `registry.templates`, passing in `registry`
  - Updated `getDefaultRegistry()` to import the new `templates` directory `index.ts` instead of all the separate templates, exporting it on the default `registry`
  - Fixed up all the tests to deal with this consolidation
- Updated `@rjsf/antd` to consolidate `templates` as follows:
  - Moved `ErrorList.js` into the `templates/ErrorList` directory as `index.js`
  - Moved `DescriptionField` and `TitleField` into the `templates` directory
    - Removed the now, unnecessary commented out `FieldProps` from `DescriptionField` and `TitleField`
    - Also extracted `formContext` out of `registry` in `TitleField`
  - Updated the base `index.js` file to export `templates` by combining default `templates` with the files from the `templates` directories
- Updated `@rjsf/bootstrap-4` to consolidate `templates` as follows:
  - Updated `DescriptionField` and `TitleField` to use the `DescriptionFieldProps` and `TitleFieldProps` from `@rjsf/utils` instead of `Partial<FieldProps>`
  - Updated `ArrayFieldTemplate.tsx` and `ObjectFieldTemplate.tsx` to pull `DescriptionFieldTemplate` and `TitleFieldTemplate` from `registry.templates`
    - Also, pass `registry` (and `uiSchema`) to the `DescriptionFieldTemplate` and `TitleFieldTemplate`
  - Renamed `Fields/Fields.ts` to `Templates/Templates.ts`
    - Also added `ArrayFieldTemplate`, `ErrorList` (as `ErrorListTemplate`), `FieldTemplate` and `ObjectFieldTemplate` to the `Templates`
  - Updated `Theme` to export `templates` from the `Templates` directory
  - Updated tests to deal with the consolidation
- Updated `@rjsf/chakra-ui` to consolidate `templates` as follows:
  - Updated `DescriptionField` and `TitleField` to use the `DescriptionFieldProps` and `TitleFieldProps` from `@rjsf/utils` instead of `Partial<FieldProps>`
  - Updated `ArrayFieldTemplate.tsx` and `ObjectFieldTemplate.tsx` to pull `DescriptionFieldTemplate` and `TitleFieldTemplate` from `registry.templates`
    - Also, pass `registry` to the `DescriptionFieldTemplate` and `TitleFieldTemplate`
  - Renamed `Fields/Fields.ts` to `Templates/Templates.ts`
    - Also added `ArrayFieldTemplate`, `ErrorList` (as `ErrorListTemplate`), `FieldTemplate` and `ObjectFieldTemplate` to the `Templates`
  - Updated `Theme` to export `templates` from the `Templates` directory
  - Updated the base `index.ts` file to export the `Templates` directory in place of the `Fields` and individual templates, as well as fixed the `Form` export
- Updated `@rjsf/fluent-ui` to consolidate `templates` as follows:
  - Updated `DescriptionField` and `TitleField` to use the `DescriptionFieldProps` and `TitleFieldProps` from `@rjsf/utils` instead of `Partial<FieldProps>`
  - Updated `ArrayFieldTemplate.tsx` and `ObjectFieldTemplate.tsx` to pull `DescriptionFieldTemplate` and `TitleFieldTemplate` from `registry.templates`
    - Also, pass `registry` to the `DescriptionFieldTemplate` and `TitleFieldTemplate`
  - Renamed `Fields/Fields.ts` to `Templates/Templates.ts`
    - Also added `ArrayFieldTemplate`, `ErrorList` (as `ErrorListTemplate`), `FieldTemplate` and `ObjectFieldTemplate` to the `Templates`
  - Updated `Theme` to export `templates` from the `Templates` directory
  - Updated the base `index.ts` file to export the `Templates` directory in place of the `Fields` and individual templates, as well as fixed the `Form` export
- Updated `@rsjf/material-ui` and `@rjsf/mui` to considate `templates` as follows:
  - Updated `DescriptionField` and `TitleField` to use the `DescriptionFieldProps` and `TitleFieldProps` from `@rjsf/utils` instead of `Partial<FieldProps>`
  - Updated `ArrayFieldTemplate.tsx` and `ObjectFieldTemplate.tsx` to pull `DescriptionFieldTemplate` and `TitleFieldTemplate` from `registry.templates`
    - Also, pass `registry` to the `DescriptionFieldTemplate` and `TitleFieldTemplate`
  - Renamed `Fields/Fields.ts` to `Templates/Templates.ts`
    - Also added `ArrayFieldTemplate`, `ErrorList` (as `ErrorListTemplate`), `FieldTemplate` and `ObjectFieldTemplate` to the `Templates`
  - Updated `Theme` to export `templates` from the `Templates` directory
  - Updated the base `index.ts` file to export the `Templates` directory in place of the `Fields` and individual templates, as well as fixed the `Form` export
  - Fixed the tests as well
- Updated the `@rjsf/semantic-ui` to consolidate `templates` as follows:
  - Updated `ArrayFieldTemplate.tsx` and `ObjectFieldTemplate.tsx` to pull `DescriptionFieldTemplate` and `TitleFieldTemplate` from `registry.templates`
    - Also, pass `registry` (and `uiSchema`) to the `DescriptionFieldTemplate` and `TitleFieldTemplate`
  - Renamed `Fields/Fields.ts` to `Templates/Templates.ts`
    - Also added `ArrayFieldTemplate`, `ErrorList` (as `ErrorListTemplate`), `FieldTemplate` and `ObjectFieldTemplate` to the `Templates`
  - Updated `FieldTemplate` to get the `DescriptionFieldTemplate` from `registry.templates`
  - Updated `Theme` to export `templates` from the `Templates` directory
  - Updated `TitleField` to get the `ui:options` from the `uiSchema` instead of having them passed directly
  - Updated the base `index.ts` file to export the `Templates` directory in place of the `Fields` and individual templates, as well as fixed the `Form` export

* - Changed the name of `DescriptionField` and `TitleField` to append `Template` onto it only in association with the `templates`
  - Also, made them both render `id` for all the themes
- Updated tests and snapshots accordingly

* - Added documentation for the new typescript files in `core`

* - Responded to self and other reviewer feedback

* - Fixed bad commit in core imported by rebase

* Prepare utils and tests for upcoming BaseInputTemplate work (#2986)

* Prepare utils and tests for upcoming BaseInputTemplate work
- Added the `BaseInputTemplate` type into the `TemplatesType`
- Refactored code from `BaseInput` in `@rjsf/core` as `getInputProps()`
  - Added 100% unit tests
- Consolidated all the various tests in different themes into all of the other themes
- Updated the snapshots for all the new tests in all themes

* - Fixed up test for material-ui themes by adding missing ref's required by the components
- Also, for `material-ui` 4, add mock of `findDOMNode()` so that tests are all successful

* - Updated all the snapshot due to the new and fixed tests in all the themes

* - Fix chakra-ui's `WrapIfAdditional`, `CheckboxesWidget` and `RadioWidget` to generate stable label ids
- Updated snapshots accordingly

* - Updated `RadioWidget` in semantic UI to generate a stable names

* Implement BaseInputTemplate in core (#2987)

* Implement BaseInputTemplate in core
- Updated `TemplateType` to make `BaseInputTemplate` required now
- Refactored the `TextWidget.js` file into `BaseInputTemplate.tsx`, adding support for number transforms
- Refactored (and converted to Typescript) the following widgets to use the `BaseInputTemplate` for their implementations
  - `ColorWidget`, `DateTimeWidget`, `DateWidget`, `EmailWidget`, `PasswordWidget`, `RangeWidget`, `TextWidget`, `URLWidget` and `UpDownWidget`
- Updated all of the tests to use `BaseInputWidget` in `templates` instead of `BaseInput` in `widgets`
- Updated `bootstrap-4`, `material-ui` and `mui` themes to add `TextWidget` as the `BaseInputTemplate` temporarily to fix tests

* - Updated `semantic-ui` test snapshot due to changes in core

* Remove Node 12, use Node 16 as default engine, add Node 18 to build (#2996)

* Deprecate Node 12, use Node 16 as default engine
* Add engine to validator-ajv6

* Implement BaseInputTemplate in bootstrap-4 (#2990)

- Refactored `TextWidget` as `BaseInputTemplate`, using the `getInputProps()` to implement `core` feature
- Deleted the following widgets because they are now just duplicate code to what is implemented with the template in `core`
  - `ColorWidget`, `DateTimeWidget`, `DateWidget`, `EmailWidget`, `PasswordWidget`, `URLWidget`, `UpDownWidget`
  - Updated the `widgets` overrides in `Widgets.js` to remove the deleted class references
- Updated `WrapIfAdditional` to add missing `htmlFor`
- Updated `FileWidget` and `RangeWidget` to use the `BaseInputTemplate`
- Updated the test snapshots to match the subtle little changes caused by the `getInputProps()` feature and increased use of the `BaseInputTemplate`
  - Also deleted some tests and snapshots that were for now deleted widgets

* Implement BaseInputTemplate in chakra-ui (#2991)

- Refactored `TextWidget` as `BaseInputTemplate`, using the `getInputProps()` to implement `core` feature
- Deleted the following widgets because they are now just duplicate code to what is implemented with the template in `core`
  - `ColorWidget`, `DateTimeWidget`, `DateWidget`, `EmailWidget`, `PasswordWidget`, `URLWidget`
  - Updated the `widgets` overrides in `Widgets.tsx` to remove the deleted class references
- Updated the test snapshots to match the subtle little changes caused by the `getInputProps()` feature and increased use of the `BaseInputTemplate`

* Implement BaseInputTemplate in fluent-ui (#2992)

- Refactored `TextWidget` as `BaseInputTemplate`, using the `getInputProps()` to implement `core` feature
- Deleted the following widgets because they are now just duplicate code to what is implemented with the template in `core`
  - `AltDateTimeWidget`, `AltDateWidget`, `EmailWidget`, `PasswordWidget`, `URLWidget`
  - Updated the `widgets` overrides in `Widgets.tsx` to remove the deleted class references
- Updated `TextareaWidget` to use the `BaseInputTemplate`
- Updated the test snapshots to match the subtle little changes caused by the `getInputProps()` feature and increased use of the `BaseInputTemplate`

* Implement BaseInputTemplate in material-ui (#2993)

- Refactored `TextWidget` as `BaseInputTemplate`, using the `getInputProps()` to implement `core` feature
- Deleted the following widgets because they are now just duplicate code to what is implemented with the template in `core`
  - `ColorWidget`, `EmailWidget`, `PasswordWidget`, `URLWidget`, `UpDownWidget`
  - Updated the `widgets` overrides in `Widgets.tsx` to remove the deleted class references
- Updated `CheckboxesWidget`, `RadioWidget` to add missing `id` associated with the `htmlFor`
- Updated `DateTimeWidget` `DateWidget` and `TextareaWidget` to use the `BaseInputTemplate`
- Updated the test snapshots to match the subtle little changes caused by the `getInputProps()` feature and increased use of the `BaseInputTemplate`
  - Also deleted some tests and snapshots that were for now deleted widgets

* Implement BaseInputTemplate in mui (#2994)

- Refactored `TextWidget` as `BaseInputTemplate`, using the `getInputProps()` to implement `core` feature
- Deleted the following widgets because they are now just duplicate code to what is implemented with the template in `core`
  - `ColorWidget`, `EmailWidget`, `PasswordWidget`, `URLWidget`, `UpDownWidget`
  - Updated the `widgets` overrides in `Widgets.tsx` to remove the deleted class references
- Updated `CheckboxesWidget`, `RadioWidget` to add missing `id` associated with the `htmlFor`
- Updated `DateTimeWidget` `DateWidget` and `TextareaWidget` to use the `BaseInputTemplate`
- Updated the test snapshots to match the subtle little changes caused by the `getInputProps()` feature and increased use of the `BaseInputTemplate`
  - Also deleted some tests and snapshots that were for now deleted widgets

* Implement BaseInputTemplate in semantic-ui (#2995)

- Refactored `TextWidget` as `BaseInputTemplate`, using the `getInputProps()` to implement `core` feature
  - Yes, git thinks it was the `EmailWidget` but it was actually `TextWidget`
- Deleted the following widgets because they are now just duplicate code to what is implemented with the template in `core`
  - `DateTimeWidget`, `DateWidget`, `EmailWidget`, `PasswordWidget`, `URLWidget`, `UpDownWidget`
  - Updated the `widgets` overrides in `Widgets.tsx` to remove the deleted class references
- Updated `RadioWidget` to improve the name of the `Radio` buttons
- Updated the test snapshots to match the subtle little changes caused by the `getInputProps()` feature and increased use of the `BaseInputTemplate`
  - Also deleted some tests and snapshots that were for now deleted widgets

* Implement BaseInputTemplate in antd (#2989)

- Refactored `TextWidget` as `BaseInputTemplate`, using the `getInputProps()` to implement `core` feature
- Deleted the following widgets because they are now just duplicate code to what is implemented with the template in `core`
  - `ColorWidget`, `EmailWidget`, `URLWidget`, `UpDownWidget`
  - Updated the `widgets` overrides in `index.js` to remove the deleted class references
- Updated the test snapshots to match the subtle little changes caused by the `getInputProps()` feature and increased use of the `BaseInputTemplate`

* Add precommit script to all packages missing it (#3004)

- Copied the `precommit: lint-staged` from `core` into all of the packages missing it
- Also updated to husky v8 and lint-staged to v13

* Remove unnecessary lodash uses (#2997)

* Remove unnecessary lodash dependencies

* revert some changes

* readd newline

* Refactored the ArrayFieldTemplate into 4 templates (#3001)

* Refactored the ArrayFieldTemplate into 4 templates
- Updated the `types` in `@rjsf/utils` to make `ArrayFieldTemplate` required as well as adding the following 3 new templates:
  - `ArrayFieldDescriptionTemplate`, `ArrayFieldItemTemplate` and `ArrayFieldTitleTemplate`
  - Also added to new types `ArrayFieldDescriptionProps` and `ArrayFieldTitleProps`
- Updated the `core` theme to support the updated `ArrayFeildTemplate`s as follows:
  - Refactored the `ArrayFieldDescription` and `ArrayFieldTitle` from `ArrayField.js` as `ArrayFieldDescriptionTemplate` and `ArrayFieldTitleTemplate`
    - These new Typescript classes were added into the `Templates` directory
    - These two new templates were essentially the same across all themes, but made a template just in case and so they can be used in all themes
  - Refactored the `DefaultArrayItem` component from `ArrayField.js` as `ArrayFieldItemTemplate` as a new Typescript file in the `Templates` directory
  - Refactored the `DefaultNormalArrayFieldTemplate` from `ArrayField.js` as `ArrayFieldTemplate` as a new Typescript file in the `Templates` directory
    - Turns out the `DefaultFixedArrayFieldTemplate` was essentially the same as the other template (and was never customized in any of the themes)
    - As a result, this template was deemed unnecessary
- Updated the `antd` theme to support the updated `ArrayFieldTemplate`s as follows:
  - Renamed the `ArrayFieldTemplateItem` component as `ArrayFieldItemTemplate` in its own directory
  - Renamed the `NormalArrayFieldTemplate` as `ArrayFieldTemplate` (ignore git)
    - Switched to using the `ArrayFieldDescriptionTemplate`, `ArrayFieldItemTemplate` and `ArrayFieldTitleTemplate` from the templates directory
  - Deleted the main `ArrayFieldTemplate/index.js` and `FixedArrayFieldTemplate.js` files from the directory
  - Updated the `Templates.tsx` file to add the `ArrayFieldItemTemplate` into the `templates` object
- Updated the `bootstrap-4` theme to support the updated `ArrayFieldTemplates`s as follows:
  - Refactored the `DefaultArrayItem` component from `ArrayFieldTemplate` as `ArrayFieldItemTemplate` in its own directory
  - Updated `ArrayFieldTemplate` by deleting all the unnecessary code, turning the `DefaultNormalArrayFieldTemplate` into the `ArrayFieldTemplate`
    - Used the `ArrayFieldDescriptionTemplate`, `ArrayFieldItemTemplate` and `ArrayFieldTitleTemplate` from `registry.templates`
  - Updated the `Templates.tsx` file to add the `ArrayFieldItemTemplate` into the `templates` object
  - Deleted the test and snapshot for `ArrayFieldTemplates` since it was already covered elsewhere
  - Updated the `registry` mock to pull `templates` from the `getDefaultRegistry()`, overriding with the theme `Templates`
- Updated the `chakra-ui` theme to support the updated `ArrayFieldTemplates`s as follows:
  - Refactored the `DefaultArrayItem` component from `ArrayFieldTemplate` as `ArrayFieldItemTemplate` in its own directory
  - Updated `ArrayFieldTemplate` by deleting all the unnecessary code, turning the `DefaultNormalArrayFieldTemplate` into the `ArrayFieldTemplate`
    - Used the `ArrayFieldDescriptionTemplate`, `ArrayFieldItemTemplate` and `ArrayFieldTitleTemplate` from `registry.templates`
  - Updated the `Templates.tsx` file to add the `ArrayFieldItemTemplate` into the `templates` object
- Updated the `chakra-ui` theme to support the updated `ArrayFieldTemplates`s as follows:
  - Refactored the `DefaultArrayItem` component from `ArrayFieldTemplate` as `ArrayFieldItemTemplate` in its own directory
  - Updated `ArrayFieldTemplate` by deleting all the unnecessary code, turning the `DefaultNormalArrayFieldTemplate` into the `ArrayFieldTemplate`
    - Used the `ArrayFieldDescriptionTemplate`, `ArrayFieldItemTemplate` and `ArrayFieldTitleTemplate` from `registry.templates`
  - Updated the `Templates.tsx` file to add the `ArrayFieldItemTemplate` into the `templates` object
  - Updated the snapshot for the array templates to pick up the little changes from the refactor
- Updated the `material-ui` and `mui` themes to support the updated `ArrayFieldTemplates`s as follows:
  - Refactored the `DefaultArrayItem` component from `ArrayFieldTemplate` as `ArrayFieldItemTemplate` in its own directory
  - Updated `ArrayFieldTemplate` by deleting all the unnecessary code, turning the `DefaultNormalArrayFieldTemplate` into the `ArrayFieldTemplate`
    - Used the `ArrayFieldDescriptionTemplate`, `ArrayFieldItemTemplate` and `ArrayFieldTitleTemplate` from `registry.templates`
  - Updated the `Templates.tsx` file to add the `ArrayFieldItemTemplate` into the `templates` object
  - Deleted the `UpDownWidget` tests and snapshots because they are duplicated in the `Form` tests
- Updated the `semantic-ui` theme to support the updated `ArrayFieldTemplates`s as follows:
  - Refactored the `DefaultArrayItem` component from `ArrayFieldTemplate` as `ArrayFieldItemTemplate` in its own directory
  - Updated `ArrayFieldTemplate` by deleting all the unnecessary code, turning the `DefaultNormalArrayFieldTemplate` into the `ArrayFieldTemplate`
    - Used the `ArrayFieldDescriptionTemplate`, `ArrayFieldItemTemplate` and `ArrayFieldTitleTemplate` from `registry.templates`
  - Updated the `Templates.tsx` file to add the `ArrayFieldItemTemplate` into the `templates` object

* - Responded to reviewer feedback

* add nx to monorepo (#2998)

* add nx to monorepo

* fixed lockfile issue

* remove nx cloud access token

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

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

* Migrate core widget folder to typescript (#3006)

* Migrate core widget folder to typescript

* Adressed PR feedback

* Addressed additional PR comments

* Addressed additional PR comments

* fix : semantic-ui error class on fields (#3009)

* Converted core fields to Typescript (#3007)

* Converted the fields to Typescript
- Updated the `@rjsf/utils` types and functions based on necessary changes needed for the conversion as follows:
  - In `types.ts` some improvements and new types were discovered as follows:
    - Modified the `RJSFSchema` to add the non-standard `enumNames` property onto the `JSONSchema7` to support the `Field`s
    - Added a new `EnumOptionsType` required for some of the fields
    - Added a new `UnsupportedFieldProps` type for the new `UnsupportedFieldTemplate` on `TemplatesType`
    - Removed the `fields` property on `FieldTemplateProps` since that data can be easily obtained from the `registry`
    - Added the `rawErrors` property to `ArrayFieldTemplateProps` since it was needed `ArrayField`
    - Added the missing `T` generic on a few uses of `IdSchema` properties on a few types
    - Updated the `WidgetProps` type to combine the `options` property with an additional, optional `enumOptions` property as needed by widgets
    - Updated the `UIOptionsBaseType` to have it combined with the `TemplatesType` making it require the `T` and `F` generics as well as adding the following new properties:
      - `classNames` was added as a breaking change (it used to simply be `classNames` in `UiSchema` but now it will be `ui:classNames` or `ui:options: { classNames }`
        - This makes `classNames` consistent with all the other ui options
      - `orderable` and `removable` were added to support the `ArrayField`
      - `widget` was added to support many of the `Field`s
    - Updated `UIOptionsType` to also take the `T` and `F` generics
    - Updated `SchemaUtilsType.retrieveSchema()` to make the `formData` parameter optional, like it already is on the wrapped function
  - Updated the `getUiOptions()` function to add the `T` and `F` generics to the return value type
  - Updated `getWidget()` to make the `widget` property optional, updating the tests accordingly
  - Updated `isCustomWidget()` to make `uiSchema` default to an empty object if missing, updating the tests accordingly
  - Updated `optionsList` to remove the `enumNames` hack and to return the new `EnumOptionsType[] | undefined` type
- Updated `FieldTemplate` for `antd` to remove the commented out `fields` variable since it was removed from the `FieldTemplateProps`
- Refactored `ArrayField.js` to `ArrayField.tsx` converting things to typescript
  - Made the `FieldProps` use the `T[]` generic based on the `ArrayField`'s `T` generic since `formData` should always be an array
  - There were many places where type safety checks were required along with custom casts to deal with `T` vs `T[]` issues
  - Exported `ArrayField` cast as a `Field` to allow it to be used properly in the `index.ts`
- Refactored `BooleanField.js` to `BooleanField.tsx` converting things to typescript
- Refactored `MultiSchemaField.js` to `MultiSchemaField.tsx` converting things to typescript
- Refactored `NullField.js` to `NullField.tsx` converting things to typescript
- Refactored `NumberField.js` to `NumberField.tsx` converting things to typescript as well as making it a stateless functional component with `useState()` instead of a class
- Refactored `ObjectField.js` to `ObjectField.tsx` converting things to typescript
- Refactored `SchemaField.js` to `SchemaField.tsx` converting things to typescript
  - Updated the code to deal with the `classNames` now coming from `ui:` options, including updating tests accordingly adding a new one for the new case inside of `ui:options`
- Refactored `StringField.js` to `StringField.tsx` converting things to typescript
- Refactored `fields/index.js` to `fields/index.ts` adding the proper type for the returned object
- Updated `ArrayFieldTemplate` to add the missing `T` and `F` generics required for `getUiOptions()`
- Updated `ObjectFieldTemplate` to add the `T` and `F` generics ont…
  • Loading branch information
9 people committed Aug 27, 2022
1 parent d8ad425 commit 899710d
Show file tree
Hide file tree
Showing 808 changed files with 477,394 additions and 178,811 deletions.
34 changes: 34 additions & 0 deletions .eslintrc-javascript
@@ -0,0 +1,34 @@
{
"extends": "eslint:recommended",
"parser": "@babel/eslint-parser",
"parserOptions": {
"babelOptions": {
"presets": ["@babel/preset-react"]
}
},
"rules": {
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2,
"react/jsx-tag-spacing": [1, {
"beforeSelfClosing": "always"
}],
"curly": [2],
"linebreak-style": [2, "unix"],
"semi": [2, "always"],
"comma-dangle": [0],
"no-unused-vars": [2, {
"vars": "all",
"args": "none",
"ignoreRestSiblings": true
}],
"no-console": [0],
"object-curly-spacing": [2, "always"],
"keyword-spacing": ["error"]
},
"env": {
"es6": true,
"browser": true,
"node": true
}
}
42 changes: 42 additions & 0 deletions .eslintrc-typescript
@@ -0,0 +1,42 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"rules": {
"react/prop-types": 0,
"react/no-find-dom-node": 0,
"react/display-name": 0,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2,
"react/jsx-tag-spacing": [1, {
"beforeSelfClosing": "always"
}],
"curly": [2],
"linebreak-style": [2, "unix"],
"semi": [2, "always"],
"comma-dangle": [0],
"@typescript-eslint/no-unused-vars": [2, {
"vars": "all",
"args": "none",
"ignoreRestSiblings": true
}],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-console": [0],
"object-curly-spacing": [2, "always"],
"keyword-spacing": ["error"],
"no-prototype-builtins": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-var-requires": "warn"
},
"env": {
"es6": true,
"browser": true,
"node": true
}
}
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Expand Up @@ -2,16 +2,16 @@ name: CI

on:
push:
branches: [ master ]
branches: [ master, rjsf-v5 ]
pull_request:
branches: [ master ]
branches: [ master, rjsf-v5 ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [12.x, 14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -22,7 +22,7 @@ jobs:
- run: npm ci
- run: npm run lint
- run: npm run cs-check

- name: Build with Netlify badge
if: github.ref != 'refs/heads/master'
run: npm run build
Expand All @@ -31,14 +31,14 @@ jobs:
- name: Build
if: github.ref == 'refs/heads/master'
run: npm run build
- if: matrix.node-version == '14.x'

- if: matrix.node-version == '16.x'
uses: actions/upload-artifact@v2
with:
name: dist
path: packages/playground/build
- run: npm test

deploy_preview:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
Expand All @@ -58,7 +58,7 @@ jobs:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}

deploy_playground:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
Expand All @@ -78,7 +78,7 @@ jobs:
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# deploy_canary:
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 16.x
- run: npm ci
- run: npm run build
- run: npm test
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -110,6 +110,7 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk
.rts2_**

# End of https://www.gitignore.io/api/osx,node,linux,windows

Expand All @@ -127,10 +128,12 @@ yarn.lock
.vscode
.idea
*.iml
.editorconfig

# Code coverage
coverage
.nyc_output

venv
*.orig
out/
5 changes: 5 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# Hopefully this disables husky on github CI
[ -n "$CI" ] && exit 0
npm run pre-commit:husky
2 changes: 1 addition & 1 deletion .node-version
@@ -1 +1 @@
14
16
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
14
16
5 changes: 5 additions & 0 deletions .prettierrc.yaml
@@ -0,0 +1,5 @@
bracketSameLine: false
trailingComma: es5
useTabs: false
semi: true
tabWidth: 2
95 changes: 93 additions & 2 deletions CHANGELOG.md
Expand Up @@ -15,7 +15,98 @@ it according to semantic versioning. For example, if your PR adds a breaking cha
should change the heading of the (upcoming) version to include a major version bump.
-->
# v5.0.0 (coming soon)
# v5.0.0-beta.1

## Global changes across all themes:
- Node 16 is now the default node engine for all packages, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2687)
- Refactored all themes to use the new `@rjsf/utils` library functions and types
- Refactored the individual theme forms to consolidate `templates` as part of the fix for https://github.com/rjsf-team/react-jsonschema-form/issues/2526
- All the work implementing the `BaseInputTemplate` should fix (https://github.com/rjsf-team/react-jsonschema-form/issues/2926, https://github.com/rjsf-team/react-jsonschema-form/issues/2889, https://github.com/rjsf-team/react-jsonschema-form/issues/2875, https://github.com/rjsf-team/react-jsonschema-form/issues/2223)
- Also made the display of `title` and `description` consistent across themes, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2481, https://github.com/rjsf-team/react-jsonschema-form/issues/2363, https://github.com/rjsf-team/react-jsonschema-form/issues/2219)
- This change also ensures that all templates are properly exported, resolving (https://github.com/rjsf-team/react-jsonschema-form/issues/2365)
- Bumped most devDependencies to the latest versions where possible
- Switched all repos `package.json` and `package-lock.json` files to be built and maintained by Node 16.
- Adding button templates help to change text for buttons (https://github.com/rjsf-team/react-jsonschema-form/issues/2082, https://github.com/rjsf-team/react-jsonschema-form/issues/2357)

## @rjsf/utils
- New package created by refactoring and converting to Typescript the `utils.js` file from `core` into independent functions.
- Resolves (https://github.com/rjsf-team/react-jsonschema-form/issues/1655, https://github.com/rjsf-team/react-jsonschema-form/issues/2480, https://github.com/rjsf-team/react-jsonschema-form/issues/2341)
- Updated `types` from `core` in `utils` to better match the implementation across all themes
- Included adding a bunch of new types for existing and new features
- The type updates should fix (https://github.com/rjsf-team/react-jsonschema-form/issues/2871, https://github.com/rjsf-team/react-jsonschema-form/issues/2673, https://github.com/rjsf-team/react-jsonschema-form/issues/2347, https://github.com/rjsf-team/react-jsonschema-form/issues/2186)
- Clear errors on `formData` change when `liveOmit=true` when "additionalProperties: false" [issue 1507](https://github.com/rjsf-team/react-jsonschema-form/issues/1507) (https://github.com/rjsf-team/react-jsonschema-form/pull/2631)

## @rjsf/validator-ajv6
- New package created by refactoring and converting to Typescript the `validator.js` file from `core` into independent functions as well as a class that implements the new `ValidatorType` interface.
- [#2693](https://github.com/rjsf-team/react-jsonschema-form/issues/2693).
- Added support for customizing the options passed to the creation of the `ajv` instance.

## @rjsf/validator-ajv6
- A **BREAKING CHANGE** to `toErrorList()` was made so that it takes `fieldPath: string[]` rather than `fieldName='root'` as part of the fix to (https://github.com/rjsf-team/react-jsonschema-form/issues/1596)
- The returned `errors` also now adds `property` from the `fieldPath` along with the proper path from the `property` to the `stack` message, making it consistent with the AJV errors.
- Previously the `stack` attribute would say `root: error message`; now it says `. error message`
- In addition, the extra information provided by AJV is no longer lost from the `errors` when merged with custom validation, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/1596).

## @rjsf/core
- Converted core to Typescript (https://github.com/rjsf-team/react-jsonschema-form/issues/583)
- `ui:emptyValue` now works with selects (https://github.com/rjsf-team/react-jsonschema-form/issues/1041)
- Refactoring `utils.js` into the new `@rjsf/utils` fixes (https://github.com/rjsf-team/react-jsonschema-form/issues/2719)
- **BREAKING CHANGE** Fix overriding core submit button className (https://github.com/rjsf-team/react-jsonschema-form/issues/2979)
- Fix `ui:field` with anyOf or oneOf no longer rendered twice (#2890)
- **BREAKING CHANGE** Fixed `anyOf` and `oneOf` getting incorrect, potentially duplicate ids when combined with array (https://github.com/rjsf-team/react-jsonschema-form/issues/2197)
- `formContext` is now passed properly to `SchemaField`, fixes (https://github.com/rjsf-team/react-jsonschema-form/issues/2394, https://github.com/rjsf-team/react-jsonschema-form/issues/2274)
- Added `ui:duplicateKeySuffixSeparator` to customize how duplicate object keys are renamed when using `additionalProperties`.
- The `extraErrors` are now consistently appended onto the end of the schema validation-based `errors` information that is returned via the `onErrors()` callback when submit fails.
- In addition, the extra information provided by AJV is no longer stripped from the `errors` during the merge process, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/1596).
- Fixed id generation for `RadioWidget` to no longer use random numbers fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2461)
- Correctly call the `onChange` handler in the new set of props if it changed, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/1708).
- Fixed race condition for `onChange` when `formData` is controlled prop, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/513),

## @rjsf/antd
- Fix esm build to use `@rollup/plugin-replace` to replace `antd/lib` and `rc-picker/lib` with `antd/es` and `rc-picker/es` respectively, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2962)

## @rjsf/bootstrap-4
- Bootstrap-4 `withTheme` customizations should work properly now (https://github.com/rjsf-team/react-jsonschema-form/issues/2058)
- `ArrayFieldTemplate` refactor seems to have fixed https://github.com/rjsf-team/react-jsonschema-form/issues/2775
- Fix issues with `SelectField` (https://github.com/rjsf-team/react-jsonschema-form/issues/2616, https://github.com/rjsf-team/react-jsonschema-form/issues/2875)

## @rjsf/chakra-ui
- Properly handle the hidden field in this theme (https://github.com/rjsf-team/react-jsonschema-form/issues/2571)

## @rjsf/material-ui
- The theme for Material UI version 5 (i.e. `@rjsf/mui`) was split out of the theme for version 4 (i.e. `@rjsf/material-ui`) to resolve the following issues:
- [#2762](https://github.com/rjsf-team/react-jsonschema-form/issues/2762)
- [#2858](https://github.com/rjsf-team/react-jsonschema-form/issues/2858)
- [#2905](https://github.com/rjsf-team/react-jsonschema-form/issues/2905)
- [#2945](https://github.com/rjsf-team/react-jsonschema-form/issues/2945)
- [#2774](https://github.com/rjsf-team/react-jsonschema-form/issues/2774)
- Material-UI TextWidget now respects `inputType` in uiSchema (https://github.com/rjsf-team/react-jsonschema-form/issues/2057)
- Also respects `step` for `number` type (https://github.com/rjsf-team/react-jsonschema-form/issues/2488)
- Material-UI UpDownWidget now support min/max/step (https://github.com/rjsf-team/react-jsonschema-form/issues/2022)
- Properly handle the hidden field in this theme (https://github.com/rjsf-team/react-jsonschema-form/issues/2571)
- Select properly accepts true or false (https://github.com/rjsf-team/react-jsonschema-form/issues/2326)

## @rjsf/mui
- The theme for Material UI version 5 (i.e. `@rjsf/mui`) was split out of the theme for version 4 (i.e. `@rjsf/material-ui`) to resolve the following issues:
- [#2762](https://github.com/rjsf-team/react-jsonschema-form/issues/2762)
- [#2858](https://github.com/rjsf-team/react-jsonschema-form/issues/2858)
- [#2905](https://github.com/rjsf-team/react-jsonschema-form/issues/2905)
- [#2945](https://github.com/rjsf-team/react-jsonschema-form/issues/2945)
- [#2774](https://github.com/rjsf-team/react-jsonschema-form/issues/2774)
- Material-UI TextWidget now respects `inputType` in uiSchema (https://github.com/rjsf-team/react-jsonschema-form/issues/2057)
- Also respects `step` for `number` type (https://github.com/rjsf-team/react-jsonschema-form/issues/2488)
- Material-UI UpDownWidget now support min/max/step (https://github.com/rjsf-team/react-jsonschema-form/issues/2022)
- Properly handle the hidden field in this theme (https://github.com/rjsf-team/react-jsonschema-form/issues/2571)

## @rjsf/semantic-ui
- Fix missing error class on fields (https://github.com/rjsf-team/react-jsonschema-form/issues/2666)
- Fixed the `main` definition in `semantic-ui` to fix (https://github.com/withastro/astro/issues/4357)
- Properly handle the hidden field in this theme (https://github.com/rjsf-team/react-jsonschema-form/issues/2571)

## Dev / docs / playground
- Demonstrate use of `ui:field` with `anyOf` (#2890)
- Playground now uses webpack 5
- Corrected number field default (https://github.com/rjsf-team/react-jsonschema-form/issues/2358)

# 4.2.1
* fix typo by @epicfaace in https://github.com/rjsf-team/react-jsonschema-form/pull/2854
Expand Down Expand Up @@ -47,7 +138,7 @@ should change the heading of the (upcoming) version to include a major version b
- NOTE: `@rjsf/material-ui` was retained to avoid a breaking change, but using it will continue to cause bundler warnings
- See the `README.md` for the `@rjsf/material-ui` package for updated usage information
- Fixed (#2831) for `material-ui` by removing the `DefaultChildren` passed into the themes

## @rjsf/bootstrap-4
- SubmitButton widget to use new ui:submitButtonOptions on the submit button for forms (https://github.com/rjsf-team/react-jsonschema-form/pull/2640)

Expand Down
2 changes: 1 addition & 1 deletion docs/3.x upgrade guide.md
Expand Up @@ -12,7 +12,7 @@ Dropped support for Node 8, 9, 10. Minimum supported version of Node.js is now 1

### Help field IDs

IDs for [Help fields](https://react-jsonschema-form.readthedocs.io/en/latest/api-reference/uiSchema/#help) are now suffixed by `__help` so that the IDs are unique. Previously, their IDs would be nonexistent or the same as the fields that they were describing.
IDs for [Help fields](https://react-jsonschema-form.readthedocs.io/en/stable/api-reference/uiSchema/#help) are now suffixed by `__help` so that the IDs are unique. Previously, their IDs would be nonexistent or the same as the fields that they were describing.

### Bring your own polyfills

Expand Down
2 changes: 1 addition & 1 deletion docs/4.x upgrade guide.md
Expand Up @@ -8,4 +8,4 @@ No longer actively supporting React version < 16.3. The minimum supported versio

### @rjsf/material-ui package - Minimum version of material-ui 4

If you are using the material-ui 4 theme, @material-ui/core and @material-ui/icons packages should be updated to the latest versions. The minimum versions supported for @material-ui/core and @material-ui/icons are 4.12.0 and 4.11.1 respectively. This change is required for [support for the material-ui version 5 theme](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/material-ui)
If you are using the material-ui 4 theme, @material-ui/core and @material-ui/icons packages should be updated to the latest versions. The minimum versions supported for @material-ui/core and @material-ui/icons are 4.12.0 and 4.11.1 respectively. This change is required for [support for the material-ui version 5 theme](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/material-ui)

0 comments on commit 899710d

Please sign in to comment.