@obiba/quasar-app-extension-json-form 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/package.json +16 -0
- package/src/boot/register.js +6 -0
- package/src/index.js +45 -0
- package/src/templates/.gitkeep +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Quasar App Extension json-form
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@obiba/quasar-app-extension-json-form)
|
|
4
|
+
[](https://www.npmjs.com/package/@obiba/quasar-app-extension-json-form)
|
|
5
|
+
|
|
6
|
+
This app extension integrates the `QJsonForm` component into your Quasar CLI project, enabling schema-driven form generation using JSON Schema. It automatically registers the component and its dependencies, so you can render complex, dynamic forms with Quasar-styled inputs without any manual setup. `QJsonForm` uses [JSON Forms](https://jsonforms.io/).
|
|
7
|
+
|
|
8
|
+
# Install
|
|
9
|
+
```bash
|
|
10
|
+
quasar ext add json-form
|
|
11
|
+
```
|
|
12
|
+
Quasar CLI will retrieve it from NPM and install the extension.
|
|
13
|
+
|
|
14
|
+
## Prompts
|
|
15
|
+
|
|
16
|
+
> If your app extension uses prompts, explain them here, otherwise remove this section and remove prompts.js file.
|
|
17
|
+
|
|
18
|
+
# Uninstall
|
|
19
|
+
```bash
|
|
20
|
+
quasar ext remove json-form
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
# Info
|
|
24
|
+
> Add longer information here that will help the user of your app extension.
|
|
25
|
+
|
|
26
|
+
# Other Info
|
|
27
|
+
> Add other information that's not as important to know
|
|
28
|
+
|
|
29
|
+
# Donate
|
|
30
|
+
If you appreciate the work that went into this App Extension, please consider [donating to Quasar](https://donate.quasar.dev).
|
|
31
|
+
|
|
32
|
+
# License
|
|
33
|
+
MIT (c) Yannick Marcon <yannick.marcon@obiba.org>
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@obiba/quasar-app-extension-json-form",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Quasar app extension for JSON Forms",
|
|
5
|
+
"author": "Yannick Marcon <yannick.marcon@obiba.org>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@obiba/quasar-ui-json-form": "^0.1.0"
|
|
10
|
+
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">= 8.9.0",
|
|
13
|
+
"npm": ">= 5.6.0",
|
|
14
|
+
"yarn": ">= 1.6.0"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quasar App Extension index/runner script
|
|
3
|
+
* (runs on each dev/build)
|
|
4
|
+
*
|
|
5
|
+
* Docs: https://quasar.dev/app-extensions/development-guide/index-api
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
function extendConf (conf, api) {
|
|
9
|
+
// register our boot file
|
|
10
|
+
conf.boot.push('~@obiba/quasar-app-extension-json-form/src/boot/register.js')
|
|
11
|
+
|
|
12
|
+
if (api.hasWebpack) {
|
|
13
|
+
// make sure app extension files & ui package gets transpiled
|
|
14
|
+
const transpileTarget = (
|
|
15
|
+
conf.build.webpackTranspileDependencies // q/app-webpack >= v4
|
|
16
|
+
|| conf.build.transpileDependencies // q/app-webpack v3
|
|
17
|
+
)
|
|
18
|
+
transpileTarget.push(/@obiba\/quasar-app-extension-json-form[\\/]src/)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// make sure the stylesheet goes through webpack to avoid SSR issues
|
|
22
|
+
conf.css.push('~@obiba/quasar-ui-json-form/src/index.sass')
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default function (api) {
|
|
26
|
+
// Quasar compatibility check; you may need
|
|
27
|
+
// hard dependencies, as in a minimum version of the "quasar"
|
|
28
|
+
// package or a minimum version of "@quasar/app-*" CLI
|
|
29
|
+
api.compatibleWith('quasar', '^2.0.0')
|
|
30
|
+
|
|
31
|
+
if (api.hasVite) {
|
|
32
|
+
api.compatibleWith('@quasar/app-vite', '^1.5.0 || ^2.0.0')
|
|
33
|
+
}
|
|
34
|
+
else if (api.hasWebpack) {
|
|
35
|
+
api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0')
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
// Uncomment the line below if you provide a JSON API for your component
|
|
40
|
+
// api.registerDescribeApi('QJsonForm', '~@obiba/quasar-ui-json-form/src/components/QJsonForm.json')
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// We extend /quasar.conf.js
|
|
44
|
+
api.extendQuasarConf(extendConf)
|
|
45
|
+
}
|
|
File without changes
|