@mx-cartographer/experiences 7.7.2 → 7.8.0-alpha-ram-goal-bug
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 +18 -0
- package/dist/Account-BiB1F8lL.mjs +118 -0
- package/dist/{Account-BfkKlfsW.mjs → Account-DuOz1a27.mjs} +1 -1
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/{AccountDetailsHeader-DqYIuhOs.mjs → AccountDetailsHeader-Cf2TUJnM.mjs} +4 -4
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-yP8QdgPd.mjs → AccountFields-UdOvbQ5H.mjs} +7 -6
- package/dist/{AccountListItem-DMbu9ehd.mjs → AccountListItem-BPVxmNT_.mjs} +7 -7
- package/dist/AccountStore-BbPWe2C9.mjs +244 -0
- package/dist/Accounts-M-LTzStv.mjs +27 -0
- package/dist/{CategoryStore-Cnw9yUys.mjs → CategoryStore-BYICdb9m.mjs} +73 -73
- package/dist/CategoryUtil-meuejJqP.mjs +80 -0
- package/dist/{ConnectionsDrawer-BqR6FWJO.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +1 -1
- package/dist/{DebtsStore-DuSdXM1k.mjs → DebtsStore-BIbOVCPe.mjs} +12 -12
- package/dist/{ExportCsvAction-HK5CeZWR.mjs → ExportCsvAction-CDuzTva1.mjs} +2 -2
- package/dist/GlobalAccountFilter-DQCPNc95.mjs +316 -0
- package/dist/GoalStore-B4LVt_kH.mjs +422 -0
- package/dist/{ManageIncome-BrTrlplL.mjs → ManageIncome-CL3hv8i9.mjs} +44 -44
- package/dist/NetWorthStore-yV43kJro.mjs +168 -0
- package/dist/{NotificationSettings-D4Vh3z8I.mjs → NotificationSettings-SPg3pwbX.mjs} +171 -169
- package/dist/{NotificationStore-CDX_kqHa.mjs → NotificationStore-Ck2KdNmT.mjs} +22 -14
- package/dist/{RecurringSettings-D2V6l77l.mjs → RecurringSettings-Bmnnpb48.mjs} +16 -16
- package/dist/{RecurringTransactionsStore-Caf1cq4v.mjs → RecurringTransactionsStore-BQBEJOPP.mjs} +91 -81
- package/dist/{RecurringTransactions-Bf4lX0Cn.mjs → RepeatingTransaction-miZVnk_A.mjs} +4 -4
- package/dist/{SettingsStore-krIRNwHK.mjs → SettingsStore-BHpuyujx.mjs} +1 -1
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingLegend-gTCJLLkV.mjs → SpendingLegend-CD60HCYS.mjs} +33 -33
- package/dist/{TransactionDetails-7MHOshKQ.mjs → TransactionDetails-BDhz3DLT.mjs} +2 -2
- package/dist/TransactionStore-BSp5bOKg.mjs +705 -0
- package/dist/{User-LJpEwPtn.mjs → User-B0LnmiKO.mjs} +21 -20
- package/dist/WidgetContainer-BbPS3Yxz.mjs +555 -0
- package/dist/accounts/index.es.js +421 -391
- package/dist/accounts/stores/AccountStore.d.ts +30 -23
- package/dist/accounts/utils/Accounts.d.ts +2 -1
- package/dist/budgets/index.es.js +546 -540
- package/dist/budgets/store/BudgetsStore.d.ts +1 -0
- package/dist/cashflow/index.es.js +444 -457
- package/dist/categories/index.es.js +1 -1
- package/dist/categories/stores/CategoryStore.d.ts +10 -5
- package/dist/categories/util/CategoryUtil.d.ts +3 -2
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +459 -445
- package/dist/common/stores/AppDataStore.d.ts +3 -1
- package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
- package/dist/common/stores/GlobalStore.d.ts +3 -3
- package/dist/common/stores/GlobalUiStore.d.ts +10 -6
- package/dist/common/stores/UserStore.d.ts +3 -2
- package/dist/common/types/Account.d.ts +9 -6
- package/dist/dashboard/index.es.js +84 -116
- package/dist/debts/index.es.js +417 -413
- package/dist/{exportTransactionsToCSV-BrTYdSgJ.mjs → exportTransactionsToCSV-DtQ7ovAR.mjs} +1 -1
- package/dist/finstrong/index.es.js +1167 -1110
- package/dist/goals/index.es.js +618 -598
- package/dist/goals/stores/GoalStore.d.ts +19 -4
- package/dist/help/index.es.js +13 -13
- package/dist/investments/index.es.js +330 -325
- package/dist/investments/stores/HoldingStore.d.ts +1 -0
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +423 -433
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +90 -91
- package/dist/notifications/stores/NotificationStore.d.ts +3 -1
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +543 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +4 -2
- package/dist/settings/index.es.js +253 -248
- package/dist/spending/index.es.js +282 -301
- package/dist/transactions/index.es.js +269 -263
- package/dist/transactions/stores/TransactionStore.d.ts +26 -77
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +708 -699
- package/dist/{useAccountDisplayName-BTvP_pw6.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
- package/package.json +3 -3
- package/dist/AccountStore-CWFzg8-E.mjs +0 -260
- package/dist/Accounts-CWt-NRq8.mjs +0 -9
- package/dist/CategoryUtil-DZflYFam.mjs +0 -78
- package/dist/ConnectDrawer-BOjfI6rz.mjs +0 -563
- package/dist/GoalStore-C7ahxxLi.mjs +0 -364
- package/dist/NetWorthStore-xWIo9CYU.mjs +0 -150
- package/dist/TransactionStore-DJwPaZuM.mjs +0 -677
- package/dist/WidgetContainer-CrK6tyHr.mjs +0 -572
- 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/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e, Fragment as M } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import p from "react";
|
|
3
3
|
import { observer as C } from "mobx-react-lite";
|
|
4
4
|
import v from "@mui/material/Divider";
|
|
5
5
|
import E from "@mui/material/List";
|
|
@@ -7,39 +7,39 @@ import O from "@mui/material/ListItem";
|
|
|
7
7
|
import L from "@mui/material/ListItemText";
|
|
8
8
|
import V from "@mui/material/ListItemButton";
|
|
9
9
|
import h from "@mui/material/Stack";
|
|
10
|
-
import { ChevronRight as w, ExpandMore as
|
|
11
|
-
import { Text as x, InstitutionLogo as
|
|
12
|
-
import { endOfMonth as
|
|
13
|
-
import { startOfMonth as
|
|
14
|
-
import { DateCalendar as
|
|
15
|
-
import { LocalizationProvider as
|
|
16
|
-
import { AdapterDateFns as
|
|
17
|
-
import { A as
|
|
18
|
-
import { u as
|
|
19
|
-
import { b as
|
|
20
|
-
import { b as
|
|
10
|
+
import { ChevronRight as w, ExpandMore as ee, Star as te } from "@mxenabled/mx-icons";
|
|
11
|
+
import { Text as x, InstitutionLogo as ne, H3 as F } from "@mxenabled/mxui";
|
|
12
|
+
import { endOfMonth as ie } from "date-fns/endOfMonth";
|
|
13
|
+
import { startOfMonth as oe } from "date-fns/startOfMonth";
|
|
14
|
+
import { DateCalendar as se } from "@mui/x-date-pickers/DateCalendar";
|
|
15
|
+
import { LocalizationProvider as ae } from "@mui/x-date-pickers/LocalizationProvider";
|
|
16
|
+
import { AdapterDateFns as ce } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
17
|
+
import { A as le, T as R, a as D, N as b } from "./Notification-Bs1fdbzI.mjs";
|
|
18
|
+
import { u as S, r as T, o as A, d as J, g as re, a as X, b as de } from "./hooks-ZMp65DFz.mjs";
|
|
19
|
+
import { b as me } from "./Localization-2MODESHW.mjs";
|
|
20
|
+
import { b as he, f as _e } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
21
21
|
import { a as N } from "./Dialog-B4PI-_bL.mjs";
|
|
22
|
-
import { C as
|
|
23
|
-
import { u as
|
|
24
|
-
import { D as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
22
|
+
import { C as ue } from "./CurrencyInput-itK0R3wV.mjs";
|
|
23
|
+
import { u as pe } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
24
|
+
import { D as q } from "./Drawer-DV4NTsFg.mjs";
|
|
25
|
+
import fe from "@mui/material/Collapse";
|
|
26
|
+
import ge from "@mui/material/Card";
|
|
27
|
+
import ye from "@mui/material/CardContent";
|
|
28
|
+
import H from "@mui/material/Box";
|
|
29
29
|
import j from "@mui/material/Button";
|
|
30
30
|
import U from "@mui/material/TextField";
|
|
31
|
-
import { u as
|
|
32
|
-
import
|
|
33
|
-
import { u as
|
|
34
|
-
import { u as
|
|
35
|
-
import { L as
|
|
36
|
-
const
|
|
37
|
-
const { common: n, settings: t } =
|
|
31
|
+
import { u as be } from "./useDimensions-27p2evRx.mjs";
|
|
32
|
+
import K from "@mui/material/styles/useTheme";
|
|
33
|
+
import { u as xe } from "./useInsightsEnabled-B7dxpDrX.mjs";
|
|
34
|
+
import { u as Ce } from "./useWidgetLoadTimer-hIOioiKx.mjs";
|
|
35
|
+
import { L as ve } from "./Loader-DUaFpDGv.mjs";
|
|
36
|
+
const Te = C(() => {
|
|
37
|
+
const { common: n, settings: t } = S(), { sendEmailVerification: s } = T(), { user: l } = A(), i = K(), [r, a] = p.useState(!1), o = () => {
|
|
38
38
|
a(!1);
|
|
39
39
|
}, _ = () => {
|
|
40
40
|
a(!0);
|
|
41
41
|
};
|
|
42
|
-
return /* @__PURE__ */ c(
|
|
42
|
+
return /* @__PURE__ */ c(p.Fragment, { children: [
|
|
43
43
|
/* @__PURE__ */ c(j, { onClick: _, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
44
44
|
/* @__PURE__ */ e(x, { variant: "Small", children: t.verify_email }),
|
|
45
45
|
/* @__PURE__ */ e(w, {})
|
|
@@ -82,9 +82,9 @@ const Ce = C(() => {
|
|
|
82
82
|
}
|
|
83
83
|
)
|
|
84
84
|
] });
|
|
85
|
-
}),
|
|
85
|
+
}), Pe = C(
|
|
86
86
|
({ handleClose: n, handleVerify: t, isOpen: s }) => {
|
|
87
|
-
const { common: l, settings: i } =
|
|
87
|
+
const { common: l, settings: i } = S(), [r, a] = p.useState("");
|
|
88
88
|
return /* @__PURE__ */ e(
|
|
89
89
|
N,
|
|
90
90
|
{
|
|
@@ -107,22 +107,22 @@ const Ce = C(() => {
|
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
|
-
),
|
|
111
|
-
const { common: n, settings: t } =
|
|
110
|
+
), De = C(() => {
|
|
111
|
+
const { common: n, settings: t } = S(), { sendPhoneVerification: s, verifyPhoneToken: l } = T(), { user: i } = A(), r = K(), [a, o] = p.useState(!1), [_, d] = p.useState(!1), f = () => {
|
|
112
112
|
o(!1);
|
|
113
|
-
},
|
|
113
|
+
}, u = () => {
|
|
114
114
|
o(!0);
|
|
115
|
-
},
|
|
115
|
+
}, y = () => {
|
|
116
116
|
s().finally(() => {
|
|
117
117
|
d(!0);
|
|
118
118
|
});
|
|
119
|
-
},
|
|
120
|
-
l(
|
|
119
|
+
}, m = (g) => {
|
|
120
|
+
l(g).finally(() => {
|
|
121
121
|
d(!1);
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
-
return /* @__PURE__ */ c(
|
|
125
|
-
/* @__PURE__ */ c(j, { onClick:
|
|
124
|
+
return /* @__PURE__ */ c(p.Fragment, { children: [
|
|
125
|
+
/* @__PURE__ */ c(j, { onClick: u, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
126
126
|
/* @__PURE__ */ e(x, { variant: "Small", children: t.verify_phone }),
|
|
127
127
|
/* @__PURE__ */ e(w, {})
|
|
128
128
|
] }),
|
|
@@ -131,9 +131,9 @@ const Ce = C(() => {
|
|
|
131
131
|
{
|
|
132
132
|
copy: { title: "" },
|
|
133
133
|
isOpen: a,
|
|
134
|
-
onClose:
|
|
135
|
-
onPrimaryAction:
|
|
136
|
-
onSecondaryAction:
|
|
134
|
+
onClose: f,
|
|
135
|
+
onPrimaryAction: y,
|
|
136
|
+
onSecondaryAction: f,
|
|
137
137
|
primaryText: t.send_verification,
|
|
138
138
|
secondaryText: n.back,
|
|
139
139
|
sx: {
|
|
@@ -164,30 +164,30 @@ const Ce = C(() => {
|
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
166
|
/* @__PURE__ */ e(
|
|
167
|
-
|
|
167
|
+
Pe,
|
|
168
168
|
{
|
|
169
169
|
handleClose: () => d(!1),
|
|
170
|
-
handleVerify:
|
|
170
|
+
handleVerify: m,
|
|
171
171
|
isOpen: _
|
|
172
172
|
}
|
|
173
173
|
)
|
|
174
174
|
] });
|
|
175
|
-
}),
|
|
175
|
+
}), Se = C(
|
|
176
176
|
({ onProfileUpdated: n, profile: t }) => {
|
|
177
|
-
const { common: s, recurring: l, settings: i } =
|
|
177
|
+
const { common: s, recurring: l, settings: i } = S(), { updateAccount: r } = J(), a = t.notification_type === le.DebtPaymentReminder, [o, _] = p.useState(!1), [d, f] = p.useState(t.threshold || 0), [u, y] = p.useState(
|
|
178
178
|
t.account?.day_payment_is_due || 0
|
|
179
|
-
),
|
|
179
|
+
), m = t.account?.name || t.account?.feed_name || "", g = t.account?.day_payment_is_due ? me(
|
|
180
180
|
i.notification_debt_payment_date,
|
|
181
|
-
|
|
182
|
-
) : i.notification_debt_payment_zero_state,
|
|
183
|
-
a && t.account ? await r({ ...t.account, day_payment_is_due:
|
|
181
|
+
he(t.account?.day_payment_is_due)
|
|
182
|
+
) : i.notification_debt_payment_zero_state, P = a ? g : _e(t.threshold ?? 0, "0,0"), I = async () => {
|
|
183
|
+
a && t.account ? await r({ ...t.account, day_payment_is_due: u }) : n({ ...t, threshold: d });
|
|
184
184
|
};
|
|
185
185
|
return /* @__PURE__ */ c(h, { children: [
|
|
186
186
|
/* @__PURE__ */ e(
|
|
187
187
|
R,
|
|
188
188
|
{
|
|
189
189
|
avatar: t.account?.institution_guid ? /* @__PURE__ */ e(
|
|
190
|
-
|
|
190
|
+
ne,
|
|
191
191
|
{
|
|
192
192
|
alt: t.label,
|
|
193
193
|
institutionGuid: t.account?.institution_guid
|
|
@@ -202,8 +202,8 @@ const Ce = C(() => {
|
|
|
202
202
|
...t,
|
|
203
203
|
is_enabled: !t.is_enabled
|
|
204
204
|
}),
|
|
205
|
-
primaryText:
|
|
206
|
-
secondaryText: t.is_enabled ?
|
|
205
|
+
primaryText: m,
|
|
206
|
+
secondaryText: t.is_enabled ? P : i.notification_disabled
|
|
207
207
|
}
|
|
208
208
|
),
|
|
209
209
|
/* @__PURE__ */ e(
|
|
@@ -213,18 +213,18 @@ const Ce = C(() => {
|
|
|
213
213
|
title: a ? l.day_of_the_month : i.notification_threshold_label,
|
|
214
214
|
close_aria: s.close_aria
|
|
215
215
|
},
|
|
216
|
-
disablePrimaryButton: a &&
|
|
216
|
+
disablePrimaryButton: a && u === 0,
|
|
217
217
|
isOpen: o,
|
|
218
218
|
onClose: () => _(!1),
|
|
219
219
|
onPrimaryAction: I,
|
|
220
220
|
primaryText: s.save_button,
|
|
221
|
-
children: a ? /* @__PURE__ */ e(
|
|
222
|
-
|
|
221
|
+
children: a ? /* @__PURE__ */ e(ae, { dateAdapter: ce, children: /* @__PURE__ */ e(
|
|
222
|
+
se,
|
|
223
223
|
{
|
|
224
|
-
maxDate:
|
|
225
|
-
minDate:
|
|
226
|
-
onChange: (
|
|
227
|
-
|
|
224
|
+
maxDate: ie(/* @__PURE__ */ new Date()),
|
|
225
|
+
minDate: oe(/* @__PURE__ */ new Date()),
|
|
226
|
+
onChange: (k) => {
|
|
227
|
+
y(k.getDate());
|
|
228
228
|
},
|
|
229
229
|
slots: {
|
|
230
230
|
// Hides the arrows
|
|
@@ -240,13 +240,13 @@ const Ce = C(() => {
|
|
|
240
240
|
views: ["day"]
|
|
241
241
|
}
|
|
242
242
|
) }) : /* @__PURE__ */ e(
|
|
243
|
-
|
|
243
|
+
ue,
|
|
244
244
|
{
|
|
245
245
|
amount: d,
|
|
246
246
|
autoFocus: !0,
|
|
247
247
|
fullWidth: !0,
|
|
248
248
|
minAmount: 0,
|
|
249
|
-
setAmount: (
|
|
249
|
+
setAmount: (k) => f(Number(k) || 0),
|
|
250
250
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
251
251
|
}
|
|
252
252
|
)
|
|
@@ -254,23 +254,23 @@ const Ce = C(() => {
|
|
|
254
254
|
)
|
|
255
255
|
] });
|
|
256
256
|
}
|
|
257
|
-
),
|
|
257
|
+
), ke = C(
|
|
258
258
|
({ onUpdateProfile: n, profile: t }) => {
|
|
259
|
-
const { settings: s } =
|
|
259
|
+
const { settings: s } = S(), { user: l } = A(), { clientCommunicationProfile: i, userCommunicationsProfile: r } = T(), { isMobile: a } = pe(), o = t.notification_type > 2, {
|
|
260
260
|
opted_out_of_email_notifications: _,
|
|
261
261
|
opted_out_of_push_notifications: d,
|
|
262
|
-
opted_out_of_sms_notifications:
|
|
262
|
+
opted_out_of_sms_notifications: f
|
|
263
263
|
} = r, {
|
|
264
|
-
email_notifications_enabled:
|
|
265
|
-
push_notifications_enabled:
|
|
266
|
-
sms_notifications_enabled:
|
|
264
|
+
email_notifications_enabled: u,
|
|
265
|
+
push_notifications_enabled: y,
|
|
266
|
+
sms_notifications_enabled: m
|
|
267
267
|
} = i;
|
|
268
268
|
return /* @__PURE__ */ c(h, { children: [
|
|
269
|
-
(
|
|
269
|
+
(u || m || y) && /* @__PURE__ */ c(M, { children: [
|
|
270
270
|
/* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.delivery_method_title }),
|
|
271
271
|
/* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
u && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
273
|
+
D,
|
|
274
274
|
{
|
|
275
275
|
isChecked: !_ && t.email_channel && !!l.email,
|
|
276
276
|
isDisabled: _ || !l.email,
|
|
@@ -280,21 +280,21 @@ const Ce = C(() => {
|
|
|
280
280
|
useExtraPadding: !1
|
|
281
281
|
}
|
|
282
282
|
) }),
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
u && (m || y) && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
284
|
+
m && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
285
|
+
D,
|
|
286
286
|
{
|
|
287
|
-
isChecked: !
|
|
288
|
-
isDisabled:
|
|
287
|
+
isChecked: !f && t.sms_channel && !!l.phone,
|
|
288
|
+
isDisabled: f || !l.phone,
|
|
289
289
|
onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
|
|
290
290
|
primaryText: `${s.delivery_method_sms_label}`,
|
|
291
|
-
secondaryText:
|
|
291
|
+
secondaryText: f || !t.sms_channel || !l.phone ? s.notification_disabled : s.notification_enabled,
|
|
292
292
|
useExtraPadding: !1
|
|
293
293
|
}
|
|
294
294
|
) }),
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
295
|
+
m && y && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
296
|
+
y && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
297
|
+
D,
|
|
298
298
|
{
|
|
299
299
|
isChecked: !d && t.push_channel,
|
|
300
300
|
isDisabled: d,
|
|
@@ -309,19 +309,19 @@ const Ce = C(() => {
|
|
|
309
309
|
] }),
|
|
310
310
|
o && !!t.children?.length && /* @__PURE__ */ c(h, { children: [
|
|
311
311
|
/* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.accounts_threshold_title }),
|
|
312
|
-
/* @__PURE__ */ e(E, { sx: { bgcolor: "background.paper" }, children: t.children?.map((
|
|
313
|
-
|
|
312
|
+
/* @__PURE__ */ e(E, { sx: { bgcolor: "background.paper" }, children: t.children?.map((g) => /* @__PURE__ */ e(
|
|
313
|
+
Se,
|
|
314
314
|
{
|
|
315
315
|
onProfileUpdated: n,
|
|
316
|
-
profile:
|
|
316
|
+
profile: g
|
|
317
317
|
},
|
|
318
|
-
|
|
318
|
+
g.guid
|
|
319
319
|
)) })
|
|
320
320
|
] })
|
|
321
321
|
] });
|
|
322
322
|
}
|
|
323
|
-
),
|
|
324
|
-
const { accountProfiles: n, updateNotificationProfile: t } = T(), [s, l] =
|
|
323
|
+
), W = C(() => {
|
|
324
|
+
const { accountProfiles: n, updateNotificationProfile: t } = T(), [s, l] = p.useState(""), i = p.useMemo(
|
|
325
325
|
() => n.find((o) => o.guid === s),
|
|
326
326
|
[n, s]
|
|
327
327
|
), r = async (o) => {
|
|
@@ -347,13 +347,13 @@ const Ce = C(() => {
|
|
|
347
347
|
o.guid
|
|
348
348
|
)),
|
|
349
349
|
/* @__PURE__ */ e(
|
|
350
|
-
|
|
350
|
+
q,
|
|
351
351
|
{
|
|
352
352
|
isOpen: !!i,
|
|
353
353
|
onClose: () => l(""),
|
|
354
354
|
title: i ? i.label : "",
|
|
355
355
|
children: i && /* @__PURE__ */ e(
|
|
356
|
-
|
|
356
|
+
ke,
|
|
357
357
|
{
|
|
358
358
|
onUpdateProfile: a,
|
|
359
359
|
profile: i
|
|
@@ -362,8 +362,8 @@ const Ce = C(() => {
|
|
|
362
362
|
}
|
|
363
363
|
)
|
|
364
364
|
] });
|
|
365
|
-
}),
|
|
366
|
-
const { settings: t } =
|
|
365
|
+
}), Q = C(({ profile: n }) => {
|
|
366
|
+
const { settings: t } = S(), {
|
|
367
367
|
clientCommunicationProfile: {
|
|
368
368
|
email_notifications_enabled: s,
|
|
369
369
|
push_notifications_enabled: l,
|
|
@@ -375,40 +375,40 @@ const Ce = C(() => {
|
|
|
375
375
|
opted_out_of_push_notifications: o,
|
|
376
376
|
opted_out_of_sms_notifications: _
|
|
377
377
|
}
|
|
378
|
-
} = T(), { user: d } = A(), [
|
|
379
|
-
await
|
|
380
|
-
},
|
|
381
|
-
await r(
|
|
382
|
-
},
|
|
378
|
+
} = T(), { user: d } = A(), [f, u] = p.useState(!1), y = async () => {
|
|
379
|
+
await m({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && u(!1);
|
|
380
|
+
}, m = async (P) => {
|
|
381
|
+
await r(P);
|
|
382
|
+
}, g = s || i || l;
|
|
383
383
|
return /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
384
384
|
/* @__PURE__ */ e(
|
|
385
385
|
R,
|
|
386
386
|
{
|
|
387
|
-
endIcon:
|
|
388
|
-
|
|
387
|
+
endIcon: g ? /* @__PURE__ */ e(
|
|
388
|
+
ee,
|
|
389
389
|
{
|
|
390
390
|
sx: {
|
|
391
391
|
transition: "transform 0.3s ease-in-out",
|
|
392
|
-
transform:
|
|
392
|
+
transform: f ? "rotate(180deg)" : "rotate(0deg)"
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
) : void 0,
|
|
396
396
|
isChecked: n.is_enabled,
|
|
397
397
|
isDisabled: !n.is_enabled,
|
|
398
|
-
onClick: () =>
|
|
399
|
-
onToggle: () =>
|
|
398
|
+
onClick: () => u(!f),
|
|
399
|
+
onToggle: () => y(),
|
|
400
400
|
primaryText: n.label,
|
|
401
401
|
secondaryText: n.is_enabled ? n.deliveryMethodsLabel : void 0
|
|
402
402
|
},
|
|
403
403
|
n.guid
|
|
404
404
|
),
|
|
405
|
-
|
|
405
|
+
g && /* @__PURE__ */ e(fe, { in: f, children: /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
406
406
|
s && /* @__PURE__ */ e(
|
|
407
|
-
|
|
407
|
+
D,
|
|
408
408
|
{
|
|
409
409
|
isChecked: !a && n.email_channel && !!d.email,
|
|
410
410
|
isDisabled: a || !d.email,
|
|
411
|
-
onToggle: () =>
|
|
411
|
+
onToggle: () => m({
|
|
412
412
|
...n,
|
|
413
413
|
email_channel: !n.email_channel
|
|
414
414
|
}),
|
|
@@ -417,11 +417,11 @@ const Ce = C(() => {
|
|
|
417
417
|
),
|
|
418
418
|
s && (i || l) && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
419
419
|
i && /* @__PURE__ */ e(
|
|
420
|
-
|
|
420
|
+
D,
|
|
421
421
|
{
|
|
422
422
|
isChecked: !_ && n.sms_channel && !!d.phone,
|
|
423
423
|
isDisabled: _ || !d.phone,
|
|
424
|
-
onToggle: () =>
|
|
424
|
+
onToggle: () => m({
|
|
425
425
|
...n,
|
|
426
426
|
sms_channel: !n.sms_channel
|
|
427
427
|
}),
|
|
@@ -430,11 +430,11 @@ const Ce = C(() => {
|
|
|
430
430
|
),
|
|
431
431
|
i && l && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
432
432
|
l && /* @__PURE__ */ e(
|
|
433
|
-
|
|
433
|
+
D,
|
|
434
434
|
{
|
|
435
435
|
isChecked: !o && n.push_channel,
|
|
436
436
|
isDisabled: o,
|
|
437
|
-
onToggle: () =>
|
|
437
|
+
onToggle: () => m({
|
|
438
438
|
...n,
|
|
439
439
|
push_channel: !n.push_channel
|
|
440
440
|
}),
|
|
@@ -444,19 +444,19 @@ const Ce = C(() => {
|
|
|
444
444
|
] }) }),
|
|
445
445
|
/* @__PURE__ */ e(v, {})
|
|
446
446
|
] }, n.guid);
|
|
447
|
-
}),
|
|
447
|
+
}), z = C(() => {
|
|
448
448
|
const { budgetProfiles: n } = T();
|
|
449
|
-
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(
|
|
450
|
-
}),
|
|
451
|
-
const { onEvent: n } =
|
|
449
|
+
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(Q, { profile: t }, t.guid)) });
|
|
450
|
+
}), we = C(() => {
|
|
451
|
+
const { onEvent: n } = re(), { settings: t } = S(), {
|
|
452
452
|
clientCommunicationProfile: s,
|
|
453
453
|
updateUserCommunicationProfile: l,
|
|
454
454
|
userCommunicationsProfile: i
|
|
455
455
|
} = T(), { user: r } = A(), a = async (o, _) => {
|
|
456
456
|
const d = { ...i, [o]: _ };
|
|
457
457
|
if (n) {
|
|
458
|
-
const
|
|
459
|
-
_ === !1 ? n("opt_in_notification_method", { notificationType:
|
|
458
|
+
const u = o.split("_")[3];
|
|
459
|
+
_ === !1 ? n("opt_in_notification_method", { notificationType: u }) : n("opt_out_notification_method", { notificationType: u });
|
|
460
460
|
}
|
|
461
461
|
await l(d);
|
|
462
462
|
};
|
|
@@ -464,7 +464,7 @@ const Ce = C(() => {
|
|
|
464
464
|
/* @__PURE__ */ e(F, { sx: { mt: 24 }, children: t.delivery_method_title }),
|
|
465
465
|
s.email_notifications_enabled && /* @__PURE__ */ c(M, { children: [
|
|
466
466
|
/* @__PURE__ */ e(
|
|
467
|
-
|
|
467
|
+
D,
|
|
468
468
|
{
|
|
469
469
|
isChecked: !!r.email && !i.opted_out_of_email_notifications,
|
|
470
470
|
isDisabled: !r.email,
|
|
@@ -481,7 +481,7 @@ const Ce = C(() => {
|
|
|
481
481
|
] }),
|
|
482
482
|
s.sms_notifications_enabled && /* @__PURE__ */ c(M, { children: [
|
|
483
483
|
/* @__PURE__ */ e(
|
|
484
|
-
|
|
484
|
+
D,
|
|
485
485
|
{
|
|
486
486
|
isChecked: !!r.phone && !i.opted_out_of_sms_notifications,
|
|
487
487
|
isDisabled: !r.phone,
|
|
@@ -494,7 +494,7 @@ const Ce = C(() => {
|
|
|
494
494
|
s.push_notifications_enabled && /* @__PURE__ */ e(v, {})
|
|
495
495
|
] }),
|
|
496
496
|
s.push_notifications_enabled && /* @__PURE__ */ e(
|
|
497
|
-
|
|
497
|
+
D,
|
|
498
498
|
{
|
|
499
499
|
isChecked: !i.opted_out_of_push_notifications,
|
|
500
500
|
isDisabled: !0,
|
|
@@ -505,22 +505,22 @@ const Ce = C(() => {
|
|
|
505
505
|
useExtraPadding: !1
|
|
506
506
|
}
|
|
507
507
|
),
|
|
508
|
-
s.sms_notifications_enabled && /* @__PURE__ */ e(
|
|
509
|
-
/* @__PURE__ */ e(
|
|
508
|
+
s.sms_notifications_enabled && /* @__PURE__ */ e(ge, { sx: { backgroundColor: "background.default", mt: 12 }, variant: "outlined", children: /* @__PURE__ */ e(ye, { children: /* @__PURE__ */ c(h, { alignItems: "flex-start", direction: "row", gap: 6, children: [
|
|
509
|
+
/* @__PURE__ */ e(te, { color: "primary", filled: !0 }),
|
|
510
510
|
/* @__PURE__ */ e(x, { sx: { whiteSpace: "wrap" }, variant: "XSmall", children: t.delivery_method_sms_note_1 })
|
|
511
511
|
] }) }) })
|
|
512
512
|
] });
|
|
513
|
-
}),
|
|
513
|
+
}), $ = C(() => {
|
|
514
514
|
const { insightsProfiles: n } = T();
|
|
515
|
-
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(
|
|
516
|
-
}),
|
|
517
|
-
const { config: n } =
|
|
515
|
+
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(Q, { profile: t }, t.guid)) });
|
|
516
|
+
}), Ae = () => {
|
|
517
|
+
const { config: n } = X(), [t, { width: s }] = be(), { common: l, settings: i } = S(), { updateUser: r } = T(), { user: a } = A(), [o, _] = p.useState(!1), [d, f] = p.useState({
|
|
518
518
|
email: a.email,
|
|
519
519
|
phone: a.phone
|
|
520
|
-
}),
|
|
521
|
-
const { name: I, value:
|
|
522
|
-
|
|
523
|
-
},
|
|
520
|
+
}), u = d.email && !a.email_is_verified && !o, y = d.phone && !a.phone_is_verified && !o, m = (P) => {
|
|
521
|
+
const { name: I, value: k } = P.target, B = { ...d, [I]: k };
|
|
522
|
+
f(B), _(JSON.stringify({ ...a, ...B }) !== JSON.stringify(a));
|
|
523
|
+
}, g = async () => {
|
|
524
524
|
await r({ ...a, ...d }), _(!1);
|
|
525
525
|
};
|
|
526
526
|
return /* @__PURE__ */ c(h, { ref: t, children: [
|
|
@@ -536,11 +536,11 @@ const Ce = C(() => {
|
|
|
536
536
|
fullWidth: !0,
|
|
537
537
|
label: i.email_address,
|
|
538
538
|
name: "email",
|
|
539
|
-
onChange:
|
|
539
|
+
onChange: m
|
|
540
540
|
}
|
|
541
541
|
),
|
|
542
|
-
|
|
543
|
-
|
|
542
|
+
u && /* @__PURE__ */ e(
|
|
543
|
+
H,
|
|
544
544
|
{
|
|
545
545
|
sx: {
|
|
546
546
|
height: 20,
|
|
@@ -551,7 +551,7 @@ const Ce = C(() => {
|
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
},
|
|
554
|
-
children: /* @__PURE__ */ e(
|
|
554
|
+
children: /* @__PURE__ */ e(Te, {})
|
|
555
555
|
}
|
|
556
556
|
)
|
|
557
557
|
] }),
|
|
@@ -563,11 +563,11 @@ const Ce = C(() => {
|
|
|
563
563
|
fullWidth: !0,
|
|
564
564
|
label: i.mobile_number,
|
|
565
565
|
name: "phone",
|
|
566
|
-
onChange:
|
|
566
|
+
onChange: m
|
|
567
567
|
}
|
|
568
568
|
),
|
|
569
|
-
|
|
570
|
-
|
|
569
|
+
y && /* @__PURE__ */ e(
|
|
570
|
+
H,
|
|
571
571
|
{
|
|
572
572
|
sx: {
|
|
573
573
|
height: 20,
|
|
@@ -578,7 +578,7 @@ const Ce = C(() => {
|
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
},
|
|
581
|
-
children: /* @__PURE__ */ e(
|
|
581
|
+
children: /* @__PURE__ */ e(De, {})
|
|
582
582
|
}
|
|
583
583
|
)
|
|
584
584
|
] })
|
|
@@ -587,7 +587,7 @@ const Ce = C(() => {
|
|
|
587
587
|
j,
|
|
588
588
|
{
|
|
589
589
|
disabled: !o,
|
|
590
|
-
onClick:
|
|
590
|
+
onClick: g,
|
|
591
591
|
sx: { width: 84 },
|
|
592
592
|
variant: "contained",
|
|
593
593
|
children: l.save_button
|
|
@@ -595,69 +595,71 @@ const Ce = C(() => {
|
|
|
595
595
|
)
|
|
596
596
|
] })
|
|
597
597
|
] });
|
|
598
|
-
},
|
|
598
|
+
}, Ie = C(Ae), ht = C(
|
|
599
599
|
({
|
|
600
|
-
notificationTypes: n = [
|
|
600
|
+
notificationTypes: n = [b.Accounts, b.Budgets],
|
|
601
601
|
showPersonalDetails: t = !1,
|
|
602
602
|
view: s
|
|
603
603
|
}) => {
|
|
604
|
-
const { config: l } =
|
|
604
|
+
const { config: l } = X(), { settings: i } = S(), { isInitialized: r } = de(), { isAccountDataLoaded: a, loadAccountData: o } = J(), { clientCommunicationProfile: _, loadNotificationProfiles: d } = T(), f = xe(), [u, y] = p.useState(!1), [m, g] = p.useState(
|
|
605
605
|
void 0
|
|
606
606
|
);
|
|
607
|
-
if (n.length > 0 &&
|
|
607
|
+
if (n.length > 0 && f && n.push(b.Insights), Ce({
|
|
608
608
|
widgetName: "NotificationSettingsWidget",
|
|
609
|
-
isLoaded:
|
|
610
|
-
}),
|
|
611
|
-
|
|
609
|
+
isLoaded: u
|
|
610
|
+
}), p.useEffect(() => {
|
|
611
|
+
a || o().finally();
|
|
612
|
+
}, []), p.useEffect(() => {
|
|
613
|
+
r && d().finally(() => y(!0));
|
|
612
614
|
}, [r]), !r)
|
|
613
|
-
return /* @__PURE__ */ e(
|
|
614
|
-
let
|
|
615
|
-
m ===
|
|
615
|
+
return /* @__PURE__ */ e(ve, {});
|
|
616
|
+
let P = i.manage_account_notifications;
|
|
617
|
+
m === b.Budgets ? P = i.manage_budget_notifications : m === b.Insights && (P = i.manage_insights_notifications);
|
|
616
618
|
const {
|
|
617
|
-
email_notifications_enabled:
|
|
619
|
+
email_notifications_enabled: I,
|
|
618
620
|
sms_notifications_enabled: k,
|
|
619
|
-
push_notifications_enabled:
|
|
620
|
-
} =
|
|
621
|
+
push_notifications_enabled: B
|
|
622
|
+
} = _, G = I || k || B;
|
|
621
623
|
if (s === "accounts")
|
|
622
|
-
return /* @__PURE__ */ e(H, {});
|
|
623
|
-
if (s === "budgets")
|
|
624
624
|
return /* @__PURE__ */ e(W, {});
|
|
625
|
-
if (s === "
|
|
625
|
+
if (s === "budgets")
|
|
626
626
|
return /* @__PURE__ */ e(z, {});
|
|
627
|
-
|
|
628
|
-
|
|
627
|
+
if (s === "insights")
|
|
628
|
+
return /* @__PURE__ */ e($, {});
|
|
629
|
+
const Y = l.display_email_edit_field_in_settings || l.display_sms_edit_field_in_settings, Z = t && _.can_edit_contact_info && Y;
|
|
630
|
+
return /* @__PURE__ */ c(h, { sx: { pt: G ? 0 : 24 }, children: [
|
|
629
631
|
/* @__PURE__ */ c(h, { sx: { px: 24 }, children: [
|
|
630
|
-
|
|
631
|
-
/* @__PURE__ */ e(
|
|
632
|
+
G && /* @__PURE__ */ c(M, { children: [
|
|
633
|
+
/* @__PURE__ */ e(we, {}),
|
|
632
634
|
/* @__PURE__ */ e(v, { sx: { my: 24 } })
|
|
633
635
|
] }),
|
|
634
636
|
/* @__PURE__ */ e(F, { sx: { mb: 4 }, children: i.notification_types_title })
|
|
635
637
|
] }),
|
|
636
638
|
/* @__PURE__ */ c(E, { children: [
|
|
637
|
-
n.includes(
|
|
639
|
+
n.includes(b.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => g(b.Accounts), children: [
|
|
638
640
|
/* @__PURE__ */ e(L, { primary: i.accounts_title, secondary: i.accounts_subtitle }),
|
|
639
641
|
/* @__PURE__ */ e(w, {})
|
|
640
642
|
] }) }),
|
|
641
|
-
n.includes(
|
|
643
|
+
n.includes(b.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => g(b.Budgets), children: [
|
|
642
644
|
/* @__PURE__ */ e(L, { primary: i.budgets_title, secondary: i.budgets_subtitle }),
|
|
643
645
|
/* @__PURE__ */ e(w, {})
|
|
644
646
|
] }) }),
|
|
645
|
-
n.includes(
|
|
647
|
+
n.includes(b.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => g(b.Insights), children: [
|
|
646
648
|
/* @__PURE__ */ e(L, { primary: i.insights_title, secondary: i.insights_subtitle }),
|
|
647
649
|
/* @__PURE__ */ e(w, {})
|
|
648
650
|
] }) })
|
|
649
651
|
] }),
|
|
650
|
-
|
|
652
|
+
Z && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(Ie, {}) }),
|
|
651
653
|
/* @__PURE__ */ e(
|
|
652
|
-
|
|
654
|
+
q,
|
|
653
655
|
{
|
|
654
656
|
isOpen: !!m,
|
|
655
|
-
onClose: () =>
|
|
656
|
-
title:
|
|
657
|
+
onClose: () => g(void 0),
|
|
658
|
+
title: P,
|
|
657
659
|
children: /* @__PURE__ */ c(h, { children: [
|
|
658
|
-
m ===
|
|
659
|
-
m ===
|
|
660
|
-
m ===
|
|
660
|
+
m === b.Accounts && /* @__PURE__ */ e(W, {}),
|
|
661
|
+
m === b.Budgets && /* @__PURE__ */ e(z, {}),
|
|
662
|
+
m === b.Insights && /* @__PURE__ */ e($, {})
|
|
661
663
|
] })
|
|
662
664
|
}
|
|
663
665
|
)
|
|
@@ -665,10 +667,10 @@ const Ce = C(() => {
|
|
|
665
667
|
}
|
|
666
668
|
);
|
|
667
669
|
export {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
670
|
+
W as A,
|
|
671
|
+
z as B,
|
|
672
|
+
$ as I,
|
|
673
|
+
ht as N,
|
|
674
|
+
Te as V,
|
|
675
|
+
De as a
|
|
674
676
|
};
|