@tesouro/embedded-components-react 0.2.249 → 0.2.253

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.
Files changed (44) hide show
  1. package/README.md +15 -6
  2. package/dist/experimental/WidgetSuite.d.ts +649 -25
  3. package/dist/experimental/WidgetSuite.js +5 -2
  4. package/dist/experimental/index.d.ts +649 -25
  5. package/dist/experimental/index.js +5 -2
  6. package/dist/index.css +22 -2
  7. package/dist/index.d.ts +35 -14
  8. package/dist/lib/AcceptDisclosuresWidget.d.ts +35 -14
  9. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index2.js +25 -6
  11. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +81 -46
  12. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/index2.js +1 -0
  13. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/index3.js +23 -13
  14. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index3.js → lib/AccountCard.js} +3 -3
  18. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index6.js → lib/BankAccountsWidgetUi.js} +7 -7
  19. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index4.js → lib/BankingHeader.js} +2 -2
  20. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index5.js → lib/CreateAccountDialog.js} +4 -4
  21. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index2.js → lib/labels.js} +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/index.js +3 -3
  24. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/{index3.js → lib/SettingsWidgetUi/SettingsWidgetUi.js} +3 -3
  25. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/index.js +2 -0
  26. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/{index2.js → lib/SettingsWidgetUi/labels.js} +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +19 -19
  28. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +4 -0
  29. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +149 -156
  30. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +54 -42
  31. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +4 -0
  32. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +4 -0
  33. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  34. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UIContext/UIProvider.js +4 -0
  35. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index.js +5 -2
  36. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index2.js +4 -0
  37. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js +8 -0
  38. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +34 -0
  39. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +59 -0
  40. package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index.js +3 -3
  41. package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index2.js +6 -3
  42. package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js +70 -18
  43. package/package.json +1 -1
  44. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/index4.js +0 -2
package/README.md CHANGED
@@ -183,17 +183,26 @@ listed here.
183
183
 
184
184
  ### AcceptDisclosuresWidget
185
185
 
186
- A self-contained widget for reviewing and accepting required banking disclosures. Renders an inline bordered card with disclosure links, an agreement checkbox, and an Accept action. You supply the four bank-issued document URLs via `disclosureLinks`; the provider attribution and agreement copy come from the widget init tenant identity. Accepting records the acceptance for the signed-in user and then hides the card.
186
+ A self-contained widget for reviewing and accepting required banking disclosures during the **pre-auth invite flow**. Renders an inline bordered card with disclosure links, an agreement checkbox, and an Accept action. You supply the four bank-issued document URLs via `disclosureLinks`; the provider attribution and agreement copy come from the widget init tenant identity.
187
+
188
+ Accept posts `POST /api/widget-gateway/disclosure-acceptance` after reading the disclosure version in force from `GET /identity/v1/disclosures` (hosts rewrite that onto `/api/widget-gateway/proxy/identity/v1/disclosures` the same way as other identity calls — do not call the generated catch-all proxy helper, which percent-encodes path slashes and surfaces as a browser CORS error). `version` may be `null` when the org's requirement is `NOT_REQUIRED`; that value is posted through and ignored by the gateway so invitees in those orgs can still activate. Pass `invitationToken` and `userId` so the disclosures lookup can reject a revoked/expired invite before activation. The accept is one transaction: it activates the invitee and records disclosure acceptance together, so a failed second hop cannot leave an `ACTIVE` user with no acceptance on record. After accept succeeds, the widget awaits any async `onAccepted` continuation, then kicks a widget-init refresh so host gates keyed on `INVITED` can clear. Accept and `onAccepted` failures are handled separately — a rejected host continuation does not look like (or re-run) a failed gateway accept. The refresh is fire-and-forget and runs only after `onAccepted` settles — hosts that unmount this widget when status leaves `INVITED` would otherwise hide a rejected continuation. Auth uses the normal `widgetToken` provider contract — **never** pass an application (APP) / M2M bearer as `widgetToken`. The host must pass `invitationToken` and `userId` from the invite link — this widget does not read URL search params.
187
189
 
188
190
  The widget carries no document URLs of its own — disclosures are bank-issued legal instruments whose hosting is yours to control, and an embeddable library must not depend on infrastructure your content-security policy cannot see. It renders nothing until `disclosureLinks` is supplied and init resolves a `bankName`; it never substitutes another tenant's legal copy. If init omits `vspName`, provider attribution falls back to the bank name so the sentence remains complete.
189
191
 
192
+ Once the atomic accept _and_ any async `onAccepted` continuation succeed, the checkbox and Accept control stay disabled, so a legal acceptance is never posted twice even if the host does not navigate away. A failed accept or rejected `onAccepted` shows an inline error and leaves the control usable for a retry; a successful accept is skipped on retry after a later failure. Init refresh is kicked only after `onAccepted` succeeds.
193
+
190
194
  #### Props
191
195
 
192
- | Prop | Type | Default | Description |
193
- | ----------------- | ---------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------- |
194
- | `disclosureLinks` | `AcceptDisclosuresLinks` | — | URLs of the four disclosure documents. Required to render the widget ships none of its own. |
195
- | `labels` | `Partial<AcceptDisclosuresWidgetLabels>` | — | Override shell copy (title, Accept, link labels, attribution/agreement templates). |
196
- | `onAccept` | `() => Promise<void> \| void` | Built-in request | Records the acceptance instead of the built-in request. Reject to keep the card up for retry. |
196
+ | Prop | Type | Default | Description |
197
+ | ----------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
198
+ | `invitationToken` | `string` | — | **Required.** Invitation token from the invite link (`code` query param). Bound into the disclosures lookup before activation. |
199
+ | `userId` | `string` | — | **Required.** Invited user id from the invite link (`userId` query param). Paired with `invitationToken`. |
200
+
201
+ | Prop | Type | Default | Description |
202
+ | ----------------- | ---------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
203
+ | `disclosureLinks` | `AcceptDisclosuresLinks` | — | URLs of the four disclosure documents. Required to render — the widget ships none of its own. |
204
+ | `labels` | `Partial<AcceptDisclosuresWidgetLabels>` | — | Override shell copy (title, Accept, link labels, attribution/agreement templates). |
205
+ | `onAccepted` | `() => void \| Promise<void>` | — | Called after the atomic accept succeeds and before init refresh; awaited before the widget locks. Reject to surface an error and keep Accept retryable. |
197
206
 
198
207
  ### BankAccountsWidget
199
208