koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
538 stars 154 forks source link

Rich expression implementation #273 #334

Closed Meplos closed 2 years ago

Meplos commented 2 years ago

According to the Issue #273. There is an implementation of rich expression in the x-if with the library expr-eval import as optionnal dependency.

Meplos commented 2 years ago

Some reason for why my PR is not accepted?

albanm commented 2 years ago

None, sorry about that.

albanm commented 2 years ago

I merged but I won't release right away. I need to look more closely. I am not sure what consequences using optionalDepency and a require will have for the bundle. For now I used a simple solution where dependencies that are not required are passed as options or read from the context like this https://github.com/koumoul-dev/vuetify-jsonschema-form/blob/master/lib/VJsfNoDeps.js#L81

Also a new parser is created for each evaluation and the expression is parsed each time. This could be made more efficient.