Skip to content

Commit

Permalink
🔖(release) bump to version 1.0.0-beta.0
Browse files Browse the repository at this point in the history
Added
- Fix bugs in the library and add setSchema action
- Allow customisation of form options
- Use a reducer to manage schema
- Make translation overridable
- Setup @formatjs to extract/compile translations
- Add customization of verna render components
- Add title and description edition on sections
- Add tests on custom error feature
- Add title and description edition for fields
- Add translations on fields properties
- Add uuid generation for component naming
- Add language management feature
- Rework playground widgets template
- Functionality to customize error messages
- Functionality to customize widget options
- Functionality to drag and drop custom widgets
- Functionality to select and display only a section of the schema
- Functionality to add or remove widgets and sections

Changed
- Pin React to version less than 17
  • Loading branch information
jbpenrath committed Nov 10, 2022
1 parent 22e4de0 commit a88e458
Show file tree
Hide file tree
Showing 13 changed files with 199 additions and 48 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## [Unrealeased]

## [1.0.0-beta.0]

### Added

- Fix bugs in the library and add setSchema action
Expand All @@ -33,4 +35,5 @@ Versioning](https://semver.org/spec/v2.0.0.html).

- Pin React to version less than 17

[unreleased]: https://github.com/openfun/verna
[unreleased]: https://github.com/openfun/verna/compare/v1.0.0-beta.0...main
[1.0.0-beta.0]: https://github.com/openfun/verna/compare/c7a5eb3b32a4a626f32fc9257019f297d72b85c7...v1.0.0-beta.0
50 changes: 50 additions & 0 deletions examples/playground/i18n/locales/fr-CA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"components.App.loading": {
"description": "Message displayed while verna is loading",
"message": "Chargement..."
},
"components.App.save": {
"description": "Label of the custom save button",
"message": "Sauvegarder"
},
"components.App.title": {
"description": "Title of the playground application",
"message": "🧑‍💻 Bac à sable Verna"
},
"components.EditorFieldTemplate.parameters": {
"description": "Label of the button to display the widget properties form",
"message": "Paramètres du champ"
},
"components.FormWrapper.editorOptions": {
"description": "Title of the editor options block",
"message": "Options de l'éditeur"
},
"components.FormWrapper.language": {
"description": "Title of the language selection block",
"message": "Langue"
},
"components.FormWrapper.saveForm": {
"description": "Label of the save button",
"message": "Sauvegarder le formulaire"
},
"components.FormWrapper.sectionName": {
"description": "Label of a the button to select a section",
"message": "Section {name}"
},
"components.FormWrapper.selectSection": {
"description": "Title of the section selection block",
"message": "Sélectionner une section"
},
"components.FormWrapper.turnOffEditorMode": {
"description": "Label of the button to switch to preview mode",
"message": "Basculer en mode prévisualisation"
},
"components.FormWrapper.turnOnEditorMode": {
"description": "Label of the button to switch to editor mode",
"message": "Basculer en mode édition"
},
"components.fields.section.parameters": {
"description": "Label of the button to display the section properties form",
"message": "Paramètres de section"
}
}
16 changes: 8 additions & 8 deletions examples/playground/i18n/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@
},
"components.App.title": {
"description": "Title of the playground application",
"message": "🧑‍💻 Playground Verna"
"message": "🧑‍💻 Bac à sable Verna"
},
"components.EditorFieldTemplate.parameters": {
"description": "Label of the button to display the widget properties form",
"message": "Paramètres du champs"
"message": "Paramètres du champ"
},
"components.FormWrapper.editorOptions": {
"description": "Title of the editor options block",
"message": "Options d'édition"
"message": "Options de l'éditeur"
},
"components.FormWrapper.language": {
"description": "Title of the language selection block",
"message": "Langue"
},
"components.FormWrapper.saveForm": {
"description": "Label of the save button",
"message": "Soumettre le formulaire"
"message": "Sauvegarder le formulaire"
},
"components.FormWrapper.sectionName": {
"description": "Label of the button to select a section",
"description": "Label of a the button to select a section",
"message": "Section {name}"
},
"components.FormWrapper.selectSection": {
Expand All @@ -37,14 +37,14 @@
},
"components.FormWrapper.turnOffEditorMode": {
"description": "Label of the button to switch to preview mode",
"message": "Prévisualiser le formulaire"
"message": "Basculer en mode prévisualisation"
},
"components.FormWrapper.turnOnEditorMode": {
"description": "Label of the button to switch to editor mode",
"message": "Éditer le formulaire"
"message": "Basculer en mode édition"
},
"components.fields.section.parameters": {
"description": "Label of the button to display the section properties form",
"message": "Paramètres de la section"
"message": "Paramètres de section"
}
}
4 changes: 2 additions & 2 deletions examples/playground/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "verna-examples-playground",
"private": true,
"version": "0.0.0",
"version": "1.0.0-beta.0",
"scripts": {
"build": "tsc && vite build",
"verna:build:check": "yarn workspace @openfun/verna build:check",
Expand All @@ -14,7 +14,7 @@
"lint": "yarn lint:stylelint && yarn lint:eslint"
},
"dependencies": {
"@openfun/verna": "0.0.0",
"@openfun/verna": "1.0.0-beta.0",
"@rjsf/core": "4.2.3",
"react": "17.0.2",
"react-dom": "17.0.2"
Expand Down
14 changes: 14 additions & 0 deletions examples/playground/src/translations/fr-CA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"components.App.loading": "Chargement...",
"components.App.save": "Sauvegarder",
"components.App.title": "🧑‍💻 Bac à sable Verna",
"components.EditorFieldTemplate.parameters": "Paramètres du champ",
"components.FormWrapper.editorOptions": "Options de l'éditeur",
"components.FormWrapper.language": "Langue",
"components.FormWrapper.saveForm": "Sauvegarder le formulaire",
"components.FormWrapper.sectionName": "Section {name}",
"components.FormWrapper.selectSection": "Sélectionner une section",
"components.FormWrapper.turnOffEditorMode": "Basculer en mode prévisualisation",
"components.FormWrapper.turnOnEditorMode": "Basculer en mode édition",
"components.fields.section.parameters": "Paramètres de section"
}
14 changes: 7 additions & 7 deletions examples/playground/src/translations/fr-FR.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"components.App.loading": "Chargement...",
"components.App.save": "Sauvegarder",
"components.App.title": "🧑‍💻 Playground Verna",
"components.EditorFieldTemplate.parameters": "Paramètres du champs",
"components.FormWrapper.editorOptions": "Options d'édition",
"components.App.title": "🧑‍💻 Bac à sable Verna",
"components.EditorFieldTemplate.parameters": "Paramètres du champ",
"components.FormWrapper.editorOptions": "Options de l'éditeur",
"components.FormWrapper.language": "Langue",
"components.FormWrapper.saveForm": "Soumettre le formulaire",
"components.FormWrapper.saveForm": "Sauvegarder le formulaire",
"components.FormWrapper.sectionName": "Section {name}",
"components.FormWrapper.selectSection": "Sélectionner une section",
"components.FormWrapper.turnOffEditorMode": "Prévisualiser le formulaire",
"components.FormWrapper.turnOnEditorMode": "Éditer le formulaire",
"components.fields.section.parameters": "Paramètres de la section"
"components.FormWrapper.turnOffEditorMode": "Basculer en mode prévisualisation",
"components.FormWrapper.turnOnEditorMode": "Basculer en mode édition",
"components.fields.section.parameters": "Paramètres de section"
}
70 changes: 70 additions & 0 deletions lib/i18n/locales/fr-CA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"components.EditorFieldTemplate.addInput": {
"description": "Label of the button to add an input",
"message": "Ajouter un champ"
},
"components.EditorFieldTemplate.parameters": {
"description": "Label of the button to display the widget properties form",
"message": "Paramètres"
},
"components.SectionPropertiesForm.submitWidgetParameter": {
"description": "Label of submit input",
"message": "Sauvegarder"
},
"components.WidgetPropertiesForm.description": {
"description": "Description of the field",
"message": "description"
},
"components.WidgetPropertiesForm.enum": {
"description": "Fieldset label to add/remove options of a widget using an array of strings",
"message": "Options"
},
"components.WidgetPropertiesForm.items": {
"description": "Fieldset label containing customizable options to add widgets as items",
"message": "Options"
},
"components.WidgetPropertiesForm.maxLength": {
"description": "Label of the maximum length input",
"message": "longueur maximale"
},
"components.WidgetPropertiesForm.maximum": {
"description": "Label of the maximum input",
"message": "maximum"
},
"components.WidgetPropertiesForm.minLength": {
"description": "Label of the minimum length input",
"message": "longueur minimale"
},
"components.WidgetPropertiesForm.minimum": {
"description": "Label of the minimum input",
"message": "minimum"
},
"components.WidgetPropertiesForm.required": {
"description": "Label of the required input",
"message": "requis"
},
"components.WidgetPropertiesForm.submitWidgetParameter": {
"description": "Label of submit input",
"message": "sauvegarder"
},
"components.WidgetPropertiesForm.title": {
"description": "Title of the field",
"message": "titre"
},
"components.fields.section.addSection": {
"description": "Label of the button to add a section",
"message": "Ajouter une section"
},
"components.fields.section.parameters": {
"description": "Label of the button to display the section properties form",
"message": "Paramètres"
},
"templates.defaultSectionTitle": {
"description": "The default name of a newly created section",
"message": "Titre de section par défaut"
},
"templates.defaultWidgetTitle": {
"description": "The default name of a newly created widget",
"message": "Titre du composant par défaut"
}
}
34 changes: 15 additions & 19 deletions lib/i18n/locales/fr-FR.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,16 @@
{
"components.EditorFieldTemplate.addInput": {
"description": "Label of the button to add an input",
"message": "Ajouter un champs"
},
"components.EditorFieldTemplate.addSection": {
"description": "Label of the button to add a section",
"message": "Ajouter une section"
"message": "Ajouter un champ"
},
"components.EditorFieldTemplate.parameters": {
"description": "Label of the button to display the widget properties form",
"message": "Paramètres"
},
"components.SectionPropertiesForm.description": {
"description": "Description of the section",
"message": "Description"
},
"components.SectionPropertiesForm.legend": {
"description": "Legend of the section",
"message": "Options"
},
"components.SectionPropertiesForm.submitWidgetParameter": {
"description": "Label of submit input",
"message": "Sauvegarder"
},
"components.SectionPropertiesForm.title": {
"description": "Title of the section",
"message": "Titre"
},
"components.WidgetPropertiesForm.description": {
"description": "Description of the field",
"message": "description"
Expand All @@ -41,15 +25,15 @@
},
"components.WidgetPropertiesForm.maxLength": {
"description": "Label of the maximum length input",
"message": "longueur maximum"
"message": "longueur maximale"
},
"components.WidgetPropertiesForm.maximum": {
"description": "Label of the maximum input",
"message": "maximum"
},
"components.WidgetPropertiesForm.minLength": {
"description": "Label of the minimum length input",
"message": "longueur minimum"
"message": "longueur minimale"
},
"components.WidgetPropertiesForm.minimum": {
"description": "Label of the minimum input",
Expand All @@ -67,8 +51,20 @@
"description": "Title of the field",
"message": "titre"
},
"components.fields.section.addSection": {
"description": "Label of the button to add a section",
"message": "Ajouter une section"
},
"components.fields.section.parameters": {
"description": "Label of the button to display the section properties form",
"message": "Paramètres"
},
"templates.defaultSectionTitle": {
"description": "The default name of a newly created section",
"message": "Titre de section par défaut"
},
"templates.defaultWidgetTitle": {
"description": "The default name of a newly created widget",
"message": "Titre du composant par défaut"
}
}
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openfun/verna",
"version": "0.0.0",
"version": "1.0.0-beta.0",
"private": false,
"description": "An extensible form builder based on React JSON Schema Form.",
"scripts": {
Expand Down
19 changes: 19 additions & 0 deletions lib/src/translations/fr-CA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"components.EditorFieldTemplate.addInput": "Ajouter un champ",
"components.EditorFieldTemplate.parameters": "Paramètres",
"components.SectionPropertiesForm.submitWidgetParameter": "Sauvegarder",
"components.WidgetPropertiesForm.description": "description",
"components.WidgetPropertiesForm.enum": "Options",
"components.WidgetPropertiesForm.items": "Options",
"components.WidgetPropertiesForm.maxLength": "longueur maximale",
"components.WidgetPropertiesForm.maximum": "maximum",
"components.WidgetPropertiesForm.minLength": "longueur minimale",
"components.WidgetPropertiesForm.minimum": "minimum",
"components.WidgetPropertiesForm.required": "requis",
"components.WidgetPropertiesForm.submitWidgetParameter": "sauvegarder",
"components.WidgetPropertiesForm.title": "titre",
"components.fields.section.addSection": "Ajouter une section",
"components.fields.section.parameters": "Paramètres",
"templates.defaultSectionTitle": "Titre de section par défaut",
"templates.defaultWidgetTitle": "Titre du composant par défaut"
}
15 changes: 7 additions & 8 deletions lib/src/translations/fr-FR.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"components.EditorFieldTemplate.addInput": "Ajouter un champs",
"components.EditorFieldTemplate.addSection": "Ajouter une section",
"components.EditorFieldTemplate.addInput": "Ajouter un champ",
"components.EditorFieldTemplate.parameters": "Paramètres",
"components.SectionPropertiesForm.description": "Description",
"components.SectionPropertiesForm.legend": "Options",
"components.SectionPropertiesForm.submitWidgetParameter": "Sauvegarder",
"components.SectionPropertiesForm.title": "Titre",
"components.WidgetPropertiesForm.description": "description",
"components.WidgetPropertiesForm.enum": "Options",
"components.WidgetPropertiesForm.items": "Options",
"components.WidgetPropertiesForm.maxLength": "longueur maximum",
"components.WidgetPropertiesForm.maxLength": "longueur maximale",
"components.WidgetPropertiesForm.maximum": "maximum",
"components.WidgetPropertiesForm.minLength": "longueur minimum",
"components.WidgetPropertiesForm.minLength": "longueur minimale",
"components.WidgetPropertiesForm.minimum": "minimum",
"components.WidgetPropertiesForm.required": "requis",
"components.WidgetPropertiesForm.submitWidgetParameter": "sauvegarder",
"components.WidgetPropertiesForm.title": "titre",
"components.fields.section.parameters": "Paramètres"
"components.fields.section.addSection": "Ajouter une section",
"components.fields.section.parameters": "Paramètres",
"templates.defaultSectionTitle": "Titre de section par défaut",
"templates.defaultWidgetTitle": "Titre du composant par défaut"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verna",
"version": "0.0.0",
"version": "1.0.0-beta.0",
"description": "An extensible form builder based on React JSON Schema Form.",
"main": "./lib/dist/index.js",
"repository": "https://github.com/openfun/verna",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ trim-newlines@^3.0.0:
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==

tsc-alias@^1.7.0:
[email protected]:
version "1.7.0"
resolved "https://registry.yarnpkg.com/tsc-alias/-/tsc-alias-1.7.0.tgz#733482751133a25b97608ee424f8a1f085fcaaef"
integrity sha512-n/K6g8S7Ec7Y/A2Z77Ikp2Uv1S1ERtT63ni69XV4W1YPT4rnNmz8ItgIiJYvKfFnKfqcZQ81UPjoKpMTxaC/rg==
Expand Down

0 comments on commit a88e458

Please sign in to comment.