reactaform 1.8.9 → 1.8.92

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.full.md CHANGED
@@ -276,11 +276,36 @@ ReactaForm supports both field-level and form-level validation.
276
276
  ---
277
277
 
278
278
  ## Submission Handler
279
- Since ReactaForm is a dynamic form system, it provides a submission handler mechanism that allows you to define and plug in custom submission logic, such as validation, data processing, or API calls.
279
+
280
+ ReactaForm provide two ways for submission process:
281
+
282
+ - Direct submission callback in ReactaForm props
283
+ - Since ReactaForm is a dynamic form system, it provides a registration submission mechanism that allows you to define and plug in custom submission logic. This can provide you flexible submission process for different submission logics.
284
+
285
+ Note: In bubmission proces, onSubmit callback will be used if it is provided. Otherwise if submissionHandler in defintion is spcified, the registration handler will be invoked.
280
286
 
281
287
  **How It Works**
282
288
 
283
- Submission handling is configured in two steps:
289
+ ### Direct submission callback
290
+
291
+ ```ts
292
+ async function submitFunction(definition, instanceName, valuesMap, t) => {
293
+ // send valuesMap to your API
294
+ const res = await fetch('/api/save', { method: 'POST', body: JSON.stringify(valuesMap), headers: { 'Content-Type': 'application/json' } });
295
+ if (!res.ok) return [t('Server error while submitting form')];
296
+ return undefined; // returning undefined (or falsy) means success
297
+ });
298
+ ```
299
+
300
+ Then in your app, when call ReactaForm, pass submitFunction to onSubmit:
301
+ ```ts
302
+ <ReactaForm
303
+ definition={userDefintion}
304
+ onSubmit= {submitFunction}
305
+ />
306
+ ```
307
+
308
+ ### Submission registration handling is configured in two steps:
284
309
 
285
310
  1. Define and Register a Submission Handler
286
311
 
@@ -346,30 +371,21 @@ Status Legend:
346
371
  - 🔵 Logical operators (AND / OR / NOT)
347
372
  - 🔵 Multi-field conditions
348
373
  - 🔵 Expression-based rules
349
- - 🔵 Nested condition groups
350
- - 🔵 Cross-group conditional logic
351
- - 🔵 Conditional validation rules
352
- - 🔵 Conditional default values
353
374
 
354
375
  ### Layout & Structure
376
+ - 🟢 Collapsible sections - Group
355
377
  - 🔵 Multi-step / wizard forms
356
378
  - 🔵 Tabbed layouts
357
379
  - 🔵 Navigation sections / anchors
358
- - 🔵 Collapsible sections
359
- - 🔵 Reusable layout templates
360
- - 🔵 Responsive layout rules
361
380
  - 🔵 Grid & column layouts
362
- - 🟡 Layout-aware conditional logic
363
381
 
364
382
  ### Visual Builders
365
383
  - 🟢 Drag-and-drop form builder
366
384
  - 🔵 Advanced conditional logic editor
367
385
  - 🔵 Validation rule designer
368
386
  - 🔵 Submission workflow editor
369
- - 🔵 Layout editor (tabs, steps, groups)
370
- - 🔵 Live schema diff & change preview
387
+ - 🔵 Layout editor (nav, tabs, steps, groups)
371
388
  - 🔵 Schema version history & rollback
372
- - 🔵 Import / export schema packs
373
389
  - 🟡 Builder extensibility API
374
390
 
375
391
  ### Theme System
@@ -378,11 +394,8 @@ Status Legend:
378
394
  - 🟢 Per-form theme customization
379
395
  - 🔵 Visual theme builder
380
396
  - 🔵 CSS variable editor
381
- - 🔵 Light / dark theme generator
382
- - 🔵 Live theme preview across field types
383
397
  - 🔵 Exportable & versioned theme packages
384
398
  - 🔵 Tailwind-compatible themes
385
- - 🟡 Theme inheritance & overrides
386
399
 
387
400
  ### Plugin System
388
401
  - 🟢 Component registry
@@ -392,10 +405,6 @@ Status Legend:
392
405
  - 🔵 Custom field plugin builder
393
406
  - 🔵 Validator plugin builder
394
407
  - 🔵 Submission handler plugins
395
- - 🔵 Plugin metadata & versioning
396
- - 🔵 Plugin dependency management
397
- - 🟡 One-click plugin export
398
- - 🟡 Plugin compatibility checks
399
408
 
400
409
  Internationalization (i18n)
401
410
 
@@ -406,7 +415,6 @@ Current: built-in i18n with per-form dictionaries
406
415
  - 🔵 Translation key discovery
407
416
  - 🔵 Missing translation detection
408
417
  - 🔵 Locale fallback strategies
409
- - 🟡 RTL layout support
410
418
  - 🟡 Async translation loaders
411
419
 
412
420
  ### Ecosystem & Marketplace