@tesouro/embedded-components-react 0.5.150 → 0.5.153

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 (71) hide show
  1. package/dist/lib/monite-sdk.d.ts +2 -44
  2. package/dist/lib/monite-sdk.js +9 -12
  3. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +10 -13
  4. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index21.js +0 -7
  5. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +1 -2
  7. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +8 -12
  8. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +1 -5
  9. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index552.js +21 -13
  11. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +72 -22
  12. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index554.js +19 -1
  13. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index555.js +20 -21
  14. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index556.js +5 -51
  15. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index557.js +10 -64
  16. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index558.js +11 -167
  17. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index559.js +133 -1
  18. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index560.js +5 -184
  19. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index561.js +8 -1
  20. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index562.js +3 -41
  21. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index563.js +221 -4
  22. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index564.js +11 -21
  23. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index565.js +33 -74
  24. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index566.js +180 -15
  25. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index567.js +201 -17
  26. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index568.js +98 -4
  27. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index569.js +63 -9
  28. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index570.js +55 -11
  29. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index571.js +89 -128
  30. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index572.js +40 -5
  31. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index573.js +75 -4
  32. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index574.js +87 -5
  33. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index575.js +12 -220
  34. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index576.js +23 -11
  35. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index577.js +17 -36
  36. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index578.js +5 -184
  37. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index579.js +20 -202
  38. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index580.js +1 -102
  39. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index581.js +60 -66
  40. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index582.js +28 -53
  41. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index583.js +2 -92
  42. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index584.js +33 -40
  43. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index585.js +14 -75
  44. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index586.js +28 -82
  45. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index587.js +28 -11
  46. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index588.js +2 -26
  47. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index589.js +97 -17
  48. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js +39 -39
  49. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js +32 -30
  50. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index12.js +77 -72
  51. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js +9 -1
  52. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js +27 -23
  53. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js +21 -13
  54. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js +64 -48
  55. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js +107 -92
  56. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index4.js +23 -15
  57. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +1 -1
  59. package/package.json +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index590.js +0 -5
  61. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index591.js +0 -24
  62. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index592.js +0 -1
  63. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index593.js +0 -64
  64. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index594.js +0 -32
  65. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index595.js +0 -4
  66. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index596.js +0 -36
  67. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +0 -18
  68. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index598.js +0 -33
  69. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index599.js +0 -31
  70. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index600.js +0 -2
  71. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index601.js +0 -97
