bitboss-ui 3.0.0-beta.72 → 3.0.0-beta.73

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.
@@ -16991,6 +16991,9 @@ onClick }`.
16991
16991
  `onClick`, then completing with `data`. `false`: none.
16992
16992
  - **`false` from an `onClick`** keeps the dialog open; a throw keeps it open
16993
16993
  and is reported once (a `BbValidationError` never is).
16994
+ - **`ok` is never disabled until the form is valid**: the user submits, the
16995
+ form shows what they missed. A dialog that needs another footer writes its
16996
+ own `#footer`.
16994
16997
  - **The `footer` slot replaces them all**, for a footer of your own.
16995
16998
  - **Config styles them app-wide**:
16996
16999
  `components: { BbDialog: { okProps: { variant: 'primary' }, cancelProps: { variant: 'outline' } } }`
@@ -24600,6 +24603,9 @@ app.use(bitbossUiPlugin, {
24600
24603
  A save with no throwing client (plain `fetch`) answers the same way: read the
24601
24604
  422 and `throw new BbValidationError(body.errors)`.
24602
24605
 
24606
+ Outside a form (a confirm's action, a router visit), recognise a 422 with
24607
+ `e instanceof BbValidationError` and read its messages by field in `e.errors`.
24608
+
24603
24609
  ### Saving in place: `snapshot()`
24604
24610
 
24605
24611
  `dirty` compares against the values the form started with. A page that saves
@@ -25088,12 +25094,10 @@ lifting state into the page. It carries `values`, `isSubmitting`, `submitCount`,
25088
25094
  </template>
25089
25095
  ```
25090
25096
 
25091
- Disabling submit on `!valid` is a choice, not a default: vee-validate marks a
25092
- pristine form invalid until its fields have been validated once, so a
25093
- disabled-until-valid button can read as broken on first paint. Leaving the
25094
- button enabled and letting the failed submit surface the messages is usually the
25095
- kinder flow — `valid` is there for wizards and dialogs where a dead-end step is
25096
- worse.
25097
+ Don't disable submit until the form is valid: vee-validate marks a pristine
25098
+ form invalid until its fields have been validated once, so the button reads as
25099
+ broken, and the user never sees what they missed. Leave it enabled and let the
25100
+ failed submit show the messages.
25097
25101
 
25098
25102
  ### Driving it from outside
25099
25103
 
@@ -76118,7 +76122,10 @@ buttons (`text`, `variant`, `size`, icons, `iconOnly`, `block`).
76118
76122
 
76119
76123
  The Inertia helpers' `usePromiseRouter` / `usePromiseForm` reject with a
76120
76124
  `BbValidationError` on a validation error (the bag under `.errors`) instead of
76121
- the bare bag; a `.catch` that read the bag reads `error.errors`. Their
76125
+ the bare bag; a `.catch` that read the bag reads `error.errors`.
76126
+ `BbValidationError` extends `Error`, so a `.catch` that took
76127
+ `error instanceof Error` to mean "not a validation error" now catches 422s
76128
+ too: test `error instanceof BbValidationError` first. Their
76122
76129
  `useConfirmOnRouteLeave` takes `ok` / `cancel` too.
76123
76130
 
76124
76131
  ---