@mx-cartographer/experiences 7.0.27-alpha.sms4 → 7.0.27-alpha.sms6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/{Account-BW3-oYEs.mjs → Account-CK-DrCEa.mjs} +1 -1
  2. package/dist/{AccountDetailsContent-UxSEMBo_.mjs → AccountDetailsContent-BZAbCT6q.mjs} +8 -8
  3. package/dist/{AccountDetailsHeader-Eb3WvBGm.mjs → AccountDetailsHeader-DXTi1p0V.mjs} +11 -11
  4. package/dist/{AccountFields-CIz-r3gP.mjs → AccountFields-Bxvi1C4Z.mjs} +2 -2
  5. package/dist/{AccountListItem-B-ZjJ4Gp.mjs → AccountListItem-CnE3rCVZ.mjs} +3 -3
  6. package/dist/{AccountStore-BaMynkQT.mjs → AccountStore-DiGbJBUT.mjs} +2 -2
  7. package/dist/{Accounts-CA-nqAjT.mjs → Accounts-BBkQjUmS.mjs} +1 -1
  8. package/dist/{BudgetUtil-CeSLAcsl.mjs → BudgetUtil-D5jO0box.mjs} +1 -1
  9. package/dist/{CategorySelectorDrawer-BJ9jlCyt.mjs → CategorySelectorDrawer-joMax4Fb.mjs} +1 -1
  10. package/dist/{ConnectDrawer-phFH6OHt.mjs → ConnectDrawer-D86nRDxQ.mjs} +1 -1
  11. package/dist/{ConnectionsDrawer-ihxkAi1P.mjs → ConnectionsDrawer-BkNr5Up0.mjs} +2 -2
  12. package/dist/{CurrencyInput-bEx2Mbd0.mjs → CurrencyInput-BkflFU_-.mjs} +1 -1
  13. package/dist/{DebtsStore-VkyMADzd.mjs → DebtsStore-qrqY9Abz.mjs} +1 -1
  14. package/dist/{ExportCsvAction-CbdFfDV5.mjs → ExportCsvAction-DRfdZis1.mjs} +3 -3
  15. package/dist/{GoalStore-eSOkI6uE.mjs → GoalStore-BQRcowCN.mjs} +2 -2
  16. package/dist/{Help-KAAMEubC.mjs → Help-B3dFeYi2.mjs} +1 -1
  17. package/dist/{LineChart-BWWmmJxV.mjs → LineChart-Dyps2sOy.mjs} +1 -1
  18. package/dist/{ListItemAction-DNZZ5fSa.mjs → ListItemAction-BgKx_n6d.mjs} +1 -1
  19. package/dist/{ManageIncome-DbsiKUoO.mjs → ManageIncome-CFh-N0KK.mjs} +4 -4
  20. package/dist/{MicroWidgetContainer-Dxz8uBN9.mjs → MicroWidgetContainer-DPDsZIiS.mjs} +1 -1
  21. package/dist/{MiniWidgetContainer-CTyjmE1h.mjs → MiniWidgetContainer-BzW7V_04.mjs} +1 -1
  22. package/dist/{NetWorthStore-B6xF9eGH.mjs → NetWorthStore-DWG9Mkuu.mjs} +2 -2
  23. package/dist/NotificationSettings-BaG4tpPe.mjs +671 -0
  24. package/dist/{OriginalBalanceAction-DepsKiJz.mjs → OriginalBalanceAction-B--pIAF0.mjs} +3 -3
  25. package/dist/{RecurringSettings-Dj29piAQ.mjs → RecurringSettings-C9TjSuS_.mjs} +3 -3
  26. package/dist/{TransactionDetails-C-z3HGTT.mjs → TransactionDetails-C2gYzV0z.mjs} +37 -37
  27. package/dist/{TransactionStore-Cep_Eeql.mjs → TransactionStore-CZOvxcSw.mjs} +2 -2
  28. package/dist/{TrendsStore-WrHxzdbQ.mjs → TrendsStore-pvzHAX6B.mjs} +225 -231
  29. package/dist/{User-Dq9Qj764.mjs → User-D-O9EHMb.mjs} +1 -1
  30. package/dist/{WidgetContainer-CdBs9WOZ.mjs → WidgetContainer-Bn6JPnY3.mjs} +2 -2
  31. package/dist/accounts/index.es.js +12 -12
  32. package/dist/analytics/index.es.js +11 -11
  33. package/dist/budgets/index.es.js +10 -10
  34. package/dist/cashflow/index.es.js +7 -7
  35. package/dist/categories/index.es.js +1 -1
  36. package/dist/common/index.es.js +105 -104
  37. package/dist/dashboard/index.es.js +2 -2
  38. package/dist/debts/index.es.js +9 -9
  39. package/dist/{exportTransactionsToCSV-B5qAKd6C.mjs → exportTransactionsToCSV-zyHeWfQo.mjs} +1 -1
  40. package/dist/finstrong/index.es.js +6 -6
  41. package/dist/goals/index.es.js +11 -11
  42. package/dist/help/index.es.js +3 -3
  43. package/dist/{hooks-DkUqN6JE.mjs → hooks-DlI63qSB.mjs} +8 -8
  44. package/dist/investments/index.es.js +3 -3
  45. package/dist/merchants/index.es.js +1 -1
  46. package/dist/networth/index.es.js +7 -7
  47. package/dist/notifications/index.es.js +2 -2
  48. package/dist/recurringtransactions/index.es.js +8 -8
  49. package/dist/settings/index.es.js +7 -7
  50. package/dist/spending/index.es.js +14 -14
  51. package/dist/transactions/index.es.js +13 -13
  52. package/dist/trends/index.es.js +70 -69
  53. package/dist/useInsightsEnabled-fGr6xrSj.mjs +11 -0
  54. package/package.json +1 -1
  55. package/dist/NotificationSettings-ClJT-Sg3.mjs +0 -664
