Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit d6a09eb
Merge: 36f57b3 0134c9d
Author: Jacques Nel <[email protected]>
Date:   Wed Feb 16 08:22:00 2022 +0200

    Merge branch 'rjsf-team:master' into master

commit 0134c9d
Author: Ashwin Ramaswami <[email protected]>
Date:   Sun Feb 13 22:07:59 2022 -0500

    Update PULL_REQUEST_TEMPLATE.md (#2698)

commit 4746c0b
Author: Ashwin Ramaswami <[email protected]>
Date:   Sun Feb 13 22:07:50 2022 -0500

    Update CHANGELOG.md (#2706)

commit 2d03544
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Fri Feb 11 11:23:29 2022 +0000

    chore(deps): bump handlebars from 4.1.0 to 4.7.7 in /packages/core

    Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.0 to 4.7.7.
    - [Release notes](https://github.com/wycats/handlebars.js/releases)
    - [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
    - [Commits](handlebars-lang/handlebars.js@v4.1.0...v4.7.7)

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

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

commit 6b17ede
Author: David Johnson <[email protected]>
Date:   Wed Feb 9 19:42:48 2022 -0700

    Added .nvmrc and .node-version to help setup correct node version (#2695)

    * Added .nvmrc and .node-version to help setup correct node version

    * Changing .nvmrc/.node-version to use major version #

commit 549b718
Author: green7ea <[email protected]>
Date:   Thu Feb 10 03:42:34 2022 +0100

    Can now specify idSeparator to control how id is created (#2628)

    * Can now specify idSeparator to control how id is created

    By default, '_' is used as a separator for the different parts that
    make up a field's id. This can be problematic when '_' is part of a
    field's name.

    This commit adds the ability to specify idSeparator when building a
    form which allows users use a character that isn't used in field
    names.

    With the idSeparator option set to '.', we would get:

    'root.field_a.field_123' instead of 'root_field_a_field_123'.

    * Update CHANGELOG.md

    Co-authored-by: Emmanuel Boudreault <[email protected]>
    Co-authored-by: Ashwin Ramaswami <[email protected]>

commit c6ad877
Author: Maximillian Dornseif <[email protected]>
Date:   Tue Feb 8 02:58:40 2022 +0100

    Documenting readonlyAsDisabled functionality. (#2524)

    * Documenting readonlyAsDisabled functionality.

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

    Co-authored-by: Ashwin Ramaswami <[email protected]>

    Co-authored-by: Ashwin Ramaswami <[email protected]>

commit 6447cae
Author: Rodrigo Fuentes <[email protected]>
Date:   Mon Feb 7 09:05:31 2022 -0500

    Update README.md (#2692)

    fix typo

commit e2e1181
Author: Heath C <[email protected]>
Date:   Fri Feb 4 12:44:51 2022 -0800

    Add support for both Material UI 4 and 5 in @rjsf/material-ui (fix #2555) (#2605)

    * Attempting to build a `material-ui` that works for both version 4 and 5

    * Some minor cleanup and upgrade to React 17 to get all the tests working

    * Made the Themes be tolerant of not having the library actually present

    * Changes needed to make the old playground work with the new v4 & v5 material-ui theme, by emptying-out the @mui libraries since they need React 17

    * Updated React 17 playground to also support material-ui v4 along with v5

    * Extracted the Context creation from the them, including properly dealing with `require()` throwing errors

    * Final changes in preparation for the PR

    * Added missing `size="small"` on the `IconButtons`, reordered and/or consolidated some imports
    Fixed up the `Mui5ContextProps` to use `OutlinedInput` for `Input`
    Also improved the documentation on the `@mui` -> `emptyLibrary` hack

    * Update the tests snapshots to account for the `size="small"` change on the `IconButton`

    * - Updated to the latest `@mui` and `@emotion` libraries and made the `@material-ui`, `@mui` and `@emotion` packages optional in `peerDependenciesMeta`

    * - Rebased package-lock.json for `material-ui` and `playground` after rebase to latest master
    - Updated the `material-ui` snapshot due to updated libraries

    * - Updated the original playground to call out `material-ui-4` rather than just `material-ui`

    * - Restored the [PR](https://github.com/heath-freenome/react-jsonschema-form/pull/1/files#) that was lost in a merge issue

    * - Bump `react-bootstrap` in the playground to match the version used in `@rjsf/bootstrap-4`

    * - Fixed issue found by reviewer where the `Slider` component was not output into the Contexts

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

commit 3d1a71c
Author: Ashwin Ramaswami <[email protected]>
Date:   Fri Feb 4 12:14:13 2022 -0500

    Add chakra-ui theme (#2688)

    Co-authored-by: Jonathan Blair <[email protected]>
    Co-authored-by: Rodrigo Fuentes <[email protected]>
    Co-authored-by: U.M Andrew <[email protected]>
    Co-authored-by: jzander <[email protected]>

commit 3537039
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 1 16:08:13 2022 +0000

    chore(deps): bump browserslist in /packages/playground

    Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.6.2 to 4.19.1.
    - [Release notes](https://github.com/browserslist/browserslist/releases)
    - [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
    - [Commits](browserslist/browserslist@4.6.2...4.19.1)

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

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

commit 89ba649
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 1 15:51:44 2022 +0000

    chore(deps-dev): bump react-portal from 4.2.0 to 4.2.1

    Bumps [react-portal](https://github.com/tajo/react-portal) from 4.2.0 to 4.2.1.
    - [Release notes](https://github.com/tajo/react-portal/releases)
    - [Commits](tajo/react-portal@v4.2.0...v4.2.1)

    ---
    updated-dependencies:
    - dependency-name: react-portal
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

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

commit b54b124
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 1 07:00:31 2022 +0000

    chore(deps): bump crazy-max/ghaction-github-pages from 2.5.0 to 2.6.0

    Bumps [crazy-max/ghaction-github-pages](https://github.com/crazy-max/ghaction-github-pages) from 2.5.0 to 2.6.0.
    - [Release notes](https://github.com/crazy-max/ghaction-github-pages/releases)
    - [Changelog](https://github.com/crazy-max/ghaction-github-pages/blob/dev/CHANGELOG.md)
    - [Commits](crazy-max/ghaction-github-pages@v2.5.0...v2.6.0)

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

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

commit 36f57b3
Merge: 9e2dff9 3c1d465
Author: Jacques Nel <[email protected]>
Date:   Tue Jan 25 20:40:22 2022 +0200

    Merge branch 'rjsf-team:master' into master
  • Loading branch information
jacqueswho committed Feb 16, 2022
1 parent 629e0bb commit e91212c
Show file tree
Hide file tree
Showing 172 changed files with 116,386 additions and 31,794 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
name: dist
path: dist
- name: Deploy playground
uses: crazy-max/ghaction-github-pages@v2.5.0
uses: crazy-max/ghaction-github-pages@v2.6.0
with:
keep_history: true
target_branch: gh-pages
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
28 changes: 25 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,38 @@ 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.
-->
# v3.3.1 (upcoming)
# v4.0.1 (upcoming)

# v4.0.0

## @rjsf/core
- Add React 17 as a supported peer-dependency
- Introduce `idSeparator` prop to change the path separator used to generate field names (https://github.com/rjsf-team/react-jsonschema-form/pull/2628)

## @rjsf/material-ui
- Added React 17 as an optional peer dependency
- Bumped required minimum versions of `@material-ui/core` and `@material-ui/icons` to the latest (`4.12.0` and `4.11.1`)
- New exports: `MuiForm4` and `Theme4` are aliases to the material-ui version 4 `MuiForm` and `Theme`
- The Material-UI 4 theme will fallback to a form with a message indicating `@material-ui` is not available when one (or both) of the libraries are not installed
- Added support for material-ui version 5 on top of React 17
- Added `@mui/material`, `@mui/icons-material`, `@emotion/react` and `@emotion/styled` as optional peer dependencies
- New exports: `MuiForm5` and `Theme5` support using the Material UI 5 libraries instead of version 4
- The Material-UI 5 theme will fallback to a form with a message indicating `@mui` is not available when one (or both) of the libraries are not installed

## @rjsf/chakra-ui
- Added support for this new theme

## Dev / docs / playground
- Upgraded playground to use React 17
- Differentiated the material-ui 4 and 5 themes
- Added chakra-ui theme

# v3.3.0

## @rjsf/semantic-ui
- "semantic-ui-react" dependency updated to v1.3.1 (https://github.com/rjsf-team/react-jsonschema-form/pull/2590)
- fixed an issue where all semantic props overwritten when a single [semantic theme-specific prop](https://react-jsonschema-form.readthedocs.io/en/latest/api-reference/themes/semantic-ui/uiSchema/) is passed in ([issue 2619](https://github.com/rjsf-team/react-jsonschema-form/issues/2619)) (https://github.com/rjsf-team/react-jsonschema-form/pull/2590)

# v3.2.2 (upcoming)

# v3.2.1

## @rjsf/core
Expand Down
2 changes: 2 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

If this is related to existing tickets, include links to them as well. Use the syntax `fixes #[issue number]` (ex: `fixes #123`).

If your PR is non-trivial and you'd like to schedule a synchronous review, please add it to the weekly meeting agenda: https://docs.google.com/document/d/12PjTvv21k6LIky6bNQVnsplMLLnmEuypTLQF8a-8Wss/edit

### Checklist

* [ ] **I'm updating documentation**
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[![Contributors][contributors-shield]][contributors-url]
[![Apache 2.0 License][license-shield]][license-url]


<p align="center">
<a href="https://github.com/rjsf-team/react-jsonschema-form">
<img src="https://raw.githubusercontent.com/rjsf-team/react-jsonschema-form/59a8206e148474bea854bbb004f624143fbcbac8/packages/core/logo.png" alt="Logo" width="180" height="120">
Expand All @@ -26,31 +25,34 @@

[![playground animation](https://i.imgur.com/M8ZCES5.gif)](https://rjsf-team.github.io/react-jsonschema-form/)


## Supported Themes

- [Ant Design](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/antd)
- [Bootstrap 3](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/core)
- [Bootstrap 4](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/bootstrap-4)
- [Fluent UI](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/fluent-ui)
- [Material UI](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/material-ui)
- [Material UI 4](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/material-ui)
- [Material UI 5](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/material-ui)
- [Semantic UI](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/semantic-ui)
- [Chakra UI](https://github.com/rjsf-team/react-jsonschema-form/tree/master/packages/chakra-ui)

## Documentation

Read our [documentation](https://react-jsonschema-form.readthedocs.io/en/latest/) on Read the Docs.

## Live Playground

A [live playground](https://rjsf-team.github.io/react-jsonschema-form/) is hosted on gh-pages.

## Contributing

Read our [contributors' guide](https://react-jsonschema-form.readthedocs.io/en/latest/contributing/) to get started.

## Credits

Testing powered by BrowserStack<br>
<a target="_blank" href="https://www.browserstack.com/"><img width="200" src="https://user-images.githubusercontent.com/1689183/51487090-4ea04f80-1d57-11e9-9a91-79b7ef8d2013.png"></a>


[build-shield]: https://github.com/rjsf-team/react-jsonschema-form/workflows/CI/badge.svg
[build-url]: https://github.com/rjsf-team/react-jsonschema-form/actions
[contributors-shield]: https://img.shields.io/github/contributors/rjsf-team/react-jsonschema-form.svg
Expand Down
25 changes: 25 additions & 0 deletions docs/api-reference/form-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ React component used to customize each field of the form. See [Custom Templates]
## formContext

You can provide a `formContext` object to the Form, which is passed down to all fields and widgets. Useful for implementing context aware fields and widgets.
Setting `{readonlyAsDisabled: false}` on the formContext will make the antd theme treat readOnly fields as disabled.

## formData

Expand All @@ -138,6 +139,30 @@ render((

This will render `<input id="rjsf_prefix_key">` instead of `<input id="root_key">`

## idSeparator

To avoid using a path separator that is present in field names, it is possible to change the separator used for ids (the default is `_`).

```jsx
const schema = {
type: "object",
properties: {
first: {
type: "string"
}
}
};

render((
<Form schema={schema}
idSeparator={"/"}/>
), document.getElementById("app"));
```

This will render `<input id="root/first">` instead of `<input
id="root_first">` when rendering `first`.


## liveOmit

If `omitExtraData` and `liveOmit` are both set to true, then extra form data values that are not in any form field will be removed whenever `onChange` is called. Set to `false` by default.
Expand Down
29 changes: 29 additions & 0 deletions docs/api-reference/themes/chakra-ui/uiSchema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# uiSchema Options for Chakra-UI

When using `@rjsf/chakra-ui` there are a couple of ways to customize the feel of the form.

## Styling

You can use `ChakraProvider`, where you can customize the components at a theme level.\
And, `uiSchema` allows for the use of a `"chakra"` `"ui:option"` to customize the styling of the form widgets.

```json
{
"ui:options": {
"chakra": {
"p": "1rem",
"color": "blue.200",
"sx": {
"margin": "0 auto"
}
}
}
}
```

It accepts the theme accessible [style props](https://chakra-ui.com/docs/features/style-props) provided by [Chakra](https://chakra-ui.com/docs/getting-started) and [Emotion](https://emotion.sh/docs/introduction).

### Limitations

- The `chakra` option is only available for the Chakra-UI theme.
- The props are given to the parent component in the individual widget. To pass styles to the inner components, use the [`sx` prop](https://chakra-ui.com/docs/features/the-sx-prop).
18 changes: 9 additions & 9 deletions docs/usage/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ meaning that you must load the Bootstrap stylesheet on the page to view the form

## Supported themes

Theme Name | Status | Package Name / Link
---------- | ------- | -----------
Bootstrap 3 (default) | Published | `@rjsf/core`
Bootstrap 4 | Published | `@rjsf/bootstrap-4`
material-ui | Published | `@rjsf/material-ui`
fluent-ui | Published | `@rjsf/fluent-ui`
antd | Published | `@rjsf/antd`
Semantic UI | Published | `@rjsf/semantic-ui`

| Theme Name | Status | Package Name / Link |
| --------------------- | --------- | ------------------- |
| Bootstrap 3 (default) | Published | `@rjsf/core` |
| Bootstrap 4 | Published | `@rjsf/bootstrap-4` |
| material-ui 4 & 5 | Published | `@rjsf/material-ui` |
| fluent-ui | Published | `@rjsf/fluent-ui` |
| antd | Published | `@rjsf/antd` |
| Semantic UI | Published | `@rjsf/semantic-ui` |
| Chakra UI | Published | `@rjsf/chakra-ui` |

## Using themes

Expand Down
35 changes: 18 additions & 17 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,27 @@ nav:
- Introduction: index.md
- Quickstart: quickstart.md
- JSON schema:
- Single fields: usage/single.md
- Objects: usage/objects.md
- Arrays: usage/arrays.md
- Definitions: usage/definitions.md
- Dependencies: usage/dependencies.md
- oneOf / anyOf / allOf: usage/oneof.md
- Single fields: usage/single.md
- Objects: usage/objects.md
- Arrays: usage/arrays.md
- Definitions: usage/definitions.md
- Dependencies: usage/dependencies.md
- oneOf / anyOf / allOf: usage/oneof.md
- Usage:
- Widgets: usage/widgets.md
- Themes: usage/themes.md
- Validation: usage/validation.md
- Widgets: usage/widgets.md
- Themes: usage/themes.md
- Validation: usage/validation.md
- Advanced Customization:
- Custom Widgets and Fields: advanced-customization/custom-widgets-fields.md
- Custom Templates: advanced-customization/custom-templates.md
- Custom Themes: advanced-customization/custom-themes.md
- Other Internals: advanced-customization/internals.md
- Contributing: contributing.md
- Custom Widgets and Fields: advanced-customization/custom-widgets-fields.md
- Custom Templates: advanced-customization/custom-templates.md
- Custom Themes: advanced-customization/custom-themes.md
- Other Internals: advanced-customization/internals.md
- Contributing: contributing.md
- API Reference:
- General uiSchema Reference: api-reference/uiSchema.md
- semantic-ui uiSchema Reference: api-reference/themes/semantic-ui/uiSchema.md
- "&lt;Form /&gt; props": api-reference/form-props.md
- General uiSchema Reference: api-reference/uiSchema.md
- semantic-ui uiSchema Reference: api-reference/themes/semantic-ui/uiSchema.md
- chakra-ui uiSchema Reference: api-reference/themes/chakra-ui/uiSchema.md
- "&lt;Form /&gt; props": api-reference/form-props.md
- 3.x Migration: 3.x upgrade guide.md
- 2.x Migration: 2.x upgrade guide.md

Expand Down
48 changes: 27 additions & 21 deletions packages/antd/test/__snapshots__/Array.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,16 @@ exports[`array fields array 1`] = `
</div>
</fieldset>
</div>
<div>
<button
className="btn btn-info"
type="submit"
>
<button
className="ant-btn btn btn-info ant-btn-submit"
disabled={false}
onClick={[Function]}
type="button"
>
<span>
Submit
</button>
</div>
</span>
</button>
</form>
`;

Expand Down Expand Up @@ -183,14 +185,16 @@ exports[`array fields checkboxes 1`] = `
</div>
</div>
</div>
<div>
<button
className="btn btn-info"
type="submit"
>
<button
className="ant-btn btn btn-info ant-btn-submit"
disabled={false}
onClick={[Function]}
type="button"
>
<span>
Submit
</button>
</div>
</span>
</button>
</form>
`;

Expand Down Expand Up @@ -455,13 +459,15 @@ exports[`array fields fixed array 1`] = `
</div>
</fieldset>
</div>
<div>
<button
className="btn btn-info"
type="submit"
>
<button
className="ant-btn btn btn-info ant-btn-submit"
disabled={false}
onClick={[Function]}
type="button"
>
<span>
Submit
</button>
</div>
</span>
</button>
</form>
`;
Loading

0 comments on commit e91212c

Please sign in to comment.