@factorialco/rjsf-f0 2.6.0 → 3.0.0

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 CHANGED
@@ -10,7 +10,7 @@ Use it inside an app that already runs f0 (the Factorial Code dashboard, the Fac
10
10
  pnpm add @factorialco/rjsf-f0
11
11
  ```
12
12
 
13
- Peers you must already have: `react`, `react-dom`, `@rjsf/core` 6, `@rjsf/utils` 6 and `@factorialco/f0-react` 4.39+ or 6.
13
+ Peers you must already have: `react`, `react-dom`, `@rjsf/core` 6, `@rjsf/utils` 6 and `@factorialco/f0-react` 11.3.1 or later, up to 14 (the pairing table needs f0's `F0FormEditableTable`).
14
14
 
15
15
  ## Usage
16
16
 
@@ -62,6 +62,7 @@ The host app must render f0's `F0Provider` above the form and import `@factorial
62
62
  | `file` / `data-url` | f0-styled dropzone + file chips (see below) |
63
63
  | submit, add/move/copy/remove | `F0Button` |
64
64
  | `oauth` connect control | `F0Button` (see below) |
65
+ | `pairing` table | `F0FormEditableTable` (see below) |
65
66
  | error summary | `F0Alert` |
66
67
  | section title | `F0Heading` |
67
68
 
@@ -196,6 +197,16 @@ The toolbar is RJSF's, so it is the schema that decides what a row can do:
196
197
 
197
198
  The Forms SDK's `"ui:widget": "oauth"` field opens the provider in a popup and reacts when the flow finishes; the widget logic ships in `@factorialco/fcode-react-forms`. This theme only contributes the control it draws, as `Theme.oauth.ConnectControl`: an `F0Button` (`default` while idle or waiting, `outline` with a check icon once connected) plus the flow's error message underneath. `FcodeJsonSchemaForm` finds it through `rjsfTheme.oauth`, the same way it finds `rjsfTheme.multistep`.
198
199
 
200
+ ### Pairing tables
201
+
202
+ The Forms SDK's `"ui:field": "pairing"` turns an object whose properties pair Factorial records with another system's (accounts, tax codes, wage types…) into one reviewable table. The rows, their suggestions, the in-use filter and the submitted values are all handled in `@factorialco/fcode-react-forms`. This theme contributes only the drawing, as `Theme.pairing.Table`, which `FcodeJsonSchemaForm` finds through `rjsfTheme.pairing`. The table has:
203
+
204
+ - a header with the counts, an **Accept N suggestions** `F0Button` shown while any suggestion is pending, and the **Needs a choice (N)** filter (an `F0Button`, outlined while off and filled while on);
205
+ - an `F0FormEditableTable` with three columns: the Factorial record, a searchable select of the other system's records (a suggested row shows the suggestion as its value, marked by a blue lightbulb hint carrying the app's reason; clearing it dismisses the suggestion), and a status tag: _Confirmed_, _Suggested_ (the reason as its tooltip), _No longer available_ or _Needs a choice_. An explicit "not mapped" (`""` in the form) is a real option in the select. The record and status columns have fixed widths so the select keeps the rest. Each suggested row also gets an **Accept** action, and a row's validation error marks its select;
206
+ - a footer with an `F0Select` to add rows the in-use list left out, beside the app's in-use note.
207
+
208
+ f0's editable table re-renders every row on each edit. With a few hundred rows listed, an edit takes about a third of a second, so keep the default list short by marking the rows in use.
209
+
199
210
  ### Not yet f0
200
211
 
201
212
  - **`range`** renders as a number input rather than `F0Slider`.