@obiba/quasar-app-extension-json-form 0.1.1 → 0.3.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 +13 -2
- package/package.json +10 -5
- package/src/boot/register.js +2 -2
- package/src/index.js +8 -23
package/README.md
CHANGED
|
@@ -5,15 +5,26 @@
|
|
|
5
5
|
|
|
6
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
7
|
|
|
8
|
+
# Requirements
|
|
9
|
+
- `@quasar/app-vite` v3+ (Quasar CLI with Vite)
|
|
10
|
+
- `quasar` v2
|
|
11
|
+
- `vue-i18n` v11, registered in a boot file with `app.use(i18n)` (composition mode, `legacy: false`).
|
|
12
|
+
Every title, description, option label and message of a form is passed through `t()`, so they
|
|
13
|
+
can be i18n keys or literal strings. Without vue-i18n the forms still render untranslated, with
|
|
14
|
+
english validation messages, and a warning is logged.
|
|
15
|
+
|
|
16
|
+
Quasar CLI with Webpack (`@quasar/app-webpack`) is no longer supported. Use version 0.1.1 of this
|
|
17
|
+
extension if you are still on `@quasar/app-vite` v1/v2 or on `@quasar/app-webpack`.
|
|
18
|
+
|
|
8
19
|
# Install
|
|
9
20
|
```bash
|
|
10
|
-
quasar ext add json-form
|
|
21
|
+
quasar ext add @obiba/json-form
|
|
11
22
|
```
|
|
12
23
|
Quasar CLI will retrieve it from NPM and install the extension.
|
|
13
24
|
|
|
14
25
|
# Uninstall
|
|
15
26
|
```bash
|
|
16
|
-
quasar ext remove json-form
|
|
27
|
+
quasar ext remove @obiba/json-form
|
|
17
28
|
```
|
|
18
29
|
|
|
19
30
|
# Donate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obiba/quasar-app-extension-json-form",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Quasar app extension for JSON Forms",
|
|
5
5
|
"author": "Yannick Marcon <yannick.marcon@obiba.org>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,12 +13,17 @@
|
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://github.com/obiba/quasar-json-form",
|
|
15
15
|
"type": "module",
|
|
16
|
+
"main": "src/index.js",
|
|
17
|
+
"imports": {
|
|
18
|
+
"#q-app": "@quasar/app-vite"
|
|
19
|
+
},
|
|
16
20
|
"dependencies": {
|
|
17
|
-
"@obiba/quasar-ui-json-form": "^0.
|
|
21
|
+
"@obiba/quasar-ui-json-form": "^0.3.0"
|
|
18
22
|
},
|
|
19
23
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
"node": ">= 26 || ^24 || ^22.12"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@quasar/app-vite": "^3.0.0"
|
|
23
28
|
}
|
|
24
29
|
}
|
package/src/boot/register.js
CHANGED
package/src/index.js
CHANGED
|
@@ -5,41 +5,26 @@
|
|
|
5
5
|
* Docs: https://quasar.dev/app-extensions/development-guide/index-api
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import { defineIndexScript } from '#q-app'
|
|
9
|
+
|
|
10
|
+
function extendConf (conf) {
|
|
9
11
|
// register our boot file
|
|
10
12
|
conf.boot.push('~@obiba/quasar-app-extension-json-form/src/boot/register.js')
|
|
11
13
|
|
|
12
|
-
|
|
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
|
|
14
|
+
// make sure the stylesheet goes through the bundler to avoid SSR issues
|
|
22
15
|
conf.css.push('~@obiba/quasar-ui-json-form/src/index.sass')
|
|
23
16
|
}
|
|
24
17
|
|
|
25
|
-
export default
|
|
18
|
+
export default defineIndexScript(api => {
|
|
26
19
|
// Quasar compatibility check; you may need
|
|
27
20
|
// hard dependencies, as in a minimum version of the "quasar"
|
|
28
21
|
// package or a minimum version of "@quasar/app-*" CLI
|
|
29
22
|
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
|
-
|
|
23
|
+
api.compatibleWith('@quasar/app-vite', '^3.0.0')
|
|
38
24
|
|
|
39
25
|
// Uncomment the line below if you provide a JSON API for your component
|
|
40
26
|
// api.registerDescribeApi('QJsonForm', '~@obiba/quasar-ui-json-form/src/components/QJsonForm.json')
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
// We extend /quasar.conf.js
|
|
28
|
+
// We extend /quasar.config
|
|
44
29
|
api.extendQuasarConf(extendConf)
|
|
45
|
-
}
|
|
30
|
+
})
|