@obiba/quasar-app-extension-json-form 0.1.1 → 0.2.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 CHANGED
@@ -5,15 +5,22 @@
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
+
12
+ Quasar CLI with Webpack (`@quasar/app-webpack`) is no longer supported. Use version 0.1.1 of this
13
+ extension if you are still on `@quasar/app-vite` v1/v2 or on `@quasar/app-webpack`.
14
+
8
15
  # Install
9
16
  ```bash
10
- quasar ext add json-form
17
+ quasar ext add @obiba/json-form
11
18
  ```
12
19
  Quasar CLI will retrieve it from NPM and install the extension.
13
20
 
14
21
  # Uninstall
15
22
  ```bash
16
- quasar ext remove json-form
23
+ quasar ext remove @obiba/json-form
17
24
  ```
18
25
 
19
26
  # Donate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obiba/quasar-app-extension-json-form",
3
- "version": "0.1.1",
3
+ "version": "0.2.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.1.1"
21
+ "@obiba/quasar-ui-json-form": "^0.2.0"
18
22
  },
19
23
  "engines": {
20
- "node": ">= 8.9.0",
21
- "npm": ">= 5.6.0",
22
- "yarn": ">= 1.6.0"
24
+ "node": ">= 26 || ^24 || ^22.12"
25
+ },
26
+ "peerDependencies": {
27
+ "@quasar/app-vite": "^3.0.0"
23
28
  }
24
29
  }
@@ -1,6 +1,6 @@
1
- import { boot } from 'quasar/wrappers'
1
+ import { defineBoot } from '#q-app'
2
2
  import VuePlugin from '@obiba/quasar-ui-json-form'
3
3
 
4
- export default boot(({ app }) => {
4
+ export default defineBoot(({ app }) => {
5
5
  app.use(VuePlugin)
6
6
  })
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
- function extendConf (conf, api) {
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
- 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
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 function (api) {
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
+ })