@tesouro/embedded-components-react 0.5.181 → 0.5.182

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 (22) hide show
  1. package/README.md +32 -32
  2. package/dist/index.d.ts +18 -19
  3. package/dist/index.js +2 -2
  4. package/dist/lib/CreditCardsWidget.d.ts +9 -11
  5. package/dist/lib/CreditCardsWidget.js +1 -1
  6. package/dist/lib/DebitCardsWidget.d.ts +14 -15
  7. package/dist/lib/DebitCardsWidget.js +1 -1
  8. package/dist/lib/WidgetSuite.d.ts +13 -15
  9. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index.js +4 -4
  10. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index10.js +87 -8
  11. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js +3 -3
  12. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index12.js +17 -0
  13. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +17 -24
  14. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index5.js +23 -24
  15. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index6.js +24 -30
  16. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +28 -55
  17. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +53 -222
  18. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +219 -87
  19. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +3 -3
  21. package/package.json +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +0 -19
package/README.md CHANGED
@@ -216,16 +216,16 @@ A whole banking page in one component: a section menu over the widgets behind it
216
216
 
217
217
  #### Props
218
218
 
219
- | Prop | Type | Default | Description |
220
- | --------------------------- | --------------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
221
- | `sections` | `readonly WidgetSuiteSectionId[]` | `WIDGET_SUITE_DEFAULT_SECTIONS` | Which sections the suite offers, in menu order. A listed section is still hidden when the token does not earn it. |
222
- | `section` | `WidgetSuiteSectionId` | — | Which section is showing. Supplying it puts the menu in controlled mode for the lifetime of the mount, so pair it with `onSectionChange`. |
223
- | `defaultSection` | `WidgetSuiteSectionId` | first of `sections` | Which section the suite opens on. Read once per mount, and ignored when `section` is supplied. |
224
- | `onSectionChange` | `(section) => void` | `undefined` | Called when a person moves the suite. Never fired on mount, and never for the entitlement fallback, so a URL mirroring it cannot erase a deep link. |
225
- | `labels` | `WidgetSuiteLabelOverrides` | `WIDGET_SUITE_LABELS_EN` | Every string on the page, in one tree: a group for the shell, the menu names, the section heading, the disclosure states, and one per section carrying that section's widget copy. Override any leaf and its siblings keep their defaults. |
226
- | `showSectionTitle` | `boolean` | `true` | Shows a heading above each section, named as its menu item is. Set `false` when your page already heads the suite. |
227
- | `onboardingDisclosureLinks` | `DisclosureLinks` | `undefined` | Legal disclosure URLs (Terms, Privacy, Electronic Communication, Patriot Act) for the entry-point onboarding widget's business-details agreement step, shown to a session whose organization has no application yet. Omitted fields render as plain, non-clickable text. |
228
- | `cardArtSrc` | `string` | `undefined` | Card artwork URL for the debit list's built-in Create card sheet and details card face. Omit it and both use a built-in neutral plastic, so Create card still shows when the token holds the issue, roster and funding scopes. Credit Create card is always hidden in the suite. |
219
+ | Prop | Type | Default | Description |
220
+ | --------------------------- | --------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
221
+ | `sections` | `readonly WidgetSuiteSectionId[]` | `WIDGET_SUITE_DEFAULT_SECTIONS` | Which sections the suite offers, in menu order. A listed section is still hidden when the token does not earn it. |
222
+ | `section` | `WidgetSuiteSectionId` | — | Which section is showing. Supplying it puts the menu in controlled mode for the lifetime of the mount, so pair it with `onSectionChange`. |
223
+ | `defaultSection` | `WidgetSuiteSectionId` | first of `sections` | Which section the suite opens on. Read once per mount, and ignored when `section` is supplied. |
224
+ | `onSectionChange` | `(section) => void` | `undefined` | Called when a person moves the suite. Never fired on mount, and never for the entitlement fallback, so a URL mirroring it cannot erase a deep link. |
225
+ | `labels` | `WidgetSuiteLabelOverrides` | `WIDGET_SUITE_LABELS_EN` | Every string on the page, in one tree: a group for the shell, the menu names, the section heading, the disclosure states, and one per section carrying that section's widget copy. Override any leaf and its siblings keep their defaults. |
226
+ | `showSectionTitle` | `boolean` | `true` | Shows a heading above each section, named as its menu item is. Set `false` when your page already heads the suite. |
227
+ | `onboardingDisclosureLinks` | `DisclosureLinks` | `undefined` | Legal disclosure URLs (Terms, Privacy, Electronic Communication, Patriot Act) for the entry-point onboarding widget's business-details agreement step, shown to a session whose organization has no application yet. Omitted fields render as plain, non-clickable text. |
228
+ | `cardArtSrc` | `string` | `undefined` | Card artwork URL for the debit list's built-in Create card sheet and details card face. Omit it and the sheet uses a built-in neutral plastic while the face falls back to the bank logo. Create card shows when the token holds the issue, roster and funding scopes. Credit Create card is always hidden in the suite. |
229
229
 
