@tesouro/embedded-components-react 0.2.259 → 0.2.261
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 +45 -37
- package/dist/index.d.ts +236 -128
- package/dist/index.js +13 -12
- package/dist/lib/CardsWidget.d.ts +142 -14
- package/dist/lib/ProfileWidget.d.ts +16 -0
- package/dist/lib/SettingsWidget.d.ts +65 -3
- package/dist/lib/SettingsWidget.js +3 -2
- 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/monite-sdk/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +59 -56
- package/dist/libs/tesouro-embedded-components-react/profile-widget/ui/dist/index2.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/profile-widget/ui/dist/index3.js +25 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js +20 -41
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +37 -122
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +133 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index7.js +3 -0
- 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 +1 -1
- package/package.json +1 -1
|
@@ -12,42 +12,64 @@ import "../../ui/dist/index.js";
|
|
|
12
12
|
import { useCardsWidget as a } from "./index7.js";
|
|
13
13
|
import { CardDetailsWidget as o } from "../../../card-details-widget/feature/dist/index6.js";
|
|
14
14
|
import "../../../card-details-widget/feature/dist/index.js";
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
15
|
+
import { CreateCardWidget as s } from "../../../create-card-widget/feature/dist/index7.js";
|
|
16
|
+
import "../../../create-card-widget/feature/dist/index.js";
|
|
17
|
+
import { useCallback as c, useMemo as l, useState as u } from "react";
|
|
18
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
17
19
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js
|
|
18
|
-
function
|
|
19
|
-
let { selectedCardId:
|
|
20
|
+
function m({ cardProgram: e, pagination: t, defaultPagination: m, onPaginationChange: h, labels: g, featureLabels: _, selectedCardId: v, defaultSelectedCardId: y, onSelectedCardIdChange: b, cardDetailsLabels: x, cardDetailsFeatureLabels: S, bankLogoSrc: C, bankLogoAlt: w, cardArtSrc: T, createCardLabels: E, createCardFeatureLabels: D, onCreateCard: O, onActivateCard: k }) {
|
|
21
|
+
let { selectedCardId: A, onSelectCard: j, onCreateCardClick: M, canCreateCard: N, canReadCards: P, ...F } = a({
|
|
20
22
|
cardProgram: e,
|
|
21
23
|
pagination: t,
|
|
22
|
-
defaultPagination:
|
|
23
|
-
onPaginationChange:
|
|
24
|
-
featureLabels:
|
|
25
|
-
selectedCardId:
|
|
26
|
-
defaultSelectedCardId:
|
|
27
|
-
onSelectedCardIdChange:
|
|
28
|
-
onCreateCard:
|
|
29
|
-
onActivateCard:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
defaultPagination: m,
|
|
25
|
+
onPaginationChange: h,
|
|
26
|
+
featureLabels: _,
|
|
27
|
+
selectedCardId: v,
|
|
28
|
+
defaultSelectedCardId: y,
|
|
29
|
+
onSelectedCardIdChange: b,
|
|
30
|
+
onCreateCard: O,
|
|
31
|
+
onActivateCard: k,
|
|
32
|
+
cardArtSrc: T
|
|
33
|
+
}), I = l(() => n(g), [g]), [L, R] = u(!1), [z, B] = u(0), [V, H] = u(A), [U, W] = u(null), G = c(() => {
|
|
34
|
+
A !== null && j(null), B((e) => e + 1), R(!0);
|
|
35
|
+
}, [A, j]), K = c(() => {
|
|
36
|
+
R(!1), A !== null && j(null);
|
|
37
|
+
}, [A, j]), q = c((e) => {
|
|
38
|
+
R(!1), j(e);
|
|
39
|
+
}, [j]), J = e === "debit" && !!T && !!N && M === void 0, Y = L && A === null && J;
|
|
40
|
+
L && (A !== null || !J) && R(!1), Y ? U !== "create" && W("create") : A !== null && (U !== "details" && W("details"), A !== V && H(A));
|
|
41
|
+
let X = U === "create", Z = A !== null || Y;
|
|
42
|
+
return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(r, {
|
|
43
|
+
...F,
|
|
44
|
+
canCreateCard: N,
|
|
45
|
+
onCreateCardClick: M ?? G,
|
|
46
|
+
labels: I
|
|
47
|
+
}), /* @__PURE__ */ f(i, {
|
|
48
|
+
isOpen: Z,
|
|
49
|
+
labels: X ? I.createSheet : I.detailsSheet,
|
|
50
|
+
contentClassName: X ? "ttw:overflow-hidden ttw:p-0 ttw:min-h-0" : void 0,
|
|
51
|
+
onClose: K,
|
|
52
|
+
children: X && J && T ? /* @__PURE__ */ f(s, {
|
|
53
|
+
cardArtSrc: T,
|
|
54
|
+
labels: E,
|
|
55
|
+
featureLabels: D,
|
|
56
|
+
onClose: K,
|
|
57
|
+
onCancel: K,
|
|
58
|
+
onViewCard: P ? q : void 0,
|
|
59
|
+
className: "ttw:min-h-0 ttw:flex-1"
|
|
60
|
+
}, z) : V === null ? null : /* @__PURE__ */ f(o, {
|
|
61
|
+
cardId: V,
|
|
40
62
|
cardProgram: e,
|
|
41
|
-
labels:
|
|
42
|
-
featureLabels:
|
|
43
|
-
bankLogoSrc:
|
|
44
|
-
bankLogoAlt:
|
|
45
|
-
onClose:
|
|
46
|
-
},
|
|
63
|
+
labels: x,
|
|
64
|
+
featureLabels: S,
|
|
65
|
+
bankLogoSrc: C,
|
|
66
|
+
bankLogoAlt: w,
|
|
67
|
+
onClose: K
|
|
68
|
+
}, V)
|
|
47
69
|
})] });
|
|
48
70
|
}
|
|
49
|
-
function
|
|
50
|
-
return /* @__PURE__ */
|
|
71
|
+
function h({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, ...p }) {
|
|
72
|
+
return /* @__PURE__ */ f(e, {
|
|
51
73
|
widgetName: t,
|
|
52
74
|
baseUrl: n,
|
|
53
75
|
widgetToken: r,
|
|
@@ -57,10 +79,10 @@ function p({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a, lin
|
|
|
57
79
|
implementation: s,
|
|
58
80
|
uiFramework: c,
|
|
59
81
|
errorFallback: l,
|
|
60
|
-
onError:
|
|
61
|
-
analytics:
|
|
62
|
-
children: /* @__PURE__ */
|
|
82
|
+
onError: u,
|
|
83
|
+
analytics: d,
|
|
84
|
+
children: /* @__PURE__ */ f(m, { ...p })
|
|
63
85
|
});
|
|
64
86
|
}
|
|
65
87
|
//#endregion
|
|
66
|
-
export {
|
|
88
|
+
export { h as CardsWidget, h as default };
|
|
@@ -2,37 +2,37 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Sheet as e, SheetContent as t, SheetDescription as n, SheetTitle as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { CARDS_LIST_LABELS_EN as
|
|
7
|
-
import { useMemo as
|
|
8
|
-
import { jsx as
|
|
5
|
+
import { Sheet as e, SheetContent as t, SheetDescription as n, SheetTitle as r, cn as i } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { CARDS_LIST_LABELS_EN as a } from "./labels.js";
|
|
7
|
+
import { useMemo as o } from "react";
|
|
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
|
|
11
|
-
let
|
|
12
|
-
...
|
|
13
|
-
...
|
|
14
|
-
}), [
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
open:
|
|
10
|
+
function l({ isOpen: l, onClose: u, labels: d, contentClassName: f, children: p }) {
|
|
11
|
+
let m = o(() => ({
|
|
12
|
+
...a.detailsSheet,
|
|
13
|
+
...d
|
|
14
|
+
}), [d]);
|
|
15
|
+
return /* @__PURE__ */ s(e, {
|
|
16
|
+
open: l,
|
|
17
17
|
onOpenChange: (e) => {
|
|
18
|
-
e ||
|
|
18
|
+
e || u();
|
|
19
19
|
},
|
|
20
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ c(t, {
|
|
21
21
|
showCloseButton: !1,
|
|
22
|
-
className: "ttw:w-168 ttw:
|
|
22
|
+
className: i("ttw:w-168 ttw:sm:max-w-168", f ?? "ttw:overflow-y-auto"),
|
|
23
23
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ s(r, {
|
|
25
25
|
className: "ttw:sr-only",
|
|
26
|
-
children:
|
|
26
|
+
children: m.title
|
|
27
27
|
}),
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ s(n, {
|
|
29
29
|
className: "ttw:sr-only",
|
|
30
|
-
children:
|
|
30
|
+
children: m.description
|
|
31
31
|
}),
|
|
32
|
-
|
|
32
|
+
p
|
|
33
33
|
]
|
|
34
34
|
})
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
|
-
export {
|
|
38
|
+
export { l as CardsListDetailsSheet };
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js
CHANGED
|
@@ -29,6 +29,10 @@ var t = {
|
|
|
29
29
|
detailsSheet: {
|
|
30
30
|
title: "Card details",
|
|
31
31
|
description: "Details for the selected card. Press Escape to close."
|
|
32
|
+
},
|
|
33
|
+
createSheet: {
|
|
34
|
+
title: "Create card",
|
|
35
|
+
description: "Create a new card. Press Escape to close."
|
|
32
36
|
}
|
|
33
37
|
};
|
|
34
38
|
function n(e) {
|
|
@@ -46,6 +50,10 @@ function n(e) {
|
|
|
46
50
|
detailsSheet: {
|
|
47
51
|
...t.detailsSheet,
|
|
48
52
|
...e?.detailsSheet
|
|
53
|
+
},
|
|
54
|
+
createSheet: {
|
|
55
|
+
...t.createSheet,
|
|
56
|
+
...e?.createSheet
|
|
49
57
|
}
|
|
50
58
|
};
|
|
51
59
|
}
|