Comments (7)
Some feedback:
- We weren't passing options in our implementation on Vue 2 so with the update and on Vue 3 I had to use the option
readOnly : false
to be able to input data to string and array fields, it doesn't look like it's the default although the docs state it is - After the upgrade our app wouldn't build, with errors like
ERROR in ./node_modules/@json-layout/core/src/state/state-node.js 2:0-95
Module not found: Error: Default condition should be last one
@ ./node_modules/@json-layout/core/src/state/index.js 5:0-69 304:27-45 330:13-27
@ ./node_modules/@json-layout/core/src/index.js 2:0-33 2:0-33
@ ./node_modules/@koumoul/vjsf/src/compat/v2.js 4:0-48 74:2-13
So I had to switch this
"import": {
"default": "./src/index.js",
"types": "./types/index.d.ts"
}
to
"import": {
"types": "./types/index.d.ts",
"default": "./src/index.js"
}
in all of the package.json files for @koumoul/vjsf
and @json-layout
- I'm not sure if it's meant to still be supported but we had a schema using an array of items defined by a $ref which now works differently; as each input blurs it looks readonly and can only be edited by clicking a button
from vuetify-jsonschema-form.
Hey, when I try using this on a vite project I am getting this error:
Uncaught SyntaxError: The requested module '/node_modules/ajv-formats/dist/formats.js?v=67c67aed' does not provide an export named 'fullFormats' (at validate.js?v=67c67aed:1:10)
from vuetify-jsonschema-form.
Hey, when I try using this on a vite project I am getting this error:
...
This has to do with ESM vs CommonJS problems. This is because ajv-formats
doesn't have type:module
in its package.json (maybe there's a new version that does, I didn't look). Vite automatically converts direct dependencies into ESM for you. But since its not a direct dependency it is not getting converted. You can tell Vite to pre-bundle certain CommonJS dependencies, and it will convert them to ESM for you. I added the following to my vite.config.ts
and V3 VJSF is working beautifully for me (optimizeDeps
for dev and build.commonjsOptions
for prod):
export default defineConfig({
...
optimizeDeps: {
include: ['ajv', 'ajv-formats', 'ajv-formats/dist/formats.js', 'ajv-i18n', 'ajv-errors', 'markdown-it', 'rfdc', 'debug'],
},
build: {
...
commonjsOptions: {
include: [/ajv/, /ajv-formats/, /ajv-formats\/dist\/formats.js/, /ajv-i18n/, /ajv-errors/, /markdown-it/, /rfdc/, /debug/, /node_modules/],
},
},
});
This V3 VJSF came at the best timing for me. So stoked to be able to use this. Thank you!!
Vuetify has released 3.4.0 which moves everything from labs
into "core", which is a breaking change (for my app, but also for VJSF - labs/VDatePicker
dependency). Hopefully VJSF can update to Vuetify 3.4 in the near future!
from vuetify-jsonschema-form.
I didn't have as much time as I wanted to work on vjsf these last few weeks. But still, I just released v3.0.0-alpha.1. It solves some build issues, add few missing functionalities and some improvements to the doc site. I am quite happy with the new editor (https://koumoul-dev.github.io/vuetify-jsonschema-form/next/editor), it looks like bidirectional reactivity works pretty well in this version compared to the previous one as I was hoping to achieve. This is still a work in progress and there is a ton of missing stuff.
from vuetify-jsonschema-form.
Concerning the management of the commonjs dependencies I just added a section in the getting-started, and an example application based on a standard Vite template here.
from vuetify-jsonschema-form.
@albanm I was struggling with it still not working until I learned that vite actually caches the commonjs conversion stuff. Make sure to do vite --force
after changing these settings to ignore caches. Maybe you could add this info to the docs as well, might be helpful for some people
from vuetify-jsonschema-form.
Sure, thanks.
from vuetify-jsonschema-form.
Related Issues (20)
- x-fromData vuex binding HOT 1
- Conditional X-cols prop to be 12 in mobile screen and 6 in widescreen HOT 2
- Non-required fields become required after interaction with them HOT 3
- Docs use deprecated slot-scope / slot properties HOT 2
- Adding empty/null check for file upload
- imagining the next major version v3 HOT 13
- Date-Times can't select a correct date for month less than 31 days HOT 1
- Date-time validation fails with useValidator: true HOT 2
- display and edit an array item HOT 1
- ArrayProp with schema dependencies HOT 1
- `oneOf` issues HOT 2
- Collapsible Array Elements HOT 5
- Support for $ref external schema references HOT 2
- v3 alpha: import fails with "Default condition should be last one" HOT 14
- Feat: AdditionalProperties HOT 2
- x-directives seems to be broken HOT 4
- Console error in `initFromSchema`
- v3 beta: "ResizeObserver loop completed with undelivered notifications." in v-dialog with auto width HOT 3
- Behavior of optional objects with required fields HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuetify-jsonschema-form.