@tesouro/embedded-components-react 0.4.14 → 0.4.15
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/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +15 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +63 -65
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js
|
|
2
2
|
var e = {
|
|
3
3
|
list: "cards-list",
|
|
4
|
-
cardFaceSwatch: "card-face-swatch"
|
|
5
|
-
|
|
4
|
+
cardFaceSwatch: "card-face-swatch",
|
|
5
|
+
rowPrefix: "cards-list-row",
|
|
6
|
+
empty: "cards-list-empty",
|
|
7
|
+
error: "cards-list-error",
|
|
8
|
+
detailsSheet: "cards-list-details-sheet"
|
|
9
|
+
}, t = {
|
|
10
|
+
root: e.list,
|
|
11
|
+
empty: e.empty,
|
|
12
|
+
error: e.error,
|
|
13
|
+
row: {
|
|
14
|
+
rootPrefix: e.rowPrefix,
|
|
15
|
+
cardFaceSwatch: { root: e.cardFaceSwatch }
|
|
16
|
+
}
|
|
17
|
+
}, n = { root: e.detailsSheet };
|
|
6
18
|
//#endregion
|
|
7
|
-
export { e as cardsWidgetTestIds };
|
|
19
|
+
export { n as cardsListDetailsSheetTestIds, t as cardsListTestIds, e as cardsWidgetTestIds };
|
|
@@ -5,77 +5,75 @@
|
|
|
5
5
|
import { WidgetProvider as e } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
6
6
|
import "../../../shared/feature/dist/index.js";
|
|
7
7
|
import { WIDGET_NAME as t } from "./index2.js";
|
|
8
|
-
import {
|
|
9
|
-
import { resolveCardsListLabels as
|
|
10
|
-
import { CardsList as
|
|
11
|
-
import { CardsListDetailsSheet as
|
|
8
|
+
import { cardsListDetailsSheetTestIds as n, cardsListTestIds as r } from "./index3.js";
|
|
9
|
+
import { resolveCardsListLabels as i } from "../../ui/dist/lib/CardsList/labels.js";
|
|
10
|
+
import { CardsList as a } from "../../ui/dist/lib/CardsList/CardsList.js";
|
|
11
|
+
import { CardsListDetailsSheet as o } from "../../ui/dist/lib/CardsList/CardsListDetailsSheet.js";
|
|
12
12
|
import "../../ui/dist/index.js";
|
|
13
|
-
import { useCardsWidget as
|
|
14
|
-
import { CardDetailsWidget as
|
|
13
|
+
import { useCardsWidget as s } from "./index8.js";
|
|
14
|
+
import { CardDetailsWidget as c } from "../../../card-details-widget/feature/dist/index13.js";
|
|
15
15
|
import "../../../card-details-widget/feature/dist/index.js";
|
|
16
|
-
import { CreateCardWidget as
|
|
16
|
+
import { CreateCardWidget as l } from "../../../create-card-widget/feature/dist/index8.js";
|
|
17
17
|
import "../../../create-card-widget/feature/dist/index.js";
|
|
18
|
-
import { useCallback as
|
|
19
|
-
import { Fragment as
|
|
18
|
+
import { useCallback as u, useMemo as d, useState as f } from "react";
|
|
19
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
20
20
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js
|
|
21
|
-
function
|
|
22
|
-
let { selectedCardId:
|
|
21
|
+
function g({ cardProgram: e, pagination: t, defaultPagination: g, onPaginationChange: _, labels: v, featureLabels: y, selectedCardId: b, defaultSelectedCardId: x, onSelectedCardIdChange: S, cardDetailsLabels: C, cardDetailsFeatureLabels: w, cardDetailsActivateLabels: T, bankLogoSrc: E, bankLogoAlt: D, cardArtSrc: O, createCardLabels: k, createCardFeatureLabels: A, onCreateCard: j, onActivateCard: M }) {
|
|
22
|
+
let { selectedCardId: N, onSelectCard: P, onCreateCardClick: F, canCreateCard: I, canReadCards: L, ...R } = s({
|
|
23
23
|
cardProgram: e,
|
|
24
24
|
pagination: t,
|
|
25
|
-
defaultPagination:
|
|
26
|
-
onPaginationChange:
|
|
27
|
-
featureLabels:
|
|
28
|
-
selectedCardId:
|
|
29
|
-
defaultSelectedCardId:
|
|
30
|
-
onSelectedCardIdChange:
|
|
31
|
-
onCreateCard:
|
|
32
|
-
onActivateCard:
|
|
33
|
-
cardArtSrc:
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
|
|
38
|
-
}, [
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
42
|
-
let
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
...
|
|
45
|
-
canCreateCard:
|
|
46
|
-
onCreateCardClick:
|
|
47
|
-
labels:
|
|
48
|
-
testIds:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
onCancel: J,
|
|
63
|
-
onViewCard: I ? Y : void 0,
|
|
25
|
+
defaultPagination: g,
|
|
26
|
+
onPaginationChange: _,
|
|
27
|
+
featureLabels: y,
|
|
28
|
+
selectedCardId: b,
|
|
29
|
+
defaultSelectedCardId: x,
|
|
30
|
+
onSelectedCardIdChange: S,
|
|
31
|
+
onCreateCard: j,
|
|
32
|
+
onActivateCard: M,
|
|
33
|
+
cardArtSrc: O
|
|
34
|
+
}), z = d(() => i(v), [v]), [B, V] = f(!1), [H, U] = f(0), [W, G] = f(N), [K, q] = f(null), J = u(() => {
|
|
35
|
+
N !== null && P(null), U((e) => e + 1), V(!0);
|
|
36
|
+
}, [N, P]), Y = u(() => {
|
|
37
|
+
V(!1), N !== null && P(null);
|
|
38
|
+
}, [N, P]), X = u((e) => {
|
|
39
|
+
V(!1), P(e);
|
|
40
|
+
}, [P]), Z = e === "debit" && !!O && !!I && F === void 0, Q = B && N === null && Z;
|
|
41
|
+
B && (N !== null || !Z) && V(!1), Q ? K !== "create" && q("create") : N !== null && (K !== "details" && q("details"), N !== W && G(N));
|
|
42
|
+
let $ = K === "create", ee = N !== null || Q;
|
|
43
|
+
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(a, {
|
|
44
|
+
...R,
|
|
45
|
+
canCreateCard: I,
|
|
46
|
+
onCreateCardClick: F ?? J,
|
|
47
|
+
labels: z,
|
|
48
|
+
testIds: r
|
|
49
|
+
}), /* @__PURE__ */ m(o, {
|
|
50
|
+
isOpen: ee,
|
|
51
|
+
labels: $ ? z.createSheet : z.detailsSheet,
|
|
52
|
+
contentClassName: $ ? "ttw:overflow-hidden ttw:p-0 ttw:min-h-0" : void 0,
|
|
53
|
+
onClose: Y,
|
|
54
|
+
testIds: n,
|
|
55
|
+
children: $ && Z && O ? /* @__PURE__ */ m(l, {
|
|
56
|
+
cardArtSrc: O,
|
|
57
|
+
labels: k,
|
|
58
|
+
featureLabels: A,
|
|
59
|
+
onClose: Y,
|
|
60
|
+
onCancel: Y,
|
|
61
|
+
onViewCard: L ? X : void 0,
|
|
64
62
|
className: "ttw:min-h-0 ttw:flex-1"
|
|
65
|
-
},
|
|
66
|
-
cardId:
|
|
63
|
+
}, H) : W === null ? null : /* @__PURE__ */ m(c, {
|
|
64
|
+
cardId: W,
|
|
67
65
|
cardProgram: e,
|
|
68
|
-
labels:
|
|
69
|
-
activateLabels:
|
|
70
|
-
featureLabels:
|
|
71
|
-
bankLogoSrc:
|
|
72
|
-
bankLogoAlt:
|
|
73
|
-
onClose:
|
|
74
|
-
},
|
|
66
|
+
labels: C,
|
|
67
|
+
activateLabels: T,
|
|
68
|
+
featureLabels: w,
|
|
69
|
+
bankLogoSrc: E,
|
|
70
|
+
bankLogoAlt: D,
|
|
71
|
+
onClose: Y
|
|
72
|
+
}, W)
|
|
75
73
|
})] });
|
|
76
74
|
}
|
|
77
|
-
function
|
|
78
|
-
return /* @__PURE__ */
|
|
75
|
+
function _({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: h, ..._ }) {
|
|
76
|
+
return /* @__PURE__ */ m(e, {
|
|
79
77
|
widgetName: t,
|
|
80
78
|
baseUrl: n,
|
|
81
79
|
widgetToken: r,
|
|
@@ -88,10 +86,10 @@ function g({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a, gat
|
|
|
88
86
|
errorFallback: u,
|
|
89
87
|
onError: d,
|
|
90
88
|
analytics: f,
|
|
91
|
-
disclosuresAcceptance:
|
|
92
|
-
providerLabels:
|
|
93
|
-
children: /* @__PURE__ */
|
|
89
|
+
disclosuresAcceptance: p,
|
|
90
|
+
providerLabels: h,
|
|
91
|
+
children: /* @__PURE__ */ m(g, { ..._ })
|
|
94
92
|
});
|
|
95
93
|
}
|
|
96
94
|
//#endregion
|
|
97
|
-
export {
|
|
95
|
+
export { _ as CardsWidget, _ as default };
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js
CHANGED
|
@@ -88,7 +88,8 @@ function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleS
|
|
|
88
88
|
title: U.errorTitle,
|
|
89
89
|
description: U.errorDescription,
|
|
90
90
|
retryLabel: U.retryButton,
|
|
91
|
-
onRetry: A
|
|
91
|
+
onRetry: A,
|
|
92
|
+
testId: V?.error
|
|
92
93
|
})
|
|
93
94
|
})
|
|
94
95
|
}) : S ? /* @__PURE__ */ _(C, { columnCount: K }) : t.length === 0 ? /* @__PURE__ */ _(c, {
|
|
@@ -105,7 +106,8 @@ function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleS
|
|
|
105
106
|
"aria-hidden": !0,
|
|
106
107
|
className: "ttw:size-4"
|
|
107
108
|
}),
|
|
108
|
-
onAction: W ? k : void 0
|
|
109
|
+
onAction: W ? k : void 0,
|
|
110
|
+
testId: V?.empty
|
|
109
111
|
})
|
|
110
112
|
})
|
|
111
113
|
}) : t.map((e) => /* @__PURE__ */ _(p, {
|
|
@@ -7,8 +7,8 @@ import { CARDS_LIST_LABELS_EN as a } from "./labels.js";
|
|
|
7
7
|
import { useMemo as o } from "react";
|
|
8
8
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
9
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js
|
|
10
|
-
function l({ isOpen: l, onClose: u, labels: d, contentClassName: f,
|
|
11
|
-
let
|
|
10
|
+
function l({ isOpen: l, onClose: u, labels: d, contentClassName: f, testIds: p, children: m }) {
|
|
11
|
+
let h = o(() => ({
|
|
12
12
|
...a.detailsSheet,
|
|
13
13
|
...d
|
|
14
14
|
}), [d]);
|
|
@@ -19,17 +19,18 @@ function l({ isOpen: l, onClose: u, labels: d, contentClassName: f, children: p
|
|
|
19
19
|
},
|
|
20
20
|
children: /* @__PURE__ */ c(t, {
|
|
21
21
|
showCloseButton: !1,
|
|
22
|
+
"data-testid": p?.root,
|
|
22
23
|
className: i("ttw:w-168 ttw:sm:max-w-168", "ttw:!gap-0", f ?? "ttw:overflow-y-auto"),
|
|
23
24
|
children: [
|
|
24
25
|
/* @__PURE__ */ s(r, {
|
|
25
26
|
className: "ttw:sr-only",
|
|
26
|
-
children:
|
|
27
|
+
children: h.title
|
|
27
28
|
}),
|
|
28
29
|
/* @__PURE__ */ s(n, {
|
|
29
30
|
className: "ttw:sr-only",
|
|
30
|
-
children:
|
|
31
|
+
children: h.description
|
|
31
32
|
}),
|
|
32
|
-
|
|
33
|
+
m
|
|
33
34
|
]
|
|
34
35
|
})
|
|
35
36
|
});
|
|
@@ -80,7 +80,7 @@ function l({ row: i, columns: a, labels: l, testIds: u }) {
|
|
|
80
80
|
})
|
|
81
81
|
};
|
|
82
82
|
return /* @__PURE__ */ s(n, {
|
|
83
|
-
"data-testid":
|
|
83
|
+
"data-testid": u?.rootPrefix ? `${u.rootPrefix}-${i.key}` : void 0,
|
|
84
84
|
className: f ? "ttw:relative ttw:h-18 ttw:cursor-pointer" : "ttw:h-18",
|
|
85
85
|
children: [a.map((e, n) => /* @__PURE__ */ s(t, { children: [n === 0 && f ? /* @__PURE__ */ o("button", {
|
|
86
86
|
type: "button",
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.4.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.4.15", n = "a15437f1c29a0b2963f6e4505115338ae1a6198c", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|