treege 3.0.0-beta.19 → 3.0.0-beta.20
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 +24 -3
- package/dist/{ThemeContext-CQoWKClD.js → ThemeContext-BIT4DHqC.js} +65 -47
- package/dist/{TreegeEditor-BP0R2rMo.js → TreegeEditor-LKN_xeXZ.js} +2 -2
- package/dist/TreegeRenderer--ZEq_w_0.js +1812 -0
- package/dist/editor.js +2 -2
- package/dist/main.js +18 -16
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/hooks/useTranslate.d.ts +6 -4
- package/dist/renderer/index.d.ts +1 -0
- package/dist/renderer/utils/sanitize.d.ts +85 -0
- package/dist/renderer.js +18 -16
- package/dist/shared/locales/ar.json.d.ts +3 -3
- package/dist/shared/locales/de.json.d.ts +3 -3
- package/dist/shared/locales/en.json.d.ts +3 -3
- package/dist/shared/locales/es.json.d.ts +3 -3
- package/dist/shared/locales/fr.json.d.ts +3 -3
- package/dist/shared/locales/it.json.d.ts +3 -3
- package/dist/shared/locales/pt.json.d.ts +3 -3
- package/package.json +3 -1
- package/dist/TreegeRenderer-ClfGb4Mq.js +0 -1754
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@ Treege is a modern React library for creating and rendering interactive decision
|
|
|
39
39
|
- **16 Input Types**: text, number, select, checkbox, radio, date, daterange, time, timerange, file, address, http, textarea, password, switch, autocomplete, and hidden
|
|
40
40
|
- **HTTP Integration**: Built-in API integration with response mapping and search functionality
|
|
41
41
|
- **Advanced Validation**: Required fields, pattern matching, custom validation functions
|
|
42
|
+
- **Security**: Built-in input sanitization to prevent XSS attacks
|
|
43
|
+
- **Enhanced Error Messages**: Clear, user-friendly error messages for HTTP inputs and validation
|
|
42
44
|
- **Conditional Logic**: Dynamic field visibility based on user input and conditional edges
|
|
43
45
|
- **Web & Native**: Both web (React) and React Native renderer implementations
|
|
44
46
|
- **Fully Customizable**: Override any component (FormWrapper, Group, Inputs, SubmitButton, UI elements)
|
|
@@ -412,10 +414,29 @@ function CustomForm() {
|
|
|
412
414
|
Check out the `/example` directory for complete examples:
|
|
413
415
|
|
|
414
416
|
```bash
|
|
415
|
-
|
|
416
|
-
|
|
417
|
+
# Run the example app
|
|
418
|
+
bun example
|
|
417
419
|
```
|
|
418
420
|
|
|
421
|
+
### Available Example URLs
|
|
422
|
+
|
|
423
|
+
Once the development server is running, you can access these examples:
|
|
424
|
+
|
|
425
|
+
- **Default Example**: [http://localhost:5173/](http://localhost:5173/)
|
|
426
|
+
- Basic demonstration of Treege functionality
|
|
427
|
+
|
|
428
|
+
- **Demo Example**: [http://localhost:5173/example](http://localhost:5173/example)
|
|
429
|
+
- Full featured demo showcasing the library capabilities
|
|
430
|
+
|
|
431
|
+
- **All Inputs Example**: [http://localhost:5173/example-all-inputs](http://localhost:5173/example-all-inputs)
|
|
432
|
+
- Comprehensive showcase of all 16 input types
|
|
433
|
+
|
|
434
|
+
- **Custom Input Example**: [http://localhost:5173/example-custom-input](http://localhost:5173/example-custom-input)
|
|
435
|
+
- Demonstrates how to create and integrate custom input components
|
|
436
|
+
|
|
437
|
+
- **TreegeConfigProvider Example**: [http://localhost:5173/example-treege-config-provider](http://localhost:5173/example-treege-config-provider)
|
|
438
|
+
- Shows global configuration with TreegeConfigProvider
|
|
439
|
+
|
|
419
440
|
## API Reference
|
|
420
441
|
|
|
421
442
|
### TreegeEditor Props
|
|
@@ -481,7 +502,7 @@ ISC
|
|
|
481
502
|
|
|
482
503
|
## Credits
|
|
483
504
|
|
|
484
|
-
Created and maintained by [Mickaël Austoni](https://github.com/
|
|
505
|
+
Created and maintained by [Mickaël Austoni](https://github.com/MickaelAustoni)
|
|
485
506
|
|
|
486
507
|
## Support
|
|
487
508
|
|