230
230
  ### AcceptDisclosuresWidget
231
231
 
@@ -309,31 +309,31 @@ One page of an organization's **credit** cards, with a scope-gated "Show my card
309
309
 
310
310
  ### DebitCardsWidget
311
311
 
312
- One page of an organization's **debit** cards, with a scope-gated "Show my cards" toggle, Create card and per-row Activate affordances. Selecting a row opens that card's read-only details in a side sheet. With `cardArtSrc`, Create card opens the same sheet with the built-in debit issuance flow.
312
+ One page of an organization's **debit** cards, with a scope-gated "Show my cards" toggle, Create card and per-row Activate affordances. Selecting a row opens that card's read-only details in a side sheet. Create card opens the same sheet with the built-in debit issuance flow.
313
313
 
314
314
  #### Props
315
315
 
316
- | Prop | Type | Default | Description |
317
- | --------------------------- | --------------------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
318
- | `pagination` | `{ paginationToken?, pageSize? }` | `undefined` | Controlled cursor and page size. Supply with `onPaginationChange` when your app owns the list position. |
319
- | `defaultPagination` | `{ paginationToken?, pageSize? }` | First page, 10 | Initial cursor and page size when uncontrolled. Ignored when `pagination` is supplied. |
320
- | `onPaginationChange` | `(pagination: CardsPagination) => void` | `undefined` | Called whenever the widget moves page or changes page size. Persist the whole object, not the token alone. |
321
- | `labels` | `PartialDeep<CardsLabels>` | English labels | Overrides the copy of the list screen — its controls, columns, states, the details sheet's screen-reader name under `detailsSheet` and the create sheet's under `createSheet`. Nested groups merge per group. |
322
- | `featureLabels` | `PartialDeep<CardsFeatureLabels>` | English labels | Overrides the copy this widget resolves rather than passes through — status and form-factor vocabulary, the empty-cell placeholder, and name fallbacks. |
323
- | `selectedCardId` | `string \| null` | `undefined` | Controlled selection of the card whose details panel is open. `null` closes it; omit for uncontrolled. See **Selection** below. |
324
- | `defaultSelectedCardId` | `string \| null` | `undefined` | Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied. |
325
- | `onSelectedCardIdChange` | `(cardId: string \| null) => void` | `undefined` | Fires whenever the open card changes, including on close (`null`). Supplying it does **not** change what renders. |
326
- | `cardDetailsLabels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Label overrides forwarded into the details panel. |
327
- | `cardDetailsFeatureLabels` | `PartialDeep<CardDetailsFeatureLabels>` | English labels | Overrides for the copy the panel's feature layer resolves — status vocabulary, form-factor copy, program label, copy-success toast. Distinct from `featureLabels`. |
328
- | `cardDetailsActivateLabels` | `PartialDeep<ActivateCardPanelLabels>` | English labels | Overrides for the Activate Card form the details panel opens — its heading, the two field labels, and its validation and status copy. |
329
- | `bankLogoSrc` | `string` | `undefined` | Bank logo for the details panel's card face. Ignored there when `cardArtSrc` is set. Omit both and the face renders without a logo rather than with a placeholder. |
330
- | `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`. |
331
- | `cardArtSrc` | `string` | `undefined` | Plastic art for the built-in create sheet **and** the details panel's card face. Required for the create sheet: omit it (with no `onCreateCard`) and Create card is hidden. The details panel has no such requirement — omit it there and it falls back to `bankLogoSrc`. See **Create card** below. |
332
- | `createCardLabels` | `PartialDeep<CreateCardWidgetLabels>` | English labels | Label overrides forwarded into the nested create-card panel. |
333
- | `createCardFeatureLabels` | toast / untitled-funding overrides | English labels | Overrides for the copy the create panel's feature layer resolves — mutation toasts, untitled funding-account fallback, pending-activation success copy. |
334
- | `onCreateCard` | `() => void` | `undefined` | Host-owned Create card handler. When supplied, the built-in sheet does not open — use it for a custom issuance flow. |
335
- | `headerStart` | `ReactNode` | `undefined` | Your own markup for the start of the header row, beside Create card. Pass your heading here so the two share one row; the widget renders no heading of its own, so you choose the element and level. |
336
- | `onActivateCard` | `(cardId: string) => void` | `undefined` | Called when a row's Activate button is clicked. Omit it and the button is not rendered. |
316
+ | Prop | Type | Default | Description |
317
+ | --------------------------- | --------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
318
+ | `pagination` | `{ paginationToken?, pageSize? }` | `undefined` | Controlled cursor and page size. Supply with `onPaginationChange` when your app owns the list position. |
319
+ | `defaultPagination` | `{ paginationToken?, pageSize? }` | First page, 10 | Initial cursor and page size when uncontrolled. Ignored when `pagination` is supplied. |
320
+ | `onPaginationChange` | `(pagination: CardsPagination) => void` | `undefined` | Called whenever the widget moves page or changes page size. Persist the whole object, not the token alone. |
321
+ | `labels` | `PartialDeep<CardsLabels>` | English labels | Overrides the copy of the list screen — its controls, columns, states, the details sheet's screen-reader name under `detailsSheet` and the create sheet's under `createSheet`. Nested groups merge per group. |
322
+ | `featureLabels` | `PartialDeep<CardsFeatureLabels>` | English labels | Overrides the copy this widget resolves rather than passes through — status and form-factor vocabulary, the empty-cell placeholder, and name fallbacks. |
323
+ | `selectedCardId` | `string \| null` | `undefined` | Controlled selection of the card whose details panel is open. `null` closes it; omit for uncontrolled. See **Selection** below. |
324
+ | `defaultSelectedCardId` | `string \| null` | `undefined` | Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied. |
325
+ | `onSelectedCardIdChange` | `(cardId: string \| null) => void` | `undefined` | Fires whenever the open card changes, including on close (`null`). Supplying it does **not** change what renders. |
326
+ | `cardDetailsLabels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Label overrides forwarded into the details panel. |
327
+ | `cardDetailsFeatureLabels` | `PartialDeep<CardDetailsFeatureLabels>` | English labels | Overrides for the copy the panel's feature layer resolves — status vocabulary, form-factor copy, program label, copy-success toast. Distinct from `featureLabels`. |
328
+ | `cardDetailsActivateLabels` | `PartialDeep<ActivateCardPanelLabels>` | English labels | Overrides for the Activate Card form the details panel opens — its heading, the two field labels, and its validation and status copy. |
329
+ | `bankLogoSrc` | `string` | `undefined` | Bank logo for the details panel's card face. Ignored there when `cardArtSrc` is set. Omit both and the face renders without a logo rather than with a placeholder. |
330
+ | `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`. |
331
+ | `cardArtSrc` | `string` | `undefined` | Plastic art for the built-in create sheet **and** the details panel's card face. Omit it and the create sheet draws a built-in neutral plastic, while the details face falls back to `bankLogoSrc`. See **Create card** below. |
332
+ | `createCardLabels` | `PartialDeep<CreateCardWidgetLabels>` | English labels | Label overrides forwarded into the nested create-card panel. |
333
+ | `createCardFeatureLabels` | toast / untitled-funding overrides | English labels | Overrides for the copy the create panel's feature layer resolves — mutation toasts, untitled funding-account fallback, pending-activation success copy. |
334
+ | `onCreateCard` | `() => void` | `undefined` | Host-owned Create card handler. When supplied, the built-in sheet does not open — use it for a custom issuance flow. |
335
+ | `headerStart` | `ReactNode` | `undefined` | Your own markup for the start of the header row, beside Create card. Pass your heading here so the two share one row; the widget renders no heading of its own, so you choose the element and level. |
336
+ | `onActivateCard` | `(cardId: string) => void` | `undefined` | Called when a row's Activate button is clicked. Omit it and the button is not rendered. |
337
337
 