@@ -1,222 +1,14 @@
1
- import { useCurrencies as e } from "./index62.js";
2
- import "./index222.js";
3
- import { MoniteScopedProviders as t } from "./index241.js";
4
- import { FinanceBannerWrapper as n } from "./index564.js";
5
- import { FinanceFaqWrapper as r } from "./index566.js";
6
- import { FinanceProgressBar as i } from "./index567.js";
7
- import { useKanmonContext as a } from "./index570.js";
8
- import { FinancialApplicationState as o, useFinancing as s } from "./index571.js";
9
- import "./index574.js";
10
- import { useState as c } from "react";
11
- import { Fragment as l, jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
12
- import { Box as f, Button as p, CircularProgress as m, Stack as h, Typography as g, useMediaQuery as _, useTheme as v } from "@mui/material";
13
- import { useLingui as y } from "@lingui/react";
1
+ import { FinanceLimits as e } from "./index573.js";
2
+ import { FinanceOffers as t } from "./index574.js";
3
+ import { jsx as n, jsxs as r } from "@emotion/react/jsx-runtime";
4
+ import { Box as i } from "@mui/material";
14
5
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index575.js
15
- var b = "financing_banner_hidden", x = 605800, S = (e) => /* @__PURE__ */ u(t, { children: /* @__PURE__ */ u(C, { ...e }) }), C = ({ enableServicingBanner: t = !1, handleViewDetails: S }) => {
16
- let { i18n: C } = y(), { startFinanceSession: w } = a(), T = v(), E = _(T.breakpoints.down("lg")), { formatCurrencyToDisplay: D } = e(), { buttonText: O, isLoading: k, isEnabled: A, applicationState: j, isServicing: M, offer: N } = s(), P = N?.total_amount ?? 0, F = (N?.status === "LATE" ? 0 : N?.available_amount) ?? 0, I = F / P * 100, L = N?.status !== "CLOSED" && N?.status !== "DEFAULTED", [R, z] = c(() => {
17
- let e = JSON.parse(JSON.parse(JSON.stringify(sessionStorage.getItem(b))));
18
- if (e) return e.isHidden;
19
- let t = JSON.parse(JSON.parse(JSON.stringify(localStorage.getItem(b))));
20
- return t ? t.expires_at && (/* @__PURE__ */ new Date()).getTime() > t.expires_at ? (localStorage.removeItem(b), !1) : t.isHidden : !1;
21
- }), B = t && M, V = j !== o.PENDING_APPROVAL && j !== o.NO_OFFERS_AVAILABLE && j !== o.OFFERS_EXPIRED;
22
- return R || j === o.SERVICING && !t || !A ? null : /* @__PURE__ */ d(n, {
23
- shouldApplyFinanceStyles: B,
24
- children: [/* @__PURE__ */ d(f, {
25
- display: "flex",
26
- alignItems: E && !B ? "flex-end" : "center",
27
- flexDirection: E && !B ? "column" : "row",
28
- justifyContent: "space-between",
29
- gap: 2,
30
- width: "100%",
31
- height: "100%",
32
- children: [/* @__PURE__ */ u(f, {
33
- sx: {
34
- width: "100%",
35
- display: "flex",
36
- gap: 2,
37
- flex: "1 1 0%",
38
- alignItems: E && !B ? "flex-start" : "center"
39
- },
40
- children: /* @__PURE__ */ u(f, {
41
- sx: { flex: "1 1 0%" },
42
- children: (() => {
43
- switch (j) {
44
- case o.INIT:
45
- case o.IN_PROGRESS:
46
- default: return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(g, {
47
- variant: "subtitle2",
48
- sx: { fontSize: 20 },
49
- children: C._("Fund your sales/purchases")
50
- }), /* @__PURE__ */ d(g, {
51
- variant: "body1",
52
- children: [
53
- C._("Get a small business loan plan to manage finances more efficiently."),
54
- " ",
55
- /* @__PURE__ */ u(r, { children: ({ openModal: e }) => /* @__PURE__ */ u(g, {
56
- onClick: e,
57
- variant: "body1",
58
- sx: {
59
- textDecoration: "underline",
60
- cursor: "pointer"
61
- },
62
- component: "span",
63
- children: C._("Read more >")
64
- }) })
65
- ]
66
- })] });
67
- case o.PENDING_APPROVAL: return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(g, {
68
- variant: "subtitle2",
69
- sx: { fontSize: 20 },
70
- children: C._("Your application is in review")
71
- }), /* @__PURE__ */ u(g, {
72
- variant: "body1",
73
- children: C._("It can take up to 48 hours. We'll notify you about the results.")
74
- })] });
75
- case o.APPROVED:
76
- case o.OFFER_ACCEPTED: return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(g, {
77
- variant: "subtitle2",
78
- sx: { fontSize: 20 },
79
- children: C._("Your application was approved")
80
- }), /* @__PURE__ */ u(g, {
81
- variant: "body1",
82
- children: C._("Please, review the offered credit limit and approved financing plans.")
83
- })] });
84
- case o.NO_OFFERS_AVAILABLE: return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(g, {
85
- variant: "subtitle2",
86
- sx: { fontSize: 20 },
87
- children: C._("A provider can’t offer you financing")
88
- }), /* @__PURE__ */ u(g, {
89
- variant: "body1",
90
- children: C._("They will contact you if your credit score improves and you can reapply.")
91
- })] });
92
- case o.OFFERS_EXPIRED: return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(g, {
93
- variant: "subtitle2",
94
- sx: { fontSize: 20 },
95
- children: C._("You haven’t accepted the offer and it has expired")
96
- }), /* @__PURE__ */ u(g, {
97
- variant: "body1",
98
- children: C._("Please get in touch with the provider if you still wish to receive financing.")
99
- })] });
100
- case o.SERVICING: return /* @__PURE__ */ u(g, {
101
- variant: "subtitle2",
102
- sx: { fontSize: 20 },
103
- children: C._("My financing")
104
- });
105
- }
106
- })()
107
- })
108
- }), /* @__PURE__ */ d(h, {
109
- width: E && !B ? "100%" : "auto",
110
- direction: "row",
111
- gap: 1,
112
- alignItems: "center",
113
- justifyContent: E && !B ? "flex-end" : "flex-start",
114
- children: [B && S ? /* @__PURE__ */ u(p, {
115
- onClick: S,
116
- variant: "text",
117
- children: C._("View details")
118
- }) : /* @__PURE__ */ u(p, {
119
- onClick: () => {
120
- switch (z(!0), j) {
121
- case o.IN_PROGRESS:
122
- case o.APPROVED:
123
- case o.PENDING_APPROVAL:
124
- case o.OFFER_ACCEPTED:
125
- sessionStorage.setItem(b, JSON.stringify({
126
- isHidden: !0,
127
- expires_at: null
128
- }));
129
- return;
130
- case o.INIT:
131
- localStorage.setItem(b, JSON.stringify({
132
- isHidden: !0,
133
- expires_at: (/* @__PURE__ */ new Date()).getTime() + x
134
- }));
135
- return;
136
- case o.NO_OFFERS_AVAILABLE:
137
- case o.OFFERS_EXPIRED:
138
- default:
139
- localStorage.setItem(b, JSON.stringify({
140
- isHidden: !0,
141
- expires_at: null
142
- }));
143
- return;
144
- }
145
- },
146
- variant: "text",
147
- children: V ? C._("Hide") : C._("Close")
148
- }), V && O && /* @__PURE__ */ u(p, {
149
- onClick: () => {
150
- w();
151
- },
152
- disabled: k,
153
- variant: "contained",
154
- color: "primary",
155
- sx: {
156
- px: 2.5,
157
- py: 1.5,
158
- height: 40
159
- },
160
- children: k ? /* @__PURE__ */ u(m, { size: 20 }) : O
161
- })]
162
- })]
163
- }), B && /* @__PURE__ */ d(f, { children: [
164
- L ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(g, {
165
- variant: "body1",
166
- children: C._("Remaining limit")
167
- }), /* @__PURE__ */ d(f, {
168
- display: "flex",
169
- alignItems: "center",
170
- justifyContent: "space-between",
171
- gap: 1,
172
- mb: 1,
173
- children: [/* @__PURE__ */ d(f, {
174
- display: "flex",
175
- alignItems: "center",
176
- gap: 1,
177
- flexShrink: 0,
178
- children: [/* @__PURE__ */ u(g, {
179
- variant: "h2",
180
- fontSize: 32,
181
- children: D(F, "USD")
182
- }), /* @__PURE__ */ d(g, {
183
- component: "span",
184
- variant: "subtitle1",
185
- sx: { color: T.palette.grey[400] },
186
- children: ["/ ", D(P, "USD")]
187
- })]
188
- }), /* @__PURE__ */ d(g, {
189
- variant: "body1",
190
- sx: {
191
- textOverflow: "ellipsis",
192
- overflow: "hidden",
193
- whiteSpace: "nowrap"
194
- },
195
- children: [
196
- N?.pricing_plans?.length,
197
- " ",
198
- C._("financial plans enabled")
199
- ]
200
- })]
201
- })] }) : /* @__PURE__ */ u(g, {
202
- variant: "h2",
203
- fontSize: 32,
204
- mb: 1,
205
- children: C._("Not available")
206
- }),
207
- /* @__PURE__ */ u(i, { progress: I }),
208
- (!L || N?.status === "LATE") && /* @__PURE__ */ d(g, {
209
- variant: "body1",
210
- fontWeight: 400,
211
- mt: 1,
212
- children: [
213
- N?.status === "CLOSED" && C._("Financing is not available for your business anymore. Please, contact the provider for further details."),
214
- N?.status === "DEFAULTED" && C._("Financing is blocked due to a violation of the agreed-upon terms. Please, contact the provider for further details."),
215
- N?.status === "LATE" && C._("Due to late payment your financing is currently on hold. Please, contact the provider for further details.")
216
- ]
217
- })
218
- ] })]
219
- });
220
- };
6
+ var a = ({ offers: a }) => /* @__PURE__ */ r(i, {
7
+ sx: {
8
+ display: "flex",
9
+ gap: 2
10
+ },
11
+ children: [/* @__PURE__ */ n(e, { offers: a }), a?.[0]?.status === "CURRENT" && /* @__PURE__ */ n(t, { offers: a })]
12
+ });
221
13
  //#endregion
222
- export { S as FinanceBanner };
14
+ export { a as FinanceWidget };
@@ -1,14 +1,26 @@
1
+ import { useGetFinanceOffers as e } from "./index556.js";
2
+ import { useFinancing as t } from "./index559.js";
3
+ import "./index562.js";
4
+ import { FinancedInvoicesTable as n } from "./index567.js";
5
+ import { FinanceWidget as r } from "./index575.js";
6
+ import { jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
7
+ import { CircularProgress as o, Stack as s } from "@mui/material";
1
8
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index576.js
2
- var e = (e, t) => {
3
- switch (t) {
4
- case "NEW": return e._("In review");
5
- case "DEFAULTED": return e._("Uncollectible");
6
- case "PAID": return e._("Paid in full");
7
- case "FUNDED": return e._("Funded");
8
- case "LATE": return e._("Late payment");
9
- case "REJECTED": return e._("Rejected");
10
- default: throw Error(`Unknown status ${JSON.stringify(t)}`);
11
- }
9
+ var c = ({ onRowClick: c }) => {
10
+ let { isLoading: l, data: u } = e(), { isLoading: d, isEnabled: f } = t();
11
+ return d || l ? /* @__PURE__ */ i(o, {
12
+ color: "inherit",
13
+ size: 20
14
+ }) : f ? /* @__PURE__ */ a(s, {
15
+ mt: 4,
16
+ gap: 4,
17
+ px: 1.5,
18
+ height: "100%",
19
+ children: [u?.offers && u.offers.length > 0 && /* @__PURE__ */ i(r, { offers: u.offers }), /* @__PURE__ */ i(n, {
20
+ onRowClick: c,
21
+ offers: u?.offers
22
+ })]
23
+ }) : null;
12
24
  };
13
25
  //#endregion
14
- export { e as getCommonStatusLabel };
26
+ export { c as FinanceTab };
@@ -1,36 +1,17 @@
1
- import { BACKGROUND_FINANCE_STATUS_MUI_MAP as e, FINANCE_INVOICE_STATUS_TO_MUI_ICON_MAP as t, ROW_TO_TAG_FINANCE_STATUS_MUI_MAP as n } from "./index19.js";
2
- import { getCommonStatusLabel as r } from "./index576.js";
3
- import { jsx as i } from "@emotion/react/jsx-runtime";
4
- import { Chip as a } from "@mui/material";
5
- import { useLingui as o } from "@lingui/react";
6
- import s from "@mui/icons-material/Circle";
7
- import { styled as c, useThemeProps as l } from "@mui/material/styles";
8
- //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index577.js
9
- var u = ({ ref: a, ...c }) => {
10
- let { status: u, variant: f, icon: p, size: m } = l({
11
- props: c,
12
- name: "MoniteFinancedInvoiceStatusChip"
13
- }), { i18n: h } = o(), g = t[u];
14
- return /* @__PURE__ */ i(d, {
15
- ref: a,
16
- sx: {
17
- width: "auto",
18
- color: n[u],
19
- bgcolor: e[u]
20
- },
21
- icon: p && g ? /* @__PURE__ */ i(g, { sx: {
22
- fontSize: 16,
23
- fill: n[u]
24
- } }) : /* @__PURE__ */ i(s, { sx: { fontSize: "10px !important" } }),
25
- label: r(h, u),
26
- size: m,
27
- status: u,
28
- variant: f ?? "filled"
29
- });
30
- }, d = c(a, {
31
- name: "MoniteFinancedInvoiceStatusChip",
32
- slot: "root",
33
- shouldForwardProp: () => !0
34
- })({});
35
- //#endregion
36
- export { u as FinancedInvoiceStatusChip };
1
+ import "./index552.js";
2
+ import "./index553.js";
3
+ import "./index554.js";
4
+ import "./index555.js";
5
+ import "./index563.js";
6
+ import "./index569.js";
7
+ import "./index565.js";
8
+ import "./index566.js";
9
+ import "./index570.js";
10
+ import "./index571.js";
11
+ import "./index567.js";
12
+ import "./index568.js";
13
+ import "./index572.js";
14
+ import "./index573.js";
15
+ import "./index574.js";
16
+ import "./index575.js";
17
+ import "./index576.js";
@@ -1,184 +1,5 @@
1
- import { useMoniteContext as e } from "./index46.js";
2
- import { useCurrencies as t } from "./index62.js";
3
- import "./index222.js";
4
- import { InvoiceStatusChip as n } from "./index242.js";
5
- import { useKanmonContext as r } from "./index570.js";
6
- import { FinancedInvoiceStatusChip as i } from "./index577.js";
7
- import { Fragment as a, jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
8
- import { Box as c, Button as l, Divider as u, Typography as d, darken as f, useTheme as p } from "@mui/material";
9
- import { useLingui as m } from "@lingui/react";
10
- //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index578.js
11
- var h = ({ invoice: h, offers: g, financedInvoice: _, enableNavigate: v = !1, handleNavigate: y }) => {
12
- let { i18n: b } = m(), { locale: x } = e(), { startFinanceSession: S } = r(), { formatCurrencyToDisplay: C } = t(), w = p(), T = x.dateFormat, E = _ ? b.date(_.issue_date, T) : "—", D = _ ? C(_.total_amount, _.currency) : "-", O = g?.[0]?.pricing_plans?.reduce((e, t, n) => (t?.fee_percentage === _?.fee_percentage && t?.advance_rate_percentage === _?.advance_rate_percentage && (e = {
13
- pricingPlanIndex: n,
14
- data: t
15
- }), e), null), k = _?.repayment_schedule?.repayment_date ? b.date(_.repayment_schedule.repayment_date, T) : "—", A = _?.advance_amount ? C(_.advance_amount, _.currency) : "-", j = _?.fee_amount ? C(_.fee_amount, _.currency) : "-", M = _?.repayment_amount ? C(_.repayment_amount, _.currency) : "-", N = _?.status === "REJECTED" || _?.status === "NEW", P = _?.status === "FUNDED" || _?.status === "LATE";
16
- return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ s(c, {
17
- sx: {
18
- p: 4,
19
- display: "flex",
20
- flexDirection: "column",
21
- gap: 4
22
- },
23
- children: [
24
- /* @__PURE__ */ o(d, {
25
- variant: "h3",
26
- children: b._("Funding details")
27
- }),
28
- /* @__PURE__ */ s(c, { children: [/* @__PURE__ */ o(d, {
29
- variant: "h2",
30
- fontWeight: 600,
31
- fontSize: 32,
32
- children: D
33
- }), /* @__PURE__ */ o(d, {
34
- fontWeight: 500,
35
- variant: "body1",
36
- children: b._("{issueDate}", { issueDate: E })
37
- })] }),
38
- /* @__PURE__ */ s(c, {
39
- sx: {
40
- display: "flex",
41
- gap: 3
42
- },
43
- children: [
44
- /* @__PURE__ */ s(c, {
45
- width: "100%",
46
- children: [/* @__PURE__ */ o(d, {
47
- variant: "body1",
48
- color: f(w.palette.grey[50], .4),
49
- mb: .5,
50
- fontWeight: 400,
51
- children: b._("Financing plan {value}", { value: (O?.pricingPlanIndex ?? 0) + 1 })
52
- }), /* @__PURE__ */ o(d, {
53
- variant: "body1",
54
- fontWeight: 400,
55
- children: b._("{value}% advance rate, Pay in {pricingPlan} days, {value1}% fee", {
56
- value: (O?.data?.advance_rate_percentage ?? 0) / 100,
57
- pricingPlan: O?.data?.repayment_duration_days,
58
- value1: (O?.data?.fee_percentage ?? 0) / 100
59
- })
60
- })]
61
- }),
62
- /* @__PURE__ */ s(c, {
63
- width: "100%",
64
- children: [/* @__PURE__ */ o(d, {
65
- variant: "body1",
66
- color: f(w.palette.grey[50], .4),
67
- mb: .5,
68
- fontWeight: 400,
69
- children: b._("Repayment on")
70
- }), /* @__PURE__ */ o(d, {
71
- variant: "body1",
72
- fontWeight: 400,
73
- children: b._("{repaymentDate}", { repaymentDate: k })
74
- })]
75
- }),
76
- /* @__PURE__ */ s(c, {
77
- width: "100%",
78
- children: [/* @__PURE__ */ o(d, {
79
- variant: "body1",
80
- color: f(w.palette.grey[50], .4),
81
- mb: .5,
82
- fontWeight: 400,
83
- children: b._("Status")
84
- }), /* @__PURE__ */ o(i, {
85
- icon: !0,
86
- status: _?.status ?? "DEFAULTED"
87
- })]
88
- })
89
- ]
90
- }),
91
- /* @__PURE__ */ o(u, {}),
92
- /* @__PURE__ */ s(c, {
93
- sx: {
94
- display: "grid",
95
- gridTemplateColumns: "minmax(140px, auto) 1fr",
96
- flexDirection: "column",
97
- rowGap: 1,
98
- columnGap: 2
99
- },
100
- children: [
101
- /* @__PURE__ */ o(d, {
102
- variant: "body1",
103
- color: f(w.palette.grey[50], .4),
104
- children: b._("{isRequestedSum}", { isRequestedSum: N ? "Requested sum" : "Received sum" })
105
- }),
106
- /* @__PURE__ */ o(d, {
107
- variant: "body1",
108
- children: A
109
- }),
110
- /* @__PURE__ */ o(d, {
111
- variant: "body1",
112
- color: f(w.palette.grey[50], .4),
113
- children: b._("Service Fee")
114
- }),
115
- /* @__PURE__ */ o(d, {
116
- variant: "body1",
117
- children: j
118
- }),
119
- /* @__PURE__ */ o(d, {
120
- variant: "body1",
121
- color: f(w.palette.grey[50], .4),
122
- children: b._("Repayment sum")
123
- }),
124
- /* @__PURE__ */ o(d, {
125
- variant: "body1",
126
- children: M
127
- })
128
- ]
129
- }),
130
- /* @__PURE__ */ o(u, {}),
131
- /* @__PURE__ */ s(c, {
132
- sx: {
133
- borderRadius: "16px",
134
- px: 3,
135
- py: 2.5,
136
- border: `1px solid ${w.palette.divider}`,
137
- display: "flex",
138
- gap: 2,
139
- justifyContent: "space-between",
140
- alignItems: "center",
141
- cursor: v ? "pointer" : "default"
142
- },
143
- ...v && y && { onClick: () => y(h.id) },
144
- children: [/* @__PURE__ */ s(c, { children: [/* @__PURE__ */ o(d, {
145
- variant: "body1",
146
- fontWeight: 500,
147
- children: b._("Invoice {invoiceDocument_id}", { invoiceDocument_id: h.document_id || b._("Pending") })
148
- }), /* @__PURE__ */ o(d, {
149
- color: w.palette.text.secondary,
150
- variant: "body2",
151
- children: b._("For {invoiceAmount} | Issued {issueDate}", {
152
- invoiceAmount: D,
153
- issueDate: E
154
- })
155
- })] }), /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o(n, { status: h.status }) })]
156
- })
157
- ]
158
- }), P && /* @__PURE__ */ o(c, {
159
- sx: {
160
- mt: "auto",
161
- borderTop: `1px solid ${w.palette.divider}`,
162
- px: 4,
163
- py: 2,
164
- display: "flex",
165
- alignItems: "center",
166
- justifyContent: "flex-end"
167
- },
168
- children: /* @__PURE__ */ o(l, {
169
- variant: "contained",
170
- color: "primary",
171
- onClick: () => S({ component: "PAY_NOW" }),
172
- sx: {
173
- py: 1.25,
174
- px: 1.5,
175
- height: 32,
176
- fontSize: 14,
177
- ml: "auto"
178
- },
179
- children: b._("Repay now")
180
- })
181
- })] });
182
- };
183
- //#endregion
184
- export { h as FinanceDetails };
1
+ import "./index563.js";
2
+ import "./index569.js";
3
+ import "./index571.js";
4
+ import "./index576.js";
5
+ import "./index577.js";