Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7798592
Enable antd (ant-design) support
delyanr Dec 29, 2019
b03bf8d
Change name of package in local package.json for consistency
delyanr Jan 8, 2020
da11880
Add local readme file
delyanr Jan 8, 2020
35f73ef
Tidy the package dependencies
delyanr Jan 13, 2020
b6c4101
Change README.md references to rjsf npm organisation
delyanr Jan 13, 2020
8859799
Merge branch 'master' into enable-antd
delyanr Mar 10, 2020
7a2be3b
Update package.json an dimports to reflect the new rjsf organization
delyanr Mar 10, 2020
bce09ef
Deprecate antd custom withTheme as core now has forwardRef
delyanr Mar 10, 2020
830ed8a
Ensure Theme is not default export for consistency
delyanr Mar 10, 2020
fd69ba1
Add scripts for building dist and lib in package.json
delyanr Mar 10, 2020
ee6e1ac
Fix test to use non-default import
delyanr Mar 10, 2020
939c485
Add babel-plugin-import to ensure styles are imported on demand
delyanr Mar 10, 2020
320ee70
Add rjsf-antd theme to the playground
delyanr Mar 10, 2020
09aba00
Merge branch 'master' into enable-antd
delyanr Apr 25, 2020
fe61e8f
Migrate rjsf-antd code to antd v4 support
delyanr Apr 25, 2020
23cb8e1
Implement EmailWidget and URLWidget for rjsf-antd
delyanr Apr 25, 2020
9829ee8
Reimplement rjsf-antd tests based on latest
delyanr Apr 25, 2020
0082350
Enable rjsf-antd support in the playground
delyanr Apr 25, 2020
3114563
Merge branch 'master' into enable-antd; bump rsjf-antd versions
delyanr Apr 25, 2020
33b32a3
Finalise rjsf-antd packages files
delyanr Apr 25, 2020
c7df8e7
Merge branch 'master' into enable-antd
epicfaace Apr 25, 2020
a6e7aff
Remove useless build:lib script
delyanr Apr 26, 2020
f867dc9
Enable support for additionalProperties schemas
delyanr Apr 26, 2020
4185415
Update the test snapshots
delyanr Apr 26, 2020
61123b4
Merge branch 'enable-antd' of https://github.com/delyanr/react-jsonsc…
delyanr Apr 26, 2020
90f4202
Fix minor styling issues with descriptions
delyanr Apr 30, 2020
066df5e
Ensure popups are rendered next to fields (even when used with iframes)
delyanr Apr 30, 2020
8dab55b
Implement AltDate/AltDateTimeWidgets for antd theme
delyanr Apr 30, 2020
03eb7f6
Merge branch 'master' into delyanr-enable-antd
epicfaace Jun 4, 2020
fcb8c5d
update package-lock
epicfaace Jun 4, 2020
c3ebba1
Fix SelectWidget placeholder never being shown
delyanr Jun 14, 2020
1b55960
Fix issue with the alternative date pickers
delyanr Jun 14, 2020
3284d20
Fix issue with additionalProperties blanking out
delyanr Jun 14, 2020
64e080f
Change license for consistency
delyanr Jun 14, 2020
699b291
Merge branch 'master' into enable-antd
epicfaace Jun 14, 2020
7695801
Add semicolon
epicfaace Jun 14, 2020
6c9e7d5
build cjs, es, and umd
epicfaace Jun 22, 2020
4b8ae25
antd - switch to new build process, fix global styles
epicfaace Jun 23, 2020
65f9880
Merge branch 'master' into enable-antd
epicfaace Jun 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions packages/antd/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parser": "babel-eslint",
"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
},
"extends": "eslint:recommended",
"plugins": [
"jsx-a11y",
"react"
]
}
83 changes: 83 additions & 0 deletions packages/antd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[![npm][npm-shield]][npm-url]
[![npm downloads][npm-dl-shield]][npm-dl-url]

<br />
<p align="center">
<h3 align="center">@rjsf/antd</h3>

<p align="center">
Ant Design theme, fields and widgets for <a href="https://github.com/rjsf-team/react-jsonschema-form"><code>react-jsonschema-form</code></a>.
<br />
<a href="https://react-jsonschema-form.readthedocs.io/"><strong>Explore the docs »</strong></a>
<br />
<br />
<a href="https://rjsf-team.github.io/react-jsonschema-form/">View Playground (TBD)</a>
·
<a href="https://github.com/rjsf-team/react-jsonschema-form/issues">Report Bug</a>
·
<a href="https://github.com/rjsf-team/react-jsonschema-form/issues">Request Feature</a>
</p>
</p>

## Table of Contents

- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Roadmap](#roadmap)
- [Contributing](#contributing)
- [License](#license)

## Getting Started

### Prerequisites

- `antd >= 4.0.0`
- `react-jsonschema-form >= 2.0.0`

```sh
npm install antd @rjsf/core
```

### Installation

```sh
npm install @rjsf/antd
```

## Usage

```javascript
import Form from '@rjsf/antd';
```

or

```javascript
import { withTheme } from '@rjsf/core';
import { Theme } from '@rjsf/antd';

// Make modifications to the Theme with your own fields and widgets

const Form = withTheme(Theme);
```

## Roadmap

See the general [open issues](https://github.com/rjsf-team/react-jsonschema-form/issues).

## Contributing

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

## License

Apache 2

<!-- MARKDOWN LINKS & IMAGES -->

[npm-shield]: https://img.shields.io/npm/v/react-jsonschema-form/latest.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/react-jsonschema-form
[npm-dl-shield]: https://img.shields.io/npm/dm/react-jsonschema-form.svg?style=flat-square
[npm-dl-url]: https://www.npmjs.com/package/react-jsonschema-form
13 changes: 13 additions & 0 deletions packages/antd/__mocks__/matchMedia.mock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation(query => ({
matches: false,
media: query,
onchange: null,
addListener: jest.fn(),
removeListener: jest.fn(),
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
})),
});
1 change: 1 addition & 0 deletions packages/antd/__mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
55 changes: 55 additions & 0 deletions packages/antd/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const BABEL_ENV = process.env.BABEL_ENV;

const defaultPlugins = [];

module.exports = {
"presets": [
[
"@babel/preset-env",
{
modules: ["cjs", "test"].includes(BABEL_ENV) ? "commonjs" : false,
targets:
BABEL_ENV === "test" ? { node: "current" } : { browsers: "defaults" },
},
],
"@babel/preset-react"
],
"plugins": [
[
"import",
{
"libraryName": "antd",
"style": true
}
],
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties",
[
"@babel/plugin-transform-runtime",
{
"corejs": 2
}
]
],
"env": {
cjs: {
plugins: defaultPlugins,
ignore: ['test/**/*.js']
},
umd: {
plugins: defaultPlugins,
ignore: ['test/**/*.js']
},
es: {
plugins: [
...defaultPlugins,
['@babel/plugin-transform-runtime', { useESModules: true, corejs: 2 }]
],
ignore: ['test/**/*.js']
},
test: {
plugins: defaultPlugins,
ignore: []
}
}
};
Loading