338
338
  ### CardDetailsWidget
339
339
 
package/dist/index.d.ts CHANGED
@@ -2795,12 +2795,10 @@ interface CardsWidgetProps extends WidgetProviderProps {
2795
2795
  * details panel's card face — forwarded verbatim into both nested
2796
2796
  * `CreateCardWidget` and `CardDetailsWidget`, so a card created in this
2797
2797
  * widget's own sheet and that same card's later details view show the same
2798
- * artwork. Required for the create sheet specifically: omitting it (with no
2799
- * host `onCreateCard`) hides Create card rather than opening a panel that
2800
- * cannot render. The details panel has no such requirement — omitting it
2801
- * just falls back to `bankLogoSrc`, same as `CardDetailsWidget` on its own.
2802
- * Same PLAT-1179 / ADR 0005 rule as `bankLogoSrc` — the package ships no
2803
- * card artwork.
2798
+ * artwork. Omitted, the create sheet draws a built-in neutral plastic and the
2799
+ * details panel falls back to `bankLogoSrc`, same as `CardDetailsWidget` on
2800
+ * its own. Card art never decides whether Create card shows; the token's
2801
+ * scopes do.
2804
2802
  */
2805
2803
  cardArtSrc?: string;
2806
2804
  /**
@@ -2817,11 +2815,11 @@ interface CardsWidgetProps extends WidgetProviderProps {
2817
2815
  createCardFeatureLabels?: CreateCardWidgetProps['featureLabels'];
2818
2816
  /**
2819
2817
  * Called when Create card is clicked. When supplied, the host owns the
2820
- * gesture: the built-in debit sheet does **not** open. Omit it on a debit list
2821
- * with `cardArtSrc` to use the built-in `CreateCardWidget` sheet. Credit has
2822
- * no in-package issuance widget, so credit Create card still requires this
2823
- * callback — omitting it hides the button rather than offering a control that
2824
- * does nothing.
2818
+ * gesture: the built-in debit sheet does **not** open. Omit it on a debit
2819
+ * list to use the built-in `CreateCardWidget` sheet. Credit has no in-package
2820
+ * issuance widget, so credit Create card still requires this callback —
2821
+ * omitting it hides the button rather than offering a control that does
2822
+ * nothing.
2825
2823
  */
2826
2824
  onCreateCard?: () => void;
2827
2825
  /**
@@ -2884,10 +2882,11 @@ type DebitCardsWidgetProps = Omit<CardsWidgetProps, 'cardProgram'>;
2884
2882
  * Create card and per-row Activate affordances. Selecting a row opens that
2885
2883
  * card's read-only details in a sheet.
2886
2884
  *
2887
- * With `cardArtSrc`, Create card opens the same sheet with the built-in
2888
- * `CreateCardWidget` issuance flow; a host `onCreateCard` still takes the
2889
- * gesture over. Credit is {@link CreditCardsWidget}, which accepts neither
2890
- * `cardArtSrc` nor the create-panel labels.
2885
+ * Create card opens the same sheet with the built-in `CreateCardWidget`
2886
+ * issuance flow, drawing `cardArtSrc` or a built-in plastic; a host
2887
+ * `onCreateCard` still takes the gesture over. Credit is
2888
+ * {@link CreditCardsWidget}, which accepts neither `cardArtSrc` nor the
2889
+ * create-panel labels.
2891
2890
  *
2892
2891
  * The program is pinned *after* the spread, so a JavaScript host still passing
2893
2892
  * the retired `cardProgram` cannot point this export at the credit endpoint.
@@ -3657,10 +3656,10 @@ interface WidgetSuiteProps extends WidgetProviderProps {
3657
3656
  onboardingDisclosureLinks?: DisclosureLinks;
3658
3657
  /**
3659
3658
  * Card artwork URL for the debit list's built-in Create card sheet and its
3660
- * details card face. Omitted, both use a built-in neutral plastic, so Create
3661
- * card still shows whenever the token holds the issue, roster and funding
3662
- * scopes. Credit has no in-package issuance flow, so its Create card stays
3663
- * hidden either way.
3659
+ * details card face. Omitted, the sheet draws a built-in neutral plastic and
3660
+ * the face falls back to the bank logo. Create card shows whenever the token
3661
+ * holds the issue, roster and funding scopes. Credit has no in-package
3662
+ * issuance flow, so its Create card stays hidden either way.
3664
3663
  */
3665
3664
  cardArtSrc?: string;
3666
3665
  }
