Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readmes for 3.0 #1875

Merged
merged 3 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Please see the official JSON Forms website, [jsonforms.io](https://jsonforms.io)
## Getting started

1. Clone the seed app with `git clone https://github.com/eclipsesource/jsonforms-react-seed.git`
2. Install dependencies with `npm ci` (or `npm install` when using an older version)
2. Install dependencies with `npm ci`
3. Run the app with `npm run start`

For more info about the seed app, please see the corresponding README file of the [seed repo](https://github.com/eclipsesource/jsonforms-react-seed).
For a more detailed tutorial about the usage of JSON Forms, please see [this tutorial](http://jsonforms.io/docs/tutorial).

## Upgrading to JSON Forms 3.0 Alpha
## Upgrading to JSON Forms 3.0

With version 3.0 of JSON Forms we removed `json-schema-ref-parser` from the core package.
This change only affects users of the React variant (Vue and Angular are not affected) and even for React only a few users will need to adjust their code.
Expand Down
56 changes: 54 additions & 2 deletions packages/angular-material/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,58 @@ import { angularMaterialRenderers } from "@jsonforms/angular-material";
})
export class AppComponent {
renderers = angularMaterialRenderers;
uischema = {
type: "VerticalLayout",
elements: [
{
type: "Control",
label: false,
scope: "#/properties/done",
},
{
type: "Control",
scope: "#/properties/name",
},
{
type: "HorizontalLayout",
elements: [
{
type: "Control",
scope: "#/properties/due_date",
},
{
type: "Control",
scope: "#/properties/recurrence",
},
],
},
],
};
schema = {
type: "object",
properties: {
name: {
type: "string",
minLength: 1,
},
done: {
type: "boolean",
},
due_date: {
type: "string",
format: "date",
},
recurrence: {
type: "string",
enum: ["Never", "Daily", "Weekly", "Monthly"],
},
},
required: ["name", "due_date"],
};
data = {};
}
```

Example module file:
Example module file `app.module.ts`:

```ts
import { NgModule } from "@angular/core";
Expand All @@ -65,6 +112,7 @@ import { AppComponent } from "./app.component";
bootstrap: [AppComponent],
})

export class AppModule { }
```

## License
Expand All @@ -83,3 +131,7 @@ If you encounter any problems feel free to [open an issue](https://github.com/ec
For questions and discussions please use the [JSON Forms board](https://jsonforms.discourse.group).
You can also reach us via [email](mailto:jsonforms@eclipsesource.com?subject=JSON%20Forms).
In addition, EclipseSource also offers [professional support](https://jsonforms.io/support) for JSON Forms.

## Migration

See our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master/MIGRATION.md) when updating JSON Forms.
5 changes: 5 additions & 0 deletions packages/angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ import { AppComponent } from "./app.component";
bootstrap: [AppComponent],
})

export class AppModule { }
```

