@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-alpha.mega1
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/CHANGELOG.md +217 -0
- package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/Account-CMjOp7S2.mjs +118 -0
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
- package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
- package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
- package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
- package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
- package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
- package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
- package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
- package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
- package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
- package/dist/Drawer-Bet2ZPJo.mjs +176 -0
- package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
- package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
- package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
- package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
- package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
- package/dist/LineChart-DHj-Bufi.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
- package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
- package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
- package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
- package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
- package/dist/NotificationSettings-e789PcRb.mjs +676 -0
- package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
- package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
- package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
- package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
- package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
- package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
- package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
- package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
- package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
- package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
- package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
- package/dist/accounts/index.es.js +933 -232
- package/dist/accounts/stores/AccountStore.d.ts +6 -2
- package/dist/accounts/utils/AccountDetails.d.ts +5 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +561 -522
- package/dist/cashflow/index.es.js +397 -396
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
- package/dist/categories/components/SubcategoryRow.d.ts +1 -0
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +5 -3
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +325 -306
- package/dist/common/stores/GlobalUiStore.d.ts +7 -4
- package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
- package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
- package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
- package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
- package/dist/dashboard/index.es.js +95 -125
- package/dist/debts/index.es.js +466 -460
- package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +1660 -1553
- package/dist/goals/index.es.js +716 -677
- package/dist/goals/stores/GoalStore.d.ts +2 -0
- package/dist/help/index.es.js +14 -10
- package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
- package/dist/investments/index.es.js +464 -457
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/cards/InsightCard.d.ts +0 -2
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
- package/dist/microinsights/index.d.ts +2 -2
- package/dist/microinsights/index.es.js +824 -14
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +433 -438
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +331 -325
- package/dist/settings/index.es.js +293 -285
- package/dist/spending/components/SpendingChart.d.ts +1 -1
- package/dist/spending/components/SpendingList.d.ts +1 -1
- package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
- package/dist/spending/index.es.js +250 -235
- package/dist/transactions/index.es.js +288 -281
- package/dist/transactions/stores/TransactionStore.d.ts +5 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +876 -802
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/trends/utils/TrendsTable.d.ts +12 -0
- package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
- package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
- package/package.json +26 -21
- package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
- package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
- package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
- package/dist/Drawer-Dqe5EqvA.mjs +0 -163
- package/dist/LineChart-bc1D9xBE.mjs +0 -581
- package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
- package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
- package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
- package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/microinsights/cards/BaseCard.d.ts +0 -13
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,130 +1,805 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import
|
|
5
|
-
import { Text as
|
|
6
|
-
import { S as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as C, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import h from "react";
|
|
3
|
+
import { observer as V } from "mobx-react-lite";
|
|
4
|
+
import e1 from "@mui/material/Stack";
|
|
5
|
+
import { Text as g, Icon as F, THEMES as i1 } from "@mxenabled/mxui";
|
|
6
|
+
import { S as h1 } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
7
|
+
import c1 from "@mui/material/Box";
|
|
8
|
+
import b from "@mui/material/Divider";
|
|
9
9
|
import E from "@mui/material/List";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { useTheme as
|
|
13
|
-
import { u as
|
|
14
|
-
import { L as
|
|
15
|
-
import { g as
|
|
16
|
-
import { m as
|
|
17
|
-
import { A as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
10
|
+
import B from "@mui/material/ListSubheader";
|
|
11
|
+
import W from "@mui/system/Stack";
|
|
12
|
+
import { useTheme as M1, alpha as y1 } from "@mui/material/styles";
|
|
13
|
+
import { u as R, A as x1 } from "../AccountDetailsHeader-BOV91g1o.mjs";
|
|
14
|
+
import { L as w1 } from "../LineChart-DHj-Bufi.mjs";
|
|
15
|
+
import { g as b1, a as S1, b as R1 } from "../SpendingData-B7NuTQ9s.mjs";
|
|
16
|
+
import { m as T1, u as y, d as k, g as Z, h as m1, b as G, a as E1 } from "../hooks-fY_n74f7.mjs";
|
|
17
|
+
import { A as N, g as L, N as p1 } from "../Account-CMjOp7S2.mjs";
|
|
18
|
+
import { I as _1, P as L1, S as f1 } from "../Account-BIKn4XEZ.mjs";
|
|
19
|
+
import { a as D1, b as k1 } from "../AccountFields-BRRH37K1.mjs";
|
|
20
|
+
import { g as e2 } from "../AccountFields-BRRH37K1.mjs";
|
|
21
|
+
import { A as U } from "../AccountListItem-Ds5C0mOT.mjs";
|
|
22
|
+
import a1 from "@mui/material/Tab";
|
|
23
|
+
import Z1 from "@mui/material/Tabs";
|
|
24
|
+
import I1 from "@mui/material/Switch";
|
|
25
|
+
import D from "@mui/material/ListItem";
|
|
26
|
+
import $ from "@mui/material/ListItemButton";
|
|
27
|
+
import O from "@mui/material/ListItemText";
|
|
28
|
+
import { a as Q, f as s1, D as l1 } from "../Dialog-CWymUiuO.mjs";
|
|
29
|
+
import { D as t1 } from "../Drawer-Bet2ZPJo.mjs";
|
|
30
|
+
import { A as S, W as N1 } from "../WidgetContainer-mzejMmz2.mjs";
|
|
31
|
+
import { b as f } from "../Localization-2MODESHW.mjs";
|
|
32
|
+
import Y from "@mui/material/ListItemAvatar";
|
|
33
|
+
import O1 from "@mui/material/styles/useTheme";
|
|
34
|
+
import { Language as F1, Error as g1, CheckCircle as P1 } from "@mxenabled/mx-icons";
|
|
35
|
+
import { b as z, F as j } from "../GlobalAccountFilter-BpWlPAl5.mjs";
|
|
36
|
+
import { M as n2 } from "../GlobalAccountFilter-BpWlPAl5.mjs";
|
|
37
|
+
import { fromUnixTime as W1 } from "date-fns/fromUnixTime";
|
|
38
|
+
import { isToday as B1 } from "date-fns/isToday";
|
|
39
|
+
import { isYesterday as U1 } from "date-fns/isYesterday";
|
|
40
|
+
import { I as X } from "../IconBacking-DgT8DCeh.mjs";
|
|
41
|
+
import { addMonths as $1 } from "date-fns/addMonths";
|
|
42
|
+
import { AdapterDateFns as G1 } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
43
|
+
import { DateCalendar as z1 } from "@mui/x-date-pickers/DateCalendar";
|
|
44
|
+
import K1 from "@mui/material/FormControl";
|
|
45
|
+
import Y1 from "@mui/material/InputLabel";
|
|
46
|
+
import { LocalizationProvider as j1 } from "@mui/x-date-pickers-pro";
|
|
47
|
+
import X1 from "@mui/material/MenuItem";
|
|
48
|
+
import J1 from "@mui/material/Select";
|
|
49
|
+
import q1 from "@mui/material/TextField";
|
|
50
|
+
import { C as Q1 } from "../CurrencyInput-DDQ4DBrE.mjs";
|
|
51
|
+
import e3 from "@mui/material/Alert";
|
|
52
|
+
import t3 from "@mui/material/AlertTitle";
|
|
53
|
+
import n3 from "@mui/material/Link";
|
|
54
|
+
import o3 from "@mui/material/Paper";
|
|
55
|
+
import { endOfToday as i3, subDays as c3, startOfToday as a3 } from "date-fns";
|
|
56
|
+
import { T as s3, a as l3 } from "../TransactionDetails-CPwv9xtZ.mjs";
|
|
57
|
+
import { T as r1 } from "../TabContentContainer-CnMXkVqr.mjs";
|
|
58
|
+
import { f as d1 } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
59
|
+
import { C as r3 } from "../ConnectionsDrawer-BExzgE16.mjs";
|
|
60
|
+
import { L as n1 } from "../Loader-BSWSYqvn.mjs";
|
|
61
|
+
import { u as H1 } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
62
|
+
import { u as o1 } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
|
|
63
|
+
import { M as A1 } from "../MiniWidgetContainer-DKn7ndO6.mjs";
|
|
64
|
+
import { A as i2 } from "../AccountApi-DgZ8ILj1.mjs";
|
|
65
|
+
import { A as a2 } from "../AccountStore-BFKvXJSD.mjs";
|
|
66
|
+
const d3 = (t, o) => {
|
|
67
|
+
const n = _1.includes(o) ? b1(t) : [], i = L1.includes(o) ? S1(t) : [], c = f1.includes(o) ? R1(t) : [];
|
|
68
|
+
return [n, i, c].filter((l) => l.length > 0);
|
|
69
|
+
}, u3 = (t, o, n) => {
|
|
70
|
+
const [i, c] = t, l = i, u = c ?? i, a = [];
|
|
71
|
+
if (l && u && _1.includes(o)) {
|
|
72
|
+
const d = l[l.length - 1].y;
|
|
73
|
+
a.push({ label: n.income_label, amount: d });
|
|
74
|
+
} else if (L1.includes(o)) {
|
|
75
|
+
const d = l[l.length - 1].y;
|
|
76
|
+
a.push({ label: n.payments_label, amount: d });
|
|
45
77
|
}
|
|
46
|
-
if (
|
|
47
|
-
const
|
|
48
|
-
|
|
78
|
+
if (u && f1.includes(o)) {
|
|
79
|
+
const d = u[u.length - 1].y;
|
|
80
|
+
a.push({ label: n.spending_label, amount: d });
|
|
49
81
|
}
|
|
50
|
-
return
|
|
51
|
-
},
|
|
52
|
-
const
|
|
82
|
+
return a;
|
|
83
|
+
}, C3 = () => {
|
|
84
|
+
const t = M1(), { selectedAccount: o } = R(), { monthlyCategoryTotals: n } = T1(), { trends: i } = y(), c = [t.palette.chart?.chart1, t.palette.chart?.chart2], l = d3(n, o.account_type), u = u3(l, o.account_type, i), a = [N.LOAN, N.MORTGAGE].includes(o.account_type);
|
|
53
85
|
return /* @__PURE__ */ e("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ e(
|
|
54
|
-
|
|
86
|
+
w1,
|
|
55
87
|
{
|
|
56
|
-
colors:
|
|
57
|
-
datasets:
|
|
88
|
+
colors: c,
|
|
89
|
+
datasets: l,
|
|
58
90
|
height: 185,
|
|
59
|
-
labels:
|
|
60
|
-
showAverage:
|
|
61
|
-
|
|
91
|
+
labels: u,
|
|
92
|
+
showAverage: a,
|
|
93
|
+
showAxisHighlight: !0,
|
|
94
|
+
showBars: a,
|
|
62
95
|
showLegend: !0,
|
|
96
|
+
showTooltip: !0,
|
|
97
|
+
showXAxis: !0,
|
|
98
|
+
showXAxisTicks: !0,
|
|
99
|
+
showYAxis: !0,
|
|
100
|
+
showYAxisTicks: !0,
|
|
63
101
|
valueFormatterString: "0,0"
|
|
64
102
|
}
|
|
65
103
|
) });
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
104
|
+
}, h3 = V(C3), J = ({
|
|
105
|
+
children: t,
|
|
106
|
+
isLast: o = !1,
|
|
107
|
+
onClick: n,
|
|
108
|
+
primaryText: i,
|
|
109
|
+
secondaryText: c
|
|
110
|
+
}) => /* @__PURE__ */ C(x, { children: [
|
|
111
|
+
/* @__PURE__ */ e(D, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ C($, { onClick: n, children: [
|
|
112
|
+
/* @__PURE__ */ e(O, { primary: i, secondary: c }),
|
|
113
|
+
t
|
|
114
|
+
] }) }),
|
|
115
|
+
/* @__PURE__ */ e(b, { sx: { ml: o ? 0 : 24 } })
|
|
116
|
+
] }), m3 = () => {
|
|
117
|
+
const { accounts: t } = k(), { selectedAccount: o, selectedMember: n } = R();
|
|
118
|
+
return t.filter(
|
|
119
|
+
(i) => i.member_guid === n.guid && n.successfully_aggregated_at && i.guid !== o.guid
|
|
120
|
+
);
|
|
121
|
+
}, p3 = () => {
|
|
122
|
+
const [t, o] = h.useState(!1), [n, i] = h.useState(!1), [c, l] = h.useState(!1), [u, a] = h.useState({}), { selectedAccount: d } = R(), { mergeAccounts: m, updateAccount: _ } = k(), { accounts: s } = y(), H = m3(), { onEvent: v } = Z(), { modifyTransactionByAccountGuid: M } = m1(), w = async (p) => {
|
|
123
|
+
await _({
|
|
124
|
+
...d,
|
|
125
|
+
...p
|
|
126
|
+
}), "is_closed" in p && p.is_closed !== d.is_closed && M(d.guid, { accountIsClosed: p.is_closed });
|
|
127
|
+
}, r = () => {
|
|
128
|
+
m([d.guid, u.guid]).finally(
|
|
129
|
+
() => i(!1)
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
133
|
+
/* @__PURE__ */ e(B, { sx: { backgroundColor: "transparent", mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(g, { bold: !0, component: "h2", variant: "XSmall", children: s.actions }) }),
|
|
134
|
+
/* @__PURE__ */ e(
|
|
135
|
+
J,
|
|
136
|
+
{
|
|
137
|
+
onClick: () => {
|
|
138
|
+
w({ is_hidden: !d.is_hidden }), v(S.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: d.guid });
|
|
139
|
+
},
|
|
140
|
+
primaryText: d.is_hidden ? s.unhide_account : s.hide_Account,
|
|
141
|
+
secondaryText: d.is_hidden ? s.include_this_account : s.exclude_this_account,
|
|
142
|
+
children: /* @__PURE__ */ e(I1, { checked: d.is_hidden })
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
/* @__PURE__ */ e(
|
|
146
|
+
J,
|
|
147
|
+
{
|
|
148
|
+
onClick: () => {
|
|
149
|
+
o(!0), v(S.ACCOUNT_DETAILS_CLICK_MARK_CLOSED, {
|
|
150
|
+
account_guid: d.guid
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
primaryText: d.is_closed ? s.mark_as_open : s.mark_as_closed,
|
|
154
|
+
secondaryText: d.is_closed ? s.this_will_set_the_closed_account : s.this_will_set_the_account_balance_to_0,
|
|
155
|
+
children: /* @__PURE__ */ e(F, { name: "chevron_right" })
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
H.length > 0 && /* @__PURE__ */ e(
|
|
159
|
+
J,
|
|
160
|
+
{
|
|
161
|
+
isLast: !0,
|
|
162
|
+
onClick: () => {
|
|
163
|
+
i(!0), v(S.ACCOUNT_DETAILS_CLICK_MARK_DUPLICATE, {
|
|
164
|
+
account_guid: d.guid
|
|
165
|
+
});
|
|
166
|
+
},
|
|
167
|
+
primaryText: s.mark_as_duplicate,
|
|
168
|
+
secondaryText: s.if_a_connected_account_is_showing_up_twice,
|
|
169
|
+
children: /* @__PURE__ */ e(F, { name: "chevron_right" })
|
|
170
|
+
}
|
|
171
|
+
),
|
|
172
|
+
/* @__PURE__ */ e(
|
|
173
|
+
Q,
|
|
174
|
+
{
|
|
175
|
+
copy: {
|
|
176
|
+
close_aria: s.close_modal,
|
|
177
|
+
title: d.is_closed ? s.confirm_mark_as_open : s.confirm_mark_closed
|
|
178
|
+
},
|
|
179
|
+
isOpen: t,
|
|
180
|
+
onClose: () => {
|
|
181
|
+
o(!1);
|
|
182
|
+
},
|
|
183
|
+
onPrimaryAction: () => w({ is_closed: !d.is_closed }),
|
|
184
|
+
children: /* @__PURE__ */ e(g, { truncate: !1, children: f(
|
|
185
|
+
d.is_closed ? s.this_will_resume_updating_the_balance : s.this_will_set_the_balance_of_your_account,
|
|
186
|
+
d.name
|
|
187
|
+
) })
|
|
188
|
+
}
|
|
189
|
+
),
|
|
190
|
+
/* @__PURE__ */ e(
|
|
191
|
+
t1,
|
|
192
|
+
{
|
|
193
|
+
ariaLabelClose: s.close_drawer,
|
|
194
|
+
isOpen: n,
|
|
195
|
+
onClose: () => i(!1),
|
|
196
|
+
title: s.mark_as_duplicate,
|
|
197
|
+
children: /* @__PURE__ */ e(E, { children: H.map((p) => {
|
|
198
|
+
const I = H.indexOf(p) === H.length - 1;
|
|
199
|
+
return /* @__PURE__ */ C(h.Fragment, { children: [
|
|
200
|
+
/* @__PURE__ */ e(
|
|
201
|
+
U,
|
|
202
|
+
{
|
|
203
|
+
account: p,
|
|
204
|
+
onRowClick: () => {
|
|
205
|
+
l(!0), a(p);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
),
|
|
209
|
+
/* @__PURE__ */ e(E, { sx: { ml: I ? 0 : 24 } })
|
|
210
|
+
] }, p.guid);
|
|
211
|
+
}) })
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
c && /* @__PURE__ */ C(
|
|
215
|
+
Q,
|
|
216
|
+
{
|
|
217
|
+
copy: {
|
|
218
|
+
close_aria: s.close_modal,
|
|
219
|
+
title: s.confirm_merge
|
|
220
|
+
},
|
|
221
|
+
isOpen: c,
|
|
222
|
+
onClose: () => l(!1),
|
|
223
|
+
onPrimaryAction: r,
|
|
224
|
+
children: [
|
|
225
|
+
/* @__PURE__ */ e(g, { truncate: !1, children: f(
|
|
226
|
+
s.this_means_accounts_will_be_merged,
|
|
227
|
+
d.name,
|
|
228
|
+
u.name
|
|
229
|
+
) }),
|
|
230
|
+
/* @__PURE__ */ e(g, { color: "error", sx: { mt: 24 }, children: s.this_action_cannot_be_undone })
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
] });
|
|
235
|
+
}, _3 = V(p3), V1 = (t, o) => {
|
|
236
|
+
const { connection_messages: n } = o;
|
|
237
|
+
switch (t.connection_status) {
|
|
238
|
+
case L.CHALLENGED:
|
|
239
|
+
return {
|
|
240
|
+
cta: n.challenged_cta,
|
|
241
|
+
main: f(
|
|
242
|
+
n.challenged_connection_description,
|
|
243
|
+
t.name
|
|
244
|
+
),
|
|
245
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
246
|
+
title: n.challenged_connection_title
|
|
247
|
+
};
|
|
248
|
+
case L.CLOSED:
|
|
249
|
+
return {
|
|
250
|
+
main: n.closed_connection_description,
|
|
251
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
252
|
+
title: n.closed_connection_title
|
|
253
|
+
};
|
|
254
|
+
case L.DEGRADED:
|
|
255
|
+
return {
|
|
256
|
+
main: n.degraded_connection_description,
|
|
257
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
258
|
+
title: n.degraded_connection_title
|
|
259
|
+
};
|
|
260
|
+
case L.DELAYED:
|
|
261
|
+
return {
|
|
262
|
+
main: f(
|
|
263
|
+
n.delayed_connection_description,
|
|
264
|
+
t.name
|
|
265
|
+
),
|
|
266
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
267
|
+
title: n.delayed_connection_title
|
|
268
|
+
};
|
|
269
|
+
case L.DENIED:
|
|
270
|
+
return {
|
|
271
|
+
cta: n.denied_cta,
|
|
272
|
+
main: f(
|
|
273
|
+
n.denied_connection_description,
|
|
274
|
+
t.name
|
|
275
|
+
),
|
|
276
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
277
|
+
title: n.denied_connection_title
|
|
278
|
+
};
|
|
279
|
+
case L.DISABLED:
|
|
280
|
+
return {
|
|
281
|
+
main: n.disabled_connection_description,
|
|
282
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
283
|
+
title: n.disabled_connection_title
|
|
284
|
+
};
|
|
285
|
+
case L.DISCONNECTED:
|
|
286
|
+
return {
|
|
287
|
+
main: f(
|
|
288
|
+
n.disconnected_connection_description,
|
|
289
|
+
t.name
|
|
290
|
+
),
|
|
291
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
292
|
+
title: n.disconnected_connection_title
|
|
293
|
+
};
|
|
294
|
+
case L.DISCONTINUED:
|
|
295
|
+
return {
|
|
296
|
+
main: n.discontinued_connection_description,
|
|
297
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
298
|
+
title: n.discontinued_connection_title
|
|
299
|
+
};
|
|
300
|
+
case L.EXPIRED:
|
|
301
|
+
return {
|
|
302
|
+
cta: n.expired_cta,
|
|
303
|
+
main: n.expired_connection_description,
|
|
304
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
305
|
+
title: n.expired_connection_title
|
|
306
|
+
};
|
|
307
|
+
case L.FAILED:
|
|
308
|
+
return {
|
|
309
|
+
main: f(
|
|
310
|
+
n.failed_connection_description,
|
|
311
|
+
t.name
|
|
312
|
+
),
|
|
313
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
314
|
+
title: n.failed_connection_title
|
|
315
|
+
};
|
|
316
|
+
case L.IMPAIRED:
|
|
317
|
+
return {
|
|
318
|
+
cta: n.impaired_cta,
|
|
319
|
+
main: f(
|
|
320
|
+
n.impaired_connection_description,
|
|
321
|
+
t.name
|
|
322
|
+
),
|
|
323
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
324
|
+
title: n.impaired_connection_title
|
|
325
|
+
};
|
|
326
|
+
case L.IMPEDED:
|
|
327
|
+
return {
|
|
328
|
+
main: f(
|
|
329
|
+
n.impeded_connection_description,
|
|
330
|
+
t.name,
|
|
331
|
+
t.name
|
|
332
|
+
),
|
|
333
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
334
|
+
title: n.impeded_connection_title
|
|
335
|
+
};
|
|
336
|
+
case L.IMPORTED:
|
|
337
|
+
return {
|
|
338
|
+
cta: n.imported_cta,
|
|
339
|
+
main: f(
|
|
340
|
+
n.imported_connection_description,
|
|
341
|
+
t.name
|
|
342
|
+
),
|
|
343
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
344
|
+
title: n.imported_connection_title
|
|
345
|
+
};
|
|
346
|
+
case L.LOCKED:
|
|
347
|
+
return {
|
|
348
|
+
cta: n.locked_cta,
|
|
349
|
+
main: f(
|
|
350
|
+
n.locked_connection_description,
|
|
351
|
+
t.name
|
|
352
|
+
),
|
|
353
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
354
|
+
title: n.locked_connection_title
|
|
355
|
+
};
|
|
356
|
+
case L.PREVENTED:
|
|
357
|
+
return {
|
|
358
|
+
cta: n.prevented_cta,
|
|
359
|
+
main: n.prevented_connection_description,
|
|
360
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
361
|
+
title: n.prevented_connection_title
|
|
362
|
+
};
|
|
363
|
+
case L.REJECTED:
|
|
364
|
+
return {
|
|
365
|
+
cta: n.rejected_cta,
|
|
366
|
+
main: n.rejected_connection_description,
|
|
367
|
+
statusName: o.connection_statuses[t.connection_status],
|
|
368
|
+
title: n.rejected_connection_title
|
|
369
|
+
};
|
|
370
|
+
default: {
|
|
371
|
+
const i = () => {
|
|
372
|
+
const c = t.successfully_aggregated_at ? W1(t.successfully_aggregated_at) : void 0, l = c && s1(c, l1.TIME_STAMP_HOUR_MINUTE);
|
|
373
|
+
if (l)
|
|
374
|
+
return B1(c) ? f(o.last_updated_at, o.today, l) : U1(c) ? f(o.last_updated_at, o.yesterday, l) : f(
|
|
375
|
+
o.last_updated_at,
|
|
376
|
+
s1(c, l1.MONTH_DAY_YEAR),
|
|
377
|
+
l
|
|
378
|
+
);
|
|
379
|
+
};
|
|
380
|
+
return {
|
|
381
|
+
statusName: o.connection_statuses[6],
|
|
382
|
+
// Connected
|
|
383
|
+
title: i()
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}, q = {
|
|
388
|
+
color: "background.default",
|
|
389
|
+
fontSize: 20,
|
|
390
|
+
gridRow: 1,
|
|
391
|
+
gridColumn: 1,
|
|
392
|
+
zIndex: 2
|
|
393
|
+
}, L3 = () => {
|
|
394
|
+
const [t, o] = h.useState(!1), {
|
|
395
|
+
palette: { mode: n }
|
|
396
|
+
} = O1(), { selectedMember: i } = R(), { accounts: c, connect: l } = y(), u = V1(i, l), a = p1.includes(i.connection_status) ? {
|
|
397
|
+
color: "error.main",
|
|
398
|
+
ctaCopy: u.cta ?? "",
|
|
399
|
+
icon: /* @__PURE__ */ e(g1, { filled: !0, sx: { ...q } }),
|
|
400
|
+
mainMessage: u.statusName,
|
|
401
|
+
secondaryMessage: `${u.title}.`
|
|
402
|
+
} : {
|
|
403
|
+
color: "success.main",
|
|
404
|
+
icon: /* @__PURE__ */ e(P1, { filled: !0, sx: { ...q } }),
|
|
405
|
+
mainMessage: u.statusName,
|
|
406
|
+
secondaryMessage: u.title
|
|
407
|
+
};
|
|
408
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
409
|
+
/* @__PURE__ */ e(B, { sx: { mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(g, { bold: !0, component: "h2", variant: "XSmall", children: c.connection_status }) }),
|
|
410
|
+
/* @__PURE__ */ e(D, { sx: { backgroundColor: "background.paper" }, children: i.is_manual || !a.ctaCopy ? /* @__PURE__ */ C(e1, { alignItems: "center", direction: "row", px: 24, py: 12, children: [
|
|
411
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { backingSx: { backgroundColor: a.color, borderRadius: 1 }, size: 32, children: a.icon }) }),
|
|
412
|
+
/* @__PURE__ */ e(O, { primary: a.mainMessage, secondary: a.secondaryMessage })
|
|
413
|
+
] }) : /* @__PURE__ */ C($, { onClick: () => o(!0), children: [
|
|
414
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { backingSx: { backgroundColor: a.color, borderRadius: 1 }, size: 32, children: a.icon }) }),
|
|
415
|
+
/* @__PURE__ */ e(
|
|
416
|
+
O,
|
|
417
|
+
{
|
|
418
|
+
primary: a.mainMessage,
|
|
419
|
+
secondary: a.secondaryMessage && /* @__PURE__ */ C(x, { children: [
|
|
420
|
+
a.secondaryMessage,
|
|
421
|
+
" ",
|
|
422
|
+
/* @__PURE__ */ e(g, { bold: !0, sx: { color: "action.active" }, variant: "XSmall", children: a.ctaCopy })
|
|
423
|
+
] })
|
|
424
|
+
}
|
|
425
|
+
),
|
|
426
|
+
/* @__PURE__ */ e(F, { name: "chevron_right" })
|
|
427
|
+
] }) }),
|
|
428
|
+
/* @__PURE__ */ e(b, { sx: { ml: i.is_manual || !i.institution_url ? 0 : 24 } }),
|
|
429
|
+
!i.is_manual && i.institution_url && /* @__PURE__ */ C(x, { children: [
|
|
430
|
+
/* @__PURE__ */ e(D, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ C($, { component: "a", href: i.institution_url, target: "_blank", children: [
|
|
431
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
432
|
+
X,
|
|
433
|
+
{
|
|
434
|
+
backingSx: {
|
|
435
|
+
backgroundColor: n === i1.LIGHT ? "grey.300" : "grey.700",
|
|
436
|
+
borderRadius: 1
|
|
437
|
+
},
|
|
438
|
+
size: 32,
|
|
439
|
+
children: /* @__PURE__ */ e(
|
|
440
|
+
F1,
|
|
441
|
+
{
|
|
442
|
+
sx: {
|
|
443
|
+
...q,
|
|
444
|
+
color: n === i1.LIGHT ? "grey.900" : "common.white"
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
)
|
|
448
|
+
}
|
|
449
|
+
) }),
|
|
450
|
+
/* @__PURE__ */ e(O, { primary: i.name, secondary: i.institution_url }),
|
|
451
|
+
/* @__PURE__ */ e(F, { name: "launch" })
|
|
452
|
+
] }) }),
|
|
453
|
+
/* @__PURE__ */ e(b, {})
|
|
454
|
+
] }),
|
|
455
|
+
t && /* @__PURE__ */ e(
|
|
456
|
+
z,
|
|
457
|
+
{
|
|
458
|
+
loadWidgetProps: { current_member_guid: i.guid },
|
|
459
|
+
onClose: () => o(!1),
|
|
460
|
+
showConnectWidget: t,
|
|
461
|
+
title: c.manage_connection
|
|
462
|
+
}
|
|
463
|
+
)
|
|
464
|
+
] });
|
|
465
|
+
}, f3 = V(L3), g3 = ({ field: t, isOpen: o, onClose: n }) => {
|
|
466
|
+
const { updateAccount: i } = k(), { selectedAccount: c } = R(), { accounts: l } = y(), [u, a] = h.useState(c[t.name]), [d, m] = h.useState(""), [_, s] = h.useState(!0), H = () => {
|
|
467
|
+
a(""), m(""), n();
|
|
468
|
+
}, v = () => {
|
|
469
|
+
switch (t.type) {
|
|
470
|
+
case j.Select:
|
|
471
|
+
return /* @__PURE__ */ C(K1, { fullWidth: !0, children: [
|
|
472
|
+
/* @__PURE__ */ e(Y1, { id: `${t.label}-select-label`, children: t.label }),
|
|
473
|
+
/* @__PURE__ */ e(
|
|
474
|
+
J1,
|
|
475
|
+
{
|
|
476
|
+
id: `${t.label}-select`,
|
|
477
|
+
inputProps: {
|
|
478
|
+
sx: {
|
|
479
|
+
backgroundColor: "background.paper"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
label: t.label,
|
|
483
|
+
labelId: `${t.label}-select-label`,
|
|
484
|
+
onChange: (r) => a(r.target.value),
|
|
485
|
+
placeholder: t.placeholder,
|
|
486
|
+
value: u,
|
|
487
|
+
children: t.options?.map((r) => /* @__PURE__ */ e(X1, { value: r.value, children: r.label }, r.value))
|
|
488
|
+
}
|
|
489
|
+
)
|
|
490
|
+
] });
|
|
491
|
+
case j.Currency:
|
|
492
|
+
return /* @__PURE__ */ e(
|
|
493
|
+
Q1,
|
|
494
|
+
{
|
|
495
|
+
amount: u || "",
|
|
496
|
+
ariaLabel: t.placeholder,
|
|
497
|
+
fullWidth: !0,
|
|
498
|
+
label: t.label,
|
|
499
|
+
placeholder: t.placeholder,
|
|
500
|
+
setAmount: a,
|
|
501
|
+
setHasValidInput: s
|
|
502
|
+
}
|
|
503
|
+
);
|
|
504
|
+
case j.Date:
|
|
505
|
+
return /* @__PURE__ */ e(j1, { dateAdapter: G1, children: /* @__PURE__ */ e(
|
|
506
|
+
z1,
|
|
507
|
+
{
|
|
508
|
+
maxDate: $1(/* @__PURE__ */ new Date(), 1),
|
|
509
|
+
minDate: /* @__PURE__ */ new Date(),
|
|
510
|
+
onChange: (r) => {
|
|
511
|
+
c[t.name] && Number(c[t.name]) <= 31 ? a(r.getDate()) : a(r);
|
|
512
|
+
},
|
|
513
|
+
sx: {
|
|
514
|
+
"& .MuiPickersDay-today": {
|
|
515
|
+
color: "primary.lighter"
|
|
516
|
+
},
|
|
517
|
+
"& .MuiPickersArrowSwitcher-button": {
|
|
518
|
+
color: "primary.lighter",
|
|
519
|
+
"&:hover": {
|
|
520
|
+
backgroundColor: (r) => y1(r.palette.primary.light, 0.1)
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
views: ["day"]
|
|
525
|
+
}
|
|
526
|
+
) });
|
|
527
|
+
default:
|
|
528
|
+
return /* @__PURE__ */ e(
|
|
529
|
+
q1,
|
|
530
|
+
{
|
|
531
|
+
defaultValue: c[t.name],
|
|
532
|
+
error: !!d,
|
|
533
|
+
fullWidth: !0,
|
|
534
|
+
helperText: d,
|
|
535
|
+
inputProps: {
|
|
536
|
+
"aria-label": t.placeholder
|
|
537
|
+
},
|
|
538
|
+
onChange: w,
|
|
539
|
+
placeholder: t.placeholder
|
|
540
|
+
}
|
|
541
|
+
);
|
|
542
|
+
}
|
|
543
|
+
}, M = () => {
|
|
544
|
+
c[t.name] !== u && i({
|
|
545
|
+
...c,
|
|
546
|
+
[t.name]: u
|
|
547
|
+
}), H();
|
|
548
|
+
}, w = (r) => {
|
|
549
|
+
a(r.target.value), t.validation && m(t.validation(r.target.value));
|
|
550
|
+
};
|
|
551
|
+
return /* @__PURE__ */ e(
|
|
552
|
+
Q,
|
|
553
|
+
{
|
|
554
|
+
copy: {
|
|
555
|
+
close_aria: l.close_aria,
|
|
556
|
+
title: f(l.edit_field, t.label)
|
|
557
|
+
},
|
|
558
|
+
disablePrimaryButton: !!d || !_,
|
|
559
|
+
isOpen: o,
|
|
560
|
+
onClose: H,
|
|
561
|
+
onPrimaryAction: M,
|
|
562
|
+
primaryText: l.save,
|
|
563
|
+
sx: {
|
|
564
|
+
"& .MuiButton-root:focus-visible, & .MuiButton-root:focus": {
|
|
565
|
+
outline: "2px solid",
|
|
566
|
+
outlineColor: "primary.main",
|
|
567
|
+
outlineOffset: "2px"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
children: v()
|
|
571
|
+
}
|
|
572
|
+
);
|
|
573
|
+
}, H3 = V(g3), A3 = () => {
|
|
574
|
+
const t = window.app?.config, { onEvent: o } = Z(), { selectedAccount: n } = R(), { accounts: i } = y(), c = D1(n, i), l = n.member_is_managed_by_user || !n.member_is_managed_by_user && t.enable_renaming_home_accounts, [u, a] = h.useState(!1), [d, m] = h.useState(c[0]), _ = c.filter(
|
|
575
|
+
(s) => l || n[s.name] || n[s.name] === 0
|
|
576
|
+
);
|
|
577
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
578
|
+
_.map((s) => {
|
|
579
|
+
const H = n[s.name] || n[s.name] === 0, v = _.indexOf(s) === _.length - 1, M = /* @__PURE__ */ e(
|
|
580
|
+
O,
|
|
581
|
+
{
|
|
582
|
+
disableTypography: !0,
|
|
583
|
+
primary: /* @__PURE__ */ e(g, { sx: { fontSize: 11 }, children: s.label }),
|
|
584
|
+
secondary: /* @__PURE__ */ e(g, { bold: !0, sx: { fontSize: 15 }, children: H ? s.valueFormatter(n[s.name]) : s.placeholder })
|
|
585
|
+
}
|
|
586
|
+
);
|
|
587
|
+
return /* @__PURE__ */ e(h.Fragment, { children: l ? /* @__PURE__ */ C(x, { children: [
|
|
588
|
+
/* @__PURE__ */ e(D, { sx: { backgroundColor: "background.paper", px: 0 }, children: /* @__PURE__ */ C(
|
|
589
|
+
$,
|
|
590
|
+
{
|
|
591
|
+
onClick: () => {
|
|
592
|
+
m(s), a(!0), s?.event && o(s.event, { account_guid: n.guid });
|
|
593
|
+
},
|
|
594
|
+
children: [
|
|
595
|
+
M,
|
|
596
|
+
/* @__PURE__ */ e(F, { name: "chevron_right" })
|
|
597
|
+
]
|
|
598
|
+
}
|
|
599
|
+
) }),
|
|
600
|
+
/* @__PURE__ */ e(b, { sx: { ml: v ? 0 : 24 } })
|
|
601
|
+
] }) : H && /* @__PURE__ */ C(x, { children: [
|
|
602
|
+
/* @__PURE__ */ e(D, { sx: { backgroundColor: "background.paper", px: 24 }, children: M }),
|
|
603
|
+
/* @__PURE__ */ e(b, { sx: { ml: v ? 0 : 24 } })
|
|
604
|
+
] }) }, s.name);
|
|
605
|
+
}),
|
|
606
|
+
u && d && /* @__PURE__ */ e(
|
|
607
|
+
H3,
|
|
608
|
+
{
|
|
609
|
+
field: d,
|
|
610
|
+
isOpen: u,
|
|
611
|
+
onClose: () => a(!1)
|
|
612
|
+
}
|
|
613
|
+
)
|
|
614
|
+
] });
|
|
615
|
+
}, V3 = V(A3), v3 = () => {
|
|
616
|
+
const { onEvent: t } = Z();
|
|
617
|
+
return h.useEffect(() => t(S.ACCOUNT_DETAILS_VIEW), []), /* @__PURE__ */ C(E, { children: [
|
|
618
|
+
/* @__PURE__ */ e(V3, {}),
|
|
619
|
+
/* @__PURE__ */ e(f3, {}),
|
|
620
|
+
/* @__PURE__ */ e(_3, {})
|
|
621
|
+
] });
|
|
622
|
+
}, M3 = V(v3), y3 = ({ setTabValue: t }) => {
|
|
623
|
+
const [o, n] = h.useState(!1), { selectedMember: i } = R(), { accounts: c, connect: l } = y(), u = i.connection_status && p1.includes(i.connection_status);
|
|
624
|
+
if (h.useEffect(() => {
|
|
625
|
+
u && t(1);
|
|
626
|
+
}, [u]), !u) return;
|
|
627
|
+
const a = V1(i, l);
|
|
628
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
629
|
+
/* @__PURE__ */ e(
|
|
630
|
+
o3,
|
|
631
|
+
{
|
|
632
|
+
sx: {
|
|
633
|
+
mb: 16,
|
|
634
|
+
mt: 24,
|
|
635
|
+
mx: 24
|
|
636
|
+
},
|
|
637
|
+
children: /* @__PURE__ */ C(
|
|
638
|
+
e3,
|
|
639
|
+
{
|
|
640
|
+
icon: /* @__PURE__ */ e(g1, { filled: !0 }),
|
|
641
|
+
severity: "error",
|
|
642
|
+
sx: {
|
|
643
|
+
borderLeft: 5,
|
|
644
|
+
borderTopLeftRadius: 6,
|
|
645
|
+
borderBottomLeftRadius: 6,
|
|
646
|
+
borderColor: "error.main",
|
|
647
|
+
color: "text.primary",
|
|
648
|
+
"&.MuiPaper-root": {
|
|
649
|
+
backgroundColor: "background.paper"
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
children: [
|
|
653
|
+
a.title && /* @__PURE__ */ e(t3, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: a.title }),
|
|
654
|
+
/* @__PURE__ */ e(g, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: a.main }),
|
|
655
|
+
a.cta && /* @__PURE__ */ e(
|
|
656
|
+
n3,
|
|
657
|
+
{
|
|
658
|
+
onClick: () => n(!0),
|
|
659
|
+
sx: { fontSize: 15, fontWeight: 600, ml: 0 },
|
|
660
|
+
children: a.cta
|
|
661
|
+
}
|
|
662
|
+
)
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
)
|
|
666
|
+
}
|
|
667
|
+
),
|
|
668
|
+
o && /* @__PURE__ */ e(
|
|
669
|
+
z,
|
|
670
|
+
{
|
|
671
|
+
loadWidgetProps: { current_member_guid: i.guid },
|
|
672
|
+
onClose: () => n(!1),
|
|
673
|
+
showConnectWidget: o,
|
|
674
|
+
title: c.manage_connection
|
|
675
|
+
}
|
|
676
|
+
)
|
|
677
|
+
] });
|
|
678
|
+
}, x3 = V(y3), w3 = () => {
|
|
679
|
+
const [t, o] = h.useState(""), { onEvent: n } = Z(), { selectedAccount: i } = R(), { accounts: c } = y(), { isTransactionDataLoaded: l, loadTransactionData: u, setFilter: a, sortedTransactions: d } = m1();
|
|
680
|
+
h.useEffect(() => {
|
|
681
|
+
l || u().finally();
|
|
682
|
+
}, []);
|
|
683
|
+
const m = h.useMemo(
|
|
684
|
+
() => d.find((_) => _.guid === t),
|
|
685
|
+
[t, d]
|
|
686
|
+
);
|
|
687
|
+
return h.useEffect(() => {
|
|
688
|
+
a({
|
|
689
|
+
dateRange: { start: c3(a3(), 90), end: i3() },
|
|
690
|
+
accounts: [i.guid]
|
|
691
|
+
});
|
|
692
|
+
}, [i]), h.useEffect(() => n(S.ACCOUNT_DETAILS_VIEW_TRANSACTIONS), []), /* @__PURE__ */ C(x, { children: [
|
|
693
|
+
/* @__PURE__ */ e(s3, { onClick: o }),
|
|
694
|
+
m && /* @__PURE__ */ e(
|
|
695
|
+
t1,
|
|
696
|
+
{
|
|
697
|
+
ariaLabelClose: c.close_drawer,
|
|
698
|
+
isOpen: !!t,
|
|
699
|
+
onClose: () => o(""),
|
|
700
|
+
title: c.transaction_drawer_title,
|
|
701
|
+
children: /* @__PURE__ */ e(l3, { transaction: m })
|
|
702
|
+
}
|
|
703
|
+
)
|
|
704
|
+
] });
|
|
705
|
+
}, b3 = V(w3), S3 = () => {
|
|
706
|
+
const [t, o] = h.useState(0), { accounts: n } = y();
|
|
707
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
708
|
+
/* @__PURE__ */ e(x3, { setTabValue: o }),
|
|
709
|
+
/* @__PURE__ */ C(
|
|
710
|
+
Z1,
|
|
711
|
+
{
|
|
712
|
+
"aria-label": n.transactions_and_details_aria,
|
|
713
|
+
centered: !0,
|
|
714
|
+
onChange: (i, c) => o(c),
|
|
715
|
+
textColor: "primary",
|
|
716
|
+
value: t,
|
|
717
|
+
variant: "fullWidth",
|
|
718
|
+
children: [
|
|
719
|
+
/* @__PURE__ */ e(
|
|
720
|
+
a1,
|
|
721
|
+
{
|
|
722
|
+
"aria-controls": "transaction-details-tabpanel-0",
|
|
723
|
+
id: "transaction-details-tab-0",
|
|
724
|
+
label: n.transactions
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
/* @__PURE__ */ e(
|
|
728
|
+
a1,
|
|
729
|
+
{
|
|
730
|
+
"aria-controls": "account-details-tabpanel-1",
|
|
731
|
+
id: "account-details-tab-1",
|
|
732
|
+
label: n.account_details
|
|
733
|
+
}
|
|
734
|
+
)
|
|
735
|
+
]
|
|
736
|
+
}
|
|
737
|
+
),
|
|
738
|
+
/* @__PURE__ */ e(r1, { index: 0, name: "transaction-details", value: t, children: /* @__PURE__ */ e(b3, {}) }),
|
|
739
|
+
/* @__PURE__ */ e(r1, { index: 1, name: "account-details", value: t, children: /* @__PURE__ */ e(M3, {}) })
|
|
740
|
+
] });
|
|
741
|
+
}, R3 = V(S3), T3 = () => {
|
|
742
|
+
const [t, o] = h.useState(""), { accounts: n } = y(), { allSelectedAccounts: i } = G(), { setSelectedAccount: c, setSelectedMember: l } = R(), { members: u } = k(), { onEvent: a } = Z(), d = [...new Set(i.map((r) => r.account_type))], m = i.find((r) => t === r.guid), _ = h.useMemo(
|
|
743
|
+
() => i.filter((r) => r.is_hidden),
|
|
744
|
+
[i]
|
|
745
|
+
), s = h.useMemo(
|
|
746
|
+
() => i.filter((r) => r.is_closed),
|
|
747
|
+
[i]
|
|
748
|
+
), H = _.reduce(
|
|
749
|
+
(r, p) => (p.available_balance || p.balance || 0) + r,
|
|
75
750
|
0
|
|
76
|
-
),
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
|
|
751
|
+
), v = k1(s, n);
|
|
752
|
+
h.useEffect(() => {
|
|
753
|
+
if (m) {
|
|
754
|
+
c(m);
|
|
755
|
+
const r = u.find((p) => p.guid === m?.member_guid) || {};
|
|
756
|
+
r && l(r);
|
|
82
757
|
}
|
|
83
|
-
}, [
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
account_guid:
|
|
87
|
-
account_type:
|
|
758
|
+
}, [m, t]);
|
|
759
|
+
const M = (r) => {
|
|
760
|
+
o(r.guid), a(S.ACCOUNTS_CLICK_ACCOUNT, {
|
|
761
|
+
account_guid: r.guid,
|
|
762
|
+
account_type: r.account_type
|
|
88
763
|
});
|
|
89
|
-
}, w = (
|
|
90
|
-
const
|
|
91
|
-
return /* @__PURE__ */ e(
|
|
764
|
+
}, w = (r) => {
|
|
765
|
+
const p = r === "hidden" ? _ : s, I = r === "hidden" ? H : v, A = r === "hidden" ? n.account_hidden : n.account_closed;
|
|
766
|
+
return /* @__PURE__ */ e(c1, { children: /* @__PURE__ */ e(
|
|
92
767
|
E,
|
|
93
768
|
{
|
|
94
|
-
"aria-label":
|
|
95
|
-
subheader: /* @__PURE__ */ e(
|
|
96
|
-
|
|
769
|
+
"aria-label": A,
|
|
770
|
+
subheader: /* @__PURE__ */ e(B, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ C(
|
|
771
|
+
W,
|
|
97
772
|
{
|
|
98
773
|
component: "span",
|
|
99
774
|
direction: "row",
|
|
100
775
|
sx: { justifyContent: "space-between", color: "grey.700" },
|
|
101
776
|
children: [
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
-
/* @__PURE__ */ e(
|
|
777
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: A }),
|
|
778
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: d1(I, "0,0.00") })
|
|
104
779
|
]
|
|
105
780
|
}
|
|
106
781
|
) }),
|
|
107
|
-
children: /* @__PURE__ */ e(
|
|
108
|
-
const
|
|
109
|
-
return /* @__PURE__ */
|
|
782
|
+
children: /* @__PURE__ */ e(W, { children: p.map((T, P, v1) => {
|
|
783
|
+
const K = P === v1.length - 1;
|
|
784
|
+
return /* @__PURE__ */ C(h.Fragment, { children: [
|
|
110
785
|
/* @__PURE__ */ e(
|
|
111
|
-
|
|
786
|
+
U,
|
|
112
787
|
{
|
|
113
|
-
account:
|
|
114
|
-
onRowClick: () =>
|
|
788
|
+
account: T,
|
|
789
|
+
onRowClick: () => M(T),
|
|
115
790
|
shouldShowConnectionStatus: !0
|
|
116
791
|
}
|
|
117
792
|
),
|
|
118
|
-
|
|
119
|
-
|
|
793
|
+
r === "hidden" ? /* @__PURE__ */ e(
|
|
794
|
+
b,
|
|
120
795
|
{
|
|
121
796
|
sx: {
|
|
122
|
-
mb:
|
|
123
|
-
ml:
|
|
797
|
+
mb: K ? 24 : 4,
|
|
798
|
+
ml: K ? 24 : 68
|
|
124
799
|
}
|
|
125
800
|
}
|
|
126
|
-
) : !
|
|
127
|
-
|
|
801
|
+
) : !K && /* @__PURE__ */ e(
|
|
802
|
+
b,
|
|
128
803
|
{
|
|
129
804
|
sx: {
|
|
130
805
|
mb: 4,
|
|
@@ -132,170 +807,193 @@ const h1 = (o, C) => {
|
|
|
132
807
|
}
|
|
133
808
|
}
|
|
134
809
|
)
|
|
135
|
-
] },
|
|
810
|
+
] }, T.guid);
|
|
136
811
|
}) })
|
|
137
812
|
}
|
|
138
813
|
) });
|
|
139
814
|
};
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
(
|
|
144
|
-
),
|
|
145
|
-
(
|
|
815
|
+
return /* @__PURE__ */ C(c1, { sx: { pt: 24 }, children: [
|
|
816
|
+
d.map((r) => {
|
|
817
|
+
const p = i.filter(
|
|
818
|
+
(A) => A.account_type === r && !A.is_closed && !A.is_hidden
|
|
819
|
+
), I = p.reduce(
|
|
820
|
+
(A, T) => (T.balance || 0) + A,
|
|
146
821
|
0
|
|
147
822
|
);
|
|
148
|
-
return
|
|
823
|
+
return p.length === 0 ? null : /* @__PURE__ */ e(
|
|
149
824
|
E,
|
|
150
825
|
{
|
|
151
|
-
"aria-label": n.account_type_accounts[
|
|
152
|
-
subheader: /* @__PURE__ */ e(
|
|
153
|
-
|
|
826
|
+
"aria-label": n.account_type_accounts[p[0]?.account_type],
|
|
827
|
+
subheader: /* @__PURE__ */ e(B, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ C(
|
|
828
|
+
W,
|
|
154
829
|
{
|
|
155
830
|
component: "span",
|
|
156
831
|
direction: "row",
|
|
157
832
|
sx: { display: "flex", justifyContent: "space-between" },
|
|
158
833
|
children: [
|
|
159
|
-
/* @__PURE__ */ e(
|
|
160
|
-
/* @__PURE__ */ e(
|
|
834
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: n.account_types[r] }),
|
|
835
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: d1(I, "0,0.00") })
|
|
161
836
|
]
|
|
162
837
|
}
|
|
163
838
|
) }),
|
|
164
|
-
children: /* @__PURE__ */ e(
|
|
165
|
-
const
|
|
166
|
-
return /* @__PURE__ */
|
|
839
|
+
children: /* @__PURE__ */ e(W, { children: p.map((A) => {
|
|
840
|
+
const T = i.indexOf(A) === i.length - 1, P = p.indexOf(A) === p.length - 1;
|
|
841
|
+
return /* @__PURE__ */ C(h.Fragment, { children: [
|
|
167
842
|
/* @__PURE__ */ e(
|
|
168
|
-
|
|
843
|
+
U,
|
|
169
844
|
{
|
|
170
|
-
account:
|
|
171
|
-
onRowClick: () =>
|
|
845
|
+
account: A,
|
|
846
|
+
onRowClick: () => M(A),
|
|
172
847
|
shouldShowConnectionStatus: !0
|
|
173
848
|
}
|
|
174
849
|
),
|
|
175
|
-
(!
|
|
176
|
-
|
|
850
|
+
(!T || s.length > 0 || _.length > 0) && /* @__PURE__ */ e(
|
|
851
|
+
b,
|
|
177
852
|
{
|
|
178
853
|
sx: {
|
|
179
|
-
mb:
|
|
180
|
-
ml:
|
|
854
|
+
mb: P ? 24 : 4,
|
|
855
|
+
ml: P ? 24 : 68
|
|
181
856
|
}
|
|
182
857
|
}
|
|
183
858
|
)
|
|
184
|
-
] },
|
|
859
|
+
] }, A.guid);
|
|
185
860
|
}) })
|
|
186
861
|
},
|
|
187
|
-
|
|
862
|
+
r
|
|
188
863
|
);
|
|
189
864
|
}),
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
|
|
865
|
+
_.length > 0 && w("hidden"),
|
|
866
|
+
s.length > 0 && w("closed"),
|
|
867
|
+
/* @__PURE__ */ C(
|
|
868
|
+
t1,
|
|
194
869
|
{
|
|
195
870
|
ariaLabelClose: n.close_account_details_aria,
|
|
196
|
-
isOpen: !!
|
|
197
|
-
onClose: () =>
|
|
871
|
+
isOpen: !!t,
|
|
872
|
+
onClose: () => o(""),
|
|
198
873
|
title: n.account_details,
|
|
199
874
|
children: [
|
|
200
|
-
/* @__PURE__ */ e(
|
|
201
|
-
/* @__PURE__ */ e(
|
|
875
|
+
/* @__PURE__ */ e(x1, { ChartComponent: h3 }),
|
|
876
|
+
/* @__PURE__ */ e(R3, {})
|
|
202
877
|
]
|
|
203
878
|
}
|
|
204
879
|
)
|
|
205
880
|
] });
|
|
206
|
-
},
|
|
207
|
-
const [n,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
i(!0), t(S.ACCOUNTS_CLICK_CONNECT);
|
|
881
|
+
}, E3 = V(T3), D3 = ({ onBackClick: t, sx: o = {} }) => {
|
|
882
|
+
const [n, i] = h.useState(!1), [c, l] = h.useState(!1), { config: u } = E1(), { isAccountDataLoaded: a, loadAccountData: d } = k(), { accounts: m, connect: _ } = y(), { isInitialized: s, selectedAccountGuids: H } = G(), { isDesktop: v } = H1(), { onEvent: M } = Z();
|
|
883
|
+
o1({
|
|
884
|
+
widgetName: "AccountsWidget",
|
|
885
|
+
isLoaded: a
|
|
886
|
+
}), h.useEffect(() => {
|
|
887
|
+
a || d().finally();
|
|
888
|
+
}, []);
|
|
889
|
+
const w = () => {
|
|
890
|
+
i(!0), M(S.ACCOUNTS_CLICK_CONNECT);
|
|
891
|
+
}, r = () => {
|
|
892
|
+
l(!0), M(S.ACCOUNTS_CLICK_CONNECT);
|
|
219
893
|
};
|
|
220
|
-
return
|
|
221
|
-
|
|
894
|
+
return s ? /* @__PURE__ */ C(
|
|
895
|
+
N1,
|
|
222
896
|
{
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
{ iconName: "add", label: H.add, onClick: A },
|
|
897
|
+
actions: u.show_connections_widget_in_master ? [
|
|
898
|
+
{ iconName: "add", label: m.add, onClick: w },
|
|
226
899
|
{
|
|
227
900
|
iconName: "credit_card_gear",
|
|
228
|
-
label:
|
|
229
|
-
onClick:
|
|
901
|
+
label: m.manage,
|
|
902
|
+
onClick: r
|
|
230
903
|
}
|
|
231
904
|
] : [],
|
|
232
|
-
onAccountsFilterClick: () =>
|
|
233
|
-
onBackClick:
|
|
234
|
-
sx:
|
|
235
|
-
title:
|
|
905
|
+
onAccountsFilterClick: () => M(S.ACCOUNTS_CLICK_FILTER),
|
|
906
|
+
onBackClick: t,
|
|
907
|
+
sx: o,
|
|
908
|
+
title: m.title,
|
|
236
909
|
children: [
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
/* @__PURE__ */ e(
|
|
240
|
-
] }) : /* @__PURE__ */ e(
|
|
910
|
+
a ? /* @__PURE__ */ C(e1, { sx: { px: v ? 24 : 12 }, children: [
|
|
911
|
+
H.length < 1 && /* @__PURE__ */ e(g, { display: "flex", justifyContent: "center", my: 24, children: m.no_accounts }),
|
|
912
|
+
/* @__PURE__ */ e(E3, {})
|
|
913
|
+
] }) : /* @__PURE__ */ e(h1, { sx: { px: v ? 48 : 24, pt: 24 }, variant: "list" }),
|
|
241
914
|
/* @__PURE__ */ e(
|
|
242
|
-
|
|
915
|
+
z,
|
|
243
916
|
{
|
|
244
|
-
onClose: () =>
|
|
917
|
+
onClose: () => i(!1),
|
|
245
918
|
showConnectWidget: n,
|
|
246
|
-
title:
|
|
919
|
+
title: _.mini_title
|
|
247
920
|
}
|
|
248
921
|
),
|
|
249
922
|
/* @__PURE__ */ e(
|
|
250
|
-
|
|
923
|
+
r3,
|
|
251
924
|
{
|
|
252
|
-
onClose: () =>
|
|
253
|
-
showConnectionsWidget:
|
|
254
|
-
title:
|
|
925
|
+
onClose: () => l(!1),
|
|
926
|
+
showConnectionsWidget: c,
|
|
927
|
+
title: m.manage_connections
|
|
255
928
|
}
|
|
256
929
|
)
|
|
257
930
|
]
|
|
258
931
|
}
|
|
259
|
-
) : /* @__PURE__ */ e(
|
|
260
|
-
},
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
h(n);
|
|
266
|
-
}, [n]);
|
|
267
|
-
const H = s.useMemo(
|
|
268
|
-
() => d1(d, p ? 5 : 3),
|
|
269
|
-
[d, p]
|
|
932
|
+
) : /* @__PURE__ */ e(n1, {});
|
|
933
|
+
}, j4 = V(D3);
|
|
934
|
+
function k3(t) {
|
|
935
|
+
const { heldAccounts: o, externalAccounts: n } = t.reduce(
|
|
936
|
+
(i, c) => (c.member_is_managed_by_user ? i.externalAccounts.push(c) : i.heldAccounts.push(c), i),
|
|
937
|
+
{ heldAccounts: [], externalAccounts: [] }
|
|
270
938
|
);
|
|
271
|
-
return
|
|
272
|
-
|
|
939
|
+
return {
|
|
940
|
+
heldAccounts: C1(o),
|
|
941
|
+
externalAccounts: C1(n)
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
function Z3(t, o) {
|
|
945
|
+
const { heldAccounts: n, externalAccounts: i } = k3(t), c = n.slice(0, o);
|
|
946
|
+
return c.length < o && c.push(...i.slice(0, o - c.length)), c;
|
|
947
|
+
}
|
|
948
|
+
const I3 = {
|
|
949
|
+
[N.CHECKING]: 1,
|
|
950
|
+
[N.SAVINGS]: 2,
|
|
951
|
+
[N.CREDIT_CARD]: 3
|
|
952
|
+
}, u1 = (t) => I3[t] ?? t + 100, C1 = (t) => t.sort((o, n) => {
|
|
953
|
+
const i = u1(o.account_type), c = u1(n.account_type), l = i - c;
|
|
954
|
+
if (l !== 0) return l;
|
|
955
|
+
const u = o.name ?? o.feed_name ?? "", a = n.name ?? n.feed_name ?? "";
|
|
956
|
+
return u.localeCompare(a);
|
|
957
|
+
}), N3 = ({ onPrimaryCtaClick: t, sx: o }) => {
|
|
958
|
+
const { isAccountDataLoaded: n, loadAccountData: i } = k(), { accounts: c } = y(), { isInitialized: l, selectedAccounts: u } = G(), { isDesktop: a } = H1();
|
|
959
|
+
o1({
|
|
960
|
+
widgetName: "AccountsMiniWidget",
|
|
961
|
+
isLoaded: l
|
|
962
|
+
}), h.useEffect(() => {
|
|
963
|
+
n || i().finally();
|
|
964
|
+
}, []);
|
|
965
|
+
const d = h.useMemo(
|
|
966
|
+
() => Z3(u, a ? 5 : 3),
|
|
967
|
+
[u, a]
|
|
968
|
+
);
|
|
969
|
+
return l ? /* @__PURE__ */ e(
|
|
970
|
+
A1,
|
|
273
971
|
{
|
|
274
972
|
className: "mx-exp-accounts-miniwidget",
|
|
275
|
-
onPrimaryCtaClick:
|
|
276
|
-
primaryCtaLabel:
|
|
277
|
-
sx:
|
|
278
|
-
title:
|
|
279
|
-
children:
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
const
|
|
283
|
-
return /* @__PURE__ */
|
|
973
|
+
onPrimaryCtaClick: t,
|
|
974
|
+
primaryCtaLabel: c.primary_cta,
|
|
975
|
+
sx: o,
|
|
976
|
+
title: c.mini_title,
|
|
977
|
+
children: n ? /* @__PURE__ */ C(E, { children: [
|
|
978
|
+
u.length === 0 && /* @__PURE__ */ e(D, { sx: { justifyContent: "center" }, children: c.no_accounts }),
|
|
979
|
+
d.map((m, _) => {
|
|
980
|
+
const s = d.indexOf(m) === d.length - 1;
|
|
981
|
+
return /* @__PURE__ */ C(h.Fragment, { children: [
|
|
284
982
|
/* @__PURE__ */ e(
|
|
285
|
-
|
|
983
|
+
U,
|
|
286
984
|
{
|
|
287
|
-
account:
|
|
985
|
+
account: m,
|
|
288
986
|
listItemProps: { sx: { px: 24 } },
|
|
289
987
|
shouldShowConnectionStatus: !0
|
|
290
988
|
}
|
|
291
989
|
),
|
|
292
|
-
!
|
|
293
|
-
] }, `account-item${
|
|
990
|
+
!s && /* @__PURE__ */ e(b, { "aria-hidden": "true", variant: "inset" })
|
|
991
|
+
] }, `account-item${_}`);
|
|
294
992
|
})
|
|
295
|
-
] }) : /* @__PURE__ */ e(
|
|
993
|
+
] }) : /* @__PURE__ */ e(h1, { sx: { px: 12, py: 8 }, variant: "list" })
|
|
296
994
|
}
|
|
297
|
-
) : /* @__PURE__ */ e(
|
|
298
|
-
},
|
|
995
|
+
) : /* @__PURE__ */ e(n1, {});
|
|
996
|
+
}, X4 = V(N3), O3 = () => /* @__PURE__ */ C(
|
|
299
997
|
"svg",
|
|
300
998
|
{
|
|
301
999
|
fill: "none",
|
|
@@ -303,7 +1001,7 @@ const h1 = (o, C) => {
|
|
|
303
1001
|
viewBox: "0 0 272 66",
|
|
304
1002
|
xmlns: "http://www.w3.org/2000/svg",
|
|
305
1003
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
1004
|
+
/* @__PURE__ */ C("g", { opacity: "0.35", children: [
|
|
307
1005
|
/* @__PURE__ */ e("rect", { fill: "#CD1141", height: "40.3437", rx: "2.81371", width: "39.6876", x: "19.6553" }),
|
|
308
1006
|
/* @__PURE__ */ e(
|
|
309
1007
|
"path",
|
|
@@ -589,7 +1287,7 @@ const h1 = (o, C) => {
|
|
|
589
1287
|
children: /* @__PURE__ */ e("rect", { fill: "white", height: "47.5848", rx: "3.31025", width: "46.8064", x: "113.168", y: "18.1035" })
|
|
590
1288
|
}
|
|
591
1289
|
),
|
|
592
|
-
/* @__PURE__ */
|
|
1290
|
+
/* @__PURE__ */ C("g", { mask: "url(#mask1_6197_80303)", children: [
|
|
593
1291
|
/* @__PURE__ */ e(
|
|
594
1292
|
"mask",
|
|
595
1293
|
{
|
|
@@ -734,12 +1432,12 @@ const h1 = (o, C) => {
|
|
|
734
1432
|
)
|
|
735
1433
|
]
|
|
736
1434
|
}
|
|
737
|
-
),
|
|
738
|
-
const { connect:
|
|
739
|
-
return /* @__PURE__ */
|
|
740
|
-
/* @__PURE__ */ e(
|
|
1435
|
+
), F3 = () => {
|
|
1436
|
+
const { connect: t } = y();
|
|
1437
|
+
return /* @__PURE__ */ C(e1, { alignItems: "center", direction: "column", m: 24, children: [
|
|
1438
|
+
/* @__PURE__ */ e(O3, {}),
|
|
741
1439
|
/* @__PURE__ */ e(
|
|
742
|
-
|
|
1440
|
+
g,
|
|
743
1441
|
{
|
|
744
1442
|
sx: {
|
|
745
1443
|
whiteSpace: "wrap",
|
|
@@ -747,52 +1445,55 @@ const h1 = (o, C) => {
|
|
|
747
1445
|
textAlign: "center"
|
|
748
1446
|
},
|
|
749
1447
|
variant: "Paragraph",
|
|
750
|
-
children:
|
|
1448
|
+
children: t.mini_widget_content
|
|
751
1449
|
}
|
|
752
1450
|
)
|
|
753
1451
|
] });
|
|
754
|
-
},
|
|
755
|
-
onPrimaryCtaClick:
|
|
1452
|
+
}, P3 = V(F3), W3 = ({
|
|
1453
|
+
onPrimaryCtaClick: t = () => {
|
|
756
1454
|
},
|
|
757
|
-
sx:
|
|
1455
|
+
sx: o
|
|
758
1456
|
}) => {
|
|
759
|
-
const { isCopyLoaded: n } =
|
|
760
|
-
|
|
1457
|
+
const { isCopyLoaded: n } = G(), { connect: i } = y(), [c, l] = h.useState(!1), u = () => {
|
|
1458
|
+
l(!0), t();
|
|
761
1459
|
};
|
|
762
|
-
return
|
|
763
|
-
|
|
1460
|
+
return o1({
|
|
1461
|
+
widgetName: "ConnectMiniWidget",
|
|
1462
|
+
isLoaded: n
|
|
1463
|
+
}), n ? /* @__PURE__ */ C(
|
|
1464
|
+
A1,
|
|
764
1465
|
{
|
|
765
1466
|
className: "mx-exp-connect-miniwidget",
|
|
766
|
-
onPrimaryCtaClick:
|
|
767
|
-
primaryCtaLabel:
|
|
768
|
-
sx:
|
|
769
|
-
title:
|
|
1467
|
+
onPrimaryCtaClick: u,
|
|
1468
|
+
primaryCtaLabel: i.primary_cta,
|
|
1469
|
+
sx: o,
|
|
1470
|
+
title: i.mini_title,
|
|
770
1471
|
children: [
|
|
771
|
-
/* @__PURE__ */ e(
|
|
772
|
-
|
|
773
|
-
|
|
1472
|
+
/* @__PURE__ */ e(P3, {}),
|
|
1473
|
+
c && /* @__PURE__ */ e(
|
|
1474
|
+
z,
|
|
774
1475
|
{
|
|
775
|
-
onClose: () =>
|
|
776
|
-
showConnectWidget:
|
|
777
|
-
title:
|
|
1476
|
+
onClose: () => l(!1),
|
|
1477
|
+
showConnectWidget: c,
|
|
1478
|
+
title: i.mini_title
|
|
778
1479
|
}
|
|
779
1480
|
)
|
|
780
1481
|
]
|
|
781
1482
|
}
|
|
782
|
-
) : /* @__PURE__ */ e(
|
|
783
|
-
},
|
|
1483
|
+
) : /* @__PURE__ */ e(n1, {});
|
|
1484
|
+
}, J4 = V(W3);
|
|
784
1485
|
export {
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
1486
|
+
i2 as AccountApi,
|
|
1487
|
+
R3 as AccountDetailsContent,
|
|
1488
|
+
x1 as AccountDetailsHeader,
|
|
1489
|
+
a2 as AccountStore,
|
|
1490
|
+
X4 as AccountsMiniWidget,
|
|
1491
|
+
j4 as AccountsWidget,
|
|
1492
|
+
J4 as ConnectMiniWidget,
|
|
1493
|
+
j as FieldType,
|
|
1494
|
+
n2 as MemberConnectionStatus,
|
|
1495
|
+
e2 as getAccountBalanceDetails,
|
|
1496
|
+
D1 as getAccountDetailFields,
|
|
1497
|
+
R as useAccountUiStore,
|
|
1498
|
+
m3 as useGetMergeableAccounts
|
|
798
1499
|
};
|