@tesouro/embedded-components-react 0.2.257 → 0.2.260
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 +21 -18
- package/dist/index.d.ts +156 -126
- package/dist/index.js +5 -5
- package/dist/lib/CardsWidget.d.ts +142 -14
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index8.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +23 -22
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +80 -78
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index5.js +13 -8
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +31 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +56 -34
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -239,27 +239,30 @@ A Monite-backed bill pay widget wrapped in Tesouro widget auth and theming.
|
|
|
239
239
|
|
|
240
240
|
### CardsWidget
|
|
241
241
|
|
|
242
|
-
One page of an organization's credit **or** 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.
|
|
242
|
+
One page of an organization's credit **or** 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. On a debit list with `cardArtSrc`, Create card opens the same sheet with the built-in debit issuance flow.
|
|
243
243
|
|
|
244
244
|
#### Props
|
|
245
245
|
|
|
246
|
-
| Prop | Type | Default | Description
|
|
247
|
-
| -------------------------- | --------------------------------------- | -------------- |
|
|
248
|
-
| `cardProgram` | `'credit' \| 'debit'` | **Required** | Which issuing program the list shows. Also selects the scopes that gate each affordance.
|
|
249
|
-
| `pagination` | `{ paginationToken?, pageSize? }` | `undefined` | Controlled cursor and page size. Supply with `onPaginationChange` when your app owns the list position.
|
|
250
|
-
| `defaultPagination` | `{ paginationToken?, pageSize? }` | First page, 10 | Initial cursor and page size when uncontrolled. Ignored when `pagination` is supplied.
|
|
251
|
-
| `onPaginationChange` | `(pagination) => void` | `undefined` | Called whenever the widget moves page or changes page size. Persist the whole object, not the token alone.
|
|
252
|
-
| `labels` | `PartialDeep<CardsWidgetLabels>` | English labels | Overrides the copy of the list screen, including the details sheet's screen-reader name under `detailsSheet`. Nested groups merge per group.
|
|
253
|
-
| `featureLabels` | `PartialDeep<CardsWidgetFeatureLabels>` | English labels | Overrides the copy this widget resolves rather than passes through — status and form-factor vocabulary, the empty-cell placeholder, and name fallbacks.
|
|
254
|
-
| `selectedCardId` | `string \| null` | `undefined` | Controlled selection of the card whose details panel is open. `null` closes it; omit for uncontrolled. See **Selection** below.
|
|
255
|
-
| `defaultSelectedCardId` | `string \| null` | `undefined` | Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied.
|
|
256
|
-
| `onSelectedCardIdChange` | `(cardId: string \| null) => void` | `undefined` | Fires whenever the open card changes, including on close (`null`). Supplying it does **not** change what renders.
|
|
257
|
-
| `cardDetailsLabels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Label overrides forwarded into the details panel.
|
|
258
|
-
| `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`.
|
|
259
|
-
| `bankLogoSrc` | `string` | `undefined` | Bank logo for the details panel's card face. Omit and the face renders without a logo rather than with a placeholder.
|
|
260
|
-
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`.
|
|
261
|
-
| `
|
|
262
|
-
| `
|
|
246
|
+
| Prop | Type | Default | Description |
|
|
247
|
+
| -------------------------- | --------------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
248
|
+
| `cardProgram` | `'credit' \| 'debit'` | **Required** | Which issuing program the list shows. Also selects the scopes that gate each affordance. |
|
|
249
|
+
| `pagination` | `{ paginationToken?, pageSize? }` | `undefined` | Controlled cursor and page size. Supply with `onPaginationChange` when your app owns the list position. |
|
|
250
|
+
| `defaultPagination` | `{ paginationToken?, pageSize? }` | First page, 10 | Initial cursor and page size when uncontrolled. Ignored when `pagination` is supplied. |
|
|
251
|
+
| `onPaginationChange` | `(pagination) => void` | `undefined` | Called whenever the widget moves page or changes page size. Persist the whole object, not the token alone. |
|
|
252
|
+
| `labels` | `PartialDeep<CardsWidgetLabels>` | English labels | Overrides the copy of the list screen, including the details sheet's screen-reader name under `detailsSheet` and the create sheet's under `createSheet`. Nested groups merge per group. |
|
|
253
|
+
| `featureLabels` | `PartialDeep<CardsWidgetFeatureLabels>` | English labels | Overrides the copy this widget resolves rather than passes through — status and form-factor vocabulary, the empty-cell placeholder, and name fallbacks. |
|
|
254
|
+
| `selectedCardId` | `string \| null` | `undefined` | Controlled selection of the card whose details panel is open. `null` closes it; omit for uncontrolled. See **Selection** below. |
|
|
255
|
+
| `defaultSelectedCardId` | `string \| null` | `undefined` | Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied. |
|
|
256
|
+
| `onSelectedCardIdChange` | `(cardId: string \| null) => void` | `undefined` | Fires whenever the open card changes, including on close (`null`). Supplying it does **not** change what renders. |
|
|
257
|
+
| `cardDetailsLabels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Label overrides forwarded into the details panel. |
|
|
258
|
+
| `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`. |
|
|
259
|
+
| `bankLogoSrc` | `string` | `undefined` | Bank logo for the details panel's card face. Omit and the face renders without a logo rather than with a placeholder. |
|
|
260
|
+
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`. |
|
|
261
|
+
| `cardArtSrc` | `string` | `undefined` | Plastic art for the built-in debit create sheet. Required for that sheet: omit it (with no `onCreateCard`) and Create card is hidden. See **Create card** below. |
|
|
262
|
+
| `createCardLabels` | `PartialDeep<CreateCardWidgetLabels>` | English labels | Label overrides forwarded into the nested create-card panel. |
|
|
263
|
+
| `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. |
|
|
264
|
+
| `onCreateCard` | `() => void` | `undefined` | Host-owned Create card handler. When supplied, the built-in debit sheet does not open. Credit Create card still requires this callback. |
|
|
265
|
+
| `onActivateCard` | `(cardId: string) => void` | `undefined` | Called when a row's Activate button is clicked. Omit it and the button is not rendered. |
|
|
263
266
|
|
|
264
267
|
### CardDetailsWidget
|
|
265
268
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1792,6 +1792,11 @@ interface CardsListLabels {
|
|
|
1792
1792
|
* sits here for a footer that lives in `shared/ui`.
|
|
1793
1793
|
*/
|
|
1794
1794
|
detailsSheet: CardsListDetailsSheetLabels;
|
|
1795
|
+
/**
|
|
1796
|
+
* Screen-reader copy for the same sheet when Create card is slotted in, rather
|
|
1797
|
+
* than a selected card's details. Same chrome, different accessible name.
|
|
1798
|
+
*/
|
|
1799
|
+
createSheet: CardsListDetailsSheetLabels;
|
|
1795
1800
|
}
|
|
1796
1801
|
|
|
1797
1802
|
/** Accessible copy for the panel header's controls. */
|
|
@@ -1931,14 +1936,130 @@ interface CardDetailsWidgetProps extends WidgetProviderProps {
|
|
|
1931
1936
|
*/
|
|
1932
1937
|
declare function CardDetailsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CardDetailsWidgetProps): React.JSX.Element;
|
|
1933
1938
|
|
|
1939
|
+
type PartialDeep$2<T> = {
|
|
1940
|
+
[K in keyof T]?: T[K] extends object ? PartialDeep$2<T[K]> : T[K];
|
|
1941
|
+
};
|
|
1942
|
+
interface CreateCardWidgetLabels {
|
|
1943
|
+
header: {
|
|
1944
|
+
title: string;
|
|
1945
|
+
closeAriaLabel: string;
|
|
1946
|
+
};
|
|
1947
|
+
cardArtAlt: string;
|
|
1948
|
+
setup: {
|
|
1949
|
+
sectionTitle: string;
|
|
1950
|
+
sectionDescription: string;
|
|
1951
|
+
cardholderLabel: string;
|
|
1952
|
+
cardholderPlaceholder: string;
|
|
1953
|
+
cardFormatLabel: string;
|
|
1954
|
+
cardFormatPlaceholder: string;
|
|
1955
|
+
cardFormatVirtual: string;
|
|
1956
|
+
cardFormatPhysical: string;
|
|
1957
|
+
fundingAccountLabel: string;
|
|
1958
|
+
fundingAccountPlaceholder: string;
|
|
1959
|
+
};
|
|
1960
|
+
mailing: {
|
|
1961
|
+
sectionTitle: string;
|
|
1962
|
+
sectionDescription: string;
|
|
1963
|
+
businessTitle: string;
|
|
1964
|
+
businessDescription: string;
|
|
1965
|
+
customTitle: string;
|
|
1966
|
+
customDescription: string;
|
|
1967
|
+
};
|
|
1968
|
+
manualAddress: {
|
|
1969
|
+
streetLabel: string;
|
|
1970
|
+
cityLabel: string;
|
|
1971
|
+
stateLabel: string;
|
|
1972
|
+
statePlaceholder: string;
|
|
1973
|
+
zipLabel: string;
|
|
1974
|
+
};
|
|
1975
|
+
preparing: {
|
|
1976
|
+
title: string;
|
|
1977
|
+
description: string;
|
|
1978
|
+
};
|
|
1979
|
+
success: {
|
|
1980
|
+
title: string;
|
|
1981
|
+
description: string;
|
|
1982
|
+
createAnother: string;
|
|
1983
|
+
viewCard: string;
|
|
1984
|
+
};
|
|
1985
|
+
footer: {
|
|
1986
|
+
cancel: string;
|
|
1987
|
+
createCard: string;
|
|
1988
|
+
};
|
|
1989
|
+
cardholderError: {
|
|
1990
|
+
title: string;
|
|
1991
|
+
description: string;
|
|
1992
|
+
retry: string;
|
|
1993
|
+
};
|
|
1994
|
+
fundingAccountError: {
|
|
1995
|
+
title: string;
|
|
1996
|
+
description: string;
|
|
1997
|
+
retry: string;
|
|
1998
|
+
};
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
interface CreateCardFeatureLabels {
|
|
2002
|
+
toast: {
|
|
2003
|
+
creating: string;
|
|
2004
|
+
success: string;
|
|
2005
|
+
error: string;
|
|
2006
|
+
};
|
|
2007
|
+
untitledFundingAccount: string;
|
|
2008
|
+
/**
|
|
2009
|
+
* Success-screen copy chosen from the create response's `cardStatus`.
|
|
2010
|
+
* Active/ready wording lives on the UI defaults; these cover statuses that
|
|
2011
|
+
* must not claim the card is already usable.
|
|
2012
|
+
*/
|
|
2013
|
+
success: {
|
|
2014
|
+
pendingActivationTitle: string;
|
|
2015
|
+
pendingActivationDescription: string;
|
|
2016
|
+
createdTitle: string;
|
|
2017
|
+
createdDescription: string;
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
declare const CREATE_CARD_FEATURE_LABELS_EN: CreateCardFeatureLabels;
|
|
2021
|
+
declare function resolveCreateCardFeatureLabels(overrides?: Partial<{
|
|
2022
|
+
toast: Partial<CreateCardFeatureLabels['toast']>;
|
|
2023
|
+
untitledFundingAccount: string;
|
|
2024
|
+
success: Partial<CreateCardFeatureLabels['success']>;
|
|
2025
|
+
}>): CreateCardFeatureLabels;
|
|
2026
|
+
|
|
2027
|
+
type CreateCardWidgetProps = WidgetProviderProps & {
|
|
2028
|
+
/** Static card plastic image URL (no overlays). Host / white-label supplied. */
|
|
2029
|
+
cardArtSrc: string;
|
|
2030
|
+
labels?: PartialDeep$2<CreateCardWidgetLabels>;
|
|
2031
|
+
featureLabels?: Partial<{
|
|
2032
|
+
toast: Partial<CreateCardFeatureLabels['toast']>;
|
|
2033
|
+
untitledFundingAccount: string;
|
|
2034
|
+
success: Partial<CreateCardFeatureLabels['success']>;
|
|
2035
|
+
}>;
|
|
2036
|
+
className?: string;
|
|
2037
|
+
onClose?: () => void;
|
|
2038
|
+
onCancel?: () => void;
|
|
2039
|
+
/** Fired with the new debit card id after a successful create. */
|
|
2040
|
+
onViewCard?: (cardId: string) => void;
|
|
2041
|
+
};
|
|
2042
|
+
/**
|
|
2043
|
+
* Self-contained Create Card widget. Issues a debit card via the Embed API and
|
|
2044
|
+
* drives setup → preparing → success with sonner toasts for the mutation.
|
|
2045
|
+
*/
|
|
2046
|
+
declare function CreateCardWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CreateCardWidgetProps): React.JSX.Element;
|
|
2047
|
+
|
|
2048
|
+
/** Opaque UI format values — mapped to API `DebitCardType` in the feature. */
|
|
2049
|
+
declare const CardFormatValue: {
|
|
2050
|
+
readonly Virtual: "virtual";
|
|
2051
|
+
readonly Physical: "physical";
|
|
2052
|
+
};
|
|
2053
|
+
type CardFormatValue = (typeof CardFormatValue)[keyof typeof CardFormatValue];
|
|
2054
|
+
|
|
1934
2055
|
/**
|
|
1935
2056
|
* Every key of `T` optional, recursively, so a consumer can override one nested
|
|
1936
2057
|
* label without restating its siblings. Defined locally because the repo has no
|
|
1937
2058
|
* shared deep-partial type and does not depend on `type-fest` — same helper the
|
|
1938
2059
|
* two card `ui` libs declare.
|
|
1939
2060
|
*/
|
|
1940
|
-
type PartialDeep$
|
|
1941
|
-
[K in keyof T]?: T[K] extends object ? PartialDeep$
|
|
2061
|
+
type PartialDeep$1<T> = {
|
|
2062
|
+
[K in keyof T]?: T[K] extends object ? PartialDeep$1<T[K]> : T[K];
|
|
1942
2063
|
};
|
|
1943
2064
|
/**
|
|
1944
2065
|
* Strings this layer produces rather than passes through.
|
|
@@ -2026,7 +2147,7 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
2026
2147
|
* the list library receives those values already formatted and so has no key
|
|
2027
2148
|
* for them; `BankAccountsWidget.featureLabels` is the same split.
|
|
2028
2149
|
*/
|
|
2029
|
-
featureLabels?: PartialDeep$
|
|
2150
|
+
featureLabels?: PartialDeep$1<CardsFeatureLabels>;
|
|
2030
2151
|
/**
|
|
2031
2152
|
* The card whose details panel is open. Supply with `onSelectedCardIdChange`
|
|
2032
2153
|
* when the host owns that state — a deep-linked `/cards/[id]`, say. `null`
|
|
@@ -2081,13 +2202,32 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
2081
2202
|
bankLogoSrc?: string;
|
|
2082
2203
|
bankLogoAlt?: string;
|
|
2083
2204
|
/**
|
|
2084
|
-
*
|
|
2085
|
-
*
|
|
2086
|
-
*
|
|
2087
|
-
*
|
|
2088
|
-
*
|
|
2089
|
-
|
|
2090
|
-
|
|
2205
|
+
* Plastic art for the built-in debit create sheet. Forwarded verbatim into
|
|
2206
|
+
* nested `CreateCardWidget`. Required for that sheet: omitting it (with no
|
|
2207
|
+
* host `onCreateCard`) hides Create card rather than opening a panel that
|
|
2208
|
+
* cannot render. Same PLAT-1179 / ADR 0005 rule as `bankLogoSrc` — the package
|
|
2209
|
+
* ships no card artwork.
|
|
2210
|
+
*/
|
|
2211
|
+
cardArtSrc?: string;
|
|
2212
|
+
/**
|
|
2213
|
+
* Label overrides forwarded into the nested create-card panel. Indexed off
|
|
2214
|
+
* `CreateCardWidgetProps` so the forwarded and received types cannot drift,
|
|
2215
|
+
* the same feature → feature edge as `cardDetailsLabels`.
|
|
2216
|
+
*/
|
|
2217
|
+
createCardLabels?: CreateCardWidgetProps['labels'];
|
|
2218
|
+
/**
|
|
2219
|
+
* Overrides for the copy the create panel's *feature* layer resolves — mutation
|
|
2220
|
+
* toasts, the untitled funding-account fallback, and pending-activation success
|
|
2221
|
+
* copy.
|
|
2222
|
+
*/
|
|
2223
|
+
createCardFeatureLabels?: CreateCardWidgetProps['featureLabels'];
|
|
2224
|
+
/**
|
|
2225
|
+
* Called when Create card is clicked. When supplied, the host owns the
|
|
2226
|
+
* gesture: the built-in debit sheet does **not** open. Omit it on a debit list
|
|
2227
|
+
* with `cardArtSrc` to use the built-in `CreateCardWidget` sheet. Credit has
|
|
2228
|
+
* no in-package issuance widget, so credit Create card still requires this
|
|
2229
|
+
* callback — omitting it hides the button rather than offering a control that
|
|
2230
|
+
* does nothing.
|
|
2091
2231
|
*/
|
|
2092
2232
|
onCreateCard?: () => void;
|
|
2093
2233
|
/**
|
|
@@ -2113,128 +2253,18 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
2113
2253
|
* query param, or take navigation over entirely — the widget itself reads no
|
|
2114
2254
|
* router and no search params.
|
|
2115
2255
|
*
|
|
2256
|
+
* On a debit list with `cardArtSrc`, Create card opens the same sheet with
|
|
2257
|
+
* nested `CreateCardWidget`. A host `onCreateCard` still takes over that
|
|
2258
|
+
* gesture (credit, or a custom debit flow). The two panels are mutually
|
|
2259
|
+
* exclusive: opening one closes the other. Success **View card** selects the
|
|
2260
|
+
* new debit card so its details open.
|
|
2261
|
+
*
|
|
2116
2262
|
* A pure provider wrapper — every hook lives in `CardsWidgetInner` so it runs
|
|
2117
2263
|
* inside `WidgetProvider`'s subtree, which is what the data-access hooks read
|
|
2118
2264
|
* their client, org and token from.
|
|
2119
2265
|
*/
|
|
2120
2266
|
declare function CardsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CardsWidgetProps): React.JSX.Element;
|
|
2121
2267
|
|
|
2122
|
-
type PartialDeep$1<T> = {
|
|
2123
|
-
[K in keyof T]?: T[K] extends object ? PartialDeep$1<T[K]> : T[K];
|
|
2124
|
-
};
|
|
2125
|
-
interface CreateCardWidgetLabels {
|
|
2126
|
-
header: {
|
|
2127
|
-
title: string;
|
|
2128
|
-
closeAriaLabel: string;
|
|
2129
|
-
};
|
|
2130
|
-
cardArtAlt: string;
|
|
2131
|
-
setup: {
|
|
2132
|
-
sectionTitle: string;
|
|
2133
|
-
sectionDescription: string;
|
|
2134
|
-
cardholderLabel: string;
|
|
2135
|
-
cardholderPlaceholder: string;
|
|
2136
|
-
cardFormatLabel: string;
|
|
2137
|
-
cardFormatPlaceholder: string;
|
|
2138
|
-
cardFormatVirtual: string;
|
|
2139
|
-
cardFormatPhysical: string;
|
|
2140
|
-
fundingAccountLabel: string;
|
|
2141
|
-
fundingAccountPlaceholder: string;
|
|
2142
|
-
};
|
|
2143
|
-
mailing: {
|
|
2144
|
-
sectionTitle: string;
|
|
2145
|
-
sectionDescription: string;
|
|
2146
|
-
businessTitle: string;
|
|
2147
|
-
businessDescription: string;
|
|
2148
|
-
customTitle: string;
|
|
2149
|
-
customDescription: string;
|
|
2150
|
-
};
|
|
2151
|
-
manualAddress: {
|
|
2152
|
-
streetLabel: string;
|
|
2153
|
-
cityLabel: string;
|
|
2154
|
-
stateLabel: string;
|
|
2155
|
-
statePlaceholder: string;
|
|
2156
|
-
zipLabel: string;
|
|
2157
|
-
};
|
|
2158
|
-
preparing: {
|
|
2159
|
-
title: string;
|
|
2160
|
-
description: string;
|
|
2161
|
-
};
|
|
2162
|
-
success: {
|
|
2163
|
-
title: string;
|
|
2164
|
-
description: string;
|
|
2165
|
-
createAnother: string;
|
|
2166
|
-
viewCard: string;
|
|
2167
|
-
};
|
|
2168
|
-
footer: {
|
|
2169
|
-
cancel: string;
|
|
2170
|
-
createCard: string;
|
|
2171
|
-
};
|
|
2172
|
-
cardholderError: {
|
|
2173
|
-
title: string;
|
|
2174
|
-
description: string;
|
|
2175
|
-
retry: string;
|
|
2176
|
-
};
|
|
2177
|
-
fundingAccountError: {
|
|
2178
|
-
title: string;
|
|
2179
|
-
description: string;
|
|
2180
|
-
retry: string;
|
|
2181
|
-
};
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
interface CreateCardFeatureLabels {
|
|
2185
|
-
toast: {
|
|
2186
|
-
creating: string;
|
|
2187
|
-
success: string;
|
|
2188
|
-
error: string;
|
|
2189
|
-
};
|
|
2190
|
-
untitledFundingAccount: string;
|
|
2191
|
-
/**
|
|
2192
|
-
* Success-screen copy chosen from the create response's `cardStatus`.
|
|
2193
|
-
* Active/ready wording lives on the UI defaults; these cover statuses that
|
|
2194
|
-
* must not claim the card is already usable.
|
|
2195
|
-
*/
|
|
2196
|
-
success: {
|
|
2197
|
-
pendingActivationTitle: string;
|
|
2198
|
-
pendingActivationDescription: string;
|
|
2199
|
-
createdTitle: string;
|
|
2200
|
-
createdDescription: string;
|
|
2201
|
-
};
|
|
2202
|
-
}
|
|
2203
|
-
declare const CREATE_CARD_FEATURE_LABELS_EN: CreateCardFeatureLabels;
|
|
2204
|
-
declare function resolveCreateCardFeatureLabels(overrides?: Partial<{
|
|
2205
|
-
toast: Partial<CreateCardFeatureLabels['toast']>;
|
|
2206
|
-
untitledFundingAccount: string;
|
|
2207
|
-
success: Partial<CreateCardFeatureLabels['success']>;
|
|
2208
|
-
}>): CreateCardFeatureLabels;
|
|
2209
|
-
|
|
2210
|
-
type CreateCardWidgetProps = WidgetProviderProps & {
|
|
2211
|
-
/** Static card plastic image URL (no overlays). Host / white-label supplied. */
|
|
2212
|
-
cardArtSrc: string;
|
|
2213
|
-
labels?: PartialDeep$1<CreateCardWidgetLabels>;
|
|
2214
|
-
featureLabels?: Partial<{
|
|
2215
|
-
toast: Partial<CreateCardFeatureLabels['toast']>;
|
|
2216
|
-
untitledFundingAccount: string;
|
|
2217
|
-
success: Partial<CreateCardFeatureLabels['success']>;
|
|
2218
|
-
}>;
|
|
2219
|
-
className?: string;
|
|
2220
|
-
onClose?: () => void;
|
|
2221
|
-
onCancel?: () => void;
|
|
2222
|
-
/** Fired with the new debit card id after a successful create. */
|
|
2223
|
-
onViewCard?: (cardId: string) => void;
|
|
2224
|
-
};
|
|
2225
|
-
/**
|
|
2226
|
-
* Self-contained Create Card widget. Issues a debit card via the Embed API and
|
|
2227
|
-
* drives setup → preparing → success with sonner toasts for the mutation.
|
|
2228
|
-
*/
|
|
2229
|
-
declare function CreateCardWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CreateCardWidgetProps): React.JSX.Element;
|
|
2230
|
-
|
|
2231
|
-
/** Opaque UI format values — mapped to API `DebitCardType` in the feature. */
|
|
2232
|
-
declare const CardFormatValue: {
|
|
2233
|
-
readonly Virtual: "virtual";
|
|
2234
|
-
readonly Physical: "physical";
|
|
2235
|
-
};
|
|
2236
|
-
type CardFormatValue = (typeof CardFormatValue)[keyof typeof CardFormatValue];
|
|
2237
|
-
|
|
2238
2268
|
interface AddressFieldGroupLabels {
|
|
2239
2269
|
line1: string;
|
|
2240
2270
|
line2: string;
|
package/dist/index.js
CHANGED
|
@@ -18,12 +18,12 @@ import { CounterpartsWidget as S } from "./libs/tesouro-embedded-components-reac
|
|
|
18
18
|
import { BillPayWidget as C } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js";
|
|
19
19
|
import "./lib/BillPayWidget.js";
|
|
20
20
|
import { CardDetailsWidget as w } from "./libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js";
|
|
21
|
-
import {
|
|
21
|
+
import { CardFormatValue as T } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index3.js";
|
|
22
|
+
import { CREATE_CARD_FEATURE_LABELS_EN as E, resolveCreateCardFeatureLabels as D } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index4.js";
|
|
23
|
+
import { CreateCardWidget as O } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js";
|
|
24
|
+
import { CardsWidget as k } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js";
|
|
22
25
|
import "./lib/CardsWidget.js";
|
|
23
26
|
import "./lib/CardDetailsWidget.js";
|
|
24
|
-
import { CardFormatValue as E } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index3.js";
|
|
25
|
-
import { CREATE_CARD_FEATURE_LABELS_EN as D, resolveCreateCardFeatureLabels as O } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index4.js";
|
|
26
|
-
import { CreateCardWidget as k } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js";
|
|
27
27
|
import "./lib/CreateCardWidget.js";
|
|
28
28
|
import "./lib/CounterpartsWidget.js";
|
|
29
29
|
import { ExpenseApprovalPoliciesWidget as A } from "./libs/tesouro-embedded-components-react/expense-approval-policies-widget/feature/dist/lib/ExpenseApprovalPoliciesWidgetFeature.js";
|
|
@@ -83,4 +83,4 @@ import "./lib/TransfersWidget.js";
|
|
|
83
83
|
import "./lib/UploadReceiptWidget.js";
|
|
84
84
|
import { WidgetProvider as me } from "./lib/WidgetProviderPublic.js";
|
|
85
85
|
import "./lib/WidgetProvider.js";
|
|
86
|
-
export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, V as ACCOUNT_DELETE_DIALOG_LABELS_EN, H as ACCOUNT_FORM_SHEET_LABELS_EN, ee as ADDITIONAL_OWNERS_LABELS_EN, b as AcceptDisclosuresWidget, K as AccountDeleteDialog, G as AccountFormSheet, P as BALANCES_WIDGET_LABELS_EN, te as BUSINESS_DETAILS_LABELS_EN, F as BalancesWidget, ie as BankAccountOnboardingWidget, x as BankAccountsWidget, C as BillPayWidget, U as CHART_OF_ACCOUNTS_LABELS_EN, B as CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN,
|
|
86
|
+
export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, V as ACCOUNT_DELETE_DIALOG_LABELS_EN, H as ACCOUNT_FORM_SHEET_LABELS_EN, ee as ADDITIONAL_OWNERS_LABELS_EN, b as AcceptDisclosuresWidget, K as AccountDeleteDialog, G as AccountFormSheet, P as BALANCES_WIDGET_LABELS_EN, te as BUSINESS_DETAILS_LABELS_EN, F as BalancesWidget, ie as BankAccountOnboardingWidget, x as BankAccountsWidget, C as BillPayWidget, U as CHART_OF_ACCOUNTS_LABELS_EN, B as CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN, E as CREATE_CARD_FEATURE_LABELS_EN, w as CardDetailsWidget, T as CardFormatValue, k as CardsWidget, W as ChartOfAccountsTable, q as ChartOfAccountsWidget, S as CounterpartsWidget, O as CreateCardWidget, A as ExpenseApprovalPoliciesWidget, N as ExpenseManagementWidget, j as ExpenseRequirementsWidget, Y as HELP_FAQ_EN, J as HELP_WIDGET_LABELS_EN, X as HelpWidget, I as INSIGHTS_FEATURE_LABELS_EN, L as INSIGHTS_WIDGET_LABELS_EN, n as Implementation, z as InsightsWidget, Z as InvoicingWidget, $ as LinkedAccountsWidget, ne as PERSONAL_DETAILS_LABELS_EN, ae as ProductsWidget, oe as ProfileWidget, re as RESULT_LABELS_EN, se as ReceiptMatchWidget, Q as ReceivablesWidget, m as RefreshingRootWidgetProvider, d as RootWidgetProvider, R as SINGLE_INSIGHT_LABELS_EN, ue as SettingsWidget, de as TRANSFERS_FEATURE_LABELS_EN, fe as TRANSFERS_WIDGET_LABELS_EN, ce as TagsWidget, le as TeamWidget, pe as TransfersWidget, c as UIFramework, M as UploadReceiptWidget, me as WidgetProvider, f as WidgetTokenRefreshProvider, t as cloneEmbeddedClient, r as getGlobalWidgetConfig, o as getGlobalWidgetInitState, l as registerDesignSystemEnsurer, u as registerUIRenderers, D as resolveCreateCardFeatureLabels, i as setGlobalWidgetConfig, s as subscribeToGlobalWidgetInitState, a as updateGlobalWidgetConfig, h as useOwnWidgetConfig, g as useRefetchWidget, _ as useWidgetConfig, v as useWidgetError, y as useWidgetLoading, p as useWidgetToken };
|
|
@@ -34,8 +34,8 @@ interface PaginationFooterLabels {
|
|
|
34
34
|
* label without restating its siblings. Defined locally because the repo has no
|
|
35
35
|
* shared deep-partial type and does not depend on `type-fest`.
|
|
36
36
|
*/
|
|
37
|
-
type PartialDeep$
|
|
38
|
-
[K in keyof T]?: T[K] extends object ? PartialDeep$
|
|
37
|
+
type PartialDeep$3<T> = {
|
|
38
|
+
[K in keyof T]?: T[K] extends object ? PartialDeep$3<T[K]> : T[K];
|
|
39
39
|
};
|
|
40
40
|
interface CardsListColumnHeaderLabels {
|
|
41
41
|
cardName: string;
|
|
@@ -103,6 +103,11 @@ interface CardsListLabels {
|
|
|
103
103
|
* sits here for a footer that lives in `shared/ui`.
|
|
104
104
|
*/
|
|
105
105
|
detailsSheet: CardsListDetailsSheetLabels;
|
|
106
|
+
/**
|
|
107
|
+
* Screen-reader copy for the same sheet when Create card is slotted in, rather
|
|
108
|
+
* than a selected card's details. Same chrome, different accessible name.
|
|
109
|
+
*/
|
|
110
|
+
createSheet: CardsListDetailsSheetLabels;
|
|
106
111
|
}
|
|
107
112
|
|
|
108
113
|
type AuthToken = string | undefined;
|
|
@@ -744,8 +749,8 @@ interface CardDetailsPanelLabels {
|
|
|
744
749
|
* has an identical one for the panel's labels, and this declaration also types
|
|
745
750
|
* that prop here so the widget carries one such helper rather than two.
|
|
746
751
|
*/
|
|
747
|
-
type PartialDeep$
|
|
748
|
-
[K in keyof T]?: T[K] extends object ? PartialDeep$
|
|
752
|
+
type PartialDeep$2<T> = {
|
|
753
|
+
[K in keyof T]?: T[K] extends object ? PartialDeep$2<T[K]> : T[K];
|
|
749
754
|
};
|
|
750
755
|
/**
|
|
751
756
|
* Copy the **feature** layer owns, as opposed to the panel's own
|
|
@@ -798,9 +803,9 @@ interface CardDetailsWidgetProps extends WidgetProviderProps {
|
|
|
798
803
|
*/
|
|
799
804
|
onClose?: () => void;
|
|
800
805
|
/** Overrides for the panel's own copy. */
|
|
801
|
-
labels?: PartialDeep$
|
|
806
|
+
labels?: PartialDeep$2<CardDetailsPanelLabels>;
|
|
802
807
|
/** Overrides for the copy this layer resolves — see `CardDetailsFeatureLabels`. */
|
|
803
|
-
featureLabels?: PartialDeep$
|
|
808
|
+
featureLabels?: PartialDeep$2<CardDetailsFeatureLabels>;
|
|
804
809
|
/**
|
|
805
810
|
* Bank logo for the card face. The widget ships no bank artwork of its own and
|
|
806
811
|
* resolves none from the init response: an embeddable library must not depend
|
|
@@ -813,6 +818,104 @@ interface CardDetailsWidgetProps extends WidgetProviderProps {
|
|
|
813
818
|
bankLogoAlt?: string;
|
|
814
819
|
}
|
|
815
820
|
|
|
821
|
+
type PartialDeep$1<T> = {
|
|
822
|
+
[K in keyof T]?: T[K] extends object ? PartialDeep$1<T[K]> : T[K];
|
|
823
|
+
};
|
|
824
|
+
interface CreateCardWidgetLabels {
|
|
825
|
+
header: {
|
|
826
|
+
title: string;
|
|
827
|
+
closeAriaLabel: string;
|
|
828
|
+
};
|
|
829
|
+
cardArtAlt: string;
|
|
830
|
+
setup: {
|
|
831
|
+
sectionTitle: string;
|
|
832
|
+
sectionDescription: string;
|
|
833
|
+
cardholderLabel: string;
|
|
834
|
+
cardholderPlaceholder: string;
|
|
835
|
+
cardFormatLabel: string;
|
|
836
|
+
cardFormatPlaceholder: string;
|
|
837
|
+
cardFormatVirtual: string;
|
|
838
|
+
cardFormatPhysical: string;
|
|
839
|
+
fundingAccountLabel: string;
|
|
840
|
+
fundingAccountPlaceholder: string;
|
|
841
|
+
};
|
|
842
|
+
mailing: {
|
|
843
|
+
sectionTitle: string;
|
|
844
|
+
sectionDescription: string;
|
|
845
|
+
businessTitle: string;
|
|
846
|
+
businessDescription: string;
|
|
847
|
+
customTitle: string;
|
|
848
|
+
customDescription: string;
|
|
849
|
+
};
|
|
850
|
+
manualAddress: {
|
|
851
|
+
streetLabel: string;
|
|
852
|
+
cityLabel: string;
|
|
853
|
+
stateLabel: string;
|
|
854
|
+
statePlaceholder: string;
|
|
855
|
+
zipLabel: string;
|
|
856
|
+
};
|
|
857
|
+
preparing: {
|
|
858
|
+
title: string;
|
|
859
|
+
description: string;
|
|
860
|
+
};
|
|
861
|
+
success: {
|
|
862
|
+
title: string;
|
|
863
|
+
description: string;
|
|
864
|
+
createAnother: string;
|
|
865
|
+
viewCard: string;
|
|
866
|
+
};
|
|
867
|
+
footer: {
|
|
868
|
+
cancel: string;
|
|
869
|
+
createCard: string;
|
|
870
|
+
};
|
|
871
|
+
cardholderError: {
|
|
872
|
+
title: string;
|
|
873
|
+
description: string;
|
|
874
|
+
retry: string;
|
|
875
|
+
};
|
|
876
|
+
fundingAccountError: {
|
|
877
|
+
title: string;
|
|
878
|
+
description: string;
|
|
879
|
+
retry: string;
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
interface CreateCardFeatureLabels {
|
|
884
|
+
toast: {
|
|
885
|
+
creating: string;
|
|
886
|
+
success: string;
|
|
887
|
+
error: string;
|
|
888
|
+
};
|
|
889
|
+
untitledFundingAccount: string;
|
|
890
|
+
/**
|
|
891
|
+
* Success-screen copy chosen from the create response's `cardStatus`.
|
|
892
|
+
* Active/ready wording lives on the UI defaults; these cover statuses that
|
|
893
|
+
* must not claim the card is already usable.
|
|
894
|
+
*/
|
|
895
|
+
success: {
|
|
896
|
+
pendingActivationTitle: string;
|
|
897
|
+
pendingActivationDescription: string;
|
|
898
|
+
createdTitle: string;
|
|
899
|
+
createdDescription: string;
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
type CreateCardWidgetProps = WidgetProviderProps & {
|
|
904
|
+
/** Static card plastic image URL (no overlays). Host / white-label supplied. */
|
|
905
|
+
cardArtSrc: string;
|
|
906
|
+
labels?: PartialDeep$1<CreateCardWidgetLabels>;
|
|
907
|
+
featureLabels?: Partial<{
|
|
908
|
+
toast: Partial<CreateCardFeatureLabels['toast']>;
|
|
909
|
+
untitledFundingAccount: string;
|
|
910
|
+
success: Partial<CreateCardFeatureLabels['success']>;
|
|
911
|
+
}>;
|
|
912
|
+
className?: string;
|
|
913
|
+
onClose?: () => void;
|
|
914
|
+
onCancel?: () => void;
|
|
915
|
+
/** Fired with the new debit card id after a successful create. */
|
|
916
|
+
onViewCard?: (cardId: string) => void;
|
|
917
|
+
};
|
|
918
|
+
|
|
816
919
|
/**
|
|
817
920
|
* Every key of `T` optional, recursively, so a consumer can override one nested
|
|
818
921
|
* label without restating its siblings. Defined locally because the repo has no
|
|
@@ -900,7 +1003,7 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
900
1003
|
* `ui` lib's own deep-partial helper (each labels module declares one — the
|
|
901
1004
|
* repo has no shared version) so this prop follows that library's contract.
|
|
902
1005
|
*/
|
|
903
|
-
labels?: PartialDeep$
|
|
1006
|
+
labels?: PartialDeep$3<CardsListLabels>;
|
|
904
1007
|
/**
|
|
905
1008
|
* Overrides for the copy this layer produces rather than passes through — the
|
|
906
1009
|
* status and form-factor vocabulary, the empty-cell placeholder, the nickname
|
|
@@ -963,13 +1066,32 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
963
1066
|
bankLogoSrc?: string;
|
|
964
1067
|
bankLogoAlt?: string;
|
|
965
1068
|
/**
|
|
966
|
-
*
|
|
967
|
-
*
|
|
968
|
-
*
|
|
969
|
-
*
|
|
970
|
-
*
|
|
971
|
-
|
|
972
|
-
|
|
1069
|
+
* Plastic art for the built-in debit create sheet. Forwarded verbatim into
|
|
1070
|
+
* nested `CreateCardWidget`. Required for that sheet: omitting it (with no
|
|
1071
|
+
* host `onCreateCard`) hides Create card rather than opening a panel that
|
|
1072
|
+
* cannot render. Same PLAT-1179 / ADR 0005 rule as `bankLogoSrc` — the package
|
|
1073
|
+
* ships no card artwork.
|
|
1074
|
+
*/
|
|
1075
|
+
cardArtSrc?: string;
|
|
1076
|
+
/**
|
|
1077
|
+
* Label overrides forwarded into the nested create-card panel. Indexed off
|
|
1078
|
+
* `CreateCardWidgetProps` so the forwarded and received types cannot drift,
|
|
1079
|
+
* the same feature → feature edge as `cardDetailsLabels`.
|
|
1080
|
+
*/
|
|
1081
|
+
createCardLabels?: CreateCardWidgetProps['labels'];
|
|
1082
|
+
/**
|
|
1083
|
+
* Overrides for the copy the create panel's *feature* layer resolves — mutation
|
|
1084
|
+
* toasts, the untitled funding-account fallback, and pending-activation success
|
|
1085
|
+
* copy.
|
|
1086
|
+
*/
|
|
1087
|
+
createCardFeatureLabels?: CreateCardWidgetProps['featureLabels'];
|
|
1088
|
+
/**
|
|
1089
|
+
* Called when Create card is clicked. When supplied, the host owns the
|
|
1090
|
+
* gesture: the built-in debit sheet does **not** open. Omit it on a debit list
|
|
1091
|
+
* with `cardArtSrc` to use the built-in `CreateCardWidget` sheet. Credit has
|
|
1092
|
+
* no in-package issuance widget, so credit Create card still requires this
|
|
1093
|
+
* callback — omitting it hides the button rather than offering a control that
|
|
1094
|
+
* does nothing.
|
|
973
1095
|
*/
|
|
974
1096
|
onCreateCard?: () => void;
|
|
975
1097
|
/**
|
|
@@ -995,6 +1117,12 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
995
1117
|
* query param, or take navigation over entirely — the widget itself reads no
|
|
996
1118
|
* router and no search params.
|
|
997
1119
|
*
|
|
1120
|
+
* On a debit list with `cardArtSrc`, Create card opens the same sheet with
|
|
1121
|
+
* nested `CreateCardWidget`. A host `onCreateCard` still takes over that
|
|
1122
|
+
* gesture (credit, or a custom debit flow). The two panels are mutually
|
|
1123
|
+
* exclusive: opening one closes the other. Success **View card** selects the
|
|
1124
|
+
* new debit card so its details open.
|
|
1125
|
+
*
|
|
998
1126
|
* A pure provider wrapper — every hook lives in `CardsWidgetInner` so it runs
|
|
999
1127
|
* inside `WidgetProvider`'s subtree, which is what the data-access hooks read
|
|
1000
1128
|
* their client, org and token from.
|
|
@@ -122,6 +122,7 @@ function b({ accountId: b, onBack: me, labels: he, featureLabels: ge, isBankingT
|
|
|
122
122
|
bankLogoSrc: ve,
|
|
123
123
|
bankLogoAlt: ye,
|
|
124
124
|
balanceLabel: Ve,
|
|
125
|
+
balanceTestId: "bank-accounts-widget-detail-balance",
|
|
125
126
|
isBankingTaglineVisible: _e,
|
|
126
127
|
activeTab: A,
|
|
127
128
|
transactionRows: Z,
|
|
@@ -135,6 +136,7 @@ function b({ accountId: b, onBack: me, labels: he, featureLabels: ge, isBankingT
|
|
|
135
136
|
disabledExportEndDates: Ge,
|
|
136
137
|
accountNumberLabel: K?.accountNumber ?? "",
|
|
137
138
|
maskedAccountNumberLabel: ae(K?.accountNumber ?? ""),
|
|
139
|
+
accountNumberTestId: "bank-accounts-widget-detail-account-number",
|
|
138
140
|
wireAccountNumberLabel: K?.accountNumber ?? "",
|
|
139
141
|
routingNumberLabel: K?.routingNumber ?? "",
|
|
140
142
|
bankAddressLabel: J,
|