package/dist/index.js CHANGED
@@ -16,8 +16,8 @@ import { useDisclosuresAcceptanceSurface as b, useOwnWidgetConfig as x, useRefet
16
16
  import { BankAccountsWidget as D } from "./libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js";
17
17
  import { BillPayWidget as O } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index91.js";
18
18
  import { CardDetailsWidget as k } from "./libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js";
19
- import { CreditCardsWidget as A } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index10.js";
20
- import { DebitCardsWidget as j } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js";
19
+ import { CreditCardsWidget as A } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js";
20
+ import { DebitCardsWidget as j } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index12.js";
21
21
  import { BALANCES_WIDGET_LABELS_EN as M } from "./libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/labels.js";
22
22
  import { BalancesWidget as N } from "./libs/tesouro-embedded-components-react/balances-widget/feature/dist/index6.js";
23
23
  import { INSIGHTS_FEATURE_LABELS_EN as P } from "./libs/tesouro-embedded-components-react/insights-widget/feature/dist/index3.js";
@@ -1382,12 +1382,10 @@ interface CardsWidgetProps extends WidgetProviderProps {
1382
1382
  * details panel's card face — forwarded verbatim into both nested
1383
1383
  * `CreateCardWidget` and `CardDetailsWidget`, so a card created in this
1384
1384
  * widget's own sheet and that same card's later details view show the same
1385
- * artwork. Required for the create sheet specifically: omitting it (with no
1386
- * host `onCreateCard`) hides Create card rather than opening a panel that
1387
- * cannot render. The details panel has no such requirement — omitting it
1388
- * just falls back to `bankLogoSrc`, same as `CardDetailsWidget` on its own.
1389
- * Same PLAT-1179 / ADR 0005 rule as `bankLogoSrc` — the package ships no
1390
- * card artwork.
1385
+ * artwork. Omitted, the create sheet draws a built-in neutral plastic and the
1386
+ * details panel falls back to `bankLogoSrc`, same as `CardDetailsWidget` on
1387
+ * its own. Card art never decides whether Create card shows; the token's
1388
+ * scopes do.
1391
1389
  */
1392
1390
  cardArtSrc?: string;
1393
1391
  /**
@@ -1404,11 +1402,11 @@ interface CardsWidgetProps extends WidgetProviderProps {
1404
1402
  createCardFeatureLabels?: CreateCardWidgetProps['featureLabels'];
1405
1403
  /**
1406
1404
  * Called when Create card is clicked. When supplied, the host owns the
1407
- * gesture: the built-in debit sheet does **not** open. Omit it on a debit list
1408
- * with `cardArtSrc` to use the built-in `CreateCardWidget` sheet. Credit has
1409
- * no in-package issuance widget, so credit Create card still requires this
1410
- * callback — omitting it hides the button rather than offering a control that
1411
- * does nothing.
1405
+ * gesture: the built-in debit sheet does **not** open. Omit it on a debit
1406
+ * list to use the built-in `CreateCardWidget` sheet. Credit has no in-package
1407
+ * issuance widget, so credit Create card still requires this callback —
1408
+ * omitting it hides the button rather than offering a control that does
1409
+ * nothing.
1412
1410
  */
1413
1411
  onCreateCard?: () => void;
1414
1412
  /**
@@ -1,3 +1,3 @@
1
- import { CreditCardsWidget as e } from "../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index10.js";
1
+ import { CreditCardsWidget as e } from "../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js";
2
2
  import "../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index.js";
3
3
  export { e as CreditCardsWidget };
@@ -1382,12 +1382,10 @@ interface CardsWidgetProps extends WidgetProviderProps {
1382
1382
  * details panel's card face — forwarded verbatim into both nested
1383
1383
  * `CreateCardWidget` and `CardDetailsWidget`, so a card created in this
1384
1384
  * widget's own sheet and that same card's later details view show the same
1385
- * artwork. Required for the create sheet specifically: omitting it (with no
1386
- * host `onCreateCard`) hides Create card rather than opening a panel that
1387
- * cannot render. The details panel has no such requirement — omitting it
1388
- * just falls back to `bankLogoSrc`, same as `CardDetailsWidget` on its own.
1389
- * Same PLAT-1179 / ADR 0005 rule as `bankLogoSrc` — the package ships no
1390
- * card artwork.
1385
+ * artwork. Omitted, the create sheet draws a built-in neutral plastic and the
1386
+ * details panel falls back to `bankLogoSrc`, same as `CardDetailsWidget` on
1387
+ * its own. Card art never decides whether Create card shows; the token's
1388
+ * scopes do.
1391
1389
  */
1392
1390
  cardArtSrc?: string;
1393
1391
  /**
@@ -1404,11 +1402,11 @@ interface CardsWidgetProps extends WidgetProviderProps {
1404
1402
  createCardFeatureLabels?: CreateCardWidgetProps['featureLabels'];
1405
1403
  /**
1406
1404
  * Called when Create card is clicked. When supplied, the host owns the
1407
- * gesture: the built-in debit sheet does **not** open. Omit it on a debit list
1408
- * with `cardArtSrc` to use the built-in `CreateCardWidget` sheet. Credit has
1409
- * no in-package issuance widget, so credit Create card still requires this
1410
- * callback — omitting it hides the button rather than offering a control that
1411
- * does nothing.
1405
+ * gesture: the built-in debit sheet does **not** open. Omit it on a debit
1406
+ * list to use the built-in `CreateCardWidget` sheet. Credit has no in-package
1407
+ * issuance widget, so credit Create card still requires this callback —
1408
+ * omitting it hides the button rather than offering a control that does
1409
+ * nothing.
1412
1410
  */
1413
1411
  onCreateCard?: () => void;
1414
1412
  /**
@@ -1446,10 +1444,11 @@ type DebitCardsWidgetProps = Omit<CardsWidgetProps, 'cardProgram'>;
1446
1444
  * Create card and per-row Activate affordances. Selecting a row opens that
1447
1445
  * card's read-only details in a sheet.
1448
1446
  *
1449
- * With `cardArtSrc`, Create card opens the same sheet with the built-in
1450
- * `CreateCardWidget` issuance flow; a host `onCreateCard` still takes the
1451
- * gesture over. Credit is {@link CreditCardsWidget}, which accepts neither
1452
- * `cardArtSrc` nor the create-panel labels.
1447
+ * Create card opens the same sheet with the built-in `CreateCardWidget`
1448
+ * issuance flow, drawing `cardArtSrc` or a built-in plastic; a host
1449
+ * `onCreateCard` still takes the gesture over. Credit is
1450
+ * {@link CreditCardsWidget}, which accepts neither `cardArtSrc` nor the
1451
+ * create-panel labels.
1453
1452
  *
1454
1453
  * The program is pinned *after* the spread, so a JavaScript host still passing
1455
1454
  * the retired `cardProgram` cannot point this export at the credit endpoint.
@@ -1,3 +1,3 @@
1
- import { DebitCardsWidget as e } from "../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js";
1
+ import { DebitCardsWidget as e } from "../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index12.js";
2
2
  import "../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index.js";
3
3
  export { e as DebitCardsWidget };
@@ -1979,12 +1979,10 @@ interface CardsWidgetProps extends WidgetProviderProps {
1979
1979
  * details panel's card face — forwarded verbatim into both nested
1980
1980
  * `CreateCardWidget` and `CardDetailsWidget`, so a card created in this
1981
1981
  * widget's own sheet and that same card's later details view show the same
1982
- * artwork. Required for the create sheet specifically: omitting it (with no
1983
- * host `onCreateCard`) hides Create card rather than opening a panel that
1984
- * cannot render. The details panel has no such requirement — omitting it
1985
- * just falls back to `bankLogoSrc`, same as `CardDetailsWidget` on its own.
1986
- * Same PLAT-1179 / ADR 0005 rule as `bankLogoSrc` — the package ships no
1987
- * card artwork.
1982
+ * artwork. Omitted, the create sheet draws a built-in neutral plastic and the
1983
+ * details panel falls back to `bankLogoSrc`, same as `CardDetailsWidget` on
1984
+ * its own. Card art never decides whether Create card shows; the token's
1985
+ * scopes do.
1988
1986
  */
1989
1987
  cardArtSrc?: string;
1990
1988
  /**
@@ -2001,11 +1999,11 @@ interface CardsWidgetProps extends WidgetProviderProps {
2001
1999
  createCardFeatureLabels?: CreateCardWidgetProps['featureLabels'];
2002
2000
  /**
2003
2001
  * Called when Create card is clicked. When supplied, the host owns the
2004
- * gesture: the built-in debit sheet does **not** open. Omit it on a debit list
2005
- * with `cardArtSrc` to use the built-in `CreateCardWidget` sheet. Credit has
2006
- * no in-package issuance widget, so credit Create card still requires this
2007
- * callback — omitting it hides the button rather than offering a control that
2008
- * does nothing.
2002
+ * gesture: the built-in debit sheet does **not** open. Omit it on a debit
2003
+ * list to use the built-in `CreateCardWidget` sheet. Credit has no in-package
2004
+ * issuance widget, so credit Create card still requires this callback —
2005
+ * omitting it hides the button rather than offering a control that does
2006
+ * nothing.
2009
2007
  */
2010
2008
  onCreateCard?: () => void;
2011
2009
  /**
@@ -2796,10 +2794,10 @@ interface WidgetSuiteProps extends WidgetProviderProps {
2796
2794
  onboardingDisclosureLinks?: DisclosureLinks;
2797
2795
  /**
2798
2796
  * Card artwork URL for the debit list's built-in Create card sheet and its
2799
- * details card face. Omitted, both use a built-in neutral plastic, so Create
2800
- * card still shows whenever the token holds the issue, roster and funding
2801
- * scopes. Credit has no in-package issuance flow, so its Create card stays
2802
- * hidden either way.
2797
+ * details card face. Omitted, the sheet draws a built-in neutral plastic and
2798
+ * the face falls back to the bank logo. Create card shows whenever the token
2799
+ * holds the issue, roster and funding scopes. Credit has no in-package
2800
+ * issuance flow, so its Create card stays hidden either way.
2803
2801
  */
2804
2802
  cardArtSrc?: string;
2805
2803
  }
@@ -1,5 +1,5 @@
1
- import "./index4.js";
2
- import "./index6.js";
3
- import { CreditCardsWidget as e } from "./index10.js";
4
- import { DebitCardsWidget as t } from "./index11.js";
1
+ import "./index5.js";
2
+ import "./index7.js";
3
+ import { CreditCardsWidget as e } from "./index11.js";
4
+ import { DebitCardsWidget as t } from "./index12.js";
5
5
  export { e as CreditCardsWidget, t as DebitCardsWidget };
@@ -2,16 +2,95 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { CardProgram as e } from "../../../shared/feature/dist/lib/card/cardProgram.js";
5
+ import { WidgetProvider as e } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
6
6
  import "../../../shared/feature/dist/index.js";
7
- import { CardsWidget as t } from "./index9.js";
8
- import { jsx as n } from "react/jsx-runtime";
7
+ import { WIDGET_NAME as t } from "./index2.js";
8
+ import { cardsListDetailsSheetTestIds as n, cardsListTestIds as r } from "./index4.js";
9
+ import { resolveCardsListLabels as i } from "../../ui/dist/lib/CardsList/labels.js";
10
+ import { CardsList as a } from "../../ui/dist/lib/CardsList/CardsList.js";
11
+ import { CardsListDetailsSheet as o } from "../../ui/dist/lib/CardsList/CardsListDetailsSheet.js";
12
+ import "../../ui/dist/index.js";
13
+ import { useCardsWidget as s } from "./index9.js";
14
+ import { CardDetailsWidget as c } from "../../../card-details-widget/feature/dist/index13.js";
15
+ import "../../../card-details-widget/feature/dist/index.js";
16
+ import { CreateCardWidget as l } from "../../create-card/feature/dist/index8.js";
17
+ import "../../create-card/feature/dist/index.js";
18
+ import { useCallback as u, useMemo as d, useState as f } from "react";
19
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
9
20
  //#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index10.js
10
- function r(r) {
11
- return /* @__PURE__ */ n(t, {
12
- ...r,
13
- cardProgram: e.Credit
21
+ function g({ cardProgram: e, pagination: t, defaultPagination: g, onPaginationChange: _, labels: v, featureLabels: y, selectedCardId: b, defaultSelectedCardId: x, onSelectedCardIdChange: S, cardDetailsLabels: C, cardDetailsFeatureLabels: w, cardDetailsActivateLabels: T, bankLogoSrc: E, bankLogoAlt: D, cardArtSrc: O, createCardLabels: k, createCardFeatureLabels: A, onCreateCard: j, onActivateCard: M, headerStart: ee }) {
22
+ let { selectedCardId: N, onSelectCard: P, onCreateCardClick: F, canCreateCard: I, canReadCards: L, ...R } = s({
23
+ cardProgram: e,
24
+ pagination: t,
25
+ defaultPagination: g,
26
+ onPaginationChange: _,
27
+ featureLabels: y,
28
+ selectedCardId: b,
29
+ defaultSelectedCardId: x,
30
+ onSelectedCardIdChange: S,
31
+ onCreateCard: j,
32
+ onActivateCard: M
33
+ }), z = d(() => i(v), [v]), [B, V] = f(!1), [H, U] = f(0), [W, G] = f(N), [K, q] = f(null), J = u(() => {
34
+ N !== null && P(null), U((e) => e + 1), V(!0);
35
+ }, [N, P]), Y = u(() => {
36
+ V(!1), N !== null && P(null);
37
+ }, [N, P]), X = u((e) => {
38
+ V(!1), P(e);
39
+ }, [P]), Z = e === "debit" && !!I && F === void 0, Q = B && N === null && Z;
40
+ B && (N !== null || !Z) && V(!1), Q ? K !== "create" && q("create") : N !== null && (K !== "details" && q("details"), N !== W && G(N));
41
+ let $ = K === "create", te = N !== null || Q;
42
+ return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(a, {
43
+ ...R,
44
+ canCreateCard: I,
45
+ onCreateCardClick: F ?? J,
46
+ headerStart: ee,
47
+ labels: z,
48
+ testIds: r
49
+ }), /* @__PURE__ */ m(o, {
50
+ isOpen: te,
51
+ labels: $ ? z.createSheet : z.detailsSheet,
52
+ contentClassName: $ ? "ttw:overflow-hidden ttw:p-0 ttw:min-h-0" : void 0,
53
+ onClose: Y,
54
+ testIds: n,
55
+ children: $ && Z ? /* @__PURE__ */ m(l, {
56
+ cardArtSrc: O ?? "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='190' viewBox='0 0 300 190'><rect width='300' height='190' rx='16' fill='%23334155'/><rect x='28' y='64' width='44' height='34' rx='6' fill='%2364748b'/></svg>",
57
+ labels: k,
58
+ featureLabels: A,
59
+ onClose: Y,
60
+ onCancel: Y,
61
+ onViewCard: L ? X : void 0,
62
+ className: "ttw:min-h-0 ttw:flex-1"
63
+ }, H) : W === null ? null : /* @__PURE__ */ m(c, {
64
+ cardId: W,
65
+ cardProgram: e,
66
+ labels: C,
67
+ activateLabels: T,
68
+ featureLabels: w,
69
+ cardArtSrc: O,
70
+ bankLogoSrc: E,
71
+ bankLogoAlt: D,
72
+ onClose: Y
73
+ }, W)
74
+ })] });
75
+ }
76
+ function _({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: h, ..._ }) {
77
+ return /* @__PURE__ */ m(e, {
78
+ widgetName: t,
79
+ baseUrl: n,
80
+ widgetToken: r,
81
+ organizationId: i,
82
+ configClient: a,
83
+ gatewayRouting: o,
84
+ linkComponent: s,
85
+ implementation: c,
86
+ uiFramework: l,
87
+ errorFallback: u,
88
+ onError: d,
89
+ analytics: f,
90
+ disclosuresAcceptance: p,
91
+ providerLabels: h,
92
+ children: /* @__PURE__ */ m(g, { ..._ })
14
93
  });
15
94
  }
16
95
  //#endregion
17
- export { r as CreditCardsWidget };
96
+ export { _ as CardsWidget, _ as default };
@@ -4,14 +4,14 @@
4
4
  "use client";
5
5
  import { CardProgram as e } from "../../../shared/feature/dist/lib/card/cardProgram.js";
6
6
  import "../../../shared/feature/dist/index.js";
7
- import { CardsWidget as t } from "./index9.js";
7
+ import { CardsWidget as t } from "./index10.js";
8
8
  import { jsx as n } from "react/jsx-runtime";
9
9
  //#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js
10
10
  function r(r) {
11
11
  return /* @__PURE__ */ n(t, {
12
12
  ...r,
13
- cardProgram: e.Debit
13
+ cardProgram: e.Credit
14
14
  });
15
15
  }
16
16
  //#endregion
17
- export { r as DebitCardsWidget };
17
+ export { r as CreditCardsWidget };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { CardProgram as e } from "../../../shared/feature/dist/lib/card/cardProgram.js";
6
+ import "../../../shared/feature/dist/index.js";
7
+ import { CardsWidget as t } from "./index10.js";
8
+ import { jsx as n } from "react/jsx-runtime";
9
+ //#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index12.js
10
+ function r(r) {
11
+ return /* @__PURE__ */ n(t, {
12
+ ...r,
13
+ cardProgram: e.Debit
14
+ });
15
+ }
16
+ //#endregion
17
+ export { r as DebitCardsWidget };
@@ -1,26 +1,19 @@
1
- import { CARD_STATUS_LABELS_EN as e, CARD_TYPE_LABELS_EN as t } from "../../../shared/feature/dist/lib/card/cardPresentation.js";
2
- import "../../../shared/feature/dist/index.js";
3
1
  //#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js
4
- var n = {
5
- emptyValue: "—",
6
- untitledCard: "Untitled card",
7
- untitledFundingAccount: "Account",
8
- cardStatus: e,
9
- cardType: t
10
- };
11
- function r(e) {
12
- return {
13
- ...n,
14
- ...e,
15
- cardStatus: {
16
- ...n.cardStatus,
17
- ...e?.cardStatus
18
- },
19
- cardType: {
20
- ...n.cardType,
21
- ...e?.cardType
22
- }
23
- };
24
- }
2
+ var e = {
3
+ list: "cards-list",
4
+ cardFaceSwatch: "card-face-swatch",
5
+ rowPrefix: "cards-list-row",
6
+ empty: "cards-list-empty",
7
+ error: "cards-list-error",
8
+ detailsSheet: "cards-list-details-sheet"
9
+ }, t = {
10
+ root: e.list,
11
+ empty: e.empty,
12
+ error: e.error,
13
+ row: {
14
+ rootPrefix: e.rowPrefix,
15
+ cardFaceSwatch: { root: e.cardFaceSwatch }
16
+ }
17
+ }, n = { root: e.detailsSheet };
25
18
  //#endregion
26
- export { n as DEFAULT_CARDS_FEATURE_LABELS, r as resolveCardsFeatureLabels };
19
+ export { n as cardsListDetailsSheetTestIds, t as cardsListTestIds, e as cardsWidgetTestIds };
@@ -1,27 +1,26 @@
1
- import { minorExponentForCurrency as e } from "../../../shared/util/dist/lib/amountOutputToMajorUnits.js";
2
- import { normalizeAmountOutputCurrencyCode as t } from "../../../shared/util/dist/lib/normalizeAmountOutputCurrencyCode.js";
1
+ import { CARD_STATUS_LABELS_EN as e, CARD_TYPE_LABELS_EN as t } from "../../../shared/feature/dist/lib/card/cardPresentation.js";
2
+ import "../../../shared/feature/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index5.js
4
- function n(e) {
5
- if (e == null || e === "") return;
6
- let t = Number(e);
7
- return Number.isFinite(t) ? t : void 0;
8
- }
9
- function r({ limit: r, currencyCode: i }) {
10
- let a = n(r);
11
- if (a === void 0) return;
12
- let o = t(i);
13
- return new Intl.NumberFormat(void 0, {
14
- style: "currency",
15
- currency: o,
16
- maximumFractionDigits: 0
17
- }).format(a / 10 ** e(o));
18
- }
19
- function i(e) {
20
- let t = e?.trim().slice(-4);
21
- return t ? `••••${t}` : void 0;
22
- }
23
- function a(e, t) {
24
- return e?.trim() || t;
4
+ var n = {
5
+ emptyValue: "—",
6
+ untitledCard: "Untitled card",
7
+ untitledFundingAccount: "Account",
8
+ cardStatus: e,
9
+ cardType: t
10
+ };
11
+ function r(e) {
12
+ return {
13
+ ...n,
14
+ ...e,
15
+ cardStatus: {
16
+ ...n.cardStatus,
17
+ ...e?.cardStatus
18
+ },
19
+ cardType: {
20
+ ...n.cardType,
21
+ ...e?.cardType
22
+ }
23
+ };
25
24
  }
26
25
  //#endregion
27
- export { r as formatCardLimit, i as maskAccountNumber, a as withFallback };
26
+ export { n as DEFAULT_CARDS_FEATURE_LABELS, r as resolveCardsFeatureLabels };