@@ -0,0 +1,671 @@
1
+ import { jsxs as l, jsx as e, Fragment as B } from "react/jsx-runtime";
2
+ import f from "react";
3
+ import { observer as C } from "mobx-react-lite";
4
+ import T from "@mui/material/Divider";
5
+ import E from "@mui/material/List";
6
+ import O from "@mui/material/ListItem";
7
+ import N from "@mui/material/ListItemText";
8
+ import V from "@mui/material/ListItemButton";
9
+ import h from "@mui/material/Stack";
10
+ import { ChevronRight as w, ExpandMore as K, Star as Q } from "@mxenabled/mx-icons";
11
+ import { Text as x, InstitutionLogo as Y, H3 as U } from "@mxenabled/mxui";
12
+ import { endOfMonth as Z } from "date-fns/endOfMonth";
13
+ import { startOfMonth as ee } from "date-fns/startOfMonth";
14
+ import { DateCalendar as te } from "@mui/x-date-pickers/DateCalendar";
15
+ import { LocalizationProvider as ne } from "@mui/x-date-pickers/LocalizationProvider";
16
+ import { AdapterDateFns as ie } from "@mui/x-date-pickers/AdapterDateFnsV3";
17
+ import { A as oe, T as F, a as P, N as y } from "./Notification-ByMBpJ5u.mjs";
18
+ import { u as D, r as v, o as A, c as se, f as ae, m as W, a as ce } from "./hooks-DlI63qSB.mjs";
19
+ import { b as le } from "./Localization-2MODESHW.mjs";
20
+ import { b as re, f as de } from "./NumberFormatting-CtWHhyBX.mjs";
21
+ import { a as M } from "./Dialog-CWW597AF.mjs";
22
+ import { C as me } from "./CurrencyInput-BkflFU_-.mjs";
23
+ import { u as he } from "./useScreenSize-B6JyS_Lj.mjs";
24
+ import { D as J } from "./Drawer-kEE73B87.mjs";
25
+ import _e from "@mui/material/Collapse";
26
+ import ue from "@mui/material/Card";
27
+ import pe from "@mui/material/CardContent";
28
+ import G from "@mui/material/Box";
29
+ import R from "@mui/material/Button";
30
+ import L from "@mui/material/TextField";
31
+ import { u as fe } from "./useDimensions-27p2evRx.mjs";
32
+ import X from "@mui/material/styles/useTheme";
33
+ import { u as ge } from "./useInsightsEnabled-fGr6xrSj.mjs";
34
+ import { L as ye } from "./Loader-DUaFpDGv.mjs";
35
+ const be = C(() => {
36
+ const { common: n, settings: t } = D(), { sendEmailVerification: s } = v(), { user: a } = A(), o = X(), [r, c] = f.useState(!1), i = () => {
37
+ c(!1);
38
+ }, d = () => {
39
+ c(!0);
40
+ };
41
+ return /* @__PURE__ */ l(f.Fragment, { children: [
42
+ /* @__PURE__ */ l(R, { onClick: d, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
43
+ /* @__PURE__ */ e(x, { variant: "Small", children: t.verify_email }),
44
+ /* @__PURE__ */ e(w, {})
45
+ ] }),
46
+ /* @__PURE__ */ e(
47
+ M,
48
+ {
49
+ copy: { title: "" },
50
+ isOpen: r,
51
+ onClose: i,
52
+ onPrimaryAction: s,
53
+ onSecondaryAction: i,
54
+ primaryText: t.send_verification,
55
+ secondaryText: n.back,
56
+ sx: {
57
+ "& .MuiDialogContent-root": { pt: 0, width: 400 },
58
+ "& .MuiToolbar-root:last-child": {
59
+ gap: 16,
60
+ padding: "32px 60px 48px",
61
+ justifyContent: "center"
62
+ }
63
+ },
64
+ children: /* @__PURE__ */ l(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
65
+ /* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "Body", children: t.confirm_your_email }),
66
+ /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.confirm_email }),
67
+ /* @__PURE__ */ e(
68
+ x,
69
+ {
70
+ sx: {
71
+ border: `1px solid ${o.palette.border.light}`,
72
+ borderRadius: "4px",
73
+ p: "16px 32px"
74
+ },
75
+ variant: "H3",
76
+ children: a.email
77
+ }
78
+ ),
79
+ /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.verification_notice_email })
80
+ ] })
81
+ }
82
+ )
83
+ ] });
84
+ }), xe = C(
85
+ ({ handleClose: n, handleVerify: t, isOpen: s }) => {
86
+ const { common: a, settings: o } = D(), [r, c] = f.useState("");
87
+ return /* @__PURE__ */ e(
88
+ M,
89
+ {
90
+ copy: { title: o.enter_verification_code },
91
+ isOpen: s,
92
+ onClose: n,
93
+ onPrimaryAction: () => t(r),
94
+ onSecondaryAction: n,
95
+ primaryText: o.verify,
96
+ secondaryText: a.cancel_button,
97
+ sx: {
98
+ "& .MuiDialogContent-root": { pt: 0, width: 400 },
99
+ "& .MuiToolbar-root:last-child": {
100
+ gap: 8,
101
+ padding: 24,
102
+ justifyContent: "flex-end"
103
+ }
104
+ },
105
+ children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(L, { onChange: (i) => c(i.target.value), sx: { width: 352 }, value: r }) })
106
+ }
107
+ );
108
+ }
109
+ ), Ce = C(() => {
110
+ const { common: n, settings: t } = D(), { sendPhoneVerification: s, verifyPhoneToken: a } = v(), { user: o } = A(), r = X(), [c, i] = f.useState(!1), [d, m] = f.useState(!1), _ = () => {
111
+ i(!1);
112
+ }, u = () => {
113
+ i(!0);
114
+ }, g = () => {
115
+ s().finally(() => {
116
+ m(!0);
117
+ });
118
+ }, p = (b) => {
119
+ a(b).finally(() => {
120
+ m(!1);
121
+ });
122
+ };
123
+ return /* @__PURE__ */ l(f.Fragment, { children: [
124
+ /* @__PURE__ */ l(R, { onClick: u, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
125
+ /* @__PURE__ */ e(x, { variant: "Small", children: t.verify_phone }),
126
+ /* @__PURE__ */ e(w, {})
127
+ ] }),
128
+ /* @__PURE__ */ e(
129
+ M,
130
+ {
131
+ copy: { title: "" },
132
+ isOpen: c,
133
+ onClose: _,
134
+ onPrimaryAction: g,
135
+ onSecondaryAction: _,
136
+ primaryText: t.send_verification,
137
+ secondaryText: n.back,
138
+ sx: {
139
+ "& .MuiDialogContent-root": { pt: 0, width: 400 },
140
+ "& .MuiToolbar-root:last-child": {
141
+ gap: 16,
142
+ padding: "32px 60px 48px",
143
+ justifyContent: "center"
144
+ }
145
+ },
146
+ children: /* @__PURE__ */ l(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
147
+ /* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "Body", children: t.confirm_your_phone }),
148
+ /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.confirm_phone }),
149
+ /* @__PURE__ */ e(
150
+ x,
151
+ {
152
+ sx: {
153
+ border: `1px solid ${r.palette.border.light}`,
154
+ borderRadius: "4px",
155
+ p: "16px 32px"
156
+ },
157
+ variant: "H3",
158
+ children: o.phone
159
+ }
160
+ ),
161
+ /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.verification_notice_phone })
162
+ ] })
163
+ }
164
+ ),
165
+ /* @__PURE__ */ e(
166
+ xe,
167
+ {
168
+ handleClose: () => m(!1),
169
+ handleVerify: p,
170
+ isOpen: d
171
+ }
172
+ )
173
+ ] });
174
+ }), Te = C(
175
+ ({ onProfileUpdated: n, profile: t }) => {
176
+ const { common: s, recurring: a, settings: o } = D(), { updateAccount: r } = se(), c = t.notification_type === oe.DebtPaymentReminder, [i, d] = f.useState(!1), [m, _] = f.useState(t.threshold || 0), [u, g] = f.useState(
177
+ t.account?.day_payment_is_due || 0
178
+ ), p = t.account?.name || t.account?.feed_name || "", b = t.account?.day_payment_is_due ? le(
179
+ o.notification_debt_payment_date,
180
+ re(t.account?.day_payment_is_due)
181
+ ) : o.notification_debt_payment_zero_state, S = c ? b : de(t.threshold ?? 0, "0,0"), I = async () => {
182
+ c && t.account ? await r({ ...t.account, day_payment_is_due: u }) : n({ ...t, threshold: m });
183
+ };
184
+ return /* @__PURE__ */ l(h, { children: [
185
+ /* @__PURE__ */ e(
186
+ F,
187
+ {
188
+ avatar: t.account?.institution_guid ? /* @__PURE__ */ e(
189
+ Y,
190
+ {
191
+ alt: t.label,
192
+ institutionGuid: t.account?.institution_guid
193
+ }
194
+ ) : void 0,
195
+ endIcon: /* @__PURE__ */ e(w, {}),
196
+ isChecked: t.is_enabled,
197
+ isPrimaryTextBold: !0,
198
+ onClick: () => d(!0),
199
+ onToggle: () => n({
200
+ ...t,
201
+ is_enabled: !t.is_enabled
202
+ }),
203
+ primaryText: p,
204
+ secondaryText: S
205
+ }
206
+ ),
207
+ /* @__PURE__ */ e(
208
+ M,
209
+ {
210
+ copy: {
211
+ title: c ? a.day_of_the_month : o.notification_threshold_label,
212
+ close_aria: s.close_aria
213
+ },
214
+ disablePrimaryButton: c && u === 0,
215
+ isOpen: i,
216
+ onClose: () => d(!1),
217
+ onPrimaryAction: I,
218
+ primaryText: s.save_button,
219
+ children: c ? /* @__PURE__ */ e(ne, { dateAdapter: ie, children: /* @__PURE__ */ e(
220
+ te,
221
+ {
222
+ maxDate: Z(/* @__PURE__ */ new Date()),
223
+ minDate: ee(/* @__PURE__ */ new Date()),
224
+ onChange: (k) => {
225
+ g(k.getDate());
226
+ },
227
+ slots: {
228
+ // Hides the arrows
229
+ leftArrowIcon: () => null,
230
+ rightArrowIcon: () => null
231
+ },
232
+ sx: {
233
+ // TODO: Needs to be updated in MXUI
234
+ "& .MuiPickersDay-today": {
235
+ color: "primary.main"
236
+ }
237
+ },
238
+ views: ["day"]
239
+ }
240
+ ) }) : /* @__PURE__ */ e(
241
+ me,
242
+ {
243
+ amount: m,
244
+ autoFocus: !0,
245
+ fullWidth: !0,
246
+ minAmount: 0,
247
+ setAmount: (k) => _(Number(k) || 0),
248
+ sx: { ".MuiTypography-Body": { p: 0 } }
249
+ }
250
+ )
251
+ }
252
+ )
253
+ ] });
254
+ }
255
+ ), ve = C(
256
+ ({ onUpdateProfile: n, profile: t }) => {
257
+ const { settings: s } = D(), { user: a } = A(), { clientCommunicationProfile: o, userCommunicationsProfile: r } = v(), { isMobile: c } = he(), i = t.notification_type > 2, {
258
+ opted_out_of_email_notifications: d,
259
+ opted_out_of_push_notifications: m,
260
+ opted_out_of_sms_notifications: _
261
+ } = r, {
262
+ email_notifications_enabled: u,
263
+ push_notifications_enabled: g,
264
+ sms_notifications_enabled: p
265
+ } = o;
266
+ return /* @__PURE__ */ l(h, { children: [
267
+ (u || p || g) && /* @__PURE__ */ l(B, { children: [
268
+ /* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.delivery_method_title }),
269
+ /* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
270
+ u && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
271
+ P,
272
+ {
273
+ isChecked: !d && t.email_channel && !!a.email,
274
+ isDisabled: d || !a.email,
275
+ onToggle: () => n({ ...t, email_channel: !t.email_channel }),
276
+ primaryText: s.delivery_method_email_label,
277
+ secondaryText: d || !t.email_channel || !a.email ? s.notification_disabled : s.notification_enabled,
278
+ useExtraPadding: !1
279
+ }
280
+ ) }),
281
+ u && (p || g) && /* @__PURE__ */ e(T, { sx: { ml: c ? 0 : 24 } }),
282
+ p && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
283
+ P,
284
+ {
285
+ isChecked: !_ && t.sms_channel && !!a.phone,
286
+ isDisabled: _ || !a.phone,
287
+ onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
288
+ primaryText: `${s.delivery_method_sms_label}`,
289
+ secondaryText: _ || !t.sms_channel || !a.phone ? s.notification_disabled : s.notification_enabled,
290
+ useExtraPadding: !1
291
+ }
292
+ ) }),
293
+ p && g && /* @__PURE__ */ e(T, { sx: { ml: c ? 0 : 24 } }),
294
+ g && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
295
+ P,
296
+ {
297
+ isChecked: !m && t.push_channel,
298
+ isDisabled: m,
299
+ onToggle: () => n({ ...t, push_channel: !t.push_channel }),
300
+ primaryText: s.delivery_method_push_label,
301
+ secondaryText: s.delivery_method_push_subtitle,
302
+ useExtraPadding: !1
303
+ }
304
+ ) }),
305
+ /* @__PURE__ */ e(T, {})
306
+ ] })
307
+ ] }),
308
+ i && !!t.children?.length && /* @__PURE__ */ l(h, { children: [
309
+ /* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.accounts_threshold_title }),
310
+ /* @__PURE__ */ e(E, { sx: { bgcolor: "background.paper" }, children: t.children?.map((b) => /* @__PURE__ */ e(
311
+ Te,
312
+ {
313
+ onProfileUpdated: n,
314
+ profile: b
315
+ },
316
+ b.guid
317
+ )) })
318
+ ] })
319
+ ] });
320
+ }
321
+ ), H = C(() => {
322
+ const { accountProfiles: n, updateNotificationProfile: t } = v(), [s, a] = f.useState(""), o = f.useMemo(
323
+ () => n.find((i) => i.guid === s),
324
+ [n, s]
325
+ ), r = async (i) => {
326
+ await t({
327
+ ...i,
328
+ is_enabled: !i.is_enabled
329
+ });
330
+ }, c = async (i) => {
331
+ await t(i);
332
+ };
333
+ return /* @__PURE__ */ l(h, { sx: { backgroundColor: "background.paper" }, children: [
334
+ n.filter((i) => i.children && i.children.length > 0).map((i) => /* @__PURE__ */ e(
335
+ F,
336
+ {
337
+ endIcon: /* @__PURE__ */ e(w, {}),
338
+ isChecked: i.is_enabled,
339
+ isDisabled: !i.is_enabled,
340
+ onClick: () => a(i.guid),
341
+ onToggle: () => r(i),
342
+ primaryText: i.label,
343
+ secondaryText: i.is_enabled ? i.deliveryMethodsLabel : void 0
344
+ },
345
+ i.guid
346
+ )),
347
+ /* @__PURE__ */ e(
348
+ J,
349
+ {
350
+ isOpen: !!o,
351
+ onClose: () => a(""),
352
+ title: o ? o.label : "",
353
+ children: o && /* @__PURE__ */ e(
354
+ ve,
355
+ {
356
+ onUpdateProfile: c,
357
+ profile: o
358
+ }
359
+ )
360
+ }
361
+ )
362
+ ] });
363
+ }), q = C(({ profile: n }) => {
364
+ const { settings: t } = D(), {
365
+ clientCommunicationProfile: {
366
+ email_notifications_enabled: s,
367
+ push_notifications_enabled: a,
368
+ sms_notifications_enabled: o
369
+ },
370
+ updateNotificationProfile: r,
371
+ userCommunicationsProfile: {
372
+ opted_out_of_email_notifications: c,
373
+ opted_out_of_push_notifications: i,
374
+ opted_out_of_sms_notifications: d
375
+ }
376
+ } = v(), { user: m } = A(), [_, u] = f.useState(!1), g = async () => {
377
+ await p({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && u(!1);
378
+ }, p = async (S) => {
379
+ await r(S);
380
+ }, b = s || o || a;
381
+ return /* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
382
+ /* @__PURE__ */ e(
383
+ F,
384
+ {
385
+ endIcon: b ? /* @__PURE__ */ e(
386
+ K,
387
+ {
388
+ sx: {
389
+ transition: "transform 0.3s ease-in-out",
390
+ transform: _ ? "rotate(180deg)" : "rotate(0deg)"
391
+ }
392
+ }
393
+ ) : void 0,
394
+ isChecked: n.is_enabled,
395
+ isDisabled: !n.is_enabled,
396
+ onClick: () => u(!_),
397
+ onToggle: () => g(),
398
+ primaryText: n.label,
399
+ secondaryText: n.is_enabled ? n.deliveryMethodsLabel : void 0
400
+ },
401
+ n.guid
402
+ ),
403
+ b && /* @__PURE__ */ e(_e, { in: _, children: /* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
404
+ s && /* @__PURE__ */ e(
405
+ P,
406
+ {
407
+ isChecked: !c && n.email_channel && !!m.email,
408
+ isDisabled: c || !m.email,
409
+ onToggle: () => p({
410
+ ...n,
411
+ email_channel: !n.email_channel
412
+ }),
413
+ primaryText: t.delivery_method_email_label
414
+ }
415
+ ),
416
+ s && (o || a) && /* @__PURE__ */ e(T, { sx: { ml: 48 } }),
417
+ o && /* @__PURE__ */ e(
418
+ P,
419
+ {
420
+ isChecked: !d && n.sms_channel && !!m.phone,
421
+ isDisabled: d || !m.phone,
422
+ onToggle: () => p({
423
+ ...n,
424
+ sms_channel: !n.sms_channel
425
+ }),
426
+ primaryText: t.delivery_method_sms_label
427
+ }
428
+ ),
429
+ o && a && /* @__PURE__ */ e(T, { sx: { ml: 48 } }),
430
+ a && /* @__PURE__ */ e(
431
+ P,
432
+ {
433
+ isChecked: !i && n.push_channel,
434
+ isDisabled: i,
435
+ onToggle: () => p({
436
+ ...n,
437
+ push_channel: !n.push_channel
438
+ }),
439
+ primaryText: t.delivery_method_push_label
440
+ }
441
+ )
442
+ ] }) }),
443
+ /* @__PURE__ */ e(T, {})
444
+ ] }, n.guid);
445
+ }), z = C(() => {
446
+ const { budgetProfiles: n } = v();
447
+ return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
448
+ }), Pe = C(() => {
449
+ const { onEvent: n } = ae(), { settings: t } = D(), {
450
+ clientCommunicationProfile: s,
451
+ updateUserCommunicationProfile: a,
452
+ userCommunicationsProfile: o
453
+ } = v(), { user: r } = A(), c = async (i, d) => {
454
+ const m = { ...o, [i]: d };
455
+ if (n) {
456
+ const u = i.split("_")[3];
457
+ d === !1 ? n("opt_in_notification_method", { notificationType: u }) : n("opt_out_notification_method", { notificationType: u });
458
+ }
459
+ await a(m);
460
+ };
461
+ return /* @__PURE__ */ l(h, { children: [
462
+ /* @__PURE__ */ e(U, { sx: { mt: 24 }, children: t.delivery_method_title }),
463
+ s.email_notifications_enabled && /* @__PURE__ */ l(B, { children: [
464
+ /* @__PURE__ */ e(
465
+ P,
466
+ {
467
+ isChecked: !!r.email && !o.opted_out_of_email_notifications,
468
+ isDisabled: !r.email,
469
+ onToggle: () => c(
470
+ "opted_out_of_email_notifications",
471
+ !o.opted_out_of_email_notifications
472
+ ),
473
+ primaryText: t.delivery_method_email_title,
474
+ secondaryText: r.email && !o.opted_out_of_email_notifications ? t.notification_enabled : t.notification_disabled,
475
+ useExtraPadding: !1
476
+ }
477
+ ),
478
+ (s.sms_notifications_enabled || s.push_notifications_enabled) && /* @__PURE__ */ e(T, {})
479
+ ] }),
480
+ s.sms_notifications_enabled && /* @__PURE__ */ l(B, { children: [
481
+ /* @__PURE__ */ e(
482
+ P,
483
+ {
484
+ isChecked: !!r.phone && !o.opted_out_of_sms_notifications,
485
+ isDisabled: !r.phone,
486
+ onToggle: () => c("opted_out_of_sms_notifications", !o.opted_out_of_sms_notifications),
487
+ primaryText: t.delivery_method_sms_title,
488
+ secondaryText: r.phone && !o.opted_out_of_sms_notifications ? t.notification_enabled : t.notification_disabled,
489
+ useExtraPadding: !1
490
+ }
491
+ ),
492
+ s.push_notifications_enabled && /* @__PURE__ */ e(T, {})
493
+ ] }),
494
+ s.push_notifications_enabled && /* @__PURE__ */ e(
495
+ P,
496
+ {
497
+ isChecked: !o.opted_out_of_push_notifications,
498
+ isDisabled: !0,
499
+ onToggle: () => {
500
+ },
501
+ primaryText: t.delivery_method_push_title,
502
+ secondaryText: t.delivery_method_push_subtitle,
503
+ useExtraPadding: !1
504
+ }
505
+ ),
506
+ s.sms_notifications_enabled && /* @__PURE__ */ e(ue, { sx: { backgroundColor: "background.default", mt: 12 }, variant: "outlined", children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ l(h, { alignItems: "flex-start", direction: "row", gap: 6, children: [
507
+ /* @__PURE__ */ e(Q, { color: "primary", filled: !0 }),
508
+ /* @__PURE__ */ e(x, { sx: { whiteSpace: "wrap" }, variant: "XSmall", children: t.delivery_method_sms_note_1 })
509
+ ] }) }) })
510
+ ] });
511
+ }), $ = C(() => {
512
+ const { insightsProfiles: n } = v();
513
+ return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
514
+ }), De = () => {
515
+ const { config: n } = W(), [t, { width: s }] = fe(), { common: a, settings: o } = D(), { updateUser: r } = v(), { user: c } = A(), [i, d] = f.useState(!1), [m, _] = f.useState({
516
+ email: c.email,
517
+ phone: c.phone
518
+ }), u = m.email && !c.email_is_verified && !i, g = m.phone && !c.phone_is_verified && !i, p = (S) => {
519
+ const { name: I, value: k } = S.target, j = { ...m, [I]: k };
520
+ _(j), d(JSON.stringify({ ...c, ...j }) !== JSON.stringify(c));
521
+ }, b = async () => {
522
+ await r({ ...c, ...m }), d(!1);
523
+ };
524
+ return /* @__PURE__ */ l(h, { ref: t, children: [
525
+ /* @__PURE__ */ e(T, {}),
526
+ /* @__PURE__ */ l(h, { sx: { pt: 12 }, children: [
527
+ /* @__PURE__ */ e(U, { sx: { lineHeight: "20px", pb: 4, pt: 16 }, children: o.personal_details }),
528
+ /* @__PURE__ */ l(h, { sx: { flexDirection: s <= 768 ? "column" : "row", gap: 24, py: 16 }, children: [
529
+ n.display_email_edit_field_in_settings && /* @__PURE__ */ l(h, { sx: { flex: 1, pb: 14 }, children: [
530
+ /* @__PURE__ */ e(
531
+ L,
532
+ {
533
+ defaultValue: c.email,
534
+ fullWidth: !0,
535
+ label: o.email_address,
536
+ name: "email",
537
+ onChange: p
538
+ }
539
+ ),
540
+ u && /* @__PURE__ */ e(
541
+ G,
542
+ {
543
+ sx: {
544
+ height: 20,
545
+ ".MuiButton-root": {
546
+ px: 0,
547
+ ":hover": {
548
+ bgcolor: "transparent"
549
+ }
550
+ }
551
+ },
552
+ children: /* @__PURE__ */ e(be, {})
553
+ }
554
+ )
555
+ ] }),
556
+ n.display_sms_edit_field_in_settings && /* @__PURE__ */ l(h, { sx: { flex: 1, pb: 14 }, children: [
557
+ /* @__PURE__ */ e(
558
+ L,
559
+ {
560
+ defaultValue: c.phone,
561
+ fullWidth: !0,
562
+ label: o.mobile_number,
563
+ name: "phone",
564
+ onChange: p
565
+ }
566
+ ),
567
+ g && /* @__PURE__ */ e(
568
+ G,
569
+ {
570
+ sx: {
571
+ height: 20,
572
+ ".MuiButton-root": {
573
+ px: 0,
574
+ ":hover": {
575
+ bgcolor: "transparent"
576
+ }
577
+ }
578
+ },
579
+ children: /* @__PURE__ */ e(Ce, {})
580
+ }
581
+ )
582
+ ] })
583
+ ] }),
584
+ /* @__PURE__ */ e(
585
+ R,
586
+ {
587
+ disabled: !i,
588
+ onClick: b,
589
+ sx: { width: 84 },
590
+ variant: "contained",
591
+ children: a.save_button
592
+ }
593
+ )
594
+ ] })
595
+ ] });
596
+ }, Se = C(De), ct = C(
597
+ ({
598
+ showPersonalDetails: n = !1,
599
+ view: t
600
+ }) => {
601
+ const { config: s } = W(), { settings: a } = D(), { isInitialized: o } = ce(), { clientCommunicationProfile: r, loadNotificationProfiles: c } = v(), i = ge(), [d, m] = f.useState(
602
+ void 0
603
+ ), _ = [
604
+ y.Accounts,
605
+ y.Budgets
606
+ ];
607
+ if (i && _.push(y.Insights), f.useEffect(() => {
608
+ o && c().finally();
609
+ }, [o]), !o)
610
+ return /* @__PURE__ */ e(ye, {});
611
+ let u = a.manage_account_notifications;
612
+ d === y.Budgets ? u = a.manage_budget_notifications : d === y.Insights && (u = a.manage_insights_notifications);
613
+ const {
614
+ email_notifications_enabled: g,
615
+ sms_notifications_enabled: p,
616
+ push_notifications_enabled: b
617
+ } = r, S = g || p || b;
618
+ if (t === "accounts")
619
+ return /* @__PURE__ */ e(H, {});
620
+ if (t === "budgets")
621
+ return /* @__PURE__ */ e(z, {});
622
+ if (t === "insights")
623
+ return /* @__PURE__ */ e($, {});
624
+ const I = s.display_email_edit_field_in_settings || s.display_sms_edit_field_in_settings, k = n && r.can_edit_contact_info && I;
625
+ return /* @__PURE__ */ l(h, { sx: { pt: S ? 0 : 24 }, children: [
626
+ /* @__PURE__ */ l(h, { sx: { px: 24 }, children: [
627
+ S && /* @__PURE__ */ l(B, { children: [
628
+ /* @__PURE__ */ e(Pe, {}),
629
+ /* @__PURE__ */ e(T, { sx: { my: 24 } })
630
+ ] }),
631
+ /* @__PURE__ */ e(U, { sx: { mb: 4 }, children: a.notification_types_title })
632
+ ] }),
633
+ /* @__PURE__ */ l(E, { children: [
634
+ _.includes(y.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => m(y.Accounts), children: [
635
+ /* @__PURE__ */ e(N, { primary: a.accounts_title, secondary: a.accounts_subtitle }),
636
+ /* @__PURE__ */ e(w, {})
637
+ ] }) }),
638
+ _.includes(y.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => m(y.Budgets), children: [
639
+ /* @__PURE__ */ e(N, { primary: a.budgets_title, secondary: a.budgets_subtitle }),
640
+ /* @__PURE__ */ e(w, {})
641
+ ] }) }),
642
+ _.includes(y.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => m(y.Insights), children: [
643
+ /* @__PURE__ */ e(N, { primary: a.insights_title, secondary: a.insights_subtitle }),
644
+ /* @__PURE__ */ e(w, {})
645
+ ] }) })
646
+ ] }),
647
+ k && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(Se, {}) }),
648
+ /* @__PURE__ */ e(
649
+ J,
650
+ {
651
+ isOpen: !!d,
652
+ onClose: () => m(void 0),
653
+ title: u,
654
+ children: /* @__PURE__ */ l(h, { children: [
655
+ d === y.Accounts && /* @__PURE__ */ e(H, {}),
656
+ d === y.Budgets && /* @__PURE__ */ e(z, {}),
657
+ d === y.Insights && /* @__PURE__ */ e($, {})
658
+ ] })
659
+ }
660
+ )
661
+ ] });
662
+ }
663
+ );
664
+ export {
665
+ H as A,
666
+ z as B,
667
+ $ as I,
668
+ ct as N,
669
+ be as V,
670
+ Ce as a
671
+ };
@@ -2,10 +2,10 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import _ from "react";
3
3
  import { observer as p } from "mobx-react-lite";
