Skip to content

Commit 683a9bd

Browse files
committed
readme, license
1 parent b7cd25c commit 683a9bd

File tree

4 files changed

+66
-40
lines changed

4 files changed

+66
-40
lines changed

LICENSE

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
1+
Modifications/UI-Schema integration:
2+
3+
MIT License
4+
5+
Copyright (c) 2019-2022 bemit https://bemit.codes
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.
24+
25+
create-react-app basis:
26+
127
MIT License
228

3-
Copyright (c) 2020 UI Schema
29+
Copyright (c) 2013-present, Facebook, Inc.
430

531
Permission is hereby granted, free of charge, to any person obtaining a copy
632
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
[![Github actions Build](https://github.com/ui-schema/demo-cra-ts/actions/workflows/blank.yml/badge.svg)](https://github.com/ui-schema/demo-cra-ts/actions)
44

5-
Examples for [@ui-schema/ui-schema](https://github.com/ui-schema/ui-schema) in Typescript, with material ui, see [demo-cra](https://github.com/ui-schema/demo-cra) for simpler non-TS examples.
5+
Advanced usages and examples for [@ui-schema/ui-schema](https://github.com/ui-schema/ui-schema) in Typescript, with material ui, see [demo-cra](https://github.com/ui-schema/demo-cra) for simpler non-TS examples.
66

7-
Files:
7+
Files in `src`:
88

9-
- [src/App.tsx](./src/App.tsx) provider setup, e.g. `UIMetaProvider`
10-
- [src/components/Layout.tsx](./src/components/Layout.tsx) app layout, routing and nav
11-
- [src/components/UISchema.tsx](./src/components/UISchema.tsx) UI-Schema widget setup
9+
- [App.tsx](./src/App.tsx) provider setup, e.g. `UIMetaProvider`
10+
- [components/Layout.tsx](./src/components/Layout.tsx) app layout, routing and nav
11+
- [components/UISchema.tsx](./src/components/UISchema.tsx) UI-Schema widget setup
1212
- example pages:
13-
- [src/pages/PageSimpleForm.tsx](./src/pages/PageSimpleForm.tsx) with simple form, usage of `WidgetCountrySelect`
14-
- [src/pages/PageCustomForm.tsx](./src/pages/PageCustomForm.tsx) with custom rendered form, usage of `WidgetCountrySelect`
15-
- ~multiple~ widgets in: [src/Widgets/](./src/components/Widgets)
13+
- [pages/PageSimpleForm.tsx](./src/pages/PageSimpleForm.tsx) with simple form, usage of `WidgetCountrySelect`
14+
- [pages/PageCustomForm.tsx](./src/pages/PageCustomForm.tsx) with custom rendered form, usage of `WidgetCountrySelect`
15+
- ~multiple~ widgets in: [Widgets/](./src/components/Widgets)
1616
- [WidgetCountrySelect.tsx](./src/components/Widgets/WidgetCountrySelect.tsx), uses an API to populate the `Select` options
1717

1818
[![Schema Examples + Live Editor](https://img.shields.io/badge/Schema%20Examples%20+%20Live%20Editor-green?labelColor=fff&color=1e970c&style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAE3ElEQVR4nO2bX0xbVRzHz9TExKc9mBjjn+gLgcEA2wL33ra3pV0pf/uX3t6yMAQKEkahlQkB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2MtUsXG05KxAD8KFTWMGe1wt18ETS++D1wsPOzgPX+URtY3kMQmuF7Tci4afC4RyNbN8+bC3bv3BRPHCtl3o5FILJ4eF/9gb7zBnT5ZVYm9lqFq77W0xpB3BREH/B9uwFHKzLej9hiyI2Z8j3BuD1wpYggIXBT5rerXI/Smv4bwYGXuMK8ePuIUup8uXukL3BjqNlFVjbeRoObrS25qcNwBVf7X1pASoNB2sej3IA3sP3BuD1woYgAC9739CbrsPTu4ODx42yIdhvtiYlfCJzRsRajtWgKeDgejD4RsoBXKtr/E7acK6ahVV3dXIBxOF1QYCiAvyly3mP737KAdSZrE+kjV4wxX/YmWxfkx2e2nXm1H9XID+s/MnugL8EgYgfuNxYLVkqBhBCx1IKgE3ilyDJdo6GTT2Angr7H6SDxvLblrLU7xBv9/TYrLLH0X+DDYwexjo6PCkHgBBCM+/1GK54fY+tLA/ZahZy1AwRZ6tZMDB6uOisXh3v7CxLS3gqKqqnSn8D0EwMpE6f7XEAAAAASUVORK5CYII=)](https://ui-schema.bemit.codes/examples)
1919

20-
[![Run on CodeSandbox](https://img.shields.io/badge/run%20on%20CodeSandbox-blue?labelColor=fff&logoColor=505050&style=for-the-badge&logo=codesandbox)](https://codesandbox.io/s/github/ui-schema/demo-cra-ts/tree/master/?autoresize=1&fontsize=12&hidenavigation=1&module=%2Fsrc%2FSchema%2FDemoEditor.js)
20+
[![Run on CodeSandbox](https://img.shields.io/badge/run%20on%20CodeSandbox-blue?labelColor=fff&logoColor=505050&style=for-the-badge&logo=codesandbox)](https://codesandbox.io/s/github/ui-schema/demo-cra-ts/tree/master/?autoresize=1&fontsize=12&hidenavigation=1&module=%2Fsrc%2Fpages%2FPageSimpleForm.tsx)
2121

2222
[![Fullscreen Demo](https://img.shields.io/badge/Fullscreen%20Demo-39c4d5?labelColor=fff&color=29a9b7&style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACRUlEQVR4nO3aTYiNUQDG8Z/xWRSFBRZYYSGSZCdFiZ0sFSuTjbJUdqMslGIhlmI3shGRJnZYkQVWZjNZmPIRNfIxr8Xt1JivO/ed95zzXvf917N/nn/3drvnHBoaGhoaGjphIU7iJq7jYNY2iVmCIRST8hDbMvZKxllTx4f8whWsytYuAY/NLCBkFKe1vir/Hc+1FxDyGvvz1IxHJwJC7mJzjrIxKCOgwA9cxIr0laulrICQDziBBamLV8V8BYS8wN7E3SuhKgEFxnEL65MumCdVCgj5jvNYlnBHaWIICBnGsXRTyhFTQMgT7Eg1qFNSCCjwBzewJs2suZNKQMhnrf8fi1OMmwupBYS8xaEE+9qSS0DIfWyJvnIWcgso8BOXsTLy1mmpg4CQjziFvqiLJ1EnASEvsS/m6InUUUDIIDbGm96izgIKjGEAy3tVQMgIDvSygPBp2NrLAgpc7XUB93pdwKVeFvBVhJ/FbhHwBrurHt8NAj7hDBbFGF9nAb9xDatjDQ/UUcAQtsccPZE6CXiPo3HnTqUOAr7hHJZG3jotOQWMa71KWRd95SzkEvAMexLsa0tqASM4rkaXqakEjOGCiP/ry5JCwCA2JdrTMTEFvJLwbK8sMQSMol/i092yVCkgnO931bO6qgQ8kPmGpyzzFfAOh5O3rpCyAr6o2S1vWToVEO751+YoG4NOBDzFziwtI/JI++HDuuCtT1n6zTy8q157laUPd/w7fBy3sSFjr+Qc0TpzH8CuzF0aGhoaGhoayvEXCYka61umCF0AAAAASUVORK5CYII=)](https://ui-schema-cra-ts.netlify.app)
2323

src/pages/PageCustomForm.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,6 @@ import { StringRenderer } from '@ui-schema/ds-material/Widgets/TextField'
1515
import { WidgetCountrySelect } from '../components/Widgets/WidgetCountrySelect'
1616
import { DataDebug } from '../components/DataDebug'
1717

18-
export const PageCustomForm: React.ComponentType = () => {
19-
return <>
20-
<Container maxWidth={'md'} fixed style={{display: 'flex'}}>
21-
<Nav/>
22-
<Box mx={2} py={1} style={{flexGrow: 1}}>
23-
<Box mb={2}>
24-
<Typography variant={'h1'} gutterBottom>UI-Schema Custom Form</Typography>
25-
<Typography variant={'body2'} gutterBottom>The form on this page is the same as `SimpleForm`, but rendered at custom positions per-code.</Typography>
26-
</Box>
27-
<DemoComponent/>
28-
</Box>
29-
</Container>
30-
</>
31-
}
32-
3318
const schema = createOrderedMap({
3419
type: 'object',
3520
properties: {
@@ -132,3 +117,18 @@ const CustomFormContent: React.FC<{
132117
</Grid>
133118
</ObjectGroup>
134119
}
120+
121+
export const PageCustomForm: React.ComponentType = () => {
122+
return <>
123+
<Container maxWidth={'md'} fixed style={{display: 'flex'}}>
124+
<Nav/>
125+
<Box mx={2} py={1} style={{flexGrow: 1}}>
126+
<Box mb={2}>
127+
<Typography variant={'h1'} gutterBottom>UI-Schema Custom Form</Typography>
128+
<Typography variant={'body2'} gutterBottom>The form on this page is the same as `SimpleForm`, but rendered at custom positions per-code.</Typography>
129+
</Box>
130+
<DemoComponent/>
131+
</Box>
132+
</Container>
133+
</>
134+
}

src/pages/PageSimpleForm.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,6 @@ import { OrderedMap } from 'immutable'
1212
import { GridContainer } from '@ui-schema/ds-material/GridContainer'
1313
import { DataDebug } from '../components/DataDebug'
1414

15-
export const PageSimpleForm: React.ComponentType = () => {
16-
return <>
17-
<Container maxWidth={'md'} fixed style={{display: 'flex'}}>
18-
<Nav/>
19-
<Box mx={2} py={1} style={{flexGrow: 1}}>
20-
<Box mb={2}>
21-
<Typography variant={'h1'} gutterBottom>UI-Schema Simple Form</Typography>
22-
<Typography variant={'body2'} gutterBottom>The form on this page is the same as `Custom Rendering`, but rendered automatically using <code>injectPluginStack(GridContainer)</code>.</Typography>
23-
</Box>
24-
<DemoComponent/>
25-
</Box>
26-
</Container>
27-
</>
28-
}
29-
3015
const schema = createOrderedMap({
3116
type: 'object',
3217
properties: {
@@ -85,3 +70,18 @@ const DemoComponent = () => {
8570
</UIStoreProvider>
8671
</React.Fragment>
8772
}
73+
74+
export const PageSimpleForm: React.ComponentType = () => {
75+
return <>
76+
<Container maxWidth={'md'} fixed style={{display: 'flex'}}>
77+
<Nav/>
78+
<Box mx={2} py={1} style={{flexGrow: 1}}>
79+
<Box mb={2}>
80+
<Typography variant={'h1'} gutterBottom>UI-Schema Simple Form</Typography>
81+
<Typography variant={'body2'} gutterBottom>The form on this page is the same as `Custom Rendering`, but rendered automatically using <code>injectPluginStack(GridContainer)</code>.</Typography>
82+
</Box>
83+
<DemoComponent/>
84+
</Box>
85+
</Container>
86+
</>
87+
}

0 commit comments

Comments
 (0)