## License
Expand All @@ -145,3 +146,7 @@ If you encounter any problems feel free to [open an issue](https://github.com/ec
For questions and discussions please use the [JSON Forms board](https://jsonforms.discourse.group).
You can also reach us via [email](mailto:jsonforms@eclipsesource.com?subject=JSON%20Forms).
In addition, EclipseSource also offers [professional support](https://jsonforms.io/support) for JSON Forms.

## Migration

See our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master/MIGRATION.md) when updating JSON Forms.
11 changes: 11 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ See the official [documentation](https://jsonforms.io/) and the [Example Package

Check <https://www.npmjs.com/search?q=%40jsonforms> for all published JSON Forms packages.

## Upgrading to JSON Forms 3.0

With version 3.0 of JSON Forms we removed `json-schema-ref-parser` from the core package.
This change only affects users of the React variant (Vue and Angular are not affected) and even for React only a few users will need to adjust their code.
To avoid issues and for more information, please have a look at our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master/MIGRATION.md).

## License

The JSON Forms project is licensed under the MIT License. See the [LICENSE file](https://github.com/eclipsesource/jsonforms/blob/master/LICENSE) for more information.
Expand All @@ -37,3 +43,8 @@ If you encounter any problems feel free to [open an issue](https://github.com/ec
For questions and discussions please use the [JSON Forms board](https://jsonforms.discourse.group).
You can also reach us via [email](mailto:jsonforms@eclipsesource.com?subject=JSON%20Forms).
In addition, EclipseSource also offers [professional support](https://jsonforms.io/support) for JSON Forms.


## Migration

See our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master/MIGRATION.md) when updating JSON Forms.
6 changes: 5 additions & 1 deletion packages/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ JSON Forms eliminates the tedious task of writing fully-featured forms by hand b

This is the examples package which demonstrates how to integrate JSON Forms with your application.

You can use the examples with any renderer set you want, for example the [Material Renderers](https://github.com/eclipsesource/jsonforms/blob/master/packages/material-renderers) or the [Angular Renderers](https://github.com/eclipsesource/jsonforms/blob/master/packages/vanilla-renderers).
You can use the examples with any renderer set you want, for example the [Material Renderers](https://github.com/eclipsesource/jsonforms/tree/master/packages/material) or the [Angular Renderers](https://github.com/eclipsesource/jsonforms/tree/master/packages/angular-material).

Check <https://www.npmjs.com/search?q=%40jsonforms> for all published JSON Forms packages.

Expand All @@ -28,3 +28,7 @@ If you encounter any problems feel free to [open an issue](https://github.com/ec
For questions and discussions please use the [JSON Forms board](https://jsonforms.discourse.group).
You can also reach us via [email](mailto:jsonforms@eclipsesource.com?subject=JSON%20Forms).
In addition, EclipseSource also offers [professional support](https://jsonforms.io/support) for JSON Forms.

## Migration

See our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master/MIGRATION.md) when updating JSON Forms.
84 changes: 71 additions & 13 deletions packages/material/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This is the JSON Forms Material Renderers Package. This package only contains re

See the official [documentation](https://jsonforms.io/docs/integrations/react/) and the JSON Forms React [seed repository](https://github.com/eclipsesource/jsonforms-react-seed) for examples on how to integrate JSON Forms with your application.

You can combine [JSON Forms React](https://github.com/eclipsesource/jsonforms/blob/master/packages/react) with other renderers too, for example with the [Vanilla Renderers](https://github.com/eclipsesource/jsonforms/blob/master/packages/vanilla-renderers).
You can combine [JSON Forms React](https://github.com/eclipsesource/jsonforms/blob/master/packages/react) with other renderers too, for example with the [Vanilla Renderers](https://github.com/eclipsesource/jsonforms/tree/master/packages/vanilla).

Check <https://www.npmjs.com/search?q=%40jsonforms> for all published JSONForms packages.

Expand All @@ -24,24 +24,78 @@ npm i --save @jsonforms/core @jsonforms/react @jsonforms/material-renderers

Use the `JsonForms` component for each form you want to render and hand over the renderer set.

```js

```ts
import React, { useState } from 'react';
import {
materialRenderers,
materialCells
} from '@jsonforms/material-renderers';
import { JsonForms } from '@jsonforms/react';
import { materialCells, materialRenderers } from '@jsonforms/material-renderers';

const schema = {
type: 'object',
properties: {
name: {
type: 'string',
minLength: 1
},
done: {
type: 'boolean'
},
due_date: {
type: 'string',
format: 'date'
},
recurrence: {
type: 'string',
enum: ['Never', 'Daily', 'Weekly', 'Monthly']
}
},
required: ['name', 'due_date']
};

const uischema = {
type: 'VerticalLayout',
elements: [
{
type: 'Control',
label: false,
scope: '#/properties/done'
},
{
type: 'Control',
scope: '#/properties/name'
},
{
type: 'HorizontalLayout',
elements: [
{
type: 'Control',
scope: '#/properties/due_date'
},
{
type: 'Control',
scope: '#/properties/recurrence'
}
]
}
]
};

const initialData = {};

function App() {
const [data, setData] = useState(initialData);
return (
<div className='App'>
<JsonForms
schema={schema}
uischema={uischema}
data={data}
renderers={materialRenderers}
cells={materialCells}
onChange={({ data, _errors }) => setData(data)}
/>
</div>
<JsonForms
schema={schema}
uischema={uischema}
data={data}
renderers={materialRenderers}
cells={materialCells}
onChange={({ data, _errors }) => setData(data)}
/>
);
}
```
Expand All @@ -62,3 +116,7 @@ If you encounter any problems feel free to [open an issue](https://github.com/ec
For questions and discussions please use the [JSON Forms board](https://jsonforms.discourse.group).
You can also reach us via [email](mailto:jsonforms@eclipsesource.com?subject=JSON%20Forms).
In addition, EclipseSource also offers [professional support](https://jsonforms.io/support) for JSON Forms.

## Migration

See our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master/MIGRATION.md) when updating JSON Forms.
4 changes: 3 additions & 1 deletion packages/material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@
"@jsonforms/react": "^3.0.0-beta.0",
"@mui/icons-material": "^5.0.0",
"@mui/lab": "^5.0.0-alpha.54",
"@mui/material": "^5.0.0"
"@mui/material": "^5.0.0",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0"
},
"devDependencies": {
"@emotion/react": "^11.5.0",
Expand Down
7 changes: 6 additions & 1 deletion packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ JSON Forms eliminates the tedious task of writing fully-featured forms by hand b

This is the JSON Forms React package which provides the necessary bindings for React. It uses [JSON Forms Core](https://github.com/eclipsesource/jsonforms/blob/master/packages/core).

You can combine the react package with any react-based renderer set you want, for example the [Material Renderers](https://github.com/eclipsesource/jsonforms/blob/master/packages/material-renderers) or the [Vanilla Renderers](https://github.com/eclipsesource/jsonforms/blob/master/packages/vanilla-renderers).
You can combine the react package with any react-based renderer set you want, for example the [Material Renderers](https://github.com/eclipsesource/jsonforms/tree/master/packages/material) or the [Vanilla Renderers](https://github.com/eclipsesource/jsonforms/tree/master/packages/vanilla).

See the official [documentation](https://jsonforms.io/) and the JSON Forms React [seed repository](https://github.com/eclipsesource/jsonforms-react-seed) for examples on how to integrate JSON Forms with your application.

Expand Down Expand Up @@ -107,6 +107,7 @@ function App() {
/>
);
}
export default App;
```

## License
Expand All @@ -125,3 +126,7 @@ If you encounter any problems feel free to [open an issue](https://github.com/ec
For questions and discussions please use the [JSON Forms board](https://jsonforms.discourse.group).
You can also reach us via [email](mailto:jsonforms@eclipsesource.com?subject=JSON%20Forms).
In addition, EclipseSource also offers [professional support](https://jsonforms.io/support) for JSON Forms.

## Migration

See our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master/MIGRATION.md) when updating JSON Forms.
73 changes: 62 additions & 11 deletions packages/vanilla/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ JSON Forms eliminates the tedious task of writing fully-featured forms by hand b

This is the JSONForms Vanilla Renderers Package. This package only contains renderers and must be combined with [JSON Forms React](https://github.com/eclipsesource/jsonforms/blob/master/packages/react).

You can combine [JSON Forms React](https://github.com/eclipsesource/jsonforms/blob/master/packages/react) with other renderers too, for example with the [Material Renderers](https://github.com/eclipsesource/jsonforms/blob/master/packages/material-renderers).
You can combine [JSON Forms React](https://github.com/eclipsesource/jsonforms/blob/master/packages/react) with other renderers too, for example with the [Material Renderers](https://github.com/eclipsesource/jsonforms/tree/master/packages/material).

See the official [documentation](https://jsonforms.io/docs/integrations/react/) and the JSON Forms React [seed repository](https://github.com/eclipsesource/jsonforms-react-seed) for examples on how to integrate JSON Forms with your application.

Expand All @@ -31,19 +31,66 @@ import React, { useState } from 'react';
import { JsonForms } from '@jsonforms/react';
import { vanillaCells, vanillaRenderers } from '@jsonforms/vanilla-renderers';

const schema = {
type: 'object',
properties: {
name: {
type: 'string',
minLength: 1
},
done: {
type: 'boolean'
},
due_date: {
type: 'string',
format: 'date'
},
recurrence: {
type: 'string',
enum: ['Never', 'Daily', 'Weekly', 'Monthly']
}
},
required: ['name', 'due_date']
};
const uischema = {
type: 'VerticalLayout',
elements: [
{
type: 'Control',
label: false,
scope: '#/properties/done'
},
{
type: 'Control',
scope: '#/properties/name'
},
{
type: 'HorizontalLayout',
elements: [
{
type: 'Control',
scope: '#/properties/due_date'
},
{
type: 'Control',
scope: '#/properties/recurrence'
}
]
}
]
};
const initialData = {};
function App() {
const [data, setData] = useState(initialData);
return (
<div className='App'>
<JsonForms
schema={schema}
uischema={uischema}
data={data}
renderers={vanillaRenderers}
cells={vanillaCells}
onChange={({ data, _errors }) => setData(data)}
/>
</div>
<JsonForms
schema={schema}
uischema={uischema}
data={data}
renderers={vanillaRenderers}
cells={vanillaCells}
onChange={({ data, _errors }) => setData(data)}
/>
);
}
```
Expand All @@ -64,3 +111,7 @@ If you encounter any problems feel free to [open an issue](https://github.com/ec
For questions and discussions please use the [JSON Forms board](https://jsonforms.discourse.group).
You can also reach us via [email](mailto:jsonforms@eclipsesource.com?subject=JSON%20Forms).
In addition, EclipseSource also offers [professional support](https://jsonforms.io/support) for JSON Forms.

## Migration

See our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master/MIGRATION.md) when updating JSON Forms.
Loading