@mx-cartographer/experiences 7.13.21 → 7.13.22-alpha.al0
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/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-CG9VtEpj.mjs} +2 -2
- package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-BDFCEhSI.mjs} +2 -2
- package/dist/{AccountStore-DpYvNnql.mjs → AccountStore-Bn1eH2EU.mjs} +1 -1
- package/dist/{BudgetUtil-CLhRnCoX.mjs → BudgetUtil-BCSxP3M3.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-tvJUjmwZ.mjs} +1 -1
- package/dist/{Connect-eYIWqCEr.mjs → Connect-CmjOgy5v.mjs} +1 -1
- package/dist/{ConnectDrawer-C0wjwcJt.mjs → ConnectDrawer-Be0RkL7I.mjs} +2 -2
- package/dist/{ConnectionsDrawer-IA7vnv1J.mjs → ConnectionsDrawer-yeD_PsY1.mjs} +2 -2
- package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-xu9UcYZR.mjs} +1 -1
- package/dist/DateRangeSelector-DE4UR77m.mjs +275 -0
- package/dist/{ExportCsvAction-izkIdXj5.mjs → ExportCsvAction-CLUDN8jI.mjs} +3 -3
- package/dist/{GlobalAccountFilter-B73Pw1hJ.mjs → GlobalAccountFilter-BkUeAltd.mjs} +90 -96
- package/dist/{GoalStore-DB58sKTC.mjs → GoalStore-DMhiGiF4.mjs} +1 -1
- package/dist/{Help-D-laTbKu.mjs → Help-pcoNjCaF.mjs} +1 -1
- package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DIjY-HBq.mjs} +1 -1
- package/dist/{ListItemAction-4KB7P75M.mjs → ListItemAction-BQIdxB-9.mjs} +1 -1
- package/dist/{ManageIncome-B1j-AzI1.mjs → ManageIncome-DWVaWpCT.mjs} +4 -4
- package/dist/{MicroWidgetContainer-B_EnfvCq.mjs → MicroWidgetContainer-CTMkXRJM.mjs} +1 -1
- package/dist/{MiniWidgetContainer-Bhkv-hpz.mjs → MiniWidgetContainer-BKPN3c-6.mjs} +1 -1
- package/dist/{NotificationSettings-C77J42Ue.mjs → NotificationSettings-O3iUw7-O.mjs} +32 -32
- package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-2lCGZTRv.mjs} +3 -3
- package/dist/{RecurringSettings-Dyj3i0ZJ.mjs → RecurringSettings-DNko1CD0.mjs} +2 -2
- package/dist/{SpendingLegend-BgjazduU.mjs → SpendingLegend-CGYqNtOp.mjs} +1 -1
- package/dist/{StatusIndicator-CIKUOoN_.mjs → StatusIndicator-CnDblSmc.mjs} +2 -2
- package/dist/{Transaction-CqjlF6SO.mjs → Transaction-Bd0myZzA.mjs} +1 -1
- package/dist/{TransactionDetails-CwqokbQo.mjs → TransactionDetails-DAB5arBD.mjs} +6 -6
- package/dist/{TransactionStore-rpqhGX8m.mjs → TransactionStore-hzVucfUK.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-D24H9kDm.mjs → ViewMoreMicroCard-BWCe3UeO.mjs} +1 -1
- package/dist/WidgetContainer-BPeSl0Dj.mjs +180 -0
- package/dist/WidgetContainerV2-BjOelON7.mjs +127 -0
- package/dist/accounts/index.es.js +218 -219
- package/dist/analytics/index.es.js +8 -8
- package/dist/budgets/index.es.js +408 -409
- package/dist/cashflow/index.es.js +227 -228
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
- package/dist/common/components/WidgetContainer.d.ts +3 -2
- package/dist/common/components/WidgetContainerV2.d.ts +4 -0
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +167 -164
- package/dist/dashboard/index.es.js +5 -5
- package/dist/debts/index.es.js +585 -586
- package/dist/{exportTransactionsToCSV-CdTF_RqL.mjs → exportTransactionsToCSV-CamFllci.mjs} +1 -1
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/index.es.js +641 -652
- package/dist/goals/GoalsWidget.d.ts +1 -1
- package/dist/goals/index.es.js +498 -499
- package/dist/help/index.es.js +8 -8
- package/dist/{hooks-BxkfR-Ff.mjs → hooks-DOWEalfb.mjs} +2 -2
- package/dist/insights/index.es.js +3 -3
- package/dist/investments/InvestmentsWidget.d.ts +1 -1
- package/dist/investments/index.es.js +448 -449
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +182 -196
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
- package/dist/recurringtransactions/index.es.js +240 -242
- package/dist/settings/index.es.js +7 -7
- package/dist/spending/index.es.js +8 -8
- package/dist/transactions/index.es.js +246 -248
- package/dist/trends/index.es.js +12 -12
- package/dist/{useAccountDisplayName-DKwT1mWv.mjs → useAccountDisplayName-DQc7zGqk.mjs} +1 -1
- package/dist/{useInsightsEnabled-DL_oNyI0.mjs → useInsightsEnabled-DojdZhOg.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-DgN1bTyu.mjs → useWidgetLoadTimer-DmYEMfRw.mjs} +1 -1
- package/package.json +1 -1
- package/dist/WidgetContainer-B7xDq2bM.mjs +0 -441
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as C, Fragment as R } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as b } from "mobx-react-lite";
|
|
4
4
|
import e1 from "@mui/material/Stack";
|
|
5
|
-
import { Text as
|
|
5
|
+
import { Text as H, Icon as N, THEMES as i1 } from "@mxenabled/mxui";
|
|
6
6
|
import { S as h1 } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
7
7
|
import c1 from "@mui/material/Box";
|
|
8
8
|
import W from "@mui/material/Divider";
|
|
@@ -10,15 +10,15 @@ import O from "@mui/material/List";
|
|
|
10
10
|
import B from "@mui/material/ListSubheader";
|
|
11
11
|
import P from "@mui/system/Stack";
|
|
12
12
|
import { useTheme as V1, alpha as M1 } from "@mui/material/styles";
|
|
13
|
-
import { u as w, A as y1 } from "../AccountDetailsHeader-
|
|
14
|
-
import { L as x1 } from "../LineChart-
|
|
13
|
+
import { u as w, A as y1 } from "../AccountDetailsHeader-CG9VtEpj.mjs";
|
|
14
|
+
import { L as x1 } from "../LineChart-DIjY-HBq.mjs";
|
|
15
15
|
import { g as w1, a as R1, b as S1 } from "../SpendingData-Bz1bCWAs.mjs";
|
|
16
|
-
import { l as T1, u as
|
|
16
|
+
import { l as T1, u as V, d as E, f as D, h as m1, b as G, a as E1 } from "../hooks-DOWEalfb.mjs";
|
|
17
17
|
import { A as I, g as L, N as p1 } from "../Account-BiB1F8lL.mjs";
|
|
18
18
|
import { I as _1, P as L1, S as f1 } from "../Account-DuOz1a27.mjs";
|
|
19
19
|
import { a as D1, b as k1 } from "../AccountFields-CxqONzjY.mjs";
|
|
20
20
|
import { g as i4 } from "../AccountFields-CxqONzjY.mjs";
|
|
21
|
-
import { A as U } from "../AccountListItem-
|
|
21
|
+
import { A as U } from "../AccountListItem-BDFCEhSI.mjs";
|
|
22
22
|
import a1 from "@mui/material/Tab";
|
|
23
23
|
import I1 from "@mui/material/Tabs";
|
|
24
24
|
import Z1 from "@mui/material/Switch";
|
|
@@ -27,12 +27,12 @@ import $ from "@mui/material/ListItemButton";
|
|
|
27
27
|
import Z from "@mui/material/ListItemText";
|
|
28
28
|
import { A as x } from "../Analytics-BYItVAe-.mjs";
|
|
29
29
|
import { D as Q } from "../Dialog-Ck34yr-d.mjs";
|
|
30
|
-
import { b as
|
|
30
|
+
import { b as g } from "../Localization-CPkpIwIx.mjs";
|
|
31
31
|
import { D as t1 } from "../Drawer-Bbe4AMB1.mjs";
|
|
32
32
|
import Y from "@mui/material/ListItemAvatar";
|
|
33
33
|
import N1 from "@mui/material/styles/useTheme";
|
|
34
34
|
import { Error as g1, CheckCircle as O1, Language as F1 } from "@mxenabled/mx-icons";
|
|
35
|
-
import { C as z } from "../ConnectDrawer-
|
|
35
|
+
import { C as z } from "../ConnectDrawer-Be0RkL7I.mjs";
|
|
36
36
|
import { fromUnixTime as P1 } from "date-fns/fromUnixTime";
|
|
37
37
|
import { isToday as W1 } from "date-fns/isToday";
|
|
38
38
|
import { isYesterday as B1 } from "date-fns/isYesterday";
|
|
@@ -49,50 +49,50 @@ import X1 from "@mui/material/Select";
|
|
|
49
49
|
import J1 from "@mui/material/TextField";
|
|
50
50
|
import { F as X } from "../Accounts-CseLC3lL.mjs";
|
|
51
51
|
import { M as a4 } from "../Accounts-CseLC3lL.mjs";
|
|
52
|
-
import { C as q1 } from "../CurrencyInput-
|
|
52
|
+
import { C as q1 } from "../CurrencyInput-xu9UcYZR.mjs";
|
|
53
53
|
import Q1 from "@mui/material/Alert";
|
|
54
54
|
import e3 from "@mui/material/AlertTitle";
|
|
55
55
|
import t3 from "@mui/material/Link";
|
|
56
56
|
import n3 from "@mui/material/Paper";
|
|
57
57
|
import { subDays as o3, startOfToday as i3, endOfToday as c3 } from "date-fns";
|
|
58
|
-
import { T as a3 } from "../StatusIndicator-
|
|
59
|
-
import { T as s3 } from "../TransactionDetails-
|
|
58
|
+
import { T as a3 } from "../StatusIndicator-CnDblSmc.mjs";
|
|
59
|
+
import { T as s3 } from "../TransactionDetails-DAB5arBD.mjs";
|
|
60
60
|
import { T as r1 } from "../TabContentContainer-j01JYR_7.mjs";
|
|
61
61
|
import { f as d1 } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
62
|
-
import { C as l3 } from "../ConnectionsDrawer-
|
|
62
|
+
import { C as l3 } from "../ConnectionsDrawer-yeD_PsY1.mjs";
|
|
63
63
|
import { u as H1 } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
64
|
-
import { u as n1 } from "../useWidgetLoadTimer-
|
|
64
|
+
import { u as n1 } from "../useWidgetLoadTimer-DmYEMfRw.mjs";
|
|
65
65
|
import { L as o1 } from "../Loader-D3rjKx72.mjs";
|
|
66
|
-
import { W as r3 } from "../
|
|
67
|
-
import { M as v1 } from "../MiniWidgetContainer-
|
|
66
|
+
import { W as r3 } from "../WidgetContainerV2-BjOelON7.mjs";
|
|
67
|
+
import { M as v1 } from "../MiniWidgetContainer-BKPN3c-6.mjs";
|
|
68
68
|
import { A as l4 } from "../AccountApi-ChQr5PAZ.mjs";
|
|
69
|
-
import { A as d4 } from "../AccountStore-
|
|
69
|
+
import { A as d4 } from "../AccountStore-Bn1eH2EU.mjs";
|
|
70
70
|
const d3 = (t, o) => {
|
|
71
71
|
const n = _1.includes(o) ? w1(t) : [], i = L1.includes(o) ? R1(t) : [], c = f1.includes(o) ? S1(t) : [];
|
|
72
|
-
return [n, i, c].filter((
|
|
72
|
+
return [n, i, c].filter((r) => r.length > 0);
|
|
73
73
|
}, u3 = (t, o, n) => {
|
|
74
|
-
const [i, c] = t,
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
77
|
-
a.push({ label: n.income_label, amount:
|
|
74
|
+
const [i, c] = t, r = i, d = c ?? i, a = [];
|
|
75
|
+
if (r && d && _1.includes(o)) {
|
|
76
|
+
const l = r[r.length - 1].y;
|
|
77
|
+
a.push({ label: n.income_label, amount: l });
|
|
78
78
|
} else if (L1.includes(o)) {
|
|
79
|
-
const
|
|
80
|
-
a.push({ label: n.payments_label, amount:
|
|
79
|
+
const l = r[r.length - 1].y;
|
|
80
|
+
a.push({ label: n.payments_label, amount: l });
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
a.push({ label: n.spending_label, amount:
|
|
82
|
+
if (d && f1.includes(o)) {
|
|
83
|
+
const l = d[d.length - 1].y;
|
|
84
|
+
a.push({ label: n.spending_label, amount: l });
|
|
85
85
|
}
|
|
86
86
|
return a;
|
|
87
87
|
}, C3 = () => {
|
|
88
|
-
const t = V1(), { selectedAccount: o } = w(), { monthlyCategoryTotals: n } = T1(), { trends: i } =
|
|
88
|
+
const t = V1(), { selectedAccount: o } = w(), { monthlyCategoryTotals: n } = T1(), { trends: i } = V(), c = [t.palette.chart?.chart1, t.palette.chart?.chart2], r = d3(n, o.account_type), d = u3(r, o.account_type, i), a = [I.LOAN, I.MORTGAGE].includes(o.account_type);
|
|
89
89
|
return /* @__PURE__ */ e("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ e(
|
|
90
90
|
x1,
|
|
91
91
|
{
|
|
92
92
|
colors: c,
|
|
93
|
-
datasets:
|
|
93
|
+
datasets: r,
|
|
94
94
|
height: 185,
|
|
95
|
-
labels:
|
|
95
|
+
labels: d,
|
|
96
96
|
showAverage: a,
|
|
97
97
|
showAxisHighlight: !0,
|
|
98
98
|
showBars: a,
|
|
@@ -105,13 +105,13 @@ const d3 = (t, o) => {
|
|
|
105
105
|
valueFormatterString: "0,0"
|
|
106
106
|
}
|
|
107
107
|
) });
|
|
108
|
-
}, h3 =
|
|
108
|
+
}, h3 = b(C3), J = ({
|
|
109
109
|
ariaPressed: t,
|
|
110
110
|
children: o,
|
|
111
111
|
isLast: n = !1,
|
|
112
112
|
onClick: i,
|
|
113
113
|
primaryText: c,
|
|
114
|
-
secondaryText:
|
|
114
|
+
secondaryText: r
|
|
115
115
|
}) => /* @__PURE__ */ e(
|
|
116
116
|
T,
|
|
117
117
|
{
|
|
@@ -129,7 +129,7 @@ const d3 = (t, o) => {
|
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
children: /* @__PURE__ */ C($, { "aria-pressed": t, onClick: i, children: [
|
|
132
|
-
/* @__PURE__ */ e(Z, { primary: c, secondary:
|
|
132
|
+
/* @__PURE__ */ e(Z, { primary: c, secondary: r }),
|
|
133
133
|
o
|
|
134
134
|
] })
|
|
135
135
|
}
|
|
@@ -139,40 +139,40 @@ const d3 = (t, o) => {
|
|
|
139
139
|
(i) => i.member_guid === n.guid && n.successfully_aggregated_at && i.guid !== o.guid
|
|
140
140
|
);
|
|
141
141
|
}, p3 = () => {
|
|
142
|
-
const [t, o] = h.useState(!1), [n, i] = h.useState(!1), [c,
|
|
142
|
+
const [t, o] = h.useState(!1), [n, i] = h.useState(!1), [c, r] = h.useState(!1), [d, a] = h.useState({}), { selectedAccount: l } = w(), { mergeAccounts: p, updateAccount: _ } = E(), { accounts: s } = V(), f = m3(), { onEvent: v } = D(), { modifyTransactionByAccountGuid: M } = m1(), y = async (m) => {
|
|
143
143
|
await _({
|
|
144
|
-
...
|
|
144
|
+
...l,
|
|
145
145
|
...m
|
|
146
|
-
}), "is_closed" in m && m.is_closed !==
|
|
147
|
-
},
|
|
148
|
-
p([
|
|
146
|
+
}), "is_closed" in m && m.is_closed !== l.is_closed && M(l.guid, { accountIsClosed: m.is_closed });
|
|
147
|
+
}, u = () => {
|
|
148
|
+
p([l.guid, d.guid]).finally(
|
|
149
149
|
() => i(!1)
|
|
150
150
|
);
|
|
151
151
|
};
|
|
152
152
|
return /* @__PURE__ */ C(R, { children: [
|
|
153
|
-
/* @__PURE__ */ e(B, { sx: { backgroundColor: "transparent", mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
153
|
+
/* @__PURE__ */ e(B, { sx: { backgroundColor: "transparent", mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(H, { bold: !0, component: "h2", variant: "caption", children: s.actions }) }),
|
|
154
154
|
/* @__PURE__ */ e(
|
|
155
155
|
J,
|
|
156
156
|
{
|
|
157
|
-
ariaPressed:
|
|
157
|
+
ariaPressed: l.is_hidden,
|
|
158
158
|
onClick: () => {
|
|
159
|
-
y({ is_hidden: !
|
|
159
|
+
y({ is_hidden: !l.is_hidden }), v(x.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: l.guid });
|
|
160
160
|
},
|
|
161
|
-
primaryText:
|
|
162
|
-
secondaryText:
|
|
163
|
-
children: /* @__PURE__ */ e(Z1, { "aria-hidden": !0, checked:
|
|
161
|
+
primaryText: l.is_hidden ? s.unhide_account : s.hide_Account,
|
|
162
|
+
secondaryText: l.is_hidden ? s.include_this_account : s.exclude_this_account,
|
|
163
|
+
children: /* @__PURE__ */ e(Z1, { "aria-hidden": !0, checked: l.is_hidden, tabIndex: -1 })
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
166
|
/* @__PURE__ */ C(
|
|
167
167
|
J,
|
|
168
168
|
{
|
|
169
169
|
onClick: () => {
|
|
170
|
-
o(!0),
|
|
171
|
-
account_guid:
|
|
170
|
+
o(!0), v(x.ACCOUNT_DETAILS_CLICK_MARK_CLOSED, {
|
|
171
|
+
account_guid: l.guid
|
|
172
172
|
});
|
|
173
173
|
},
|
|
174
|
-
primaryText:
|
|
175
|
-
secondaryText:
|
|
174
|
+
primaryText: l.is_closed ? s.mark_as_open : s.mark_as_closed,
|
|
175
|
+
secondaryText: l.is_closed ? s.this_will_set_the_closed_account : s.this_will_set_the_account_balance_to_0,
|
|
176
176
|
children: [
|
|
177
177
|
/* @__PURE__ */ e(N, { name: "chevron_right" }),
|
|
178
178
|
/* @__PURE__ */ e("div", { onClick: (m) => m.stopPropagation(), children: /* @__PURE__ */ e(
|
|
@@ -180,29 +180,29 @@ const d3 = (t, o) => {
|
|
|
180
180
|
{
|
|
181
181
|
copy: {
|
|
182
182
|
close_aria: s.close_modal,
|
|
183
|
-
title:
|
|
183
|
+
title: l.is_closed ? s.confirm_mark_as_open : s.confirm_mark_closed
|
|
184
184
|
},
|
|
185
185
|
isOpen: t,
|
|
186
186
|
onClose: () => {
|
|
187
187
|
o(!1);
|
|
188
188
|
},
|
|
189
|
-
onPrimaryAction: () => y({ is_closed: !
|
|
190
|
-
children: /* @__PURE__ */ e(
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
onPrimaryAction: () => y({ is_closed: !l.is_closed }),
|
|
190
|
+
children: /* @__PURE__ */ e(H, { truncate: !1, children: g(
|
|
191
|
+
l.is_closed ? s.this_will_resume_updating_the_balance : s.this_will_set_the_balance_of_your_account,
|
|
192
|
+
l.name
|
|
193
193
|
) })
|
|
194
194
|
}
|
|
195
195
|
) })
|
|
196
196
|
]
|
|
197
197
|
}
|
|
198
198
|
),
|
|
199
|
-
|
|
199
|
+
f.length > 0 && /* @__PURE__ */ e(
|
|
200
200
|
J,
|
|
201
201
|
{
|
|
202
202
|
isLast: !0,
|
|
203
203
|
onClick: () => {
|
|
204
|
-
i(!0),
|
|
205
|
-
account_guid:
|
|
204
|
+
i(!0), v(x.ACCOUNT_DETAILS_CLICK_MARK_DUPLICATE, {
|
|
205
|
+
account_guid: l.guid
|
|
206
206
|
});
|
|
207
207
|
},
|
|
208
208
|
primaryText: s.mark_as_duplicate,
|
|
@@ -218,8 +218,8 @@ const d3 = (t, o) => {
|
|
|
218
218
|
onClose: () => i(!1),
|
|
219
219
|
title: s.mark_as_duplicate,
|
|
220
220
|
children: [
|
|
221
|
-
/* @__PURE__ */ e(O, { children:
|
|
222
|
-
const k =
|
|
221
|
+
/* @__PURE__ */ e(O, { children: f.map((m) => {
|
|
222
|
+
const k = f.indexOf(m) === f.length - 1;
|
|
223
223
|
return /* @__PURE__ */ e(
|
|
224
224
|
U,
|
|
225
225
|
{
|
|
@@ -239,7 +239,7 @@ const d3 = (t, o) => {
|
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
241
|
onRowClick: () => {
|
|
242
|
-
|
|
242
|
+
r(!0), a(m);
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
245
|
m.guid
|
|
@@ -253,15 +253,15 @@ const d3 = (t, o) => {
|
|
|
253
253
|
title: s.confirm_merge
|
|
254
254
|
},
|
|
255
255
|
isOpen: c,
|
|
256
|
-
onClose: () =>
|
|
257
|
-
onPrimaryAction:
|
|
256
|
+
onClose: () => r(!1),
|
|
257
|
+
onPrimaryAction: u,
|
|
258
258
|
children: [
|
|
259
|
-
/* @__PURE__ */ e(
|
|
259
|
+
/* @__PURE__ */ e(H, { truncate: !1, children: g(
|
|
260
260
|
s.this_means_accounts_will_be_merged,
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
l.name,
|
|
262
|
+
d.name
|
|
263
263
|
) }),
|
|
264
|
-
/* @__PURE__ */ e(
|
|
264
|
+
/* @__PURE__ */ e(H, { color: "error", sx: { mt: 24 }, children: s.this_action_cannot_be_undone })
|
|
265
265
|
]
|
|
266
266
|
}
|
|
267
267
|
)
|
|
@@ -269,13 +269,13 @@ const d3 = (t, o) => {
|
|
|
269
269
|
}
|
|
270
270
|
)
|
|
271
271
|
] });
|
|
272
|
-
}, _3 =
|
|
272
|
+
}, _3 = b(p3), A1 = (t, o) => {
|
|
273
273
|
const { connection_messages: n } = o;
|
|
274
274
|
switch (t.connection_status) {
|
|
275
275
|
case L.CHALLENGED:
|
|
276
276
|
return {
|
|
277
277
|
cta: n.challenged_cta,
|
|
278
|
-
main:
|
|
278
|
+
main: g(
|
|
279
279
|
n.challenged_connection_description,
|
|
280
280
|
t.name
|
|
281
281
|
),
|
|
@@ -296,7 +296,7 @@ const d3 = (t, o) => {
|
|
|
296
296
|
};
|
|
297
297
|
case L.DELAYED:
|
|
298
298
|
return {
|
|
299
|
-
main:
|
|
299
|
+
main: g(
|
|
300
300
|
n.delayed_connection_description,
|
|
301
301
|
t.name
|
|
302
302
|
),
|
|
@@ -306,7 +306,7 @@ const d3 = (t, o) => {
|
|
|
306
306
|
case L.DENIED:
|
|
307
307
|
return {
|
|
308
308
|
cta: n.denied_cta,
|
|
309
|
-
main:
|
|
309
|
+
main: g(
|
|
310
310
|
n.denied_connection_description,
|
|
311
311
|
t.name
|
|
312
312
|
),
|
|
@@ -321,7 +321,7 @@ const d3 = (t, o) => {
|
|
|
321
321
|
};
|
|
322
322
|
case L.DISCONNECTED:
|
|
323
323
|
return {
|
|
324
|
-
main:
|
|
324
|
+
main: g(
|
|
325
325
|
n.disconnected_connection_description,
|
|
326
326
|
t.name
|
|
327
327
|
),
|
|
@@ -343,7 +343,7 @@ const d3 = (t, o) => {
|
|
|
343
343
|
};
|
|
344
344
|
case L.FAILED:
|
|
345
345
|
return {
|
|
346
|
-
main:
|
|
346
|
+
main: g(
|
|
347
347
|
n.failed_connection_description,
|
|
348
348
|
t.name
|
|
349
349
|
),
|
|
@@ -353,7 +353,7 @@ const d3 = (t, o) => {
|
|
|
353
353
|
case L.IMPAIRED:
|
|
354
354
|
return {
|
|
355
355
|
cta: n.impaired_cta,
|
|
356
|
-
main:
|
|
356
|
+
main: g(
|
|
357
357
|
n.impaired_connection_description,
|
|
358
358
|
t.name
|
|
359
359
|
),
|
|
@@ -362,7 +362,7 @@ const d3 = (t, o) => {
|
|
|
362
362
|
};
|
|
363
363
|
case L.IMPEDED:
|
|
364
364
|
return {
|
|
365
|
-
main:
|
|
365
|
+
main: g(
|
|
366
366
|
n.impeded_connection_description,
|
|
367
367
|
t.name,
|
|
368
368
|
t.name
|
|
@@ -373,7 +373,7 @@ const d3 = (t, o) => {
|
|
|
373
373
|
case L.IMPORTED:
|
|
374
374
|
return {
|
|
375
375
|
cta: n.imported_cta,
|
|
376
|
-
main:
|
|
376
|
+
main: g(
|
|
377
377
|
n.imported_connection_description,
|
|
378
378
|
t.name
|
|
379
379
|
),
|
|
@@ -383,7 +383,7 @@ const d3 = (t, o) => {
|
|
|
383
383
|
case L.LOCKED:
|
|
384
384
|
return {
|
|
385
385
|
cta: n.locked_cta,
|
|
386
|
-
main:
|
|
386
|
+
main: g(
|
|
387
387
|
n.locked_connection_description,
|
|
388
388
|
t.name
|
|
389
389
|
),
|
|
@@ -406,12 +406,12 @@ const d3 = (t, o) => {
|
|
|
406
406
|
};
|
|
407
407
|
default: {
|
|
408
408
|
const i = () => {
|
|
409
|
-
const c = t.successfully_aggregated_at ? P1(t.successfully_aggregated_at) : void 0,
|
|
410
|
-
if (
|
|
411
|
-
return W1(c) ?
|
|
409
|
+
const c = t.successfully_aggregated_at ? P1(t.successfully_aggregated_at) : void 0, r = c && s1(c, l1.TIME_STAMP_HOUR_MINUTE);
|
|
410
|
+
if (r)
|
|
411
|
+
return W1(c) ? g(o.last_updated_at, o.today, r) : B1(c) ? g(o.last_updated_at, o.yesterday, r) : g(
|
|
412
412
|
o.last_updated_at,
|
|
413
413
|
s1(c, l1.MONTH_DAY_YEAR),
|
|
414
|
-
|
|
414
|
+
r
|
|
415
415
|
);
|
|
416
416
|
};
|
|
417
417
|
return {
|
|
@@ -430,20 +430,20 @@ const d3 = (t, o) => {
|
|
|
430
430
|
}, L3 = () => {
|
|
431
431
|
const [t, o] = h.useState(!1), {
|
|
432
432
|
palette: { mode: n }
|
|
433
|
-
} = N1(), { selectedMember: i } = w(), { accounts: c, connect:
|
|
433
|
+
} = N1(), { selectedMember: i } = w(), { accounts: c, connect: r } = V(), d = A1(i, r), a = p1.includes(i.connection_status) ? {
|
|
434
434
|
color: "error.main",
|
|
435
|
-
ctaCopy:
|
|
435
|
+
ctaCopy: d.cta ?? "",
|
|
436
436
|
icon: /* @__PURE__ */ e(g1, { filled: !0, sx: { ...q } }),
|
|
437
|
-
mainMessage:
|
|
438
|
-
secondaryMessage: `${
|
|
437
|
+
mainMessage: d.statusName,
|
|
438
|
+
secondaryMessage: `${d.title}.`
|
|
439
439
|
} : {
|
|
440
440
|
color: "success.main",
|
|
441
441
|
icon: /* @__PURE__ */ e(O1, { filled: !0, sx: { ...q } }),
|
|
442
|
-
mainMessage:
|
|
443
|
-
secondaryMessage:
|
|
442
|
+
mainMessage: d.statusName,
|
|
443
|
+
secondaryMessage: d.title
|
|
444
444
|
};
|
|
445
445
|
return /* @__PURE__ */ C(R, { children: [
|
|
446
|
-
/* @__PURE__ */ e(B, { sx: { mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
446
|
+
/* @__PURE__ */ e(B, { sx: { mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(H, { bold: !0, component: "h2", variant: "caption", children: c.connection_status }) }),
|
|
447
447
|
/* @__PURE__ */ e(
|
|
448
448
|
T,
|
|
449
449
|
{
|
|
@@ -472,7 +472,7 @@ const d3 = (t, o) => {
|
|
|
472
472
|
secondary: a.secondaryMessage && /* @__PURE__ */ C(R, { children: [
|
|
473
473
|
a.secondaryMessage,
|
|
474
474
|
" ",
|
|
475
|
-
/* @__PURE__ */ e(
|
|
475
|
+
/* @__PURE__ */ e(H, { bold: !0, sx: { color: "action.active" }, variant: "caption", children: a.ctaCopy })
|
|
476
476
|
] })
|
|
477
477
|
}
|
|
478
478
|
),
|
|
@@ -523,10 +523,10 @@ const d3 = (t, o) => {
|
|
|
523
523
|
}
|
|
524
524
|
)
|
|
525
525
|
] });
|
|
526
|
-
}, f3 =
|
|
527
|
-
const { updateAccount: i } = E(), { selectedAccount: c } = w(), { accounts:
|
|
526
|
+
}, f3 = b(L3), g3 = ({ field: t, isOpen: o, onClose: n }) => {
|
|
527
|
+
const { updateAccount: i } = E(), { selectedAccount: c } = w(), { accounts: r } = V(), [d, a] = h.useState(c[t.name]), [l, p] = h.useState(""), [_, s] = h.useState(!0), f = () => {
|
|
528
528
|
a(""), p(""), n();
|
|
529
|
-
},
|
|
529
|
+
}, v = () => {
|
|
530
530
|
switch (t.type) {
|
|
531
531
|
case X.Select:
|
|
532
532
|
return /* @__PURE__ */ C(z1, { fullWidth: !0, children: [
|
|
@@ -542,10 +542,10 @@ const d3 = (t, o) => {
|
|
|
542
542
|
},
|
|
543
543
|
label: t.label,
|
|
544
544
|
labelId: `${t.label}-select-label`,
|
|
545
|
-
onChange: (
|
|
545
|
+
onChange: (u) => a(u.target.value),
|
|
546
546
|
placeholder: t.placeholder,
|
|
547
|
-
value:
|
|
548
|
-
children: t.options?.map((
|
|
547
|
+
value: d,
|
|
548
|
+
children: t.options?.map((u) => /* @__PURE__ */ e(j1, { value: u.value, children: u.label }, u.value))
|
|
549
549
|
}
|
|
550
550
|
)
|
|
551
551
|
] });
|
|
@@ -553,7 +553,7 @@ const d3 = (t, o) => {
|
|
|
553
553
|
return /* @__PURE__ */ e(
|
|
554
554
|
q1,
|
|
555
555
|
{
|
|
556
|
-
amount:
|
|
556
|
+
amount: d || "",
|
|
557
557
|
ariaLabel: t.placeholder,
|
|
558
558
|
fullWidth: !0,
|
|
559
559
|
label: t.label,
|
|
@@ -568,8 +568,8 @@ const d3 = (t, o) => {
|
|
|
568
568
|
{
|
|
569
569
|
maxDate: U1(/* @__PURE__ */ new Date(), 1),
|
|
570
570
|
minDate: /* @__PURE__ */ new Date(),
|
|
571
|
-
onChange: (
|
|
572
|
-
c[t.name] && Number(c[t.name]) <= 31 ? a(
|
|
571
|
+
onChange: (u) => {
|
|
572
|
+
c[t.name] && Number(c[t.name]) <= 31 ? a(u.getDate()) : a(u);
|
|
573
573
|
},
|
|
574
574
|
sx: {
|
|
575
575
|
"& .MuiPickersDay-today": {
|
|
@@ -578,7 +578,7 @@ const d3 = (t, o) => {
|
|
|
578
578
|
"& .MuiPickersArrowSwitcher-button": {
|
|
579
579
|
color: "primary.lighter",
|
|
580
580
|
"&:hover": {
|
|
581
|
-
backgroundColor: (
|
|
581
|
+
backgroundColor: (u) => M1(u.palette.primary.light, 0.1)
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
},
|
|
@@ -590,9 +590,9 @@ const d3 = (t, o) => {
|
|
|
590
590
|
J1,
|
|
591
591
|
{
|
|
592
592
|
defaultValue: c[t.name],
|
|
593
|
-
error: !!
|
|
593
|
+
error: !!l,
|
|
594
594
|
fullWidth: !0,
|
|
595
|
-
helperText:
|
|
595
|
+
helperText: l,
|
|
596
596
|
inputProps: {
|
|
597
597
|
"aria-label": t.placeholder
|
|
598
598
|
},
|
|
@@ -601,26 +601,26 @@ const d3 = (t, o) => {
|
|
|
601
601
|
}
|
|
602
602
|
);
|
|
603
603
|
}
|
|
604
|
-
},
|
|
605
|
-
c[t.name] !==
|
|
604
|
+
}, M = () => {
|
|
605
|
+
c[t.name] !== d && i({
|
|
606
606
|
...c,
|
|
607
|
-
[t.name]:
|
|
608
|
-
}),
|
|
609
|
-
}, y = (
|
|
610
|
-
a(
|
|
607
|
+
[t.name]: d
|
|
608
|
+
}), f();
|
|
609
|
+
}, y = (u) => {
|
|
610
|
+
a(u.target.value), t.validation && p(t.validation(u.target.value));
|
|
611
611
|
};
|
|
612
612
|
return /* @__PURE__ */ e(
|
|
613
613
|
Q,
|
|
614
614
|
{
|
|
615
615
|
copy: {
|
|
616
|
-
close_aria:
|
|
617
|
-
title:
|
|
616
|
+
close_aria: r.close_aria,
|
|
617
|
+
title: g(r.edit_field, t.label)
|
|
618
618
|
},
|
|
619
|
-
disablePrimaryButton: !!
|
|
619
|
+
disablePrimaryButton: !!l || !_,
|
|
620
620
|
isOpen: o,
|
|
621
|
-
onClose:
|
|
622
|
-
onPrimaryAction:
|
|
623
|
-
primaryText:
|
|
621
|
+
onClose: f,
|
|
622
|
+
onPrimaryAction: M,
|
|
623
|
+
primaryText: r.save,
|
|
624
624
|
sx: {
|
|
625
625
|
"& .MuiButton-root:focus-visible, & .MuiButton-root:focus": {
|
|
626
626
|
outline: "2px solid",
|
|
@@ -628,24 +628,24 @@ const d3 = (t, o) => {
|
|
|
628
628
|
outlineOffset: "2px"
|
|
629
629
|
}
|
|
630
630
|
},
|
|
631
|
-
children:
|
|
631
|
+
children: v()
|
|
632
632
|
}
|
|
633
633
|
);
|
|
634
|
-
}, H3 =
|
|
635
|
-
const t = window.app?.config, { onEvent: o } = D(), { selectedAccount: n } = w(), { accounts: i } =
|
|
636
|
-
(s) =>
|
|
634
|
+
}, H3 = b(g3), v3 = () => {
|
|
635
|
+
const t = window.app?.config, { onEvent: o } = D(), { selectedAccount: n } = w(), { accounts: i } = V(), c = D1(n, i), r = n.member_is_managed_by_user || !n.member_is_managed_by_user && t.enable_renaming_home_accounts, [d, a] = h.useState(!1), [l, p] = h.useState(c[0]), _ = c.filter(
|
|
636
|
+
(s) => r || n[s.name] || n[s.name] === 0
|
|
637
637
|
);
|
|
638
638
|
return /* @__PURE__ */ C(R, { children: [
|
|
639
639
|
_.map((s) => {
|
|
640
|
-
const
|
|
640
|
+
const f = n[s.name] || n[s.name] === 0, v = _.indexOf(s) === _.length - 1, M = /* @__PURE__ */ e(
|
|
641
641
|
Z,
|
|
642
642
|
{
|
|
643
643
|
disableTypography: !0,
|
|
644
|
-
primary: /* @__PURE__ */ e(
|
|
645
|
-
secondary: /* @__PURE__ */ e(
|
|
644
|
+
primary: /* @__PURE__ */ e(H, { sx: { fontSize: 11 }, children: s.label }),
|
|
645
|
+
secondary: /* @__PURE__ */ e(H, { bold: !0, sx: { fontSize: 15 }, children: f ? s.valueFormatter(n[s.name]) : s.placeholder })
|
|
646
646
|
}
|
|
647
647
|
);
|
|
648
|
-
return /* @__PURE__ */ e(h.Fragment, { children:
|
|
648
|
+
return /* @__PURE__ */ e(h.Fragment, { children: r ? /* @__PURE__ */ e(
|
|
649
649
|
T,
|
|
650
650
|
{
|
|
651
651
|
sx: {
|
|
@@ -657,7 +657,7 @@ const d3 = (t, o) => {
|
|
|
657
657
|
position: "absolute",
|
|
658
658
|
bottom: 0,
|
|
659
659
|
right: 0,
|
|
660
|
-
left:
|
|
660
|
+
left: v ? 0 : 24,
|
|
661
661
|
borderBottom: "1px solid",
|
|
662
662
|
borderColor: "divider"
|
|
663
663
|
}
|
|
@@ -669,13 +669,13 @@ const d3 = (t, o) => {
|
|
|
669
669
|
p(s), a(!0), s?.event && o(s.event, { account_guid: n.guid });
|
|
670
670
|
},
|
|
671
671
|
children: [
|
|
672
|
-
|
|
672
|
+
M,
|
|
673
673
|
/* @__PURE__ */ e(N, { name: "chevron_right" })
|
|
674
674
|
]
|
|
675
675
|
}
|
|
676
676
|
)
|
|
677
677
|
}
|
|
678
|
-
) :
|
|
678
|
+
) : f && /* @__PURE__ */ e(
|
|
679
679
|
T,
|
|
680
680
|
{
|
|
681
681
|
sx: {
|
|
@@ -687,37 +687,37 @@ const d3 = (t, o) => {
|
|
|
687
687
|
position: "absolute",
|
|
688
688
|
bottom: 0,
|
|
689
689
|
right: 0,
|
|
690
|
-
left:
|
|
690
|
+
left: v ? 0 : 24,
|
|
691
691
|
borderBottom: "1px solid",
|
|
692
692
|
borderColor: "divider"
|
|
693
693
|
}
|
|
694
694
|
},
|
|
695
|
-
children:
|
|
695
|
+
children: M
|
|
696
696
|
}
|
|
697
697
|
) }, s.name);
|
|
698
698
|
}),
|
|
699
|
-
|
|
699
|
+
d && l && /* @__PURE__ */ e(
|
|
700
700
|
H3,
|
|
701
701
|
{
|
|
702
|
-
field:
|
|
703
|
-
isOpen:
|
|
702
|
+
field: l,
|
|
703
|
+
isOpen: d,
|
|
704
704
|
onClose: () => a(!1)
|
|
705
705
|
}
|
|
706
706
|
)
|
|
707
707
|
] });
|
|
708
|
-
}, A3 =
|
|
708
|
+
}, A3 = b(v3), b3 = () => {
|
|
709
709
|
const { onEvent: t } = D();
|
|
710
710
|
return h.useEffect(() => t(x.ACCOUNT_DETAILS_VIEW), []), /* @__PURE__ */ C(O, { children: [
|
|
711
711
|
/* @__PURE__ */ e(A3, {}),
|
|
712
712
|
/* @__PURE__ */ e(f3, {}),
|
|
713
713
|
/* @__PURE__ */ e(_3, {})
|
|
714
714
|
] });
|
|
715
|
-
}, V3 =
|
|
716
|
-
const [o, n] = h.useState(!1), { selectedMember: i } = w(), { accounts: c, connect:
|
|
715
|
+
}, V3 = b(b3), M3 = ({ setTabValue: t }) => {
|
|
716
|
+
const [o, n] = h.useState(!1), { selectedMember: i } = w(), { accounts: c, connect: r } = V(), d = i.connection_status && p1.includes(i.connection_status);
|
|
717
717
|
if (h.useEffect(() => {
|
|
718
|
-
|
|
719
|
-
}, [
|
|
720
|
-
const a = A1(i,
|
|
718
|
+
d && t(1);
|
|
719
|
+
}, [d]), !d) return;
|
|
720
|
+
const a = A1(i, r);
|
|
721
721
|
return /* @__PURE__ */ C(R, { children: [
|
|
722
722
|
/* @__PURE__ */ e(
|
|
723
723
|
n3,
|
|
@@ -745,7 +745,7 @@ const d3 = (t, o) => {
|
|
|
745
745
|
},
|
|
746
746
|
children: [
|
|
747
747
|
a.title && /* @__PURE__ */ e(e3, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: a.title }),
|
|
748
|
-
/* @__PURE__ */ e(
|
|
748
|
+
/* @__PURE__ */ e(H, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: a.main }),
|
|
749
749
|
a.cta && /* @__PURE__ */ e(
|
|
750
750
|
t3,
|
|
751
751
|
{
|
|
@@ -769,14 +769,14 @@ const d3 = (t, o) => {
|
|
|
769
769
|
}
|
|
770
770
|
)
|
|
771
771
|
] });
|
|
772
|
-
}, y3 =
|
|
773
|
-
const [t, o] = h.useState(""), { onEvent: n } = D(), { selectedAccount: i } = w(), { accounts: c } =
|
|
772
|
+
}, y3 = b(M3), x3 = () => {
|
|
773
|
+
const [t, o] = h.useState(""), { onEvent: n } = D(), { selectedAccount: i } = w(), { accounts: c } = V(), { isTransactionDataLoaded: r, loadTransactionData: d, setFilter: a, sortedTransactions: l } = m1();
|
|
774
774
|
h.useEffect(() => {
|
|
775
|
-
|
|
775
|
+
r || d().finally();
|
|
776
776
|
}, []);
|
|
777
777
|
const p = h.useMemo(
|
|
778
|
-
() =>
|
|
779
|
-
[t,
|
|
778
|
+
() => l.find((_) => _.guid === t),
|
|
779
|
+
[t, l]
|
|
780
780
|
);
|
|
781
781
|
return h.useEffect(() => {
|
|
782
782
|
a({
|
|
@@ -796,8 +796,8 @@ const d3 = (t, o) => {
|
|
|
796
796
|
}
|
|
797
797
|
)
|
|
798
798
|
] });
|
|
799
|
-
}, w3 =
|
|
800
|
-
const [t, o] = h.useState(0), { accounts: n } =
|
|
799
|
+
}, w3 = b(x3), R3 = () => {
|
|
800
|
+
const [t, o] = h.useState(0), { accounts: n } = V();
|
|
801
801
|
return /* @__PURE__ */ C(R, { children: [
|
|
802
802
|
/* @__PURE__ */ e(y3, { setTabValue: o }),
|
|
803
803
|
/* @__PURE__ */ C(
|
|
@@ -832,35 +832,35 @@ const d3 = (t, o) => {
|
|
|
832
832
|
/* @__PURE__ */ e(r1, { index: 0, name: "transaction-details", value: t, children: /* @__PURE__ */ e(w3, {}) }),
|
|
833
833
|
/* @__PURE__ */ e(r1, { index: 1, name: "account-details", value: t, children: /* @__PURE__ */ e(V3, {}) })
|
|
834
834
|
] });
|
|
835
|
-
}, S3 =
|
|
836
|
-
const [t, o] = h.useState(""), { accounts: n } =
|
|
837
|
-
() => i.filter((
|
|
835
|
+
}, S3 = b(R3), T3 = () => {
|
|
836
|
+
const [t, o] = h.useState(""), { accounts: n } = V(), { allSelectedAccounts: i } = G(), { setSelectedAccount: c, setSelectedMember: r } = w(), { members: d } = E(), { onEvent: a } = D(), l = [...new Set(i.map((u) => u.account_type))], p = i.find((u) => t === u.guid), _ = h.useMemo(
|
|
837
|
+
() => i.filter((u) => u.is_hidden),
|
|
838
838
|
[i]
|
|
839
839
|
), s = h.useMemo(
|
|
840
|
-
() => i.filter((
|
|
840
|
+
() => i.filter((u) => u.is_closed),
|
|
841
841
|
[i]
|
|
842
|
-
),
|
|
843
|
-
(
|
|
842
|
+
), f = _.reduce(
|
|
843
|
+
(u, m) => (m.available_balance || m.balance || 0) + u,
|
|
844
844
|
0
|
|
845
|
-
),
|
|
845
|
+
), v = k1(s, n);
|
|
846
846
|
h.useEffect(() => {
|
|
847
847
|
if (p) {
|
|
848
848
|
c(p);
|
|
849
|
-
const
|
|
850
|
-
|
|
849
|
+
const u = d.find((m) => m.guid === p?.member_guid) || {};
|
|
850
|
+
u && r(u);
|
|
851
851
|
}
|
|
852
852
|
}, [p, t]);
|
|
853
|
-
const
|
|
854
|
-
o(
|
|
855
|
-
account_guid:
|
|
856
|
-
account_type:
|
|
853
|
+
const M = (u) => {
|
|
854
|
+
o(u.guid), a(x.ACCOUNTS_CLICK_ACCOUNT, {
|
|
855
|
+
account_guid: u.guid,
|
|
856
|
+
account_type: u.account_type
|
|
857
857
|
});
|
|
858
|
-
}, y = (
|
|
859
|
-
const m =
|
|
858
|
+
}, y = (u) => {
|
|
859
|
+
const m = u === "hidden" ? _ : s, k = u === "hidden" ? f : v, A = u === "hidden" ? n.account_hidden : n.account_closed;
|
|
860
860
|
return /* @__PURE__ */ e(c1, { children: /* @__PURE__ */ e(
|
|
861
861
|
O,
|
|
862
862
|
{
|
|
863
|
-
"aria-label":
|
|
863
|
+
"aria-label": A,
|
|
864
864
|
subheader: /* @__PURE__ */ e(B, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ C(
|
|
865
865
|
P,
|
|
866
866
|
{
|
|
@@ -868,8 +868,8 @@ const d3 = (t, o) => {
|
|
|
868
868
|
direction: "row",
|
|
869
869
|
sx: { justifyContent: "space-between", color: "grey.700" },
|
|
870
870
|
children: [
|
|
871
|
-
/* @__PURE__ */ e(
|
|
872
|
-
/* @__PURE__ */ e(
|
|
871
|
+
/* @__PURE__ */ e(H, { bold: !0, variant: "body1", children: A }),
|
|
872
|
+
/* @__PURE__ */ e(H, { bold: !0, variant: "body1", children: d1(k, "0,0.00") })
|
|
873
873
|
]
|
|
874
874
|
}
|
|
875
875
|
) }),
|
|
@@ -880,11 +880,11 @@ const d3 = (t, o) => {
|
|
|
880
880
|
U,
|
|
881
881
|
{
|
|
882
882
|
account: S,
|
|
883
|
-
onRowClick: () =>
|
|
883
|
+
onRowClick: () => M(S),
|
|
884
884
|
shouldShowConnectionStatus: !0
|
|
885
885
|
}
|
|
886
886
|
),
|
|
887
|
-
|
|
887
|
+
u === "hidden" ? /* @__PURE__ */ e(
|
|
888
888
|
W,
|
|
889
889
|
{
|
|
890
890
|
sx: {
|
|
@@ -907,11 +907,11 @@ const d3 = (t, o) => {
|
|
|
907
907
|
) });
|
|
908
908
|
};
|
|
909
909
|
return /* @__PURE__ */ C(c1, { sx: { pt: 24 }, children: [
|
|
910
|
-
|
|
910
|
+
l.map((u) => {
|
|
911
911
|
const m = i.filter(
|
|
912
|
-
(
|
|
912
|
+
(A) => A.account_type === u && !A.is_closed && !A.is_hidden
|
|
913
913
|
), k = m.reduce(
|
|
914
|
-
(
|
|
914
|
+
(A, S) => (S.balance || 0) + A,
|
|
915
915
|
0
|
|
916
916
|
);
|
|
917
917
|
return m.length === 0 ? null : /* @__PURE__ */ e(
|
|
@@ -925,19 +925,19 @@ const d3 = (t, o) => {
|
|
|
925
925
|
direction: "row",
|
|
926
926
|
sx: { display: "flex", justifyContent: "space-between" },
|
|
927
927
|
children: [
|
|
928
|
-
/* @__PURE__ */ e(
|
|
929
|
-
/* @__PURE__ */ e(
|
|
928
|
+
/* @__PURE__ */ e(H, { bold: !0, variant: "body1", children: n.account_types[u] }),
|
|
929
|
+
/* @__PURE__ */ e(H, { bold: !0, variant: "body1", children: d1(k, "0,0.00") })
|
|
930
930
|
]
|
|
931
931
|
}
|
|
932
932
|
) }),
|
|
933
|
-
children: /* @__PURE__ */ e(P, { children: m.map((
|
|
934
|
-
const S = i.indexOf(
|
|
933
|
+
children: /* @__PURE__ */ e(P, { children: m.map((A) => {
|
|
934
|
+
const S = i.indexOf(A) === i.length - 1, F = m.indexOf(A) === m.length - 1;
|
|
935
935
|
return /* @__PURE__ */ C(h.Fragment, { children: [
|
|
936
936
|
/* @__PURE__ */ e(
|
|
937
937
|
U,
|
|
938
938
|
{
|
|
939
|
-
account:
|
|
940
|
-
onRowClick: () =>
|
|
939
|
+
account: A,
|
|
940
|
+
onRowClick: () => M(A),
|
|
941
941
|
shouldShowConnectionStatus: !0
|
|
942
942
|
}
|
|
943
943
|
),
|
|
@@ -950,10 +950,10 @@ const d3 = (t, o) => {
|
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
)
|
|
953
|
-
] },
|
|
953
|
+
] }, A.guid);
|
|
954
954
|
}) })
|
|
955
955
|
},
|
|
956
|
-
|
|
956
|
+
u
|
|
957
957
|
);
|
|
958
958
|
}),
|
|
959
959
|
_.length > 0 && y("hidden"),
|
|
@@ -972,59 +972,58 @@ const d3 = (t, o) => {
|
|
|
972
972
|
}
|
|
973
973
|
)
|
|
974
974
|
] });
|
|
975
|
-
}, E3 =
|
|
976
|
-
const [
|
|
975
|
+
}, E3 = b(T3), D3 = ({ onBackClick: t }) => {
|
|
976
|
+
const [o, n] = h.useState(!1), [i, c] = h.useState(!1), { config: r } = E1(), { isAccountDataLoaded: d, loadAccountData: a } = E(), { accounts: l, connect: p } = V(), { isInitialized: _, selectedAccountGuids: s } = G(), { isDesktop: f } = H1(), { onEvent: v } = D();
|
|
977
977
|
n1({
|
|
978
978
|
widgetName: "AccountsWidget",
|
|
979
|
-
isLoaded:
|
|
979
|
+
isLoaded: d
|
|
980
980
|
}), h.useEffect(() => {
|
|
981
|
-
|
|
981
|
+
d || a().finally();
|
|
982
982
|
}, []);
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
},
|
|
986
|
-
|
|
983
|
+
const M = () => {
|
|
984
|
+
n(!0), v(x.ACCOUNTS_CLICK_CONNECT);
|
|
985
|
+
}, y = () => {
|
|
986
|
+
c(!0), v(x.ACCOUNTS_CLICK_CONNECT);
|
|
987
987
|
};
|
|
988
|
-
return
|
|
988
|
+
return _ ? /* @__PURE__ */ C(
|
|
989
989
|
r3,
|
|
990
990
|
{
|
|
991
|
-
actions:
|
|
992
|
-
{ iconName: "add", label:
|
|
991
|
+
actions: r.show_connections_widget_in_master ? [
|
|
992
|
+
{ iconName: "add", label: l.add, onClick: M },
|
|
993
993
|
{
|
|
994
994
|
iconName: "credit_card_gear",
|
|
995
|
-
label:
|
|
996
|
-
onClick:
|
|
995
|
+
label: l.manage,
|
|
996
|
+
onClick: y
|
|
997
997
|
}
|
|
998
998
|
] : [],
|
|
999
|
-
onAccountsFilterClick: () =>
|
|
999
|
+
onAccountsFilterClick: () => v(x.ACCOUNTS_CLICK_FILTER),
|
|
1000
1000
|
onBackClick: t,
|
|
1001
|
-
|
|
1002
|
-
title: p.title,
|
|
1001
|
+
title: l.title,
|
|
1003
1002
|
children: [
|
|
1004
|
-
|
|
1005
|
-
|
|
1003
|
+
d ? /* @__PURE__ */ C(e1, { sx: { px: f ? 24 : 12 }, children: [
|
|
1004
|
+
s.length < 1 && /* @__PURE__ */ e(H, { display: "flex", justifyContent: "center", my: 24, children: l.no_accounts }),
|
|
1006
1005
|
/* @__PURE__ */ e(E3, {})
|
|
1007
|
-
] }) : /* @__PURE__ */ e(h1, { sx: { px:
|
|
1006
|
+
] }) : /* @__PURE__ */ e(h1, { sx: { px: f ? 48 : 24, pt: 24 }, variant: "list" }),
|
|
1008
1007
|
/* @__PURE__ */ e(
|
|
1009
1008
|
z,
|
|
1010
1009
|
{
|
|
1011
|
-
onClose: () =>
|
|
1012
|
-
showConnectWidget:
|
|
1013
|
-
title:
|
|
1010
|
+
onClose: () => n(!1),
|
|
1011
|
+
showConnectWidget: o,
|
|
1012
|
+
title: p.mini_title
|
|
1014
1013
|
}
|
|
1015
1014
|
),
|
|
1016
1015
|
/* @__PURE__ */ e(
|
|
1017
1016
|
l3,
|
|
1018
1017
|
{
|
|
1019
|
-
onClose: () =>
|
|
1020
|
-
showConnectionsWidget:
|
|
1021
|
-
title:
|
|
1018
|
+
onClose: () => c(!1),
|
|
1019
|
+
showConnectionsWidget: i,
|
|
1020
|
+
title: l.manage_connections
|
|
1022
1021
|
}
|
|
1023
1022
|
)
|
|
1024
1023
|
]
|
|
1025
1024
|
}
|
|
1026
1025
|
) : /* @__PURE__ */ e(o1, {});
|
|
1027
|
-
}, Q2 =
|
|
1026
|
+
}, Q2 = b(D3);
|
|
1028
1027
|
function k3(t) {
|
|
1029
1028
|
const { heldAccounts: o, externalAccounts: n } = t.reduce(
|
|
1030
1029
|
(i, c) => (c.member_is_managed_by_user ? i.externalAccounts.push(c) : i.heldAccounts.push(c), i),
|
|
@@ -1044,23 +1043,23 @@ const Z3 = {
|
|
|
1044
1043
|
[I.SAVINGS]: 2,
|
|
1045
1044
|
[I.CREDIT_CARD]: 3
|
|
1046
1045
|
}, u1 = (t) => Z3[t] ?? t + 100, C1 = (t) => t.sort((o, n) => {
|
|
1047
|
-
const i = u1(o.account_type), c = u1(n.account_type),
|
|
1048
|
-
if (
|
|
1049
|
-
const
|
|
1050
|
-
return
|
|
1046
|
+
const i = u1(o.account_type), c = u1(n.account_type), r = i - c;
|
|
1047
|
+
if (r !== 0) return r;
|
|
1048
|
+
const d = o.name ?? o.feed_name ?? "", a = n.name ?? n.feed_name ?? "";
|
|
1049
|
+
return d.localeCompare(a);
|
|
1051
1050
|
}), N3 = ({ onPrimaryCtaClick: t, sx: o }) => {
|
|
1052
|
-
const { isAccountDataLoaded: n, loadAccountData: i } = E(), { accounts: c } =
|
|
1051
|
+
const { isAccountDataLoaded: n, loadAccountData: i } = E(), { accounts: c } = V(), { isInitialized: r, selectedAccounts: d } = G(), { isDesktop: a } = H1();
|
|
1053
1052
|
n1({
|
|
1054
1053
|
widgetName: "AccountsMiniWidget",
|
|
1055
|
-
isLoaded:
|
|
1054
|
+
isLoaded: r
|
|
1056
1055
|
}), h.useEffect(() => {
|
|
1057
1056
|
n || i().finally();
|
|
1058
1057
|
}, []);
|
|
1059
|
-
const
|
|
1060
|
-
() => I3(
|
|
1061
|
-
[
|
|
1058
|
+
const l = h.useMemo(
|
|
1059
|
+
() => I3(d, a ? 5 : 3),
|
|
1060
|
+
[d, a]
|
|
1062
1061
|
);
|
|
1063
|
-
return
|
|
1062
|
+
return r ? /* @__PURE__ */ e(
|
|
1064
1063
|
v1,
|
|
1065
1064
|
{
|
|
1066
1065
|
className: "mx-exp-accounts-miniwidget",
|
|
@@ -1069,9 +1068,9 @@ const Z3 = {
|
|
|
1069
1068
|
sx: o,
|
|
1070
1069
|
title: c.mini_title,
|
|
1071
1070
|
children: n ? /* @__PURE__ */ C(O, { children: [
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
const s =
|
|
1071
|
+
d.length === 0 && /* @__PURE__ */ e(T, { sx: { justifyContent: "center" }, children: c.no_accounts }),
|
|
1072
|
+
l.map((p, _) => {
|
|
1073
|
+
const s = l.indexOf(p) === l.length - 1;
|
|
1075
1074
|
return /* @__PURE__ */ C(h.Fragment, { children: [
|
|
1076
1075
|
/* @__PURE__ */ e(
|
|
1077
1076
|
U,
|
|
@@ -1087,7 +1086,7 @@ const Z3 = {
|
|
|
1087
1086
|
] }) : /* @__PURE__ */ e(h1, { sx: { px: 12, py: 8 }, variant: "list" })
|
|
1088
1087
|
}
|
|
1089
1088
|
) : /* @__PURE__ */ e(o1, {});
|
|
1090
|
-
}, e4 =
|
|
1089
|
+
}, e4 = b(N3), O3 = () => /* @__PURE__ */ C(
|
|
1091
1090
|
"svg",
|
|
1092
1091
|
{
|
|
1093
1092
|
fill: "none",
|
|
@@ -1527,11 +1526,11 @@ const Z3 = {
|
|
|
1527
1526
|
]
|
|
1528
1527
|
}
|
|
1529
1528
|
), F3 = () => {
|
|
1530
|
-
const { connect: t } =
|
|
1529
|
+
const { connect: t } = V();
|
|
1531
1530
|
return /* @__PURE__ */ C(e1, { alignItems: "center", direction: "column", m: 24, children: [
|
|
1532
1531
|
/* @__PURE__ */ e(O3, {}),
|
|
1533
1532
|
/* @__PURE__ */ e(
|
|
1534
|
-
|
|
1533
|
+
H,
|
|
1535
1534
|
{
|
|
1536
1535
|
sx: {
|
|
1537
1536
|
whiteSpace: "wrap",
|
|
@@ -1543,13 +1542,13 @@ const Z3 = {
|
|
|
1543
1542
|
}
|
|
1544
1543
|
)
|
|
1545
1544
|
] });
|
|
1546
|
-
}, P3 =
|
|
1545
|
+
}, P3 = b(F3), W3 = ({
|
|
1547
1546
|
onPrimaryCtaClick: t = () => {
|
|
1548
1547
|
},
|
|
1549
1548
|
sx: o
|
|
1550
1549
|
}) => {
|
|
1551
|
-
const { isCopyLoaded: n } = G(), { connect: i } =
|
|
1552
|
-
|
|
1550
|
+
const { isCopyLoaded: n } = G(), { connect: i } = V(), [c, r] = h.useState(!1), d = () => {
|
|
1551
|
+
r(!0), t();
|
|
1553
1552
|
};
|
|
1554
1553
|
return n1({
|
|
1555
1554
|
widgetName: "ConnectMiniWidget",
|
|
@@ -1558,7 +1557,7 @@ const Z3 = {
|
|
|
1558
1557
|
v1,
|
|
1559
1558
|
{
|
|
1560
1559
|
className: "mx-exp-connect-miniwidget",
|
|
1561
|
-
onPrimaryCtaClick:
|
|
1560
|
+
onPrimaryCtaClick: d,
|
|
1562
1561
|
primaryCtaLabel: i.primary_cta,
|
|
1563
1562
|
sx: o,
|
|
1564
1563
|
title: i.mini_title,
|
|
@@ -1567,7 +1566,7 @@ const Z3 = {
|
|
|
1567
1566
|
c && /* @__PURE__ */ e(
|
|
1568
1567
|
z,
|
|
1569
1568
|
{
|
|
1570
|
-
onClose: () =>
|
|
1569
|
+
onClose: () => r(!1),
|
|
1571
1570
|
showConnectWidget: c,
|
|
1572
1571
|
title: i.mini_title
|
|
1573
1572
|
}
|
|
@@ -1575,7 +1574,7 @@ const Z3 = {
|
|
|
1575
1574
|
]
|
|
1576
1575
|
}
|
|
1577
1576
|
) : /* @__PURE__ */ e(o1, {});
|
|
1578
|
-
}, t4 =
|
|
1577
|
+
}, t4 = b(W3);
|
|
1579
1578
|
export {
|
|
1580
1579
|
l4 as AccountApi,
|
|
1581
1580
|
S3 as AccountDetailsContent,
|