@tesouro/embedded-components-react 0.3.52 → 0.3.53
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 +47 -44
- package/dist/index.css +0 -6
- package/dist/index.d.ts +79 -5
- package/dist/index.js +1 -1
- package/dist/lib/CardDetailsWidget.d.ts +61 -1
- package/dist/lib/CardDetailsWidget.js +1 -1
- package/dist/lib/CreditCardsWidget.d.ts +78 -4
- package/dist/lib/DebitCardsWidget.d.ts +78 -4
- package/dist/lib/WidgetSuite.d.ts +78 -4
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index2.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index3.js +43 -6
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index4.js +40 -14
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index5.js +5 -26
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index9.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index5.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +17 -160
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index7.js +107 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index8.js +188 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +137 -8
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +27 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/FieldError.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/labels.js +55 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/validation.js +47 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +37 -36
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +22 -20
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/isApiConflictError.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/isApiUnprocessableError.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +246 -225
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +170 -134
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +27 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/PinField.js +0 -5
|
@@ -834,6 +834,58 @@ interface CardDetailsPanelLabels {
|
|
|
834
834
|
status: CardDetailsStatusScreenLabels;
|
|
835
835
|
}
|
|
836
836
|
|
|
837
|
+
/** Chrome around the form. */
|
|
838
|
+
interface ActivateCardHeaderLabels {
|
|
839
|
+
title: string;
|
|
840
|
+
/** Accessible name for the close (X) control. */
|
|
841
|
+
closeAriaLabel: string;
|
|
842
|
+
}
|
|
843
|
+
/** Accessible copy for the card face this panel reuses. */
|
|
844
|
+
interface ActivateCardCardFaceLabels {
|
|
845
|
+
/** Alt text for the bank logo when the caller supplies no `bankLogoAlt`. */
|
|
846
|
+
bankLogoAlt: string;
|
|
847
|
+
}
|
|
848
|
+
/** Field headings, placeholders and the copy behind each affordance. */
|
|
849
|
+
interface ActivateCardFieldLabels {
|
|
850
|
+
expirationDate: string;
|
|
851
|
+
expirationDatePlaceholder: string;
|
|
852
|
+
securityCode: string;
|
|
853
|
+
securityCodePlaceholder: string;
|
|
854
|
+
/** Accessible name for the (?) control that reveals the explanation. */
|
|
855
|
+
securityCodeInfoAriaLabel: string;
|
|
856
|
+
/** The explanation itself, shown in the tooltip. */
|
|
857
|
+
securityCodeInfo: string;
|
|
858
|
+
}
|
|
859
|
+
/** One message per failure the panel can mark. */
|
|
860
|
+
interface ActivateCardValidationLabels {
|
|
861
|
+
impossibleMonth: string;
|
|
862
|
+
pastExpiration: string;
|
|
863
|
+
/**
|
|
864
|
+
* Shown when the server rejects the pair. Names both values because the
|
|
865
|
+
* verify endpoint withholds which one missed — see `ActivateCardFormErrors`.
|
|
866
|
+
*/
|
|
867
|
+
verificationRejected: string;
|
|
868
|
+
}
|
|
869
|
+
/** The CTA and the two screens that replace or accompany the form. */
|
|
870
|
+
interface ActivateCardStatusLabels {
|
|
871
|
+
submit: string;
|
|
872
|
+
/** Accessible name announced while the activation is in flight. */
|
|
873
|
+
submittingAriaLabel: string;
|
|
874
|
+
successTitle: string;
|
|
875
|
+
successDescription: string;
|
|
876
|
+
/** Label for the optional post-success control. */
|
|
877
|
+
done: string;
|
|
878
|
+
/** Fallback failure copy when the owner supplies no `errorMessage`. */
|
|
879
|
+
errorDescription: string;
|
|
880
|
+
}
|
|
881
|
+
interface ActivateCardPanelLabels {
|
|
882
|
+
header: ActivateCardHeaderLabels;
|
|
883
|
+
cardFace: ActivateCardCardFaceLabels;
|
|
884
|
+
fields: ActivateCardFieldLabels;
|
|
885
|
+
validation: ActivateCardValidationLabels;
|
|
886
|
+
status: ActivateCardStatusLabels;
|
|
887
|
+
}
|
|
888
|
+
|
|
837
889
|
/**
|
|
838
890
|
* Deep partial for label overrides.
|
|
839
891
|
*
|
|
@@ -860,6 +912,12 @@ type PartialDeep$2<T> = {
|
|
|
860
912
|
interface CardDetailsFeatureLabels {
|
|
861
913
|
/** Confirmation toast after a copy affordance writes to the clipboard. */
|
|
862
914
|
copySuccessToast: string;
|
|
915
|
+
/**
|
|
916
|
+
* Toast shown when activation is refused because the card is no longer
|
|
917
|
+
* awaiting it. Resolved here rather than in the panel because it is an
|
|
918
|
+
* API outcome, and because the panel closes as it fires.
|
|
919
|
+
*/
|
|
920
|
+
activationConflictToast: string;
|
|
863
921
|
/**
|
|
864
922
|
* Replaces the panel's generic reveal error when the credentials call was
|
|
865
923
|
* refused (HTTP 403).
|
|
@@ -921,6 +979,8 @@ interface CardDetailsWidgetProps extends WidgetProviderProps {
|
|
|
921
979
|
onClose?: () => void;
|
|
922
980
|
/** Overrides for the panel's own copy. */
|
|
923
981
|
labels?: PartialDeep$2<CardDetailsPanelLabels>;
|
|
982
|
+
/** Overrides for the Activate Card form's copy. */
|
|
983
|
+
activateLabels?: PartialDeep$2<ActivateCardPanelLabels>;
|
|
924
984
|
/** Overrides for the copy this layer resolves — see `CardDetailsFeatureLabels`. */
|
|
925
985
|
featureLabels?: PartialDeep$2<CardDetailsFeatureLabels>;
|
|
926
986
|
/**
|
|
@@ -1266,6 +1326,15 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
1266
1326
|
* renames a status in the list would still read the default inside the panel.
|
|
1267
1327
|
*/
|
|
1268
1328
|
cardDetailsFeatureLabels?: CardDetailsWidgetProps['featureLabels'];
|
|
1329
|
+
/**
|
|
1330
|
+
* Overrides for the Activate Card form the details panel opens.
|
|
1331
|
+
*
|
|
1332
|
+
* Its own prop for the same reason `cardDetailsLabels` is: without it that
|
|
1333
|
+
* screen's copy is unreachable from this composition, so a host that translated
|
|
1334
|
+
* everything else would still meet English on the one form that asks the reader
|
|
1335
|
+
* to type something.
|
|
1336
|
+
*/
|
|
1337
|
+
cardDetailsActivateLabels?: CardDetailsWidgetProps['activateLabels'];
|
|
1269
1338
|
/**
|
|
1270
1339
|
* Bank logo for the details panel's card face. Forwarded verbatim; the panel
|
|
1271
1340
|
* renders no logo without it, so omitting these leaves the built-in sheet
|
|
@@ -1310,10 +1379,15 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
1310
1379
|
* renders only on cards in `PENDING_ACTIVATION`, and only when the widget token
|
|
1311
1380
|
* also holds the program's activate scope.
|
|
1312
1381
|
*
|
|
1313
|
-
* Host-owned
|
|
1314
|
-
*
|
|
1315
|
-
*
|
|
1316
|
-
* one
|
|
1382
|
+
* Host-owned because EMBD-4398 designs no activation flow for the *list*.
|
|
1383
|
+
*
|
|
1384
|
+
* The original second reason — that no activate endpoint existed — no longer
|
|
1385
|
+
* holds: both programs have one, and the details panel this widget opens now
|
|
1386
|
+
* runs the whole flow itself (EMBD-5085). So a built-in row flow is now
|
|
1387
|
+
* buildable, and this callback stays host-owned by choice rather than by
|
|
1388
|
+
* necessity. Changing it would be a breaking change to a published prop and
|
|
1389
|
+
* belongs in its own ticket; until then a host that wants the built-in flow
|
|
1390
|
+
* can omit this and let the reader open the card.
|
|
1317
1391
|
*/
|
|
1318
1392
|
onActivateCard?: (cardId: string) => void;
|
|
1319
1393
|
}
|
|
@@ -1003,6 +1003,58 @@ interface CardDetailsPanelLabels {
|
|
|
1003
1003
|
status: CardDetailsStatusScreenLabels;
|
|
1004
1004
|
}
|
|
1005
1005
|
|
|
1006
|
+
/** Chrome around the form. */
|
|
1007
|
+
interface ActivateCardHeaderLabels {
|
|
1008
|
+
title: string;
|
|
1009
|
+
/** Accessible name for the close (X) control. */
|
|
1010
|
+
closeAriaLabel: string;
|
|
1011
|
+
}
|
|
1012
|
+
/** Accessible copy for the card face this panel reuses. */
|
|
1013
|
+
interface ActivateCardCardFaceLabels {
|
|
1014
|
+
/** Alt text for the bank logo when the caller supplies no `bankLogoAlt`. */
|
|
1015
|
+
bankLogoAlt: string;
|
|
1016
|
+
}
|
|
1017
|
+
/** Field headings, placeholders and the copy behind each affordance. */
|
|
1018
|
+
interface ActivateCardFieldLabels {
|
|
1019
|
+
expirationDate: string;
|
|
1020
|
+
expirationDatePlaceholder: string;
|
|
1021
|
+
securityCode: string;
|
|
1022
|
+
securityCodePlaceholder: string;
|
|
1023
|
+
/** Accessible name for the (?) control that reveals the explanation. */
|
|
1024
|
+
securityCodeInfoAriaLabel: string;
|
|
1025
|
+
/** The explanation itself, shown in the tooltip. */
|
|
1026
|
+
securityCodeInfo: string;
|
|
1027
|
+
}
|
|
1028
|
+
/** One message per failure the panel can mark. */
|
|
1029
|
+
interface ActivateCardValidationLabels {
|
|
1030
|
+
impossibleMonth: string;
|
|
1031
|
+
pastExpiration: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* Shown when the server rejects the pair. Names both values because the
|
|
1034
|
+
* verify endpoint withholds which one missed — see `ActivateCardFormErrors`.
|
|
1035
|
+
*/
|
|
1036
|
+
verificationRejected: string;
|
|
1037
|
+
}
|
|
1038
|
+
/** The CTA and the two screens that replace or accompany the form. */
|
|
1039
|
+
interface ActivateCardStatusLabels {
|
|
1040
|
+
submit: string;
|
|
1041
|
+
/** Accessible name announced while the activation is in flight. */
|
|
1042
|
+
submittingAriaLabel: string;
|
|
1043
|
+
successTitle: string;
|
|
1044
|
+
successDescription: string;
|
|
1045
|
+
/** Label for the optional post-success control. */
|
|
1046
|
+
done: string;
|
|
1047
|
+
/** Fallback failure copy when the owner supplies no `errorMessage`. */
|
|
1048
|
+
errorDescription: string;
|
|
1049
|
+
}
|
|
1050
|
+
interface ActivateCardPanelLabels {
|
|
1051
|
+
header: ActivateCardHeaderLabels;
|
|
1052
|
+
cardFace: ActivateCardCardFaceLabels;
|
|
1053
|
+
fields: ActivateCardFieldLabels;
|
|
1054
|
+
validation: ActivateCardValidationLabels;
|
|
1055
|
+
status: ActivateCardStatusLabels;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1006
1058
|
/**
|
|
1007
1059
|
* Deep partial for label overrides.
|
|
1008
1060
|
*
|
|
@@ -1029,6 +1081,12 @@ type PartialDeep$3<T> = {
|
|
|
1029
1081
|
interface CardDetailsFeatureLabels {
|
|
1030
1082
|
/** Confirmation toast after a copy affordance writes to the clipboard. */
|
|
1031
1083
|
copySuccessToast: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* Toast shown when activation is refused because the card is no longer
|
|
1086
|
+
* awaiting it. Resolved here rather than in the panel because it is an
|
|
1087
|
+
* API outcome, and because the panel closes as it fires.
|
|
1088
|
+
*/
|
|
1089
|
+
activationConflictToast: string;
|
|
1032
1090
|
/**
|
|
1033
1091
|
* Replaces the panel's generic reveal error when the credentials call was
|
|
1034
1092
|
* refused (HTTP 403).
|
|
@@ -1090,6 +1148,8 @@ interface CardDetailsWidgetProps extends WidgetProviderProps {
|
|
|
1090
1148
|
onClose?: () => void;
|
|
1091
1149
|
/** Overrides for the panel's own copy. */
|
|
1092
1150
|
labels?: PartialDeep$3<CardDetailsPanelLabels>;
|
|
1151
|
+
/** Overrides for the Activate Card form's copy. */
|
|
1152
|
+
activateLabels?: PartialDeep$3<ActivateCardPanelLabels>;
|
|
1093
1153
|
/** Overrides for the copy this layer resolves — see `CardDetailsFeatureLabels`. */
|
|
1094
1154
|
featureLabels?: PartialDeep$3<CardDetailsFeatureLabels>;
|
|
1095
1155
|
/**
|
|
@@ -1435,6 +1495,15 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
1435
1495
|
* renames a status in the list would still read the default inside the panel.
|
|
1436
1496
|
*/
|
|
1437
1497
|
cardDetailsFeatureLabels?: CardDetailsWidgetProps['featureLabels'];
|
|
1498
|
+
/**
|
|
1499
|
+
* Overrides for the Activate Card form the details panel opens.
|
|
1500
|
+
*
|
|
1501
|
+
* Its own prop for the same reason `cardDetailsLabels` is: without it that
|
|
1502
|
+
* screen's copy is unreachable from this composition, so a host that translated
|
|
1503
|
+
* everything else would still meet English on the one form that asks the reader
|
|
1504
|
+
* to type something.
|
|
1505
|
+
*/
|
|
1506
|
+
cardDetailsActivateLabels?: CardDetailsWidgetProps['activateLabels'];
|
|
1438
1507
|
/**
|
|
1439
1508
|
* Bank logo for the details panel's card face. Forwarded verbatim; the panel
|
|
1440
1509
|
* renders no logo without it, so omitting these leaves the built-in sheet
|
|
@@ -1479,10 +1548,15 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
1479
1548
|
* renders only on cards in `PENDING_ACTIVATION`, and only when the widget token
|
|
1480
1549
|
* also holds the program's activate scope.
|
|
1481
1550
|
*
|
|
1482
|
-
* Host-owned
|
|
1483
|
-
*
|
|
1484
|
-
*
|
|
1485
|
-
* one
|
|
1551
|
+
* Host-owned because EMBD-4398 designs no activation flow for the *list*.
|
|
1552
|
+
*
|
|
1553
|
+
* The original second reason — that no activate endpoint existed — no longer
|
|
1554
|
+
* holds: both programs have one, and the details panel this widget opens now
|
|
1555
|
+
* runs the whole flow itself (EMBD-5085). So a built-in row flow is now
|
|
1556
|
+
* buildable, and this callback stays host-owned by choice rather than by
|
|
1557
|
+
* necessity. Changing it would be a breaking change to a published prop and
|
|
1558
|
+
* belongs in its own ticket; until then a host that wants the built-in flow
|
|
1559
|
+
* can omit this and let the reader open the card.
|
|
1486
1560
|
*/
|
|
1487
1561
|
onActivateCard?: (cardId: string) => void;
|
|
1488
1562
|
}
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import "./index2.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
2
|
+
import "./index3.js";
|
|
3
|
+
import { useActivateCreditCardMutation as e, useActivateDebitCardMutation as t } from "./index4.js";
|
|
4
|
+
import { useCreditCardDetailsQuery as n } from "./index6.js";
|
|
5
|
+
import { useDebitCardCredentialsQuery as r } from "./index7.js";
|
|
6
|
+
import { useDebitCardDetailsQuery as i } from "./index8.js";
|
|
7
|
+
import { useVerifyDebitCardMutation as a } from "./index9.js";
|
|
8
|
+
export { e as useActivateCreditCardMutation, t as useActivateDebitCardMutation, n as useCreditCardDetailsQuery, r as useDebitCardCredentialsQuery, i as useDebitCardDetailsQuery, a as useVerifyDebitCardMutation };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index2.js
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
+
import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
2
|
+
import { getCreditCardByIdQueryKey as t, getCreditCardsQueryKey as n, getDebitCardByIdQueryKey as r, getDebitCardsQueryKey as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
1
3
|
import "../../../shared/data-access/dist/index.js";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index2.js
|
|
5
|
+
var a = ({ client: n, organizationId: r, cardId: i }) => t({
|
|
6
|
+
client: n,
|
|
7
|
+
headers: e(r),
|
|
8
|
+
path: { cardId: i }
|
|
9
|
+
}), o = ({ client: t, organizationId: n, cardId: i }) => r({
|
|
10
|
+
client: t,
|
|
11
|
+
headers: e(n),
|
|
12
|
+
path: { id: i }
|
|
13
|
+
}), s = ({ client: t, organizationId: r }) => n({
|
|
14
|
+
client: t,
|
|
15
|
+
headers: e(r)
|
|
16
|
+
}), c = ({ client: t, organizationId: n }) => i({
|
|
17
|
+
client: t,
|
|
18
|
+
headers: e(n)
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as creditCardDetailsInvalidationKey, s as creditCardsListInvalidationKey, o as debitCardDetailsInvalidationKey, c as debitCardsListInvalidationKey };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index3.js
CHANGED
|
@@ -1,11 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
2
|
+
import { isApiConflictError as t } from "../../../shared/data-access/dist/lib/isApiConflictError.js";
|
|
2
3
|
import "../../../shared/data-access/dist/index.js";
|
|
4
|
+
import { creditCardDetailsInvalidationKey as n, creditCardsListInvalidationKey as r, debitCardDetailsInvalidationKey as i, debitCardsListInvalidationKey as a } from "./index2.js";
|
|
3
5
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index3.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var o = {
|
|
7
|
+
credit: {
|
|
8
|
+
detail: n,
|
|
9
|
+
list: r
|
|
10
|
+
},
|
|
11
|
+
debit: {
|
|
12
|
+
detail: i,
|
|
13
|
+
list: a
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
async function s({ client: t, organizationId: n, cardId: r, program: i }) {
|
|
17
|
+
let a = o[i];
|
|
18
|
+
await Promise.all([e(a.detail({
|
|
19
|
+
client: t,
|
|
20
|
+
organizationId: n,
|
|
21
|
+
cardId: r
|
|
22
|
+
})), e(a.list({
|
|
23
|
+
client: t,
|
|
24
|
+
organizationId: n
|
|
25
|
+
}))]);
|
|
26
|
+
}
|
|
27
|
+
function c({ client: e, organizationId: t, program: n }) {
|
|
28
|
+
return async (r, i) => {
|
|
29
|
+
await s({
|
|
30
|
+
client: e,
|
|
31
|
+
organizationId: t,
|
|
32
|
+
cardId: i.path.id,
|
|
33
|
+
program: n
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function l({ client: e, organizationId: n, program: r }) {
|
|
38
|
+
return async (i, a) => {
|
|
39
|
+
t(i) && await s({
|
|
40
|
+
client: e,
|
|
41
|
+
organizationId: n,
|
|
42
|
+
cardId: a.path.id,
|
|
43
|
+
program: r
|
|
44
|
+
});
|
|
8
45
|
};
|
|
9
46
|
}
|
|
10
47
|
//#endregion
|
|
11
|
-
export {
|
|
48
|
+
export { s as invalidateCardViews, c as resyncCardViews, l as resyncOnConflict };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index4.js
CHANGED
|
@@ -4,22 +4,48 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
6
|
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import {
|
|
8
|
-
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { activateCreditCardMutation as n, activateDebitCardMutation as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
8
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { resyncCardViews as i, resyncOnConflict as a } from "./index3.js";
|
|
10
|
+
import { useMutation as o } from "@tanstack/react-query";
|
|
12
11
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index4.js
|
|
13
|
-
function
|
|
14
|
-
let { client:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
function s() {
|
|
13
|
+
let { client: r, organizationId: s } = e();
|
|
14
|
+
return o({
|
|
15
|
+
...n({
|
|
16
|
+
client: r,
|
|
17
|
+
headers: t(s)
|
|
18
|
+
}),
|
|
19
|
+
onSuccess: i({
|
|
20
|
+
client: r,
|
|
21
|
+
organizationId: s,
|
|
22
|
+
program: "credit"
|
|
23
|
+
}),
|
|
24
|
+
onError: a({
|
|
25
|
+
client: r,
|
|
26
|
+
organizationId: s,
|
|
27
|
+
program: "credit"
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function c() {
|
|
32
|
+
let { client: n, organizationId: s } = e();
|
|
33
|
+
return o({
|
|
34
|
+
...r({
|
|
35
|
+
client: n,
|
|
36
|
+
headers: t(s)
|
|
37
|
+
}),
|
|
38
|
+
onSuccess: i({
|
|
39
|
+
client: n,
|
|
40
|
+
organizationId: s,
|
|
41
|
+
program: "debit"
|
|
42
|
+
}),
|
|
43
|
+
onError: a({
|
|
44
|
+
client: n,
|
|
45
|
+
organizationId: s,
|
|
46
|
+
program: "debit"
|
|
47
|
+
})
|
|
21
48
|
});
|
|
22
|
-
return i(p);
|
|
23
49
|
}
|
|
24
50
|
//#endregion
|
|
25
|
-
export {
|
|
51
|
+
export { s as useActivateCreditCardMutation, c as useActivateDebitCardMutation };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index5.js
CHANGED
|
@@ -1,32 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
-
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import { getDebitCardCredentialsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
-
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
|
-
import { isApiForbiddenError as i } from "../../../shared/data-access/dist/lib/isApiForbiddenError.js";
|
|
1
|
+
import { isApiNotFoundError as e } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
|
|
10
2
|
import "../../../shared/data-access/dist/index.js";
|
|
11
|
-
import { useQuery as a } from "@tanstack/react-query";
|
|
12
3
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index5.js
|
|
13
|
-
function
|
|
14
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(o && l && u) && s, p = f ? o ?? "" : "", m = n({
|
|
15
|
-
client: c,
|
|
16
|
-
headers: t(l),
|
|
17
|
-
path: { id: p }
|
|
18
|
-
}), h = a({
|
|
19
|
-
...r(m, d),
|
|
20
|
-
enabled: f,
|
|
21
|
-
staleTime: 0,
|
|
22
|
-
gcTime: 0,
|
|
23
|
-
retry: !1,
|
|
24
|
-
placeholderData: void 0
|
|
25
|
-
});
|
|
4
|
+
function t(t) {
|
|
26
5
|
return {
|
|
27
|
-
...
|
|
28
|
-
|
|
6
|
+
...t,
|
|
7
|
+
isNotFound: !t.data && t.isError && e(t.error)
|
|
29
8
|
};
|
|
30
9
|
}
|
|
31
10
|
//#endregion
|
|
32
|
-
export {
|
|
11
|
+
export { t as withNotFoundOutcome };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
6
|
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import {
|
|
7
|
+
import { getCreditCardByIdOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
8
|
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
9
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { withNotFoundOutcome as i } from "./
|
|
10
|
+
import { withNotFoundOutcome as i } from "./index5.js";
|
|
11
11
|
import { useQuery as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js
|
|
13
13
|
function o({ cardId: o, enabled: s }) {
|
|
14
14
|
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = n({
|
|
15
15
|
client: c,
|
|
16
16
|
headers: t(l),
|
|
17
|
-
path: {
|
|
17
|
+
path: { cardId: o ?? "" }
|
|
18
18
|
}), p = a({
|
|
19
19
|
...r(f, d),
|
|
20
20
|
enabled: !!(o && l && u) && s !== !1
|
|
@@ -22,4 +22,4 @@ function o({ cardId: o, enabled: s }) {
|
|
|
22
22
|
return i(p);
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
|
-
export { o as
|
|
25
|
+
export { o as useCreditCardDetailsQuery };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { getDebitCardCredentialsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
+
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
|
+
import { isApiForbiddenError as i } from "../../../shared/data-access/dist/lib/isApiForbiddenError.js";
|
|
10
|
+
import "../../../shared/data-access/dist/index.js";
|
|
11
|
+
import { useQuery as a } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js
|
|
13
|
+
function o({ cardId: o, enabled: s }) {
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(o && l && u) && s, p = f ? o ?? "" : "", m = n({
|
|
15
|
+
client: c,
|
|
16
|
+
headers: t(l),
|
|
17
|
+
path: { id: p }
|
|
18
|
+
}), h = a({
|
|
19
|
+
...r(m, d),
|
|
20
|
+
enabled: f,
|
|
21
|
+
staleTime: 0,
|
|
22
|
+
gcTime: 0,
|
|
23
|
+
retry: !1,
|
|
24
|
+
placeholderData: void 0
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
...h,
|
|
28
|
+
isForbidden: h.isError && i(h.error)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { o as useDebitCardCredentialsQuery };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { getDebitCardByIdOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
+
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { withNotFoundOutcome as i } from "./index5.js";
|
|
11
|
+
import { useQuery as a } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js
|
|
13
|
+
function o({ cardId: o, enabled: s }) {
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = n({
|
|
15
|
+
client: c,
|
|
16
|
+
headers: t(l),
|
|
17
|
+
path: { id: o ?? "" }
|
|
18
|
+
}), p = a({
|
|
19
|
+
...r(f, d),
|
|
20
|
+
enabled: !!(o && l && u) && s !== !1
|
|
21
|
+
});
|
|
22
|
+
return i(p);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { o as useDebitCardDetailsQuery };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index9.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { verifyDebitCardMutation as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { resyncOnConflict as r } from "./index3.js";
|
|
10
|
+
import { useMutation as i } from "@tanstack/react-query";
|
|
11
|
+
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index9.js
|
|
12
|
+
function a() {
|
|
13
|
+
let { client: a, organizationId: o } = e();
|
|
14
|
+
return i({
|
|
15
|
+
...n({
|
|
16
|
+
client: a,
|
|
17
|
+
headers: t(o)
|
|
18
|
+
}),
|
|
19
|
+
onError: r({
|
|
20
|
+
client: a,
|
|
21
|
+
organizationId: o,
|
|
22
|
+
program: "debit"
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { a as useVerifyDebitCardMutation };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index5.js
CHANGED
|
@@ -4,6 +4,7 @@ import "../../../shared/feature/dist/index.js";
|
|
|
4
4
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index5.js
|
|
5
5
|
var r = {
|
|
6
6
|
copySuccessToast: "Copied to clipboard",
|
|
7
|
+
activationConflictToast: "This card is no longer awaiting activation.",
|
|
7
8
|
revealNotPermittedDescription: "This card's details can't be shown for this session.",
|
|
8
9
|
programLabels: {
|
|
9
10
|
[e.Credit]: "Business credit",
|