4
4
  import v from "@mui/material/TextField";
5
- import { L as y } from "./ListItemAction-DNZZ5fSa.mjs";
6
- import { u as h, j as b } from "./hooks-DkUqN6JE.mjs";
5
+ import { L as y } from "./ListItemAction-BgKx_n6d.mjs";
6
+ import { u as h, k as b } from "./hooks-DlI63qSB.mjs";
7
7
  import { a as T, f as S } from "./NumberFormatting-CtWHhyBX.mjs";
8
- import { C as f } from "./CurrencyInput-bEx2Mbd0.mjs";
8
+ import { C as f } from "./CurrencyInput-BkflFU_-.mjs";
9
9
  const F = p(({ goal: e }) => {
10
10
  const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
11
11
  const n = { ...e, interest_rate: t };
@@ -7,10 +7,10 @@ import R from "@mui/material/Tabs";
7
7
  import l from "@mui/material/Divider";
8
8
  import T from "@mui/material/List";
9
9
  import C from "@mui/material/Stack";
10
- import { R as x, A as S, a as E, M as A } from "./ManageIncome-DbsiKUoO.mjs";
11
- import { u as h, h as y, e as _ } from "./hooks-DkUqN6JE.mjs";
10
+ import { R as x, A as S, a as E, M as A } from "./ManageIncome-CFh-N0KK.mjs";
11
+ import { u as h, i as y, f as _ } from "./hooks-DlI63qSB.mjs";
12
12
  import { R as v, F as N } from "./RepeatingTransaction-BW4J-jeJ.mjs";
13
- import { A as d } from "./WidgetContainer-CdBs9WOZ.mjs";
13
+ import { A as d } from "./WidgetContainer-Bn6JPnY3.mjs";
14
14
  const I = u(() => {
15
15
  const { recurring: r } = h(), { repeatingTransactions: s } = y(), { onEvent: o } = _(), a = (n) => {
16
16
  o(d.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {