@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.
Files changed (24) hide show
  1. package/README.md +8 -8
  2. package/dist/experimental/WidgetSuite.d.ts +3 -43
  3. package/dist/experimental/index.d.ts +3 -43
  4. package/dist/index.d.ts +93 -27
  5. package/dist/lib/AcceptDisclosuresWidget.d.ts +93 -27
  6. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index.js +2 -1
  7. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index2.js +20 -14
  8. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index3.js +58 -0
  9. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index3.js +22 -36
  10. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +96 -78
  11. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/index.js +3 -3
  12. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +5 -12
  13. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js +23 -3
  14. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index5.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index6.js +0 -1
  16. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index3.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1252 -1163
  21. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +0 -4
  23. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +46 -58
  24. package/package.json +1 -1
@@ -0,0 +1,58 @@
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 { getDisclosures as t } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
7
+ import { withAuthEpoch as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import "../../../shared/data-access/dist/index.js";
9
+ import { useQuery as r } from "@tanstack/react-query";
10
+ //#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index3.js
11
+ function i(e) {
12
+ let t = 2166136261;
13
+ for (let n = 0; n < e.length; n += 1) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
14
+ return (t >>> 0).toString(16);
15
+ }
16
+ function a(e, t) {
17
+ return JSON.stringify(e.slice(0, -1)) === JSON.stringify(t);
18
+ }
19
+ var o = [];
20
+ function s(e, t) {
21
+ if (e !== void 0 && t !== void 0 && a(t.queryKey, o)) return e;
22
+ }
23
+ function c({ invitationToken: a, userId: c, enabled: l } = {}) {
24
+ let { client: u, widgetToken: d, authEpoch: f } = e(), p = a && c ? {
25
+ invitationToken: a,
26
+ userId: c
27
+ } : void 0, m = async ({ signal: e }) => {
28
+ let { data: n } = await t({
29
+ client: u,
30
+ headers: { "X-Widget-Token": d ?? "" },
31
+ ...p ? { query: p } : {},
32
+ signal: e,
33
+ throwOnError: !0
34
+ });
35
+ if (!n) throw Error("Unexpected disclosures response from widget gateway");
36
+ return n;
37
+ }, h = ["getDisclosures", {
38
+ baseUrl: u.getConfig().baseUrl,
39
+ ...p ? {
40
+ userId: p.userId,
41
+ invitationTokenFingerprint: i(p.invitationToken)
42
+ } : {}
43
+ }];
44
+ o = h;
45
+ let { queryKey: g } = n({
46
+ queryKey: h,
47
+ queryFn: m,
48
+ placeholderData: void 0
49
+ }, f);
50
+ return r({
51
+ queryKey: g,
52
+ queryFn: m,
53
+ placeholderData: s,
54
+ enabled: !!d && (l === !0 || l === void 0)
55
+ });
56
+ }
57
+ //#endregion
58
+ export { c as useDisclosuresQuery };
@@ -1,43 +1,29 @@
1
- import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as e } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
1
+ import { mergeAcceptDisclosuresWidgetLabels as e } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
2
2
  import "../../ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index3.js
4
- function t(t) {
5
- return {
6
- ...e,
7
- ...t,
8
- linkLabels: {
9
- ...e.linkLabels,
10
- ...t?.linkLabels
11
- }
12
- };
4
+ function t(e, t) {
5
+ return e.length === 0 ? "" : e.length === 1 ? e[0] ?? "" : e.length === 2 ? t.documentListPairTemplate.replaceAll("{first}", e[0] ?? "").replaceAll("{second}", e[1] ?? "") : `${e.slice(0, -1).join(t.documentListSeparator)}${t.documentListLastConjunction}${e[e.length - 1]}`;
6
+ }
7
+ var n = "{documents}";
8
+ function r(e, r, i, a) {
9
+ let o = t(i, a), s = e.replaceAll("{bankName}", r);
10
+ return e.includes(n) ? s.replaceAll(n, o) : i.length === 0 ? s : `${s.trimEnd().replace(/\.$/, "")}. ${o}.`;
13
11
  }
14
- function n(e) {
15
- let n = e?.disclosureLinks, r = e?.vspName?.trim() ?? "", i = e?.bankName?.trim() ?? "";
16
- if (!n || !i) return null;
17
- let a = t(e?.labels), o = a.linkLabels;
12
+ function i(t) {
13
+ let n = t?.documents, i = t?.vspName?.trim() ?? "", a = t?.bankName?.trim() ?? "";
14
+ if (n === void 0 || !a) return null;
15
+ let o = e(t?.labels), s = n.map((e) => e.title), c = s.length > 0, l = c ? r(o.agreementTextTemplate, a, s, o) : o.noDocumentsAgreementTextTemplate.replaceAll("{bankName}", a);
18
16
  return {
19
- vspName: r || i,
20
- bankName: i,
21
- disclosureLinks: [
22
- {
23
- label: o.termsOfUse,
24
- href: n.termsOfUseUrl
25
- },
26
- {
27
- label: o.privacyPolicy,
28
- href: n.privacyPolicyUrl
29
- },
30
- {
31
- label: o.electronicCommunications,
32
- href: n.electronicCommunicationsAgreementUrl
33
- },
34
- {
35
- label: o.patriotAct,
36
- href: n.usaPatriotActUrl
37
- }
38
- ],
39
- agreementText: a.agreementTextTemplate.replaceAll("{bankName}", i)
17
+ vspName: i || a,
18
+ bankName: a,
19
+ title: c ? o.title : o.noDocumentsTitle,
20
+ disclosureLinks: n.map((e) => ({
21
+ label: e.title,
22
+ href: e.url
23
+ })),
24
+ agreementText: l,
25
+ agreementCheckboxAriaLabel: c ? o.agreementCheckboxAriaLabel : o.noDocumentsAgreementCheckboxAriaLabel.replaceAll("{bankName}", a)
40
26
  };
41
27
  }
42
28
  //#endregion
43
- export { n as resolveAcceptDisclosuresContent };
29
+ export { i as resolveAcceptDisclosuresContent };
@@ -3,118 +3,136 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { AcceptDisclosuresWidgetAnalyticsEvent as e, WIDGET_NAME as t } from "./index2.js";
6
- import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as n } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
6
+ import { mergeAcceptDisclosuresWidgetLabels as n } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
7
7
  import { AcceptDisclosuresWidget as r } from "../../ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
8
8
  import "../../ui/dist/index.js";
9
9
  import { resolveAcceptDisclosuresContent as i } from "./index3.js";
10
10
  import { useAcceptWidgetDisclosures as a } from "../../data-access/dist/index2.js";
11
+ import { useDisclosuresQuery as o } from "../../data-access/dist/index3.js";
11
12
  import "../../data-access/dist/index.js";
12
- import { useAnalyticsTrack as o } from "../../../shared/feature/dist/lib/analytics/hooks.js";
13
- import { WidgetProvider as s } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
14
- import { extractApiErrorMessage as c } from "../../../shared/util/dist/lib/apiErrors.js";
15
- import { useRefetchWidget as l, useWidgetConfig as u, useWidgetInitStaleForToken as d } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
+ import { ErrorState as s } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
14
+ import "../../../shared/ui/dist/index.js";
15
+ import { useAnalyticsTrack as c } from "../../../shared/feature/dist/lib/analytics/hooks.js";
16
+ import { WidgetProvider as l } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
17
+ import { extractApiErrorMessage as u } from "../../../shared/util/dist/lib/apiErrors.js";
18
+ import { useRefetchWidget as d, useWidgetConfig as f, useWidgetInitStaleForToken as p } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
16
19
  import "../../../shared/feature/dist/index.js";
17
- import { useCallback as f, useEffect as p, useRef as m, useState as h } from "react";
18
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
20
+ import { useCallback as m, useEffect as h, useRef as g, useState as _ } from "react";
21
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
19
22
  //#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js
20
- function y(e) {
21
- return {
22
- ...n,
23
- ...e,
24
- linkLabels: {
25
- ...n.linkLabels,
26
- ...e?.linkLabels
27
- }
28
- };
29
- }
30
- function b(e, t, n) {
31
- return /* @__PURE__ */ v(g, { children: [
23
+ function x(e, t, n) {
24
+ return /* @__PURE__ */ b(v, { children: [
32
25
  n.providerAttributionPrefix,
33
- /* @__PURE__ */ _("strong", { children: e }),
26
+ /* @__PURE__ */ y("strong", { children: e }),
34
27
  n.providerAttributionMiddle,
35
28
  t,
36
29
  n.providerAttributionSuffix
37
30
  ] });
38
31
  }
39
- function x({ invitationToken: t, userId: n, disclosureLinks: r, labels: a, onAccepted: s }) {
40
- let c = o(), { initResponse: l } = u(), f = d(), m = y(a);
41
- p(() => {
42
- c(e.Mounted);
43
- }, [c]);
44
- let h = i({
45
- disclosureLinks: r,
46
- vspName: l?.vspName,
47
- bankName: l?.bankName,
32
+ function S({ invitationToken: t, userId: r, labels: a, onAccepted: l }) {
33
+ let d = c(), { initResponse: m } = f(), g = p(), _ = n(a), { data: v, isError: b, error: x, refetch: S } = o({
34
+ invitationToken: t,
35
+ userId: r
36
+ });
37
+ if (h(() => {
38
+ d(e.Mounted);
39
+ }, [d]), b) return /* @__PURE__ */ y(s, {
40
+ title: _.loadErrorTitle,
41
+ description: u(x) ?? _.loadErrorFallback,
42
+ retryLabel: _.loadErrorRetryLabel,
43
+ onRetry: () => {
44
+ S();
45
+ },
46
+ testId: "accept-disclosures-load-error"
47
+ });
48
+ let w = i({
49
+ documents: v?.documents,
50
+ vspName: m?.vspName,
51
+ bankName: m?.bankName,
48
52
  labels: a
49
53
  });
50
- if (!h) return null;
51
- let g = !!(t && n);
52
- if (!g && f) return null;
53
- let v = `${g ? `invite:${t}:${n}` : `user:${l?.userId ?? ""}`}:${h.vspName}:${h.bankName}:${h.agreementText}:${h.disclosureLinks.map((e) => e.href).join("|")}`;
54
- return /* @__PURE__ */ _(S, {
54
+ if (!w) return null;
55
+ let T = v?.version ?? null, E = !!(t && r);
56
+ if (!E && g) return null;
57
+ let D = `${E ? `invite:${t}:${r}` : `user:${m?.userId ?? ""}`}:${T}:${w.vspName}:${w.bankName}:${w.agreementText}:${w.disclosureLinks.map((e) => e.href).join("|")}`;
58
+ return /* @__PURE__ */ y(C, {
55
59
  invitationToken: t,
56
- userId: n,
60
+ userId: r,
61
+ displayedVersion: T,
57
62
  labelOverrides: a,
58
- content: h,
59
- labels: m,
60
- onAccepted: s
61
- }, v);
63
+ content: w,
64
+ labels: _,
65
+ onAccepted: l,
66
+ onDisclosuresVersionChanged: S
67
+ }, D);
62
68
  }
63
- function S({ invitationToken: e, userId: t, labelOverrides: n, content: i, labels: o, onAccepted: s }) {
64
- let [u, d] = h(!1), [p, g] = h(), [v, y] = h(!1), [x, S] = h(!1), C = m(!1), { mutateAsync: w } = a(), T = l(), E = f((e) => {
65
- g(void 0), d(e);
66
- }, []), D = f(async () => {
67
- if (!(!u || v || x)) {
68
- g(void 0), y(!0);
69
+ function C({ invitationToken: e, userId: t, displayedVersion: n, labelOverrides: i, content: o, labels: s, onAccepted: c, onDisclosuresVersionChanged: l }) {
70
+ let [f, p] = _(!1), [h, v] = _(), [b, S] = _(!1), [C, w] = _(!1), T = g(!1), { mutateAsync: E } = a(), D = d(), O = m((e) => {
71
+ v(void 0), p(e);
72
+ }, []), k = m(async () => {
73
+ if (!(!f || b || C)) {
74
+ v(void 0), S(!0);
69
75
  try {
70
- if (!C.current) try {
71
- await w({
76
+ if (!T.current) try {
77
+ await E({
72
78
  invitationToken: e,
73
- userId: t
74
- }), C.current = !0;
79
+ userId: t,
80
+ displayedVersion: n
81
+ }), T.current = !0;
75
82
  } catch (e) {
76
- g(c(e) ?? o.acceptErrorFallback);
83
+ if (e instanceof Error && e.name === "DisclosuresVersionChangedError") {
84
+ v(s.disclosuresUpdatedFallback), l();
85
+ return;
86
+ }
87
+ v(u(e) ?? s.acceptErrorFallback);
77
88
  return;
78
89
  }
79
90
  try {
80
- await s?.();
91
+ await c?.();
81
92
  } catch (e) {
82
- g(c(e) ?? o.acceptErrorFallback);
93
+ v(u(e) ?? s.acceptErrorFallback);
83
94
  return;
84
95
  }
85
- T(), S(!0);
96
+ D(), w(!0);
86
97
  } finally {
87
- y(!1);
98
+ S(!1);
88
99
  }
89
100
  }
90
101
  }, [
91
- w,
92
- x,
102
+ E,
103
+ n,
104
+ C,
93
105
  e,
94
- u,
95
- v,
96
- o.acceptErrorFallback,
97
- s,
98
- T,
106
+ f,
107
+ b,
108
+ s.acceptErrorFallback,
109
+ s.disclosuresUpdatedFallback,
110
+ c,
111
+ l,
112
+ D,
99
113
  t
100
114
  ]);
101
- return /* @__PURE__ */ _(r, {
102
- labels: n,
103
- providerAttribution: b(i.vspName, i.bankName, o),
104
- agreementText: i.agreementText,
105
- disclosureLinks: i.disclosureLinks,
106
- isAgreed: u,
107
- onAgreedChange: E,
115
+ return /* @__PURE__ */ y(r, {
116
+ labels: {
117
+ ...i,
118
+ title: o.title,
119
+ agreementCheckboxAriaLabel: o.agreementCheckboxAriaLabel
120
+ },
121
+ providerAttribution: x(o.vspName, o.bankName, s),
122
+ agreementText: o.agreementText,
123
+ disclosureLinks: o.disclosureLinks,
124
+ isAgreed: f,
125
+ onAgreedChange: O,
108
126
  onAccept: () => {
109
- D();
127
+ k();
110
128
  },
111
- isSubmitting: v,
112
- isAccepted: x,
113
- errorMessage: p
129
+ isSubmitting: b,
130
+ isAccepted: C,
131
+ errorMessage: h
114
132
  });
115
133
  }
116
- function C({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, ...p }) {
117
- return /* @__PURE__ */ _(s, {
134
+ function w({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: u, onError: d, analytics: f, ...p }) {
135
+ return /* @__PURE__ */ y(l, {
118
136
  widgetName: t,
119
137
  baseUrl: e,
120
138
  widgetToken: n,
@@ -122,13 +140,13 @@ function C({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gat
122
140
  configClient: i,
123
141
  gatewayRouting: a,
124
142
  linkComponent: o,
125
- implementation: c,
126
- uiFramework: l,
143
+ implementation: s,
144
+ uiFramework: c,
127
145
  errorFallback: u,
128
146
  onError: d,
129
147
  analytics: f,
130
- children: /* @__PURE__ */ _(x, { ...p })
148
+ children: /* @__PURE__ */ y(S, { ...p })
131
149
  });
132
150
  }
133
151
  //#endregion
134
- export { C as AcceptDisclosuresWidget };
152
+ export { w as AcceptDisclosuresWidget };
@@ -1,3 +1,3 @@
1
- import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as e } from "./lib/AcceptDisclosuresWidget/labels.js";
2
- import { AcceptDisclosuresWidget as t } from "./lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
3
- export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, t as AcceptDisclosuresWidget };
1
+ import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as e, mergeAcceptDisclosuresWidgetLabels as t } from "./lib/AcceptDisclosuresWidget/labels.js";
2
+ import { AcceptDisclosuresWidget as n } from "./lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
3
+ export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, n as AcceptDisclosuresWidget, t as mergeAcceptDisclosuresWidgetLabels };
@@ -1,17 +1,10 @@
1
- import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as e } from "./labels.js";
1
+ import { mergeAcceptDisclosuresWidgetLabels as e } from "./labels.js";
2
2
  import { Button as t, Checkbox as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
3
3
  import { useId as r } from "react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  //#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js
6
6
  function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgreed: l, onAgreedChange: u, onAccept: d, isSubmitting: f = !1, isAccepted: p = !1, errorMessage: m, labels: h }) {
7
- let g = f || p, _ = {
8
- ...e,
9
- ...h,
10
- linkLabels: {
11
- ...e.linkLabels,
12
- ...h?.linkLabels
13
- }
14
- }, v = r(), y = `${v}-agree`, b = `${v}-agree-description`, x = `${v}-accept-error`;
7
+ let g = f || p, _ = e(h), v = r(), y = `${v}-agree`, b = `${v}-agree-description`, x = `${v}-accept-error`;
15
8
  return /* @__PURE__ */ a("div", {
16
9
  "data-testid": "accept-disclosures-widget-root",
17
10
  className: "ttw:block ttw:w-full ttw:rounded-lg ttw:border ttw:border-border ttw:bg-background ttw:p-6",
@@ -25,7 +18,7 @@ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgr
25
18
  className: "ttw:mb-4 ttw:text-sm ttw:text-foreground",
26
19
  children: o
27
20
  }),
28
- /* @__PURE__ */ i("ul", {
21
+ c.length > 0 ? /* @__PURE__ */ i("ul", {
29
22
  "data-testid": "accept-disclosures-links",
30
23
  className: "ttw:mb-4 ttw:list-disc ttw:space-y-2 ttw:pl-5",
31
24
  children: c.map((e) => /* @__PURE__ */ i("li", {
@@ -38,7 +31,7 @@ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgr
38
31
  children: e.label
39
32
  })
40
33
  }, e.href))
41
- }),
34
+ }) : null,
42
35
  /* @__PURE__ */ a("div", {
43
36
  className: "ttw:mb-4 ttw:flex ttw:items-start ttw:gap-3",
44
37
  children: [/* @__PURE__ */ i(n, {
@@ -77,4 +70,4 @@ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgr
77
70
  });
78
71
  }
79
72
  //#endregion
80
- export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, o as AcceptDisclosuresWidget };
73
+ export { o as AcceptDisclosuresWidget, e as mergeAcceptDisclosuresWidgetLabels };
@@ -4,7 +4,7 @@ var e = {
4
4
  acceptButton: "Accept",
5
5
  agreementCheckboxAriaLabel: "Agree to banking disclosures",
6
6
  acceptErrorFallback: "Failed to accept disclosures",
7
- agreementTextTemplate: "I agree to {bankName}'s Terms of Use and Privacy Policy, consent to receive electronic communications about my accounts and services, and acknowledge receipt of the USA PATRIOT Act Disclosure.",
7
+ agreementTextTemplate: "I agree to {bankName}'s {documents}.",
8
8
  providerAttributionPrefix: "Banking services for ",
9
9
  providerAttributionMiddle: " are provided by ",
10
10
  providerAttributionSuffix: ", Member FDIC.",
@@ -13,7 +13,27 @@ var e = {
13
13
  privacyPolicy: "Privacy Policy",
14
14
  electronicCommunications: "Electronic Communications Agreement",
15
15
  patriotAct: "USA PATRIOT Act Disclosure"
16
- }
16
+ },
17
+ noDocumentsTitle: "Accept to continue",
18
+ noDocumentsAgreementTextTemplate: "I agree to continue with {bankName}.",
19
+ noDocumentsAgreementCheckboxAriaLabel: "Agree to continue with {bankName}",
20
+ documentListPairTemplate: "{first} and {second}",
21
+ documentListSeparator: ", ",
22
+ documentListLastConjunction: ", and ",
23
+ loadErrorTitle: "Unable to load disclosures",
24
+ loadErrorFallback: "Failed to load disclosures",
25
+ loadErrorRetryLabel: "Try again",
26
+ disclosuresUpdatedFallback: "These disclosures have been updated. Review the new documents and accept again."
17
27
  };
28
+ function t(t) {
29
+ return {
30
+ ...e,
31
+ ...t,
32
+ linkLabels: {
33
+ ...e.linkLabels,
34
+ ...t?.linkLabels
35
+ }
36
+ };
37
+ }
18
38
  //#endregion
19
- export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN };
39
+ export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, t as mergeAcceptDisclosuresWidgetLabels };
@@ -14,7 +14,7 @@ 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: { cardId: o ?? "" }
17
+ path: { id: o ?? "" }
18
18
  }), p = a({
19
19
  ...r(f, d),
20
20
  enabled: !!(o && l && u) && s !== !1
@@ -31,7 +31,6 @@ function c(e) {
31
31
  cardholderName: e.cardholderName,
32
32
  nickname: e.nickname,
33
33
  lastFourDigits: e.lastFourDigits,
34
- limit: e.spendingLimit,
35
34
  fundingAccountId: e.bankAccountId
36
35
  }));
37
36
  }
@@ -86,7 +86,7 @@ function m({ isCustomer: m, enabled: h = !0 }) {
86
86
  _((t) => typeof e == "function" ? e(t) : e), x(void 0);
87
87
  }, []), U = u((e) => {
88
88
  y(e), x(void 0);
89
- }, []), W = u(() => x(k.data?.next_pagination_token), [k.data?.next_pagination_token]), G = u(() => x(k.data?.prev_pagination_token), [k.data?.prev_pagination_token]), K = u(() => {
89
+ }, []), W = u(() => x(k.data?.next_pagination_token ?? void 0), [k.data?.next_pagination_token]), G = u(() => x(k.data?.prev_pagination_token ?? void 0), [k.data?.prev_pagination_token]), K = u(() => {
90
90
  k.refetch();
91
91
  }, [k]), q = u((e) => {
92
92
  D(e), x(void 0);
@@ -45,7 +45,7 @@ function c({ cardholderUserId: t, format: r, bankAccountId: o, reference: s, mai
45
45
  bankAccountId: o,
46
46
  cardType: d,
47
47
  reference: s,
48
- cardholderUserId: t,
48
+ userId: t,
49
49
  ...f ? { shippingAddress: f } : {}
50
50
  };
51
51
  }
@@ -116,7 +116,7 @@ function v(e) {
116
116
  }
117
117
  function y(e) {
118
118
  return (e ?? []).map((e) => {
119
- let t = v(e.iban || e.account_number), n = [e.currency, t].filter(Boolean).join(" · ");
119
+ let t = v(e.iban || e.account_number || void 0), n = [e.currency, t].filter(Boolean).join(" · ");
120
120
  return {
121
121
  id: e.id,
122
122
  primary: e.name || e.account_holder_name || e.currency,
@@ -260,7 +260,7 @@ var n = (e) => (e.client ?? t).post({
260
260
  scheme: "bearer",
261
261
  type: "http"
262
262
  }],
263
- url: "/embedded-banking/v1/debit-cards/{cardId}",
263
+ url: "/embedded-banking/v1/debit-cards/{id}",
264
264
  ...e
265
265
  }), C = (e) => (e?.client ?? t).get({
266
266
  security: [{