Skip to content

Commit d7b7dc3

Browse files
committed
chore: merge jsonforms-vuetify-renderers into main repository
2 parents 18994ab + 3efac5c commit d7b7dc3

File tree

339 files changed

+17788
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

339 files changed

+17788
-0
lines changed

packages/vue-vuetify/.eslintrc.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
extends: [
7+
'plugin:vue/essential',
8+
'eslint:recommended',
9+
'@vue/typescript/recommended',
10+
'@vue/prettier',
11+
'@vue/eslint-config-prettier',
12+
],
13+
parserOptions: {
14+
ecmaVersion: 2020,
15+
},
16+
rules: {
17+
'no-console': 'warn',
18+
'no-debugger': 'warn',
19+
'@typescript-eslint/no-explicit-any': 'off',
20+
'@typescript-eslint/explicit-function-return-type': 'off',
21+
'@typescript-eslint/explicit-module-boundary-types': 'off',
22+
},
23+
overrides: [
24+
{
25+
files: [
26+
'**/__tests__/*.{j,t}s?(x)',
27+
'**/tests/unit/**/*.spec.{j,t}s?(x)',
28+
],
29+
env: {
30+
jest: true,
31+
},
32+
},
33+
],
34+
};

packages/vue-vuetify/.prettierrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
jsxSingleQuote: true,
3+
singleQuote: true,
4+
}

packages/vue-vuetify/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# JSON Forms - More Forms. Less Code
2+
3+
_Complex Forms in the blink of an eye_
4+
5+
JSON Forms eliminates the tedious task of writing fully-featured forms by hand by leveraging the capabilities of JSON, JSON Schema and Javascript.
6+
7+
## Vue Vuetify Renderers
8+
9+
This is the JSON Forms Vue Vuetify renderers package which provides a Vuetify based renderer set for [JSON Forms Vue](https://github.com/eclipsesource/jsonforms/blob/master/packages/vue/vue).
10+
The renderers are in a preview state.
11+
12+
### Quick start
13+
14+
Install JSON Forms Core, Vue 3 and Vue 3 Vuetify Renderers.
15+
16+
```bash
17+
npm i --save @jsonforms/core @jsonforms/vue @jsonforms/vue-vuetify
18+
```
19+
20+
Also add the packages to the transpile dependencies in the `vue.config.js` file:
21+
22+
```js
23+
module.exports = {
24+
transpileDependencies: ['@jsonforms/core', '@jsonforms/vue', '@jsonforms/vue-vuetify']
25+
}
26+
```
27+
28+
Use the `json-forms` component for each form you want to render and hand over the renderer set.
29+
30+
```vue
31+
<script>
32+
import { JsonForms } from '@jsonforms/vue';
33+
import { vuetifyRenderers } from '@jsonforms/vue-vuetify';
34+
35+
const renderers = [
36+
...vuetifyRenderers,
37+
// here you can add custom renderers
38+
];
39+
40+
export default defineComponent({
41+
name: 'app',
42+
components: {
43+
JsonForms,
44+
},
45+
data() {
46+
return {
47+
renderers: Object.freeze(renderers),
48+
data,
49+
schema,
50+
uischema,
51+
};
52+
},
53+
methods: {
54+
onChange(event) {
55+
this.data = event.data;
56+
},
57+
},
58+
});
59+
</script>
60+
61+
<template>
62+
<json-forms
63+
:data="data"
64+
:schema="schema"
65+
:uischema="uischema"
66+
:renderers="renderers"
67+
@change="onChange"
68+
/>
69+
</template>
70+
71+
<style scoped>
72+
@import '~@jsonforms/vue-vuetify/lib/jsonforms-vue-vuetify.esm.css';
73+
</style>
74+
```
75+
76+
If note done yet, please [install Vuetify for Vue](https://vuetifyjs.com/en/getting-started/installation/).
77+
78+
For more information on how JSON Forms can be configured, please see the [README of `@jsonforms/vue`](https://github.com/eclipsesource/jsonforms/blob/master/packages/vue/vue/README.md).
79+
80+
## License
81+
82+
The JSONForms project is licensed under the MIT License. See the [LICENSE file](https://github.com/eclipsesource/jsonforms/blob/master/LICENSE) for more information.

packages/vue-vuetify/babel.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const devPresets = [
2+
[
3+
'@vue/cli-plugin-babel/preset',
4+
{
5+
useBuiltIns: false,
6+
},
7+
],
8+
];
9+
const buildPresets = ['@babel/preset-env', '@babel/preset-typescript'];
10+
module.exports = {
11+
presets: process.env.NODE_ENV === 'production' ? buildPresets : devPresets,
12+
plugins:
13+
process.env.NODE_ENV === 'test'
14+
? [
15+
'@babel/plugin-proposal-optional-chaining',
16+
'@babel/plugin-proposal-nullish-coalescing-operator',
17+
]
18+
: [],
19+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Make sure eslint does not check the output files of our renderer set
2+
../*
3+
!/*
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
extends: [
7+
'plugin:vue/essential',
8+
'eslint:recommended',
9+
'@vue/typescript/recommended',
10+
'@vue/prettier',
11+
'@vue/eslint-config-prettier',
12+
],
13+
parserOptions: {
14+
ecmaVersion: 2020,
15+
},
16+
rules: {
17+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
18+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
19+
},
20+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
jsxSingleQuote: true,
3+
singleQuote: true,
4+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# JSON Forms Vuetify renderer set example app
2+
3+
## Prerequsites
4+
5+
- Build the JSON Forms Vuetify renderer set
6+
7+
## Scripts
8+
9+
- `npm run serve` to start the application
10+
- `npm run build` to build the application

0 commit comments

Comments
 (0)