@tesouro/embedded-components-react 0.2.270 → 0.2.274
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 +8 -8
- package/dist/experimental/WidgetSuite.d.ts +3 -43
- package/dist/experimental/index.d.ts +3 -43
- package/dist/index.d.ts +93 -27
- package/dist/lib/AcceptDisclosuresWidget.d.ts +93 -27
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index2.js +20 -14
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index3.js +58 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index3.js +22 -36
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +96 -78
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +5 -12
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js +23 -3
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index6.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1252 -1163
- 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 +0 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +46 -58
- package/package.json +1 -1
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.2.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.2.274", n = "407846120da5e421458168e372d9c28f66fd6d4a", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -22,10 +22,6 @@ var e = {
|
|
|
22
22
|
title: "We couldn't finish loading this page",
|
|
23
23
|
body: "Your disclosure acceptance was saved, so you won't need to accept again.",
|
|
24
24
|
retryButton: "Try again"
|
|
25
|
-
},
|
|
26
|
-
unavailableState: {
|
|
27
|
-
title: "This account needs to accept disclosures",
|
|
28
|
-
body: "The documents are not available right now. Please contact support to continue."
|
|
29
25
|
}
|
|
30
26
|
};
|
|
31
27
|
//#endregion
|
|
@@ -24,102 +24,90 @@ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
|
24
24
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js
|
|
25
25
|
var E = {
|
|
26
26
|
initFailed: "widget-suite-init-failed",
|
|
27
|
-
disclosuresRefreshFailed: "widget-suite-disclosures-refresh-failed"
|
|
28
|
-
disclosuresUnavailable: "widget-suite-disclosures-unavailable"
|
|
27
|
+
disclosuresRefreshFailed: "widget-suite-disclosures-refresh-failed"
|
|
29
28
|
};
|
|
30
|
-
function D({ sections: r,
|
|
31
|
-
let
|
|
29
|
+
function D({ sections: r, labels: m, sectionLabels: D, sectionTitleLabels: O, contentLabels: k, disclosureLabels: A, showSectionTitle: j = !0 }) {
|
|
30
|
+
let M = n();
|
|
32
31
|
b(() => {
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
let
|
|
32
|
+
M(h.Mounted);
|
|
33
|
+
}, [M]);
|
|
34
|
+
let N = {
|
|
36
35
|
...d,
|
|
37
|
-
...
|
|
38
|
-
}, { initResponse:
|
|
36
|
+
...D
|
|
37
|
+
}, { initResponse: P } = a(), F = o(), I = s(), L = P?.scopes, R = x(() => ({
|
|
39
38
|
creditCards: {
|
|
40
39
|
...l.creditCards,
|
|
41
|
-
...
|
|
40
|
+
...k?.creditCards
|
|
42
41
|
},
|
|
43
42
|
debitCards: {
|
|
44
43
|
...l.debitCards,
|
|
45
|
-
...
|
|
44
|
+
...k?.debitCards
|
|
46
45
|
},
|
|
47
46
|
expensePlaceholders: {
|
|
48
47
|
...l.expensePlaceholders,
|
|
49
|
-
...
|
|
48
|
+
...k?.expensePlaceholders
|
|
50
49
|
}
|
|
51
|
-
}), [
|
|
50
|
+
}), [k]), [z, B] = S(r[0] ?? ""), V = i(), [H, U] = S(!1), W = y(() => U(!0), []), G = g(P), K = {
|
|
52
51
|
...u,
|
|
53
|
-
...
|
|
52
|
+
...A,
|
|
54
53
|
initFailedState: {
|
|
55
54
|
...u.initFailedState,
|
|
56
|
-
...
|
|
55
|
+
...A?.initFailedState
|
|
57
56
|
},
|
|
58
57
|
refreshFailedState: {
|
|
59
58
|
...u.refreshFailedState,
|
|
60
|
-
...
|
|
61
|
-
},
|
|
62
|
-
unavailableState: {
|
|
63
|
-
...u.unavailableState,
|
|
64
|
-
...j?.unavailableState
|
|
59
|
+
...A?.refreshFailedState
|
|
65
60
|
}
|
|
66
61
|
};
|
|
67
62
|
b(() => {
|
|
68
|
-
!
|
|
69
|
-
}, [
|
|
70
|
-
let
|
|
71
|
-
if (!
|
|
63
|
+
!G && H && U(!1);
|
|
64
|
+
}, [H, G]);
|
|
65
|
+
let q = !!(P && I);
|
|
66
|
+
if (!P && !F || q && !F) return /* @__PURE__ */ w(_, {
|
|
72
67
|
isLoading: !0,
|
|
73
68
|
sections: [],
|
|
74
69
|
selectedSectionId: "",
|
|
75
|
-
onSectionChange:
|
|
76
|
-
labels:
|
|
70
|
+
onSectionChange: B,
|
|
71
|
+
labels: m
|
|
77
72
|
});
|
|
78
|
-
if ((!
|
|
79
|
-
title:
|
|
80
|
-
description:
|
|
81
|
-
retryLabel:
|
|
82
|
-
onRetry:
|
|
73
|
+
if ((!P || q) && F) return /* @__PURE__ */ w(t, {
|
|
74
|
+
title: K.initFailedState.title,
|
|
75
|
+
description: K.initFailedState.body,
|
|
76
|
+
retryLabel: K.initFailedState.retryButton,
|
|
77
|
+
onRetry: V,
|
|
83
78
|
testId: E.initFailed
|
|
84
79
|
});
|
|
85
|
-
if (
|
|
86
|
-
title:
|
|
87
|
-
description:
|
|
88
|
-
retryLabel:
|
|
89
|
-
onRetry:
|
|
80
|
+
if (G) return H && F ? /* @__PURE__ */ w(t, {
|
|
81
|
+
title: K.refreshFailedState.title,
|
|
82
|
+
description: K.refreshFailedState.body,
|
|
83
|
+
retryLabel: K.refreshFailedState.retryButton,
|
|
84
|
+
onRetry: V,
|
|
90
85
|
testId: E.disclosuresRefreshFailed
|
|
91
|
-
}) :
|
|
92
|
-
|
|
93
|
-
onAccepted: G
|
|
94
|
-
}) : /* @__PURE__ */ w(t, {
|
|
95
|
-
title: q.unavailableState.title,
|
|
96
|
-
description: q.unavailableState.body,
|
|
97
|
-
testId: E.disclosuresUnavailable
|
|
98
|
-
});
|
|
99
|
-
let Y = F?.bankName?.trim(), X = Y ? {
|
|
86
|
+
}) : /* @__PURE__ */ w(c, { onAccepted: W });
|
|
87
|
+
let J = P?.bankName?.trim(), Y = J ? {
|
|
100
88
|
...f,
|
|
101
|
-
...
|
|
102
|
-
}.bankTagline.replaceAll("{bankName}",
|
|
89
|
+
...O
|
|
90
|
+
}.bankTagline.replaceAll("{bankName}", J) : void 0, X = r.flatMap((t) => {
|
|
103
91
|
let n = p[t];
|
|
104
|
-
if (!n || n.anyOfScopes && !e(
|
|
105
|
-
let r =
|
|
106
|
-
grantedScopes:
|
|
107
|
-
labels:
|
|
92
|
+
if (!n || n.anyOfScopes && !e(L, n.anyOfScopes)) return [];
|
|
93
|
+
let r = N[t], i = n.render({
|
|
94
|
+
grantedScopes: L,
|
|
95
|
+
labels: R
|
|
108
96
|
});
|
|
109
97
|
return [{
|
|
110
98
|
id: t,
|
|
111
99
|
label: r,
|
|
112
|
-
content:
|
|
100
|
+
content: j && !n.rendersOwnTitle ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(v, {
|
|
113
101
|
title: r,
|
|
114
|
-
bankTagline:
|
|
102
|
+
bankTagline: Y
|
|
115
103
|
}), i] }) : i
|
|
116
104
|
}];
|
|
117
|
-
}),
|
|
105
|
+
}), Z = X.some((e) => e.id === z) ? z : X[0]?.id ?? "";
|
|
118
106
|
return /* @__PURE__ */ w(_, {
|
|
119
|
-
sections:
|
|
120
|
-
selectedSectionId:
|
|
121
|
-
onSectionChange:
|
|
122
|
-
labels:
|
|
107
|
+
sections: X,
|
|
108
|
+
selectedSectionId: Z,
|
|
109
|
+
onSectionChange: B,
|
|
110
|
+
labels: m
|
|
123
111
|
});
|
|
124
112
|
}
|
|
125
113
|
function O({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, ...f }) {
|