@tesouro/embedded-components-react 0.4.5 → 0.4.6
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 +37 -37
- package/dist/index.d.ts +14 -8
- package/dist/lib/CreditCardsWidget.d.ts +4 -2
- package/dist/lib/DebitCardsWidget.d.ts +4 -2
- package/dist/lib/WidgetSuite.d.ts +14 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +72 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +77 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +47 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +91 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +33 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +168 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +23 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +199 -203
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +198 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +105 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +19 -342
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +344 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +4 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +28 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +152 -131
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +84 -87
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +12 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -265,23 +265,23 @@ One page of an organization's **credit** cards, with a scope-gated "Show my card
|
|
|
265
265
|
|
|
266
266
|
#### Props
|
|
267
267
|
|
|
268
|
-
| Prop | Type | Default | Description
|
|
269
|
-
| --------------------------- | --------------------------------------- | -------------- |
|
|
270
|
-
| `pagination` | `{ paginationToken?, pageSize? }` | `undefined` | Controlled cursor and page size. Supply with `onPaginationChange` when your app owns the list position.
|
|
271
|
-
| `defaultPagination` | `{ paginationToken?, pageSize? }` | First page, 10 | Initial cursor and page size when uncontrolled. Ignored when `pagination` is supplied.
|
|
272
|
-
| `onPaginationChange` | `(pagination: CardsPagination) => void` | `undefined` | Called whenever the widget moves page or changes page size. Persist the whole object, not the token alone.
|
|
273
|
-
| `labels` | `PartialDeep<CardsLabels>` | English labels | Overrides the copy of the list screen,
|
|
274
|
-
| `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.
|
|
275
|
-
| `selectedCardId` | `string \| null` | `undefined` | Controlled selection of the card whose details panel is open. `null` closes it; omit for uncontrolled. See **Selection** below.
|
|
276
|
-
| `defaultSelectedCardId` | `string \| null` | `undefined` | Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied.
|
|
277
|
-
| `onSelectedCardIdChange` | `(cardId: string \| null) => void` | `undefined` | Fires whenever the open card changes, including on close (`null`). Supplying it does **not** change what renders.
|
|
278
|
-
| `cardDetailsLabels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Label overrides forwarded into the details panel.
|
|
279
|
-
| `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`.
|
|
280
|
-
| `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.
|
|
281
|
-
| `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.
|
|
282
|
-
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`.
|
|
283
|
-
| `onCreateCard` | `() => void` | `undefined` | Host-owned Create card handler. Required for the button to render at all. See **Create card** below.
|
|
284
|
-
| `onActivateCard` | `(cardId: string) => void` | `undefined` | Called when a row's Activate button is clicked. Omit it and the button is not rendered.
|
|
268
|
+
| Prop | Type | Default | Description |
|
|
269
|
+
| --------------------------- | --------------------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
270
|
+
| `pagination` | `{ paginationToken?, pageSize? }` | `undefined` | Controlled cursor and page size. Supply with `onPaginationChange` when your app owns the list position. |
|
|
271
|
+
| `defaultPagination` | `{ paginationToken?, pageSize? }` | First page, 10 | Initial cursor and page size when uncontrolled. Ignored when `pagination` is supplied. |
|
|
272
|
+
| `onPaginationChange` | `(pagination: CardsPagination) => void` | `undefined` | Called whenever the widget moves page or changes page size. Persist the whole object, not the token alone. |
|
|
273
|
+
| `labels` | `PartialDeep<CardsLabels>` | English labels | Overrides the copy of the list screen — its controls, columns, states, and the details sheet's screen-reader name under `detailsSheet`. Nested groups merge per group. |
|
|
274
|
+
| `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. |
|
|
275
|
+
| `selectedCardId` | `string \| null` | `undefined` | Controlled selection of the card whose details panel is open. `null` closes it; omit for uncontrolled. See **Selection** below. |
|
|
276
|
+
| `defaultSelectedCardId` | `string \| null` | `undefined` | Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied. |
|
|
277
|
+
| `onSelectedCardIdChange` | `(cardId: string \| null) => void` | `undefined` | Fires whenever the open card changes, including on close (`null`). Supplying it does **not** change what renders. |
|
|
278
|
+
| `cardDetailsLabels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Label overrides forwarded into the details panel. |
|
|
279
|
+
| `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`. |
|
|
280
|
+
| `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. |
|
|
281
|
+
| `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. |
|
|
282
|
+
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`. |
|
|
283
|
+
| `onCreateCard` | `() => void` | `undefined` | Host-owned Create card handler. Required for the button to render at all. See **Create card** below. |
|
|
284
|
+
| `onActivateCard` | `(cardId: string) => void` | `undefined` | Called when a row's Activate button is clicked. Omit it and the button is not rendered. |
|
|
285
285
|
|
|
286
286
|
### DebitCardsWidget
|
|
287
287
|
|
|
@@ -289,26 +289,26 @@ One page of an organization's **debit** cards, with a scope-gated "Show my cards
|
|
|
289
289
|
|
|
290
290
|
#### Props
|
|
291
291
|
|
|
292
|
-
| Prop | Type | Default | Description
|
|
293
|
-
| --------------------------- | --------------------------------------- | -------------- |
|
|
294
|
-
| `pagination` | `{ paginationToken?, pageSize? }` | `undefined` | Controlled cursor and page size. Supply with `onPaginationChange` when your app owns the list position.
|
|
295
|
-
| `defaultPagination` | `{ paginationToken?, pageSize? }` | First page, 10 | Initial cursor and page size when uncontrolled. Ignored when `pagination` is supplied.
|
|
296
|
-
| `onPaginationChange` | `(pagination: CardsPagination) => void` | `undefined` | Called whenever the widget moves page or changes page size. Persist the whole object, not the token alone.
|
|
297
|
-
| `labels` | `PartialDeep<CardsLabels>` | English labels | Overrides the copy of the list screen,
|
|
298
|
-
| `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.
|
|
299
|
-
| `selectedCardId` | `string \| null` | `undefined` | Controlled selection of the card whose details panel is open. `null` closes it; omit for uncontrolled. See **Selection** below.
|
|
300
|
-
| `defaultSelectedCardId` | `string \| null` | `undefined` | Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied.
|
|
301
|
-
| `onSelectedCardIdChange` | `(cardId: string \| null) => void` | `undefined` | Fires whenever the open card changes, including on close (`null`). Supplying it does **not** change what renders.
|
|
302
|
-
| `cardDetailsLabels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Label overrides forwarded into the details panel.
|
|
303
|
-
| `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`.
|
|
304
|
-
| `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.
|
|
305
|
-
| `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.
|
|
306
|
-
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`.
|
|
307
|
-
| `cardArtSrc` | `string` | `undefined` | Plastic art for the built-in create sheet. Required for that sheet: omit it (with no `onCreateCard`) and Create card is hidden. See **Create card** below.
|
|
308
|
-
| `createCardLabels` | `PartialDeep<CreateCardWidgetLabels>` | English labels | Label overrides forwarded into the nested create-card panel.
|
|
309
|
-
| `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.
|
|
310
|
-
| `onCreateCard` | `() => void` | `undefined` | Host-owned Create card handler. When supplied, the built-in sheet does not open — use it for a custom issuance flow.
|
|
311
|
-
| `onActivateCard` | `(cardId: string) => void` | `undefined` | Called when a row's Activate button is clicked. Omit it and the button is not rendered.
|
|
292
|
+
| Prop | Type | Default | Description |
|
|
293
|
+
| --------------------------- | --------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
294
|
+
| `pagination` | `{ paginationToken?, pageSize? }` | `undefined` | Controlled cursor and page size. Supply with `onPaginationChange` when your app owns the list position. |
|
|
295
|
+
| `defaultPagination` | `{ paginationToken?, pageSize? }` | First page, 10 | Initial cursor and page size when uncontrolled. Ignored when `pagination` is supplied. |
|
|
296
|
+
| `onPaginationChange` | `(pagination: CardsPagination) => void` | `undefined` | Called whenever the widget moves page or changes page size. Persist the whole object, not the token alone. |
|
|
297
|
+
| `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. |
|
|
298
|
+
| `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. |
|
|
299
|
+
| `selectedCardId` | `string \| null` | `undefined` | Controlled selection of the card whose details panel is open. `null` closes it; omit for uncontrolled. See **Selection** below. |
|
|
300
|
+
| `defaultSelectedCardId` | `string \| null` | `undefined` | Initial selection when uncontrolled. Ignored when `selectedCardId` is supplied. |
|
|
301
|
+
| `onSelectedCardIdChange` | `(cardId: string \| null) => void` | `undefined` | Fires whenever the open card changes, including on close (`null`). Supplying it does **not** change what renders. |
|
|
302
|
+
| `cardDetailsLabels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Label overrides forwarded into the details panel. |
|
|
303
|
+
| `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`. |
|
|
304
|
+
| `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. |
|
|
305
|
+
| `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. |
|
|
306
|
+
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`. |
|
|
307
|
+
| `cardArtSrc` | `string` | `undefined` | Plastic art for the built-in create sheet. Required for that sheet: omit it (with no `onCreateCard`) and Create card is hidden. See **Create card** below. |
|
|
308
|
+
| `createCardLabels` | `PartialDeep<CreateCardWidgetLabels>` | English labels | Label overrides forwarded into the nested create-card panel. |
|
|
309
|
+
| `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. |
|
|
310
|
+
| `onCreateCard` | `() => void` | `undefined` | Host-owned Create card handler. When supplied, the built-in sheet does not open — use it for a custom issuance flow. |
|
|
311
|
+
| `onActivateCard` | `(cardId: string) => void` | `undefined` | Called when a row's Activate button is clicked. Omit it and the button is not rendered. |
|
|
312
312
|
|
|
313
313
|
### CardDetailsWidget
|
|
314
314
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1588,8 +1588,10 @@ interface CardsListDetailsSheetLabels {
|
|
|
1588
1588
|
* wording change is not a breaking rename.
|
|
1589
1589
|
*/
|
|
1590
1590
|
interface CardsListLabels {
|
|
1591
|
-
|
|
1592
|
-
|
|
1591
|
+
/**
|
|
1592
|
+
* Accessible name for the list region. Not a heading: the list renders none,
|
|
1593
|
+
* because whoever mounts it names it (embedded ADR 0010).
|
|
1594
|
+
*/
|
|
1593
1595
|
regionLabel: string;
|
|
1594
1596
|
columnHeaders: CardsListColumnHeaderLabels;
|
|
1595
1597
|
/** Screen-reader name for the unheaded trailing row-actions column. */
|
|
@@ -2858,15 +2860,19 @@ interface WidgetSuiteDashboardLabels {
|
|
|
2858
2860
|
insights?: WidgetSuiteInsightsLabels;
|
|
2859
2861
|
}
|
|
2860
2862
|
/**
|
|
2861
|
-
* The two card lists.
|
|
2863
|
+
* The two card lists, plus the heading the suite writes above each.
|
|
2862
2864
|
*
|
|
2863
|
-
*
|
|
2864
|
-
*
|
|
2865
|
-
*
|
|
2865
|
+
* The headings are suite-owned copy rather than an override injected into a
|
|
2866
|
+
* widget: neither list heads itself (embedded ADR 0010), and this section is the
|
|
2867
|
+
* only layer that knows the two are siblings, so it names them — the same shape
|
|
2868
|
+
* as `SettingsWidget` heading the widgets it composes. The two groups beneath
|
|
2869
|
+
* are forwarded like every other, with no default.
|
|
2866
2870
|
*/
|
|
2867
2871
|
interface WidgetSuiteCardsLabels {
|
|
2868
|
-
|
|
2869
|
-
|
|
2872
|
+
creditCardsTitle: string;
|
|
2873
|
+
debitCardsTitle: string;
|
|
2874
|
+
creditCards?: WidgetSuiteCreditCardsLabels;
|
|
2875
|
+
debitCards?: WidgetSuiteDebitCardsLabels;
|
|
2870
2876
|
}
|
|
2871
2877
|
/** Expenses is only a placeholder until the suite wires a read/self surface. */
|
|
2872
2878
|
interface WidgetSuiteExpensesLabels {
|
|
@@ -71,8 +71,10 @@ interface CardsListDetailsSheetLabels {
|
|
|
71
71
|
* wording change is not a breaking rename.
|
|
72
72
|
*/
|
|
73
73
|
interface CardsListLabels {
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Accessible name for the list region. Not a heading: the list renders none,
|
|
76
|
+
* because whoever mounts it names it (embedded ADR 0010).
|
|
77
|
+
*/
|
|
76
78
|
regionLabel: string;
|
|
77
79
|
columnHeaders: CardsListColumnHeaderLabels;
|
|
78
80
|
/** Screen-reader name for the unheaded trailing row-actions column. */
|
|
@@ -71,8 +71,10 @@ interface CardsListDetailsSheetLabels {
|
|
|
71
71
|
* wording change is not a breaking rename.
|
|
72
72
|
*/
|
|
73
73
|
interface CardsListLabels {
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Accessible name for the list region. Not a heading: the list renders none,
|
|
76
|
+
* because whoever mounts it names it (embedded ADR 0010).
|
|
77
|
+
*/
|
|
76
78
|
regionLabel: string;
|
|
77
79
|
columnHeaders: CardsListColumnHeaderLabels;
|
|
78
80
|
/** Screen-reader name for the unheaded trailing row-actions column. */
|
|
@@ -892,8 +892,10 @@ interface CardsListDetailsSheetLabels {
|
|
|
892
892
|
* wording change is not a breaking rename.
|
|
893
893
|
*/
|
|
894
894
|
interface CardsListLabels {
|
|
895
|
-
|
|
896
|
-
|
|
895
|
+
/**
|
|
896
|
+
* Accessible name for the list region. Not a heading: the list renders none,
|
|
897
|
+
* because whoever mounts it names it (embedded ADR 0010).
|
|
898
|
+
*/
|
|
897
899
|
regionLabel: string;
|
|
898
900
|
columnHeaders: CardsListColumnHeaderLabels;
|
|
899
901
|
/** Screen-reader name for the unheaded trailing row-actions column. */
|
|
@@ -2103,15 +2105,19 @@ interface WidgetSuiteDashboardLabels {
|
|
|
2103
2105
|
insights?: WidgetSuiteInsightsLabels;
|
|
2104
2106
|
}
|
|
2105
2107
|
/**
|
|
2106
|
-
* The two card lists.
|
|
2108
|
+
* The two card lists, plus the heading the suite writes above each.
|
|
2107
2109
|
*
|
|
2108
|
-
*
|
|
2109
|
-
*
|
|
2110
|
-
*
|
|
2110
|
+
* The headings are suite-owned copy rather than an override injected into a
|
|
2111
|
+
* widget: neither list heads itself (embedded ADR 0010), and this section is the
|
|
2112
|
+
* only layer that knows the two are siblings, so it names them — the same shape
|
|
2113
|
+
* as `SettingsWidget` heading the widgets it composes. The two groups beneath
|
|
2114
|
+
* are forwarded like every other, with no default.
|
|
2111
2115
|
*/
|
|
2112
2116
|
interface WidgetSuiteCardsLabels {
|
|
2113
|
-
|
|
2114
|
-
|
|
2117
|
+
creditCardsTitle: string;
|
|
2118
|
+
debitCardsTitle: string;
|
|
2119
|
+
creditCards?: WidgetSuiteCreditCardsLabels;
|
|
2120
|
+
debitCards?: WidgetSuiteDebitCardsLabels;
|
|
2115
2121
|
}
|
|
2116
2122
|
/** Expenses is only a placeholder until the suite wires a read/self surface. */
|
|
2117
2123
|
interface WidgetSuiteExpensesLabels {
|
|
@@ -9,10 +9,10 @@ import "./index10.js";
|
|
|
9
9
|
import "./index11.js";
|
|
10
10
|
import "./index23.js";
|
|
11
11
|
import "./index24.js";
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
12
|
+
import "./index37.js";
|
|
13
|
+
import "./index42.js";
|
|
14
|
+
import "./index51.js";
|
|
15
|
+
import "./index53.js";
|
|
16
16
|
import "./index55.js";
|
|
17
17
|
import "./index56.js";
|
|
18
18
|
import "./index57.js";
|
|
@@ -1,76 +1,92 @@
|
|
|
1
1
|
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
2
|
import { derivePayableStatus as t } from "./index4.js";
|
|
3
|
-
import { resolveVendor as n } from "./index5.js";
|
|
4
|
-
import { resolveAmountDueMinorUnits as r } from "./index17.js";
|
|
3
|
+
import { resolveVendor as n, resolveVendorName as r } from "./index5.js";
|
|
5
4
|
import { formatBillMoney as i } from "./index36.js";
|
|
6
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js
|
|
7
|
-
function a({ payable: a, lineItems:
|
|
8
|
-
let
|
|
6
|
+
function a({ payable: a, lineItems: s, ledgerAccounts: c, labels: l, hasScheduledPayment: u, now: d }) {
|
|
7
|
+
let f = a.currency, p = (e) => i(e, f), m = t({
|
|
9
8
|
apiStatus: a.status,
|
|
10
9
|
dueDate: a.due_date,
|
|
11
10
|
scheduledPaymentDate: a.scheduled_payment_date,
|
|
12
|
-
hasScheduledPayment:
|
|
13
|
-
|
|
11
|
+
hasScheduledPayment: u,
|
|
12
|
+
now: d
|
|
13
|
+
}), h = n(a), g = r(a), _ = e(a.issued_at) || l.notProvided, v = e(a.due_date) || l.notProvided, y = [{
|
|
14
|
+
label: l.vendorRow,
|
|
15
|
+
value: g || l.notProvided,
|
|
16
|
+
secondaryValue: h?.email ?? void 0
|
|
17
|
+
}], b = h?.bank_account?.account_number;
|
|
18
|
+
b && y.push({
|
|
19
|
+
label: l.bankAccountRow,
|
|
20
|
+
value: l.bankAccountValue(b.slice(-4))
|
|
21
|
+
});
|
|
22
|
+
let x = [
|
|
14
23
|
{
|
|
15
|
-
label:
|
|
16
|
-
|
|
24
|
+
label: l.invoiceNumberRow,
|
|
25
|
+
value: a.document_id || l.notProvided
|
|
17
26
|
},
|
|
18
27
|
{
|
|
19
|
-
label:
|
|
20
|
-
|
|
28
|
+
label: l.issueDateRow,
|
|
29
|
+
value: _
|
|
21
30
|
},
|
|
22
31
|
{
|
|
23
|
-
label:
|
|
24
|
-
|
|
32
|
+
label: l.dueDateRow,
|
|
33
|
+
value: v
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: l.poNumberRow,
|
|
37
|
+
value: l.notProvided
|
|
38
|
+
}
|
|
39
|
+
], S = new Map(c.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), C = s.map((e) => {
|
|
40
|
+
let t = p(e.unit_price);
|
|
41
|
+
return {
|
|
42
|
+
id: e.id,
|
|
43
|
+
description: e.name ?? e.description ?? "",
|
|
44
|
+
glCodeLabel: (e.ledger_account_id ? S.get(e.ledger_account_id) : void 0) || l.glCodeMissing,
|
|
45
|
+
quantityLabel: e.quantity != null && t ? l.quantityValue(String(e.quantity), t) : "",
|
|
46
|
+
amountLabel: p(e.subtotal) ?? ""
|
|
47
|
+
};
|
|
48
|
+
}), w = [
|
|
49
|
+
{
|
|
50
|
+
label: l.subtotalRow,
|
|
51
|
+
value: a.subtotal
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: l.discountsRow,
|
|
55
|
+
value: a.discount
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: l.taxRow,
|
|
59
|
+
value: a.tax_amount
|
|
25
60
|
}
|
|
26
|
-
].map((e) => ({
|
|
27
|
-
label: e
|
|
28
|
-
value:
|
|
29
|
-
})).filter((e) => !!e.value),
|
|
30
|
-
|
|
31
|
-
label:
|
|
32
|
-
value:
|
|
61
|
+
].map(({ label: e, value: t }) => ({
|
|
62
|
+
label: e,
|
|
63
|
+
value: p(t)
|
|
64
|
+
})).filter((e) => !!e.value), T = p(a.total_amount);
|
|
65
|
+
T && w.push({
|
|
66
|
+
label: l.totalRow,
|
|
67
|
+
value: T,
|
|
33
68
|
emphasis: !0
|
|
34
|
-
})
|
|
35
|
-
|
|
69
|
+
});
|
|
70
|
+
let E = o(a);
|
|
71
|
+
return {
|
|
72
|
+
title: g,
|
|
73
|
+
subtitle: l.subtitle,
|
|
74
|
+
status: m.status,
|
|
75
|
+
statusTone: m.tone,
|
|
76
|
+
amountDueLabel: p(a.amount_due) ?? p(a.total_amount) ?? "",
|
|
77
|
+
amountPaidLabel: E ? p(a.amount_paid) : void 0,
|
|
78
|
+
paidOnLabel: E ? l.paidOnLabel(E) : void 0,
|
|
36
79
|
invoiceDateLabel: _,
|
|
37
80
|
dueDateLabel: v,
|
|
38
81
|
dueDateTone: m.isOverdue ? "danger" : "default",
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
email: h?.email ?? void 0,
|
|
44
|
-
paymentInstructionsLabel: g ? d.paymentInstructionsValue(g.slice(-4)) : void 0
|
|
45
|
-
},
|
|
46
|
-
invoiceFields: [
|
|
47
|
-
{
|
|
48
|
-
label: d.invoiceDateRow,
|
|
49
|
-
value: _
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
label: d.dueDateRow,
|
|
53
|
-
value: v
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: d.invoiceNumberRow,
|
|
57
|
-
value: a.document_id || d.notProvided
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
lineItems: o.map((e) => {
|
|
61
|
-
let t = i(e.unit_price, p);
|
|
62
|
-
return {
|
|
63
|
-
id: e.id,
|
|
64
|
-
description: e.name ?? e.description ?? "",
|
|
65
|
-
glCodeLabel: e.ledger_account_id ? y.get(e.ledger_account_id) ?? (c ? d.glCodeMissing : d.glCodeUnavailable) : d.glCodeMissing,
|
|
66
|
-
qtyPriceLabel: e.quantity != null && t ? d.qtyPriceValue(String(e.quantity), t) : "",
|
|
67
|
-
amount: i(e.subtotal, p) ?? ""
|
|
68
|
-
};
|
|
69
|
-
}),
|
|
70
|
-
amountRows: b,
|
|
71
|
-
approvalPolicy: u,
|
|
72
|
-
history: l
|
|
82
|
+
payToItems: y,
|
|
83
|
+
invoiceItems: x,
|
|
84
|
+
lineItems: C,
|
|
85
|
+
totals: w
|
|
73
86
|
};
|
|
74
87
|
}
|
|
88
|
+
function o(t) {
|
|
89
|
+
return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
|
|
90
|
+
}
|
|
75
91
|
//#endregion
|
|
76
|
-
export { a as
|
|
92
|
+
export { o as getPaidAtLabel, a as mapPayableToBillDetails };
|
|
@@ -1,52 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
1
|
+
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
|
+
import { derivePayableStatus as t } from "./index4.js";
|
|
3
|
+
import { resolveVendor as n } from "./index5.js";
|
|
4
|
+
import { resolveAmountDueMinorUnits as r } from "./index17.js";
|
|
5
|
+
import { formatBillMoney as i } from "./index36.js";
|
|
6
|
+
import { getPaidAtLabel as a } from "./index37.js";
|
|
4
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
function o({ payable: o, lineItems: s, glCodeOptions: c, glCodeRosterAvailable: l = !0, history: u, approvalPolicy: d, labels: f, hasScheduledPayment: p }) {
|
|
9
|
+
let m = o.currency, h = t({
|
|
10
|
+
apiStatus: o.status,
|
|
11
|
+
dueDate: o.due_date,
|
|
12
|
+
scheduledPaymentDate: o.scheduled_payment_date,
|
|
13
|
+
hasScheduledPayment: p
|
|
14
|
+
}), g = n(o), _ = g?.bank_account?.account_number, v = e(o.issued_at) || f.notProvided, y = e(o.due_date) || f.notProvided, b = new Map(c.map((e) => [e.value, e.label])), x = [
|
|
15
|
+
{
|
|
16
|
+
label: f.subtotalRow,
|
|
17
|
+
minorUnits: o.subtotal
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: f.discountRow,
|
|
21
|
+
minorUnits: o.discount
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: f.taxRow,
|
|
25
|
+
minorUnits: o.tax_amount
|
|
23
26
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
].map((e) => ({
|
|
28
|
+
label: e.label,
|
|
29
|
+
value: i(e.minorUnits, m)
|
|
30
|
+
})).filter((e) => !!e.value), S = i(o.total_amount, m);
|
|
31
|
+
S && x.push({
|
|
32
|
+
label: f.totalRow,
|
|
33
|
+
value: S,
|
|
34
|
+
emphasis: !0
|
|
35
|
+
});
|
|
36
|
+
let C = a(o);
|
|
37
|
+
return {
|
|
38
|
+
amountDue: i(r(o), m) ?? "",
|
|
39
|
+
amountPaid: C ? i(o.amount_paid, m) : void 0,
|
|
40
|
+
paidOnLabel: C ? f.paidOnLabel(C) : void 0,
|
|
41
|
+
invoiceDateLabel: v,
|
|
42
|
+
dueDateLabel: y,
|
|
43
|
+
dueDateTone: h.isOverdue ? "danger" : "default",
|
|
44
|
+
status: h.status,
|
|
45
|
+
statusTone: h.tone,
|
|
46
|
+
payTo: {
|
|
47
|
+
name: g?.name || f.notProvided,
|
|
48
|
+
email: g?.email ?? void 0,
|
|
49
|
+
paymentInstructionsLabel: _ ? f.paymentInstructionsValue(_.slice(-4)) : void 0
|
|
50
|
+
},
|
|
51
|
+
invoiceFields: [
|
|
52
|
+
{
|
|
53
|
+
label: f.invoiceDateRow,
|
|
54
|
+
value: v
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: f.dueDateRow,
|
|
58
|
+
value: y
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: f.invoiceNumberRow,
|
|
62
|
+
value: o.document_id || f.notProvided
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
lineItems: s.map((e) => {
|
|
66
|
+
let t = i(e.unit_price, m);
|
|
67
|
+
return {
|
|
68
|
+
id: e.id,
|
|
69
|
+
description: e.name ?? e.description ?? "",
|
|
70
|
+
glCodeLabel: e.ledger_account_id ? b.get(e.ledger_account_id) ?? (l ? f.glCodeMissing : f.glCodeUnavailable) : f.glCodeMissing,
|
|
71
|
+
qtyPriceLabel: e.quantity != null && t ? f.qtyPriceValue(String(e.quantity), t) : "",
|
|
72
|
+
amount: i(e.subtotal, m) ?? ""
|
|
73
|
+
};
|
|
74
|
+
}),
|
|
75
|
+
amountRows: x,
|
|
76
|
+
approvalPolicy: d,
|
|
77
|
+
history: u
|
|
78
|
+
};
|
|
50
79
|
}
|
|
51
80
|
//#endregion
|
|
52
|
-
export {
|
|
81
|
+
export { o as buildBillDetailView };
|