@tesouro/embedded-components-react 0.7.49 → 0.7.51
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/lib/monite-sdk.d.ts +42 -42
- package/dist/lib/monite-sdk.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/counterparts.js +233 -88
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index100.js +56 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index101.js +10 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index102.js +39 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +0 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index104.js +105 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index105.js +1 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index106.js +56 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +1 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +55 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +1 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index110.js +55 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index111.js +1 -153
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index112.js +150 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index113.js +55 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index114.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index115.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index116.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index117.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index118.js +7 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index119.js +51 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index120.js +38 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index121.js +72 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index122.js +36 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +6 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +57 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +172 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +6 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +2 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +76 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index130.js +0 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index131.js +78 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index132.js +1 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index133.js +35 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +0 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index135.js +56 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js +44 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index137.js +0 -568
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index138.js +568 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index140.js +1 -160
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index141.js +159 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index144.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +10 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index149.js +19 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index150.js +29 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +1 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +12 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +87 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +44 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +48 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +83 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +7 -305
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +307 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +1 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +32 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +29 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +1 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +22 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +0 -159
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +159 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +1 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +34 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +33 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +3 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +88 -172
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +171 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +114 -191
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +209 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +11 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +14 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +31 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +0 -241
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +241 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +1 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +31 -137
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +142 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +0 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +166 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +26 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +17 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +4 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +12 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +21 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +4 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +11 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +20 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +8 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +23 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +25 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +14 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +81 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +14 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +98 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +43 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +30 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +0 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +102 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +32 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +171 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +13 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +4 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +62 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +24 -209
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +207 -87
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +90 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +17 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +144 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +100 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +46 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +4 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +20 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +74 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +19 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +11 -131
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +129 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +8 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +4 -221
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +219 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +31 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +12 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +34 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +18 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +73 -181
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +182 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +14 -204
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +192 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +97 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +63 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +46 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +91 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +39 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +63 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +85 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +12 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +25 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +4 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +0 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +46 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +33 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +14 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +29 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +31 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +2 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +97 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index96.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index97.js +17 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index98.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index99.js +1 -57
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -1,133 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
import "./index89.js";
|
|
6
|
-
import { useKanmonContext as r } from "./index333.js";
|
|
7
|
-
import { useGetFinanceOffers as i } from "./index331.js";
|
|
8
|
-
import { useGetFinancingConnectToken as a } from "./index332.js";
|
|
9
|
-
import { useEffect as o, useState as s } from "react";
|
|
10
|
-
import { useLingui as c } from "@lingui/react";
|
|
11
|
-
import l from "react-script-hook";
|
|
1
|
+
import "./index155.js";
|
|
2
|
+
import { createContext as e, useContext as t } from "react";
|
|
3
|
+
import "@emotion/react/jsx-runtime";
|
|
4
|
+
import "@lingui/react";
|
|
12
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
APPROVED: "approved",
|
|
20
|
-
OFFER_ACCEPTED: "offer_accepted",
|
|
21
|
-
OFFERS_EXPIRED: "offers_expired"
|
|
22
|
-
}, p = () => {
|
|
23
|
-
let { apiUrl: p, api: m, queryClient: h, entityId: g } = e(), { isKanmonInitialized: _, toggleKanmon: v, handleButtonText: y, buttonText: b } = r(), { onboardingCallbacks: x } = n(), { i18n: S } = c(), C = a(), { data: w } = i(), { isUSEntity: T } = t(), E = (() => {
|
|
24
|
-
switch (w?.business_status) {
|
|
25
|
-
case "NEW":
|
|
26
|
-
default: return f.INIT;
|
|
27
|
-
case "INPUT_REQUIRED": return f.IN_PROGRESS;
|
|
28
|
-
case "ONBOARDED": return w?.offers?.length === 0 ? f.PENDING_APPROVAL : w?.offers?.[0]?.status === "NEW" ? f.APPROVED : w?.offers?.[0]?.status === "EXPIRED" ? f.OFFERS_EXPIRED : w?.offers?.[0]?.status === "ACCEPTED" ? f.OFFER_ACCEPTED : f.SERVICING;
|
|
29
|
-
}
|
|
30
|
-
})(), D = (() => {
|
|
31
|
-
try {
|
|
32
|
-
let e = new URL(p);
|
|
33
|
-
return !["api.dev.monite.com", "api.sandbox.monite.com"].includes(e.hostname);
|
|
34
|
-
} catch {
|
|
35
|
-
return !0;
|
|
36
|
-
}
|
|
37
|
-
})() ? d : u, [O] = l({ src: D }), [k, A] = s(!1), j = (e) => {
|
|
38
|
-
let t = {
|
|
39
|
-
type: "receivable",
|
|
40
|
-
status: "NEW",
|
|
41
|
-
invoice_id: e?.platformInvoiceId,
|
|
42
|
-
document_id: e?.platformInvoiceNumber,
|
|
43
|
-
due_date: e?.invoiceDueDate,
|
|
44
|
-
issue_date: e?.invoiceIssuedDate,
|
|
45
|
-
total_amount: e?.invoiceAmountCents,
|
|
46
|
-
currency: "USD",
|
|
47
|
-
payer_type: e?.payorType,
|
|
48
|
-
payer_business_name: e?.payorBusinessName,
|
|
49
|
-
payer_first_name: e?.payorFirstName,
|
|
50
|
-
payer_last_name: e?.payorLastName,
|
|
51
|
-
requested_amount: e?.amountRequestedForFinancingCents,
|
|
52
|
-
principal_amount: e?.principalAmountCents,
|
|
53
|
-
repayment_amount: e?.repaymentAmountCents,
|
|
54
|
-
advance_amount: e?.invoiceAdvanceAmountCents,
|
|
55
|
-
advance_rate_percentage: e?.advanceRatePercentage * 100,
|
|
56
|
-
fee_amount: e?.feeAmountCents,
|
|
57
|
-
fee_percentage: e?.transactionFeePercentage * 100,
|
|
58
|
-
repayment_schedule: {
|
|
59
|
-
repayment_date: e?.repaymentSchedule?.schedule?.[0]?.repaymentDate,
|
|
60
|
-
repayment_amount: e?.repaymentSchedule?.schedule?.[0]?.repaymentAmountCents,
|
|
61
|
-
repayment_fee_amount: e?.repaymentSchedule?.schedule?.[0]?.repaymentFeeAmountCents,
|
|
62
|
-
repayment_principal_amount: e?.repaymentSchedule?.schedule?.[0]?.repaymentPrincipalAmountCents
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
m.finops.getFinancingInvoices.setQueryData(m.finops.getFinancingInvoices.getQueryKey({ query: {
|
|
66
|
-
type: "receivable",
|
|
67
|
-
invoice_id: e?.platformInvoiceId
|
|
68
|
-
} }), (e) => ({
|
|
69
|
-
...e,
|
|
70
|
-
data: [t]
|
|
71
|
-
}), h), m.finops.getFinancingInvoices.setQueryData(m.finops.getFinancingInvoices.getQueryKey({ query: {} }), (e) => {
|
|
72
|
-
let n = e?.data ? e.data : [];
|
|
73
|
-
return {
|
|
74
|
-
...e,
|
|
75
|
-
data: [t, ...n]
|
|
76
|
-
};
|
|
77
|
-
}, h);
|
|
78
|
-
}, M = ({ connectToken: e }) => {
|
|
79
|
-
window?.KANMON_CONNECT?.start({
|
|
80
|
-
connectToken: e,
|
|
81
|
-
onEvent: (e) => {
|
|
82
|
-
if (e.eventType === "USER_STATE_CHANGED" || e.eventType === "USER_CONFIRMED_INVOICE") {
|
|
83
|
-
if (e.eventType === "USER_CONFIRMED_INVOICE") j(e.data.invoice);
|
|
84
|
-
else {
|
|
85
|
-
switch (e.data.userState) {
|
|
86
|
-
case "START_FLOW":
|
|
87
|
-
y(S._("Apply for financing"));
|
|
88
|
-
break;
|
|
89
|
-
case "USER_INPUT_REQUIRED":
|
|
90
|
-
e.data.section === "OFFER" ? y(S._("Review terms and sign")) : y(S._("Resume application"));
|
|
91
|
-
break;
|
|
92
|
-
case "WAITING_FOR_OFFERS":
|
|
93
|
-
y(""), (w?.business_status === "INPUT_REQUIRED" || w?.business_status === "NEW") && x.onWorkingCapitalOnboardingComplete?.(g);
|
|
94
|
-
break;
|
|
95
|
-
case "OFFERS_EXPIRED":
|
|
96
|
-
case "NO_OFFERS_EXTENDED":
|
|
97
|
-
y("");
|
|
98
|
-
break;
|
|
99
|
-
case "SERVICING":
|
|
100
|
-
y(S._("Financing menu")), w?.business_status === "ONBOARDED" && w?.offers?.[0]?.status === "NEW" && window.localStorage.setItem("isFinanceTabNew", "true");
|
|
101
|
-
break;
|
|
102
|
-
case "VIEW_OFFERS":
|
|
103
|
-
case "OFFER_ACCEPTED": y(S._("Review terms and sign"));
|
|
104
|
-
}
|
|
105
|
-
m.finops.getFinancingOffers.invalidateQueries(h);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
o(() => {
|
|
112
|
-
!_ && !O && T && (async () => {
|
|
113
|
-
A(!0);
|
|
114
|
-
try {
|
|
115
|
-
let e = await C.mutateAsync();
|
|
116
|
-
M({ connectToken: e.connect_token }), v(!0);
|
|
117
|
-
} catch {} finally {
|
|
118
|
-
A(!1);
|
|
119
|
-
}
|
|
120
|
-
})();
|
|
121
|
-
}, [O, T]);
|
|
122
|
-
let N = O || k, P = T, F = w?.business_status === "ONBOARDED" && w?.offers?.[0]?.status === "CURRENT";
|
|
123
|
-
return {
|
|
124
|
-
buttonText: b,
|
|
125
|
-
applicationState: E,
|
|
126
|
-
offer: w?.offers?.[0],
|
|
127
|
-
isLoading: N,
|
|
128
|
-
isEnabled: P,
|
|
129
|
-
isServicing: F
|
|
130
|
-
};
|
|
131
|
-
};
|
|
6
|
+
var n = e(null);
|
|
7
|
+
function r() {
|
|
8
|
+
let e = t(n);
|
|
9
|
+
if (!e) throw Error("Could not find KanmonContext. Make sure that you are using \"MoniteProvider\" component before calling this hook.");
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
132
12
|
//#endregion
|
|
133
|
-
export {
|
|
13
|
+
export { n as KanmonContext, r as useKanmonContext };
|
|
@@ -1,8 +1,133 @@
|
|
|
1
1
|
import { useMoniteContext as e } from "./index45.js";
|
|
2
|
+
import { useMyEntity as t } from "./index56.js";
|
|
3
|
+
import "./index63.js";
|
|
4
|
+
import { useComponentSettings as n } from "./index87.js";
|
|
5
|
+
import "./index89.js";
|
|
6
|
+
import { useKanmonContext as r } from "./index334.js";
|
|
7
|
+
import { useGetFinanceOffers as i } from "./index332.js";
|
|
8
|
+
import { useGetFinancingConnectToken as a } from "./index333.js";
|
|
9
|
+
import { useEffect as o, useState as s } from "react";
|
|
10
|
+
import { useLingui as c } from "@lingui/react";
|
|
11
|
+
import l from "react-script-hook";
|
|
2
12
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
13
|
+
var u = "https://cdn.sandbox.kanmon.dev/scripts/v2/kanmon-connect.js", d = "https://cdn.kanmon.dev/scripts/v2/kanmon-connect.js", f = {
|
|
14
|
+
INIT: "init",
|
|
15
|
+
IN_PROGRESS: "in_progress",
|
|
16
|
+
PENDING_APPROVAL: "pending_approval",
|
|
17
|
+
NO_OFFERS_AVAILABLE: "no_offers",
|
|
18
|
+
SERVICING: "servicing",
|
|
19
|
+
APPROVED: "approved",
|
|
20
|
+
OFFER_ACCEPTED: "offer_accepted",
|
|
21
|
+
OFFERS_EXPIRED: "offers_expired"
|
|
22
|
+
}, p = () => {
|
|
23
|
+
let { apiUrl: p, api: m, queryClient: h, entityId: g } = e(), { isKanmonInitialized: _, toggleKanmon: v, handleButtonText: y, buttonText: b } = r(), { onboardingCallbacks: x } = n(), { i18n: S } = c(), C = a(), { data: w } = i(), { isUSEntity: T } = t(), E = (() => {
|
|
24
|
+
switch (w?.business_status) {
|
|
25
|
+
case "NEW":
|
|
26
|
+
default: return f.INIT;
|
|
27
|
+
case "INPUT_REQUIRED": return f.IN_PROGRESS;
|
|
28
|
+
case "ONBOARDED": return w?.offers?.length === 0 ? f.PENDING_APPROVAL : w?.offers?.[0]?.status === "NEW" ? f.APPROVED : w?.offers?.[0]?.status === "EXPIRED" ? f.OFFERS_EXPIRED : w?.offers?.[0]?.status === "ACCEPTED" ? f.OFFER_ACCEPTED : f.SERVICING;
|
|
29
|
+
}
|
|
30
|
+
})(), D = (() => {
|
|
31
|
+
try {
|
|
32
|
+
let e = new URL(p);
|
|
33
|
+
return !["api.dev.monite.com", "api.sandbox.monite.com"].includes(e.hostname);
|
|
34
|
+
} catch {
|
|
35
|
+
return !0;
|
|
36
|
+
}
|
|
37
|
+
})() ? d : u, [O] = l({ src: D }), [k, A] = s(!1), j = (e) => {
|
|
38
|
+
let t = {
|
|
39
|
+
type: "receivable",
|
|
40
|
+
status: "NEW",
|
|
41
|
+
invoice_id: e?.platformInvoiceId,
|
|
42
|
+
document_id: e?.platformInvoiceNumber,
|
|
43
|
+
due_date: e?.invoiceDueDate,
|
|
44
|
+
issue_date: e?.invoiceIssuedDate,
|
|
45
|
+
total_amount: e?.invoiceAmountCents,
|
|
46
|
+
currency: "USD",
|
|
47
|
+
payer_type: e?.payorType,
|
|
48
|
+
payer_business_name: e?.payorBusinessName,
|
|
49
|
+
payer_first_name: e?.payorFirstName,
|
|
50
|
+
payer_last_name: e?.payorLastName,
|
|
51
|
+
requested_amount: e?.amountRequestedForFinancingCents,
|
|
52
|
+
principal_amount: e?.principalAmountCents,
|
|
53
|
+
repayment_amount: e?.repaymentAmountCents,
|
|
54
|
+
advance_amount: e?.invoiceAdvanceAmountCents,
|
|
55
|
+
advance_rate_percentage: e?.advanceRatePercentage * 100,
|
|
56
|
+
fee_amount: e?.feeAmountCents,
|
|
57
|
+
fee_percentage: e?.transactionFeePercentage * 100,
|
|
58
|
+
repayment_schedule: {
|
|
59
|
+
repayment_date: e?.repaymentSchedule?.schedule?.[0]?.repaymentDate,
|
|
60
|
+
repayment_amount: e?.repaymentSchedule?.schedule?.[0]?.repaymentAmountCents,
|
|
61
|
+
repayment_fee_amount: e?.repaymentSchedule?.schedule?.[0]?.repaymentFeeAmountCents,
|
|
62
|
+
repayment_principal_amount: e?.repaymentSchedule?.schedule?.[0]?.repaymentPrincipalAmountCents
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
m.finops.getFinancingInvoices.setQueryData(m.finops.getFinancingInvoices.getQueryKey({ query: {
|
|
66
|
+
type: "receivable",
|
|
67
|
+
invoice_id: e?.platformInvoiceId
|
|
68
|
+
} }), (e) => ({
|
|
69
|
+
...e,
|
|
70
|
+
data: [t]
|
|
71
|
+
}), h), m.finops.getFinancingInvoices.setQueryData(m.finops.getFinancingInvoices.getQueryKey({ query: {} }), (e) => {
|
|
72
|
+
let n = e?.data ? e.data : [];
|
|
73
|
+
return {
|
|
74
|
+
...e,
|
|
75
|
+
data: [t, ...n]
|
|
76
|
+
};
|
|
77
|
+
}, h);
|
|
78
|
+
}, M = ({ connectToken: e }) => {
|
|
79
|
+
window?.KANMON_CONNECT?.start({
|
|
80
|
+
connectToken: e,
|
|
81
|
+
onEvent: (e) => {
|
|
82
|
+
if (e.eventType === "USER_STATE_CHANGED" || e.eventType === "USER_CONFIRMED_INVOICE") {
|
|
83
|
+
if (e.eventType === "USER_CONFIRMED_INVOICE") j(e.data.invoice);
|
|
84
|
+
else {
|
|
85
|
+
switch (e.data.userState) {
|
|
86
|
+
case "START_FLOW":
|
|
87
|
+
y(S._("Apply for financing"));
|
|
88
|
+
break;
|
|
89
|
+
case "USER_INPUT_REQUIRED":
|
|
90
|
+
e.data.section === "OFFER" ? y(S._("Review terms and sign")) : y(S._("Resume application"));
|
|
91
|
+
break;
|
|
92
|
+
case "WAITING_FOR_OFFERS":
|
|
93
|
+
y(""), (w?.business_status === "INPUT_REQUIRED" || w?.business_status === "NEW") && x.onWorkingCapitalOnboardingComplete?.(g);
|
|
94
|
+
break;
|
|
95
|
+
case "OFFERS_EXPIRED":
|
|
96
|
+
case "NO_OFFERS_EXTENDED":
|
|
97
|
+
y("");
|
|
98
|
+
break;
|
|
99
|
+
case "SERVICING":
|
|
100
|
+
y(S._("Financing menu")), w?.business_status === "ONBOARDED" && w?.offers?.[0]?.status === "NEW" && window.localStorage.setItem("isFinanceTabNew", "true");
|
|
101
|
+
break;
|
|
102
|
+
case "VIEW_OFFERS":
|
|
103
|
+
case "OFFER_ACCEPTED": y(S._("Review terms and sign"));
|
|
104
|
+
}
|
|
105
|
+
m.finops.getFinancingOffers.invalidateQueries(h);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
o(() => {
|
|
112
|
+
!_ && !O && T && (async () => {
|
|
113
|
+
A(!0);
|
|
114
|
+
try {
|
|
115
|
+
let e = await C.mutateAsync();
|
|
116
|
+
M({ connectToken: e.connect_token }), v(!0);
|
|
117
|
+
} catch {} finally {
|
|
118
|
+
A(!1);
|
|
119
|
+
}
|
|
120
|
+
})();
|
|
121
|
+
}, [O, T]);
|
|
122
|
+
let N = O || k, P = T, F = w?.business_status === "ONBOARDED" && w?.offers?.[0]?.status === "CURRENT";
|
|
123
|
+
return {
|
|
124
|
+
buttonText: b,
|
|
125
|
+
applicationState: E,
|
|
126
|
+
offer: w?.offers?.[0],
|
|
127
|
+
isLoading: N,
|
|
128
|
+
isEnabled: P,
|
|
129
|
+
isServicing: F
|
|
130
|
+
};
|
|
6
131
|
};
|
|
7
132
|
//#endregion
|
|
8
|
-
export {
|
|
133
|
+
export { f as FinancialApplicationState, p as useFinancing };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMoniteContext as e } from "./index45.js";
|
|
2
2
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js
|
|
3
|
-
var t = (
|
|
4
|
-
let { api:
|
|
5
|
-
return
|
|
3
|
+
var t = () => {
|
|
4
|
+
let { api: t } = e();
|
|
5
|
+
return t.finops.postFinancingInvoices.useMutation({}, { onError: () => {} });
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
8
|
-
export { t as
|
|
8
|
+
export { t as useFinanceAnInvoice };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { useMoniteContext as e } from "./index45.js";
|
|
2
|
+
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js
|
|
3
|
+
var t = (t, n = !0) => {
|
|
4
|
+
let { api: r } = e();
|
|
5
|
+
return r.finops.getFinancingInvoices.useQuery({ query: t }, { enabled: n });
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as useGetFinancedInvoices };
|
|
@@ -1,222 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { FinanceFaqWrapper as r } from "./index329.js";
|
|
6
|
-
import { FinanceProgressBar as i } from "./index330.js";
|
|
7
|
-
import { useKanmonContext as a } from "./index333.js";
|
|
8
|
-
import { FinancialApplicationState as o, useFinancing as s } from "./index334.js";
|
|
1
|
+
import "./index332.js";
|
|
2
|
+
import "./index333.js";
|
|
3
|
+
import "./index335.js";
|
|
4
|
+
import "./index336.js";
|
|
9
5
|
import "./index337.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";
|
|
14
|
-
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index338.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
|
-
};
|
|
221
|
-
//#endregion
|
|
222
|
-
export { S as FinanceBanner };
|