@mx-cartographer/experiences 9.1.3 → 9.1.4-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.
Files changed (128) hide show
  1. package/CHANGELOG.md +0 -6
  2. package/dist/{AccountDetailsDrawer-Cq4kiiKD.mjs → AccountDetailsDrawer-Dae8eUXt.mjs} +10 -10
  3. package/dist/{AccountDetailsDrawer-Cq4kiiKD.mjs.map → AccountDetailsDrawer-Dae8eUXt.mjs.map} +1 -1
  4. package/dist/{AccountDetailsHeader-BliEZhz7.mjs → AccountDetailsHeader-D_UjMD99.mjs} +4 -4
  5. package/dist/{AccountDetailsHeader-BliEZhz7.mjs.map → AccountDetailsHeader-D_UjMD99.mjs.map} +1 -1
  6. package/dist/{Analytics-CkYXKvco.mjs → Analytics-BJDUP2qI.mjs} +2 -2
  7. package/dist/{Analytics-CkYXKvco.mjs.map → Analytics-BJDUP2qI.mjs.map} +1 -1
  8. package/dist/{CategorySelectorDrawer-NJsFsKP1.mjs → CategorySelectorDrawer-k8AZYC8I.mjs} +2 -2
  9. package/dist/{CategorySelectorDrawer-NJsFsKP1.mjs.map → CategorySelectorDrawer-k8AZYC8I.mjs.map} +1 -1
  10. package/dist/{Connect-BH0Pt6zc.mjs → Connect-tID_S_5e.mjs} +2 -2
  11. package/dist/{Connect-BH0Pt6zc.mjs.map → Connect-tID_S_5e.mjs.map} +1 -1
  12. package/dist/{ConnectCard-D7uxoH5Y.mjs → ConnectCard-DcM6tUOX.mjs} +2 -2
  13. package/dist/{ConnectCard-D7uxoH5Y.mjs.map → ConnectCard-DcM6tUOX.mjs.map} +1 -1
  14. package/dist/{ConnectDrawer-CW4LA3H3.mjs → ConnectDrawer-BQy4YYuc.mjs} +3 -3
  15. package/dist/{ConnectDrawer-CW4LA3H3.mjs.map → ConnectDrawer-BQy4YYuc.mjs.map} +1 -1
  16. package/dist/{ConnectionsDrawer-CZU9ku-k.mjs → ConnectionsDrawer-C73ASLMj.mjs} +3 -3
  17. package/dist/{ConnectionsDrawer-CZU9ku-k.mjs.map → ConnectionsDrawer-C73ASLMj.mjs.map} +1 -1
  18. package/dist/{CurrencyInput-DaGEQaLW.mjs → CurrencyInput-CABYmqBh.mjs} +2 -2
  19. package/dist/{CurrencyInput-DaGEQaLW.mjs.map → CurrencyInput-CABYmqBh.mjs.map} +1 -1
  20. package/dist/{EmbeddedCard-DCOQnTz-.mjs → EmbeddedCard-BwfkCsUN.mjs} +3 -3
  21. package/dist/{EmbeddedCard-DCOQnTz-.mjs.map → EmbeddedCard-BwfkCsUN.mjs.map} +1 -1
  22. package/dist/{Error-Dtw6yxkf.mjs → Error-BFJ3BnfS.mjs} +2 -2
  23. package/dist/{Error-Dtw6yxkf.mjs.map → Error-BFJ3BnfS.mjs.map} +1 -1
  24. package/dist/ErrorBoundary-C7BlHx04.mjs +27 -0
  25. package/dist/ErrorBoundary-C7BlHx04.mjs.map +1 -0
  26. package/dist/{ExportCsvAction-C-IisDcv.mjs → ExportCsvAction-B1257a3M.mjs} +3 -3
  27. package/dist/{ExportCsvAction-C-IisDcv.mjs.map → ExportCsvAction-B1257a3M.mjs.map} +1 -1
  28. package/dist/{GlobalAccountFilter-BhzR5Vb1.mjs → GlobalAccountFilter-DEEc3Bc5.mjs} +2 -2
  29. package/dist/{GlobalAccountFilter-BhzR5Vb1.mjs.map → GlobalAccountFilter-DEEc3Bc5.mjs.map} +1 -1
  30. package/dist/GlobalCopyApi-Tz10hezK.mjs +130 -0
  31. package/dist/GlobalCopyApi-Tz10hezK.mjs.map +1 -0
  32. package/dist/{Help-zVZdcmlk.mjs → Help-BAj_yo3q.mjs} +145 -145
  33. package/dist/Help-BAj_yo3q.mjs.map +1 -0
  34. package/dist/{LineChart-CUfiH86G.mjs → LineChart-BxEIZHht.mjs} +2 -2
  35. package/dist/{LineChart-CUfiH86G.mjs.map → LineChart-BxEIZHht.mjs.map} +1 -1
  36. package/dist/{ListItemAction-BqUCLj_w.mjs → ListItemAction-GDU5z4BN.mjs} +2 -2
  37. package/dist/{ListItemAction-BqUCLj_w.mjs.map → ListItemAction-GDU5z4BN.mjs.map} +1 -1
  38. package/dist/{ListItemWrapper-DRse79Iu.mjs → ListItemWrapper-D6b-6m4t.mjs} +2 -2
  39. package/dist/{ListItemWrapper-DRse79Iu.mjs.map → ListItemWrapper-D6b-6m4t.mjs.map} +1 -1
  40. package/dist/{ManageIncome-B_8i71mE.mjs → ManageIncome-BJWVPAly.mjs} +32 -32
  41. package/dist/{ManageIncome-B_8i71mE.mjs.map → ManageIncome-BJWVPAly.mjs.map} +1 -1
  42. package/dist/{MicroWidgetContainer-B2NnKBgW.mjs → MicroWidgetContainer-IUZQlml1.mjs} +2 -2
  43. package/dist/{MicroWidgetContainer-B2NnKBgW.mjs.map → MicroWidgetContainer-IUZQlml1.mjs.map} +1 -1
  44. package/dist/{MiniWidgetContainer-Bmv_WeUd.mjs → MiniWidgetContainer-CIswJui8.mjs} +2 -2
  45. package/dist/{MiniWidgetContainer-Bmv_WeUd.mjs.map → MiniWidgetContainer-CIswJui8.mjs.map} +1 -1
  46. package/dist/{NotificationSettings-CW7okUrk.mjs → NotificationSettings-DltXMrnb.mjs} +33 -33
  47. package/dist/{NotificationSettings-CW7okUrk.mjs.map → NotificationSettings-DltXMrnb.mjs.map} +1 -1
  48. package/dist/{OriginalBalanceAction-YrvxBYAl.mjs → OriginalBalanceAction-KuJSsZCA.mjs} +4 -4
  49. package/dist/{OriginalBalanceAction-YrvxBYAl.mjs.map → OriginalBalanceAction-KuJSsZCA.mjs.map} +1 -1
  50. package/dist/{RecurringSettings-hs0YUp83.mjs → RecurringSettings-D2Aaqz7d.mjs} +3 -3
  51. package/dist/{RecurringSettings-hs0YUp83.mjs.map → RecurringSettings-D2Aaqz7d.mjs.map} +1 -1
  52. package/dist/{SpendingLegend-CxvNOg3c.mjs → SpendingLegend-C_dMdqbe.mjs} +2 -2
  53. package/dist/{SpendingLegend-CxvNOg3c.mjs.map → SpendingLegend-C_dMdqbe.mjs.map} +1 -1
  54. package/dist/{TransactionDetails-DT-MQqOB.mjs → TransactionDetails-CDZNsKv7.mjs} +5 -5
  55. package/dist/{TransactionDetails-DT-MQqOB.mjs.map → TransactionDetails-CDZNsKv7.mjs.map} +1 -1
  56. package/dist/{UserStore-E5WvBXaY.mjs → UserStore-DzGgxsKk.mjs} +302 -317
  57. package/dist/UserStore-DzGgxsKk.mjs.map +1 -0
  58. package/dist/{ViewMoreMicroCard-fnwE0hqd.mjs → ViewMoreMicroCard-DXaJ-56q.mjs} +4 -4
  59. package/dist/{ViewMoreMicroCard-fnwE0hqd.mjs.map → ViewMoreMicroCard-DXaJ-56q.mjs.map} +1 -1
  60. package/dist/{WidgetContainer-CjdCY4sj.mjs → WidgetContainer-5O6N88mr.mjs} +3 -3
  61. package/dist/{WidgetContainer-CjdCY4sj.mjs.map → WidgetContainer-5O6N88mr.mjs.map} +1 -1
  62. package/dist/accounts/index.es.js +11 -11
  63. package/dist/analytics/index.es.js +2 -2
  64. package/dist/budgets/index.es.js +10 -10
  65. package/dist/cashflow/index.es.js +70 -70
  66. package/dist/categories/index.es.js +1 -1
  67. package/dist/common/components/ErrorBoundary.d.ts +2 -0
  68. package/dist/common/context/GlobalDataProvider.d.ts +2 -1
  69. package/dist/common/context/hooks.d.ts +3 -0
  70. package/dist/common/context/index.d.ts +1 -1
  71. package/dist/common/index.es.js +66 -65
  72. package/dist/core/api/AccountApi.d.ts +2 -2
  73. package/dist/core/api/AnalyticsApi.d.ts +2 -2
  74. package/dist/core/api/AppDataApi.d.ts +2 -2
  75. package/dist/core/api/BeatApi.d.ts +2 -2
  76. package/dist/core/api/BudgetsApi.d.ts +2 -2
  77. package/dist/core/api/CategoryApi.d.ts +2 -2
  78. package/dist/core/api/FinstrongApi.d.ts +2 -2
  79. package/dist/core/api/GlobalCopyApi.d.ts +2 -2
  80. package/dist/core/api/GoalApi.d.ts +2 -2
  81. package/dist/core/api/HelpApi.d.ts +2 -2
  82. package/dist/core/api/HoldingApi.d.ts +2 -2
  83. package/dist/core/api/MerchantApi.d.ts +2 -2
  84. package/dist/core/api/NotificationApi.d.ts +2 -2
  85. package/dist/core/api/RepeatingTransactionsApi.d.ts +2 -2
  86. package/dist/core/api/ScheduledPaymentsApi.d.ts +2 -2
  87. package/dist/core/api/SettingsApi.d.ts +2 -2
  88. package/dist/core/api/TransactionApi.d.ts +2 -2
  89. package/dist/core/api/UserApi.d.ts +2 -2
  90. package/dist/core/index.es.js +95 -95
  91. package/dist/core/index.es.js.map +1 -1
  92. package/dist/core/stores/GlobalStore.d.ts +4 -2
  93. package/dist/core/types/Handlers.d.ts +1 -0
  94. package/dist/core/types/index.d.ts +1 -1
  95. package/dist/core/utils/Fetch.d.ts +3 -2
  96. package/dist/dashboard/index.es.js +4 -4
  97. package/dist/debts/index.es.js +8 -8
  98. package/dist/finstrong/index.es.js +12 -12
  99. package/dist/goals/index.es.js +9 -9
  100. package/dist/help/index.es.js +4 -4
  101. package/dist/hooks-DWOrMnfZ.mjs +83 -0
  102. package/dist/hooks-DWOrMnfZ.mjs.map +1 -0
  103. package/dist/insights/index.es.js +4 -4
  104. package/dist/investments/index.es.js +4 -4
  105. package/dist/merchants/index.es.js +1 -1
  106. package/dist/microinsights/index.es.js +1 -1
  107. package/dist/networth/index.es.js +6 -6
  108. package/dist/notifications/index.es.js +8 -8
  109. package/dist/recurringtransactions/index.es.js +38 -38
  110. package/dist/settings/index.es.js +27 -27
  111. package/dist/spending/index.es.js +7 -7
  112. package/dist/transactions/index.es.js +11 -11
  113. package/dist/trends/index.es.js +12 -12
  114. package/dist/{useAccountDisplayName-BsiXA0qf.mjs → useAccountDisplayName-DHXXCFYZ.mjs} +2 -2
  115. package/dist/{useAccountDisplayName-BsiXA0qf.mjs.map → useAccountDisplayName-DHXXCFYZ.mjs.map} +1 -1
  116. package/dist/{useInsightsEnabled-D5Sdm0TJ.mjs → useInsightsEnabled-B_UpjpE6.mjs} +2 -2
  117. package/dist/{useInsightsEnabled-D5Sdm0TJ.mjs.map → useInsightsEnabled-B_UpjpE6.mjs.map} +1 -1
  118. package/dist/{useWidgetLoadTimer-B0tB-yzL.mjs → useWidgetLoadTimer-C0Mr0eRf.mjs} +2 -2
  119. package/dist/{useWidgetLoadTimer-B0tB-yzL.mjs.map → useWidgetLoadTimer-C0Mr0eRf.mjs.map} +1 -1
  120. package/package.json +1 -1
  121. package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -24
  122. package/dist/ErrorBoundary-CsdOcnJ9.mjs.map +0 -1
  123. package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -129
  124. package/dist/GlobalCopyApi-wcnDUzMV.mjs.map +0 -1
  125. package/dist/Help-zVZdcmlk.mjs.map +0 -1
  126. package/dist/UserStore-E5WvBXaY.mjs.map +0 -1
  127. package/dist/hooks-97sNJ_lf.mjs +0 -78
  128. package/dist/hooks-97sNJ_lf.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { jsxs as c, jsx as e, Fragment as N } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as e, Fragment as B } from "react/jsx-runtime";
2
2
  import f from "react";
3
3
  import { observer as C } from "mobx-react-lite";
4
4
  import v from "@mui/material/Divider";
@@ -7,7 +7,7 @@ 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 A, ExpandMore as ee, Star as te } from "@mxenabled/mx-icons";
10
+ import { ChevronRight as S, ExpandMore as ee, Star as te } from "@mxenabled/mx-icons";
11
11
  import { Text as x, InstitutionLogo as ne, H3 as F } from "@mxenabled/mxui";
12
12
  import { endOfMonth as ie } from "date-fns/endOfMonth";
13
13
  import { startOfMonth as oe } from "date-fns/startOfMonth";
@@ -16,11 +16,11 @@ import { LocalizationProvider as ae } from "@mui/x-date-pickers/LocalizationProv
16
16
  import { AdapterDateFns as ce } from "@mui/x-date-pickers/AdapterDateFnsV3";
17
17
  import { b as le } from "./Localization-DnoVyBNK.mjs";
18
18
  import { b as re, f as de } from "./NumberFormatting--XMeeBfr.mjs";
19
- import { u as k, A as T, C as S, c as J, f as me, i as q, a as he } from "./hooks-97sNJ_lf.mjs";
19
+ import { u as k, B as T, D as A, c as J, f as me, i as q, a as he } from "./hooks-DWOrMnfZ.mjs";
20
20
  import { A as ue, N as b } from "./Notification-DTNYSd8P.mjs";
21
21
  import { T as R, a as D } from "./ToggleListItem-Dl1lXNwj.mjs";
22
- import { D as B } from "./Dialog-Bvd2n8hz.mjs";
23
- import { C as _e } from "./CurrencyInput-DaGEQaLW.mjs";
22
+ import { D as N } from "./Dialog-Bvd2n8hz.mjs";
23
+ import { C as _e } from "./CurrencyInput-CABYmqBh.mjs";
24
24
  import { u as fe } from "./useScreenSize-mWpmnh5w.mjs";
25
25
  import { D as K } from "./Drawer-DsnW2o0v.mjs";
26
26
  import pe from "@mui/material/Collapse";
@@ -31,11 +31,11 @@ import j from "@mui/material/Button";
31
31
  import U from "@mui/material/TextField";
32
32
  import { u as be } from "./useDimensions-CeDR9V8N.mjs";
33
33
  import { useTheme as Q } from "@mui/material/styles";
34
- import { u as xe } from "./useInsightsEnabled-D5Sdm0TJ.mjs";
35
- import { u as Ce } from "./useWidgetLoadTimer-B0tB-yzL.mjs";
34
+ import { u as xe } from "./useInsightsEnabled-B_UpjpE6.mjs";
35
+ import { u as Ce } from "./useWidgetLoadTimer-C0Mr0eRf.mjs";
36
36
  import { L as ve } from "./Loader-CxeBwuPG.mjs";
37
37
  const Te = C(() => {
38
- const { common: n, settings: t } = k(), { sendEmailVerification: s } = T(), { user: l } = S(), i = Q(), [r, a] = f.useState(!1), o = () => {
38
+ const { common: n, settings: t } = k(), { sendEmailVerification: s } = T(), { user: l } = A(), i = Q(), [r, a] = f.useState(!1), o = () => {
39
39
  a(!1);
40
40
  }, u = () => {
41
41
  a(!0);
@@ -43,10 +43,10 @@ const Te = C(() => {
43
43
  return /* @__PURE__ */ c(f.Fragment, { children: [
44
44
  /* @__PURE__ */ c(j, { onClick: u, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
45
45
  /* @__PURE__ */ e(x, { variant: "body2", children: t.verify_email }),
46
- /* @__PURE__ */ e(A, {})
46
+ /* @__PURE__ */ e(S, {})
47
47
  ] }),
48
48
  /* @__PURE__ */ e(
49
- B,
49
+ N,
50
50
  {
51
51
  copy: { title: "" },
52
52
  isOpen: r,
@@ -87,7 +87,7 @@ const Te = C(() => {
87
87
  ({ handleClose: n, handleVerify: t, isOpen: s }) => {
88
88
  const { common: l, settings: i } = k(), [r, a] = f.useState("");
89
89
  return /* @__PURE__ */ e(
90
- B,
90
+ N,
91
91
  {
92
92
  copy: { title: i.enter_verification_code },
93
93
  isOpen: s,
@@ -109,7 +109,7 @@ const Te = C(() => {
109
109
  );
110
110
  }
111
111
  ), De = C(() => {
112
- const { common: n, settings: t } = k(), { sendPhoneVerification: s, verifyPhoneToken: l } = T(), { user: i } = S(), r = Q(), [a, o] = f.useState(!1), [u, d] = f.useState(!1), p = () => {
112
+ const { common: n, settings: t } = k(), { sendPhoneVerification: s, verifyPhoneToken: l } = T(), { user: i } = A(), r = Q(), [a, o] = f.useState(!1), [u, d] = f.useState(!1), p = () => {
113
113
  o(!1);
114
114
  }, _ = () => {
115
115
  o(!0);
@@ -125,10 +125,10 @@ const Te = C(() => {
125
125
  return /* @__PURE__ */ c(f.Fragment, { children: [
126
126
  /* @__PURE__ */ c(j, { onClick: _, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
127
127
  /* @__PURE__ */ e(x, { variant: "body2", children: t.verify_phone }),
128
- /* @__PURE__ */ e(A, {})
128
+ /* @__PURE__ */ e(S, {})
129
129
  ] }),
130
130
  /* @__PURE__ */ e(
131
- B,
131
+ N,
132
132
  {
133
133
  copy: { title: "" },
134
134
  isOpen: a,
@@ -194,7 +194,7 @@ const Te = C(() => {
194
194
  institutionGuid: t.account?.institution_guid
195
195
  }
196
196
  ) : void 0,
197
- endIcon: /* @__PURE__ */ e(A, {}),
197
+ endIcon: /* @__PURE__ */ e(S, {}),
198
198
  isChecked: t.is_enabled,
199
199
  isDisabled: !t.is_enabled,
200
200
  isPrimaryTextBold: !0,
@@ -208,7 +208,7 @@ const Te = C(() => {
208
208
  }
209
209
  ),
210
210
  /* @__PURE__ */ e(
211
- B,
211
+ N,
212
212
  {
213
213
  copy: {
214
214
  title: a ? l.day_of_the_month : i.notification_threshold_label,
@@ -257,7 +257,7 @@ const Te = C(() => {
257
257
  }
258
258
  ), we = C(
259
259
  ({ onUpdateProfile: n, profile: t }) => {
260
- const { settings: s } = k(), { user: l } = S(), { clientCommunicationProfile: i, userCommunicationsProfile: r } = T(), { isMobile: a } = fe(), o = t.notification_type > 2, {
260
+ const { settings: s } = k(), { user: l } = A(), { clientCommunicationProfile: i, userCommunicationsProfile: r } = T(), { isMobile: a } = fe(), o = t.notification_type > 2, {
261
261
  opted_out_of_email_notifications: u,
262
262
  opted_out_of_push_notifications: d,
263
263
  opted_out_of_sms_notifications: p
@@ -267,7 +267,7 @@ const Te = C(() => {
267
267
  sms_notifications_enabled: m
268
268
  } = i;
269
269
  return /* @__PURE__ */ c(h, { children: [
270
- (_ || m || y) && /* @__PURE__ */ c(N, { children: [
270
+ (_ || m || y) && /* @__PURE__ */ c(B, { children: [
271
271
  /* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.delivery_method_title }),
272
272
  /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
273
273
  _ && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
@@ -337,7 +337,7 @@ const Te = C(() => {
337
337
  n.filter((o) => o.children && o.children.length > 0).map((o) => /* @__PURE__ */ e(
338
338
  R,
339
339
  {
340
- endIcon: /* @__PURE__ */ e(A, {}),
340
+ endIcon: /* @__PURE__ */ e(S, {}),
341
341
  isChecked: o.is_enabled,
342
342
  isDisabled: !o.is_enabled,
343
343
  onClick: () => l(o.guid),
@@ -376,7 +376,7 @@ const Te = C(() => {
376
376
  opted_out_of_push_notifications: o,
377
377
  opted_out_of_sms_notifications: u
378
378
  }
379
- } = T(), { user: d } = S(), [p, _] = f.useState(!1), y = async () => {
379
+ } = T(), { user: d } = A(), [p, _] = f.useState(!1), y = async () => {
380
380
  await m({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && _(!1);
381
381
  }, m = async (P) => {
382
382
  await r(P);
@@ -448,12 +448,12 @@ const Te = C(() => {
448
448
  }), $ = C(() => {
449
449
  const { budgetProfiles: n } = T();
450
450
  return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(X, { profile: t }, t.guid)) });
451
- }), Ae = C(() => {
451
+ }), Se = C(() => {
452
452
  const { onEvent: n } = me(), { settings: t } = k(), {
453
453
  clientCommunicationProfile: s,
454
454
  updateUserCommunicationProfile: l,
455
455
  userCommunicationsProfile: i
456
- } = T(), { user: r } = S(), a = async (o, u) => {
456
+ } = T(), { user: r } = A(), a = async (o, u) => {
457
457
  const d = { ...i, [o]: u };
458
458
  if (n) {
459
459
  const _ = o.split("_")[3];
@@ -463,7 +463,7 @@ const Te = C(() => {
463
463
  };
464
464
  return /* @__PURE__ */ c(h, { children: [
465
465
  /* @__PURE__ */ e(F, { sx: { mt: 24 }, children: t.delivery_method_title }),
466
- s.email_notifications_enabled && /* @__PURE__ */ c(N, { children: [
466
+ s.email_notifications_enabled && /* @__PURE__ */ c(B, { children: [
467
467
  /* @__PURE__ */ e(
468
468
  D,
469
469
  {
@@ -480,7 +480,7 @@ const Te = C(() => {
480
480
  ),
481
481
  (s.sms_notifications_enabled || s.push_notifications_enabled) && /* @__PURE__ */ e(v, {})
482
482
  ] }),
483
- s.sms_notifications_enabled && /* @__PURE__ */ c(N, { children: [
483
+ s.sms_notifications_enabled && /* @__PURE__ */ c(B, { children: [
484
484
  /* @__PURE__ */ e(
485
485
  D,
486
486
  {
@@ -514,8 +514,8 @@ const Te = C(() => {
514
514
  }), H = C(() => {
515
515
  const { insightsProfiles: n } = T();
516
516
  return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(X, { profile: t }, t.guid)) });
517
- }), Se = () => {
518
- const { config: n } = q(), [t, { width: s }] = be(), { common: l, settings: i } = k(), { updateUser: r } = T(), { user: a } = S(), [o, u] = f.useState(!1), [d, p] = f.useState({
517
+ }), Ae = () => {
518
+ const { config: n } = q(), [t, { width: s }] = be(), { common: l, settings: i } = k(), { updateUser: r } = T(), { user: a } = A(), [o, u] = f.useState(!1), [d, p] = f.useState({
519
519
  email: a.email,
520
520
  phone: a.phone
521
521
  }), _ = d.email && !a.email_is_verified && !o, y = d.phone && !a.phone_is_verified && !o, m = (P) => {
@@ -596,7 +596,7 @@ const Te = C(() => {
596
596
  )
597
597
  ] })
598
598
  ] });
599
- }, Ie = C(Se), ut = C(
599
+ }, Ie = C(Ae), ut = C(
600
600
  ({
601
601
  notificationTypes: n = [b.Accounts, b.Budgets],
602
602
  showPersonalDetails: t = !1,
@@ -630,8 +630,8 @@ const Te = C(() => {
630
630
  const Y = l.display_email_edit_field_in_settings || l.display_sms_edit_field_in_settings, Z = t && u.can_edit_contact_info && Y;
631
631
  return /* @__PURE__ */ c(h, { sx: { pt: G ? 0 : 24 }, children: [
632
632
  /* @__PURE__ */ c(h, { sx: { px: 24 }, children: [
633
- G && /* @__PURE__ */ c(N, { children: [
634
- /* @__PURE__ */ e(Ae, {}),
633
+ G && /* @__PURE__ */ c(B, { children: [
634
+ /* @__PURE__ */ e(Se, {}),
635
635
  /* @__PURE__ */ e(v, { sx: { my: 24 } })
636
636
  ] }),
637
637
  /* @__PURE__ */ e(F, { sx: { mb: 4 }, children: i.notification_types_title })
@@ -639,15 +639,15 @@ const Te = C(() => {
639
639
  /* @__PURE__ */ c(E, { children: [
640
640
  n.includes(b.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => g(b.Accounts), children: [
641
641
  /* @__PURE__ */ e(L, { primary: i.accounts_title, secondary: i.accounts_subtitle }),
642
- /* @__PURE__ */ e(A, {})
642
+ /* @__PURE__ */ e(S, {})
643
643
  ] }) }),
644
644
  n.includes(b.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => g(b.Budgets), children: [
645
645
  /* @__PURE__ */ e(L, { primary: i.budgets_title, secondary: i.budgets_subtitle }),
646
- /* @__PURE__ */ e(A, {})
646
+ /* @__PURE__ */ e(S, {})
647
647
  ] }) }),
648
648
  n.includes(b.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => g(b.Insights), children: [
649
649
  /* @__PURE__ */ e(L, { primary: i.insights_title, secondary: i.insights_subtitle }),
650
- /* @__PURE__ */ e(A, {})
650
+ /* @__PURE__ */ e(S, {})
651
651
  ] }) })
652
652
  ] }),
653
653
  Z && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(Ie, {}) }),
@@ -675,4 +675,4 @@ export {
675
675
  Te as V,
676
676
  De as a
677
677
  };
678
- //# sourceMappingURL=NotificationSettings-CW7okUrk.mjs.map
678
+ //# sourceMappingURL=NotificationSettings-DltXMrnb.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationSettings-CW7okUrk.mjs","sources":["../src/settings/components/profile/actions/VerifyEmailAction.tsx","../src/settings/components/profile/actions/VerifyTokenAction.tsx","../src/settings/components/profile/actions/VerifyPhoneAction.tsx","../src/settings/components/notifications/AccountProfileListItem.tsx","../src/settings/components/notifications/AccountNotificationProfile.tsx","../src/settings/components/notifications/AccountNotificationProfiles.tsx","../src/settings/components/notifications/NotificationProfile.tsx","../src/settings/components/notifications/BudgetNotificationProfiles.tsx","../src/settings/components/notifications/DeliveryMethods.tsx","../src/settings/components/notifications/InsightsNotificationProfiles.tsx","../src/settings/components/notifications/PersonalDetails.tsx","../src/settings/components/notifications/NotificationSettings.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { Dialog, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../../common'\n\nconst VerifyEmailAction = observer(() => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { sendEmailVerification } = useSettingsStore()\n const { user } = useUserStore()\n const theme = useTheme()\n\n const [isOpen, setIsOpen] = React.useState(false)\n\n const handleClose = (): void => {\n setIsOpen(false)\n }\n\n const handleOpen = (): void => {\n setIsOpen(true)\n }\n\n return (\n <React.Fragment>\n <Button onClick={handleOpen} sx={{ height: 'auto', p: 4, width: 'fit-content' }}>\n <Text variant=\"body2\">{settingsCopy.verify_email}</Text>\n <ChevronRight />\n </Button>\n <Dialog\n copy={{ title: '' }}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={sendEmailVerification}\n onSecondaryAction={handleClose}\n primaryText={settingsCopy.send_verification}\n secondaryText={commonCopy.back}\n sx={{\n '& .MuiDialogContent-root': { pt: 0, width: 400 },\n\n '& .MuiToolbar-root:last-child': {\n gap: 16,\n padding: '32px 60px 48px',\n justifyContent: 'center',\n },\n }}\n >\n <Stack spacing={16} sx={{ px: 40, textAlign: 'center', width: '100%' }}>\n <Text bold={true} truncate={false} variant=\"body1\">\n {settingsCopy.confirm_your_email}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.confirm_email}\n </Text>\n <Text\n sx={{\n border: `1px solid ${theme.palette.neutral.light}`,\n borderRadius: '4px',\n p: '16px 32px',\n }}\n variant=\"h3\"\n >\n {user.email}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.verification_notice_email}\n </Text>\n </Stack>\n </Dialog>\n </React.Fragment>\n )\n})\n\nexport default VerifyEmailAction\n","import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\n\nimport { Dialog, useGlobalCopyStore } from '../../../../common'\n\ninterface ActionProps {\n handleClose: () => void\n handleVerify: (token: string) => void\n isOpen: boolean\n}\n\nconst VerifyTokenAction: React.FC<ActionProps> = observer(\n ({ handleClose, handleVerify, isOpen }) => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const [token, setToken] = React.useState('')\n\n return (\n <Dialog\n copy={{ title: settingsCopy.enter_verification_code }}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={() => handleVerify(token)}\n onSecondaryAction={handleClose}\n primaryText={settingsCopy.verify}\n secondaryText={commonCopy.cancel_button}\n sx={{\n '& .MuiDialogContent-root': { pt: 0, width: 400 },\n '& .MuiToolbar-root:last-child': {\n gap: 8,\n padding: 24,\n justifyContent: 'flex-end',\n },\n }}\n >\n <Stack>\n <TextField onChange={(e) => setToken(e.target.value)} sx={{ width: 352 }} value={token} />\n </Stack>\n </Dialog>\n )\n },\n)\n\nexport default VerifyTokenAction\n","import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { ChevronRight } from '@mxenabled/mx-icons'\nimport { Dialog, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../../common'\nimport VerifyTokenAction from './VerifyTokenAction'\n\nconst VerifyPhoneAction = observer(() => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { sendPhoneVerification, verifyPhoneToken } = useSettingsStore()\n const { user } = useUserStore()\n const theme = useTheme()\n\n const [isOpen, setIsOpen] = React.useState(false)\n const [showVerifyToken, setShowVerifyToken] = React.useState(false)\n\n const handleClose = (): void => {\n setIsOpen(false)\n }\n\n const handleOpen = (): void => {\n setIsOpen(true)\n }\n\n const handlePhoneVerify = () => {\n sendPhoneVerification().finally(() => {\n setShowVerifyToken(true)\n })\n }\n\n const handleTokenVerify = (token: string) => {\n verifyPhoneToken(token).finally(() => {\n setShowVerifyToken(false)\n })\n }\n\n return (\n <React.Fragment>\n <Button onClick={handleOpen} sx={{ height: 'auto', p: 4, width: 'fit-content' }}>\n <Text variant=\"body2\">{settingsCopy.verify_phone}</Text>\n <ChevronRight />\n </Button>\n <Dialog\n copy={{ title: '' }}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={handlePhoneVerify}\n onSecondaryAction={handleClose}\n primaryText={settingsCopy.send_verification}\n secondaryText={commonCopy.back}\n sx={{\n '& .MuiDialogContent-root': { pt: 0, width: 400 },\n\n '& .MuiToolbar-root:last-child': {\n gap: 16,\n padding: '32px 60px 48px',\n justifyContent: 'center',\n },\n }}\n >\n <Stack spacing={16} sx={{ px: 40, textAlign: 'center', width: '100%' }}>\n <Text bold={true} truncate={false} variant=\"body1\">\n {settingsCopy.confirm_your_phone}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.confirm_phone}\n </Text>\n <Text\n sx={{\n border: `1px solid ${theme.palette.neutral.light}`,\n borderRadius: '4px',\n p: '16px 32px',\n }}\n variant=\"h3\"\n >\n {user.phone}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.verification_notice_phone}\n </Text>\n </Stack>\n </Dialog>\n <VerifyTokenAction\n handleClose={() => setShowVerifyToken(false)}\n handleVerify={handleTokenVerify}\n isOpen={showVerifyToken}\n />\n </React.Fragment>\n )\n})\n\nexport default VerifyPhoneAction\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\n\nimport Stack from '@mui/material/Stack'\nimport { DateCalendar } from '@mui/x-date-pickers/DateCalendar'\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'\n\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { InstitutionLogo } from '@mxenabled/mxui'\n\nimport {\n CurrencyInput,\n Dialog,\n ToggleButtonListItem,\n useAccountStore,\n useGlobalCopyStore,\n} from '../../../common'\nimport { AccountNotificationTypes, DetailedNotificationProfile } from '../../../core'\nimport { formatCurrency, formatOrdinal } from '../../../core/utils/NumberFormatting'\nimport { buildDynamicCopy } from '../../../core/utils/Localization'\n\ninterface AccountProfileListItemProps {\n onProfileUpdated: (profile: DetailedNotificationProfile) => void\n profile: DetailedNotificationProfile\n}\n\nexport const AccountProfileListItem = observer(\n ({ onProfileUpdated, profile }: AccountProfileListItemProps) => {\n const { common: commonCopy, recurring: recurringCopy, settings: copy } = useGlobalCopyStore()\n const { updateAccount } = useAccountStore()\n\n const isPaymentReminder =\n profile.notification_type === AccountNotificationTypes.DebtPaymentReminder\n\n const [isOpen, setIsOpen] = React.useState(false)\n const [amount, setAmount] = React.useState<number>(profile.threshold || 0)\n const [paymentDay, setPaymentDay] = React.useState<number>(\n profile.account?.day_payment_is_due || 0,\n )\n\n const accountName = profile.account?.name || profile.account?.feed_name || ''\n const accountPaymentDate = profile.account?.day_payment_is_due\n ? (buildDynamicCopy(\n copy.notification_debt_payment_date,\n formatOrdinal(profile.account?.day_payment_is_due),\n ) as string)\n : copy.notification_debt_payment_zero_state\n\n const secondaryText = isPaymentReminder\n ? accountPaymentDate\n : formatCurrency(profile.threshold ?? 0, '0,0')\n\n const handleUpdateProfile = async () => {\n if (isPaymentReminder && profile.account) {\n await updateAccount({ ...profile.account, day_payment_is_due: paymentDay })\n } else {\n onProfileUpdated({ ...profile, threshold: amount })\n }\n }\n\n return (\n <Stack>\n <ToggleButtonListItem\n avatar={\n profile.account?.institution_guid ? (\n <InstitutionLogo\n alt={profile.label}\n institutionGuid={profile.account?.institution_guid}\n />\n ) : undefined\n }\n endIcon={<ChevronRight />}\n isChecked={profile.is_enabled}\n isDisabled={!profile.is_enabled}\n isPrimaryTextBold={true}\n onClick={() => setIsOpen(true)}\n onToggle={() =>\n onProfileUpdated({\n ...profile,\n is_enabled: !profile.is_enabled,\n })\n }\n primaryText={accountName}\n secondaryText={!profile.is_enabled ? copy.notification_disabled : secondaryText}\n />\n\n <Dialog\n copy={{\n title: isPaymentReminder\n ? recurringCopy.day_of_the_month\n : copy.notification_threshold_label,\n close_aria: commonCopy.close_aria,\n }}\n disablePrimaryButton={isPaymentReminder && paymentDay === 0}\n isOpen={isOpen}\n onClose={() => setIsOpen(false)}\n onPrimaryAction={handleUpdateProfile}\n primaryText={commonCopy.save_button}\n >\n {isPaymentReminder ? (\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DateCalendar\n maxDate={endOfMonth(new Date())}\n minDate={startOfMonth(new Date())}\n onChange={(date: Date) => {\n setPaymentDay(date.getDate())\n }}\n slots={{\n // Hides the arrows\n leftArrowIcon: () => null,\n rightArrowIcon: () => null,\n }}\n sx={{\n // TODO: Needs to be updated in MXUI\n '& .MuiPickersDay-today': {\n color: 'primary.main',\n },\n }}\n views={['day']}\n />\n </LocalizationProvider>\n ) : (\n <CurrencyInput\n amount={amount}\n autoFocus={true}\n fullWidth={true}\n minAmount={0}\n setAmount={(value) => setAmount(Number(value) || 0)}\n sx={{ '.MuiTypography-body1': { p: 0 } }}\n />\n )}\n </Dialog>\n </Stack>\n )\n },\n)\n","import { observer } from 'mobx-react-lite'\n\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport {\n ToggleListItem,\n useGlobalCopyStore,\n useScreenSize,\n useSettingsStore,\n useUserStore,\n} from '../../../common'\nimport { DetailedNotificationProfile } from '../../../core'\n\nimport { AccountProfileListItem } from './AccountProfileListItem'\n\ninterface AccountNotificationProfileProps {\n onUpdateProfile: (profile: DetailedNotificationProfile) => void\n profile: DetailedNotificationProfile\n}\n\nexport const AccountNotificationProfile = observer(\n ({ onUpdateProfile, profile }: AccountNotificationProfileProps) => {\n const { settings: copy } = useGlobalCopyStore()\n const { user } = useUserStore()\n const { clientCommunicationProfile, userCommunicationsProfile } = useSettingsStore()\n const { isMobile } = useScreenSize()\n\n const isAccountProfile = profile.notification_type > 2\n const {\n opted_out_of_email_notifications: emailDisabled,\n opted_out_of_push_notifications: pushDisabled,\n opted_out_of_sms_notifications: smsDisabled,\n } = userCommunicationsProfile\n\n const {\n email_notifications_enabled: showEmail,\n push_notifications_enabled: showPush,\n sms_notifications_enabled: showSms,\n } = clientCommunicationProfile\n\n return (\n <Stack>\n {(showEmail || showSms || showPush) && (\n <>\n <Text bold={true} sx={{ mb: 4, ml: 24, mt: 12 }} variant=\"caption\">\n {copy.delivery_method_title}\n </Text>\n <List sx={{ bgcolor: 'background.paper' }}>\n {showEmail && (\n <Stack sx={{ pl: 24 }}>\n <ToggleListItem\n isChecked={!emailDisabled && profile.email_channel && !!user.email}\n isDisabled={emailDisabled || !user.email}\n onToggle={() =>\n onUpdateProfile({ ...profile, email_channel: !profile.email_channel })\n }\n primaryText={copy.delivery_method_email_label}\n secondaryText={\n emailDisabled || !profile.email_channel || !user.email\n ? copy.notification_disabled\n : copy.notification_enabled\n }\n useExtraPadding={false}\n />\n </Stack>\n )}\n\n {showEmail && (showSms || showPush) && <Divider sx={{ ml: isMobile ? 0 : 24 }} />}\n\n {showSms && (\n <Stack sx={{ pl: 24 }}>\n <ToggleListItem\n isChecked={!smsDisabled && profile.sms_channel && !!user.phone}\n isDisabled={smsDisabled || !user.phone}\n onToggle={() =>\n onUpdateProfile({ ...profile, sms_channel: !profile.sms_channel })\n }\n primaryText={`${copy.delivery_method_sms_label}`}\n secondaryText={\n smsDisabled || !profile.sms_channel || !user.phone\n ? copy.notification_disabled\n : copy.notification_enabled\n }\n useExtraPadding={false}\n />\n </Stack>\n )}\n\n {showSms && showPush && <Divider sx={{ ml: isMobile ? 0 : 24 }} />}\n\n {showPush && (\n <Stack sx={{ pl: 24 }}>\n <ToggleListItem\n isChecked={!pushDisabled && profile.push_channel}\n isDisabled={pushDisabled}\n onToggle={() =>\n onUpdateProfile({ ...profile, push_channel: !profile.push_channel })\n }\n primaryText={copy.delivery_method_push_label}\n secondaryText={copy.delivery_method_push_subtitle}\n useExtraPadding={false}\n />\n </Stack>\n )}\n <Divider />\n </List>\n </>\n )}\n\n {isAccountProfile && Boolean(profile.children?.length) && (\n <Stack>\n <Text bold={true} sx={{ mb: 4, ml: 24, mt: 12 }} variant=\"caption\">\n {copy.accounts_threshold_title}\n </Text>\n\n <List sx={{ bgcolor: 'background.paper' }}>\n {profile.children?.map((child) => (\n <AccountProfileListItem\n key={child.guid}\n onProfileUpdated={onUpdateProfile}\n profile={child}\n />\n ))}\n </List>\n </Stack>\n )}\n </Stack>\n )\n },\n)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { Drawer, ToggleButtonListItem, useSettingsStore } from '../../../common'\nimport { DetailedNotificationProfile } from '../../../core'\n\nimport { AccountNotificationProfile } from './AccountNotificationProfile'\n\nexport const AccountNotificationProfiles = observer(() => {\n const { accountProfiles, updateNotificationProfile } = useSettingsStore()\n\n const [selectedProfileGuid, setSelectedProfileGuid] = React.useState('')\n\n const selectedProfile = React.useMemo(\n () => accountProfiles.find((profile) => profile.guid === selectedProfileGuid),\n [accountProfiles, selectedProfileGuid],\n )\n\n const handleProfileToggle = async (profile: DetailedNotificationProfile) => {\n await updateNotificationProfile({\n ...profile,\n is_enabled: !profile.is_enabled,\n })\n }\n\n const handleProfileUpdate = async (profile: DetailedNotificationProfile) => {\n await updateNotificationProfile(profile)\n }\n\n return (\n <Stack sx={{ backgroundColor: 'background.paper' }}>\n {accountProfiles\n // Don't show notification profiles that have no associated accounts (children)\n .filter((profile) => profile.children && profile.children.length > 0)\n .map((profile) => (\n <ToggleButtonListItem\n endIcon={<ChevronRight />}\n isChecked={profile.is_enabled}\n isDisabled={!profile.is_enabled}\n key={profile.guid}\n onClick={() => setSelectedProfileGuid(profile.guid)}\n onToggle={() => handleProfileToggle(profile)}\n primaryText={profile.label}\n secondaryText={profile.is_enabled ? profile.deliveryMethodsLabel : undefined}\n />\n ))}\n <Drawer\n isOpen={Boolean(selectedProfile)}\n onClose={() => setSelectedProfileGuid('')}\n title={selectedProfile ? selectedProfile.label : ''}\n >\n {selectedProfile && (\n <AccountNotificationProfile\n onUpdateProfile={handleProfileUpdate}\n profile={selectedProfile}\n />\n )}\n </Drawer>\n </Stack>\n )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Collapse from '@mui/material/Collapse'\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\n\nimport { ExpandMore } from '@mxenabled/mx-icons'\n\nimport {\n ToggleButtonListItem,\n ToggleListItem,\n useGlobalCopyStore,\n useSettingsStore,\n useUserStore,\n} from '../../../common'\nimport { type DetailedNotificationProfile } from '../../../core'\n\ninterface BudgetNotificationProfileProps {\n profile: DetailedNotificationProfile\n}\n\nexport const NotificationProfile = observer(({ profile }: BudgetNotificationProfileProps) => {\n const { settings: copy } = useGlobalCopyStore()\n const {\n clientCommunicationProfile: {\n email_notifications_enabled: showEmail,\n push_notifications_enabled: showPush,\n sms_notifications_enabled: showSms,\n },\n updateNotificationProfile,\n userCommunicationsProfile: {\n opted_out_of_email_notifications: emailDisabled,\n opted_out_of_push_notifications: pushDisabled,\n opted_out_of_sms_notifications: smsDisabled,\n },\n } = useSettingsStore()\n\n const { user: userDetails } = useUserStore()\n\n const [isExpanded, setIsExpanded] = React.useState(false)\n\n const handleProfileToggle = async () => {\n await handleUpdateProfile({ ...profile, is_enabled: !profile.is_enabled })\n\n if (profile.is_enabled) {\n setIsExpanded(false)\n }\n }\n\n const handleUpdateProfile = async (updatedProfile: DetailedNotificationProfile) => {\n await updateNotificationProfile(updatedProfile)\n }\n\n const hasDeliveryMethods = showEmail || showSms || showPush\n\n return (\n <List key={profile.guid} sx={{ bgcolor: 'background.paper' }}>\n <ToggleButtonListItem\n endIcon={\n hasDeliveryMethods ? (\n <ExpandMore\n sx={{\n transition: 'transform 0.3s ease-in-out',\n transform: isExpanded ? 'rotate(180deg)' : 'rotate(0deg)',\n }}\n />\n ) : undefined\n }\n isChecked={profile.is_enabled}\n isDisabled={!profile.is_enabled}\n key={profile.guid}\n onClick={() => setIsExpanded(!isExpanded)}\n onToggle={() => handleProfileToggle()}\n primaryText={profile.label}\n secondaryText={profile.is_enabled ? profile.deliveryMethodsLabel : undefined}\n />\n {hasDeliveryMethods && (\n <Collapse in={isExpanded}>\n <List sx={{ bgcolor: 'background.paper' }}>\n {showEmail && (\n <ToggleListItem\n isChecked={!emailDisabled && profile.email_channel && !!userDetails.email}\n isDisabled={emailDisabled || !userDetails.email}\n onToggle={() =>\n handleUpdateProfile({\n ...profile,\n email_channel: !profile.email_channel,\n })\n }\n primaryText={copy.delivery_method_email_label}\n />\n )}\n\n {showEmail && (showSms || showPush) && <Divider sx={{ ml: 48 }} />}\n\n {showSms && (\n <ToggleListItem\n isChecked={!smsDisabled && profile.sms_channel && !!userDetails.phone}\n isDisabled={smsDisabled || !userDetails.phone}\n onToggle={() =>\n handleUpdateProfile({\n ...profile,\n sms_channel: !profile.sms_channel,\n })\n }\n primaryText={copy.delivery_method_sms_label}\n />\n )}\n\n {showSms && showPush && <Divider sx={{ ml: 48 }} />}\n\n {showPush && (\n <ToggleListItem\n isChecked={!pushDisabled && profile.push_channel}\n isDisabled={pushDisabled}\n onToggle={() =>\n handleUpdateProfile({\n ...profile,\n push_channel: !profile.push_channel,\n })\n }\n primaryText={copy.delivery_method_push_label}\n />\n )}\n </List>\n </Collapse>\n )}\n <Divider />\n </List>\n )\n})\n","import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { NotificationProfile } from './NotificationProfile'\n\nimport { useSettingsStore } from '../../../common'\n\nexport const BudgetNotificationProfiles = observer(() => {\n const { budgetProfiles } = useSettingsStore()\n\n return (\n <Stack>\n {budgetProfiles.map((profile) => (\n <NotificationProfile key={profile.guid} profile={profile} />\n ))}\n </Stack>\n )\n})\n","import { observer } from 'mobx-react-lite'\n\nimport Card from '@mui/material/Card'\nimport CardContent from '@mui/material/CardContent'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Star } from '@mxenabled/mx-icons'\n\nimport { H3, Text } from '@mxenabled/mxui'\n\nimport {\n ToggleListItem,\n useEvent,\n useGlobalCopyStore,\n useSettingsStore,\n useUserStore,\n} from '../../../common'\nimport { type UserCommunicationProfile } from '../../../core'\n\nexport const DeliveryMethods = observer(() => {\n const { onEvent } = useEvent()\n const { settings: copy } = useGlobalCopyStore()\n const {\n clientCommunicationProfile: ccp,\n updateUserCommunicationProfile,\n userCommunicationsProfile: ucp,\n } = useSettingsStore()\n const { user } = useUserStore()\n\n const onProfileChange = async <K extends keyof UserCommunicationProfile>(\n key: K,\n value: UserCommunicationProfile[K],\n ) => {\n const updatedProfile = { ...ucp, [key]: value }\n\n if (onEvent) {\n const keyParts = key.split('_')\n const notificationType = keyParts[3] // e.g., 'email', 'sms', 'push' 'all'\n if (value === false) {\n onEvent('opt_in_notification_method', { notificationType })\n } else {\n onEvent('opt_out_notification_method', { notificationType })\n }\n }\n\n await updateUserCommunicationProfile(updatedProfile)\n }\n\n return (\n <Stack>\n <H3 sx={{ mt: 24 }}>{copy.delivery_method_title}</H3>\n\n {ccp.email_notifications_enabled && (\n <>\n <ToggleListItem\n isChecked={!!user.email && !ucp.opted_out_of_email_notifications}\n isDisabled={!user.email}\n onToggle={() =>\n onProfileChange(\n 'opted_out_of_email_notifications',\n !ucp.opted_out_of_email_notifications,\n )\n }\n primaryText={copy.delivery_method_email_title}\n secondaryText={\n !!user.email && !ucp.opted_out_of_email_notifications\n ? copy.notification_enabled\n : copy.notification_disabled\n }\n useExtraPadding={false}\n />\n\n {(ccp.sms_notifications_enabled || ccp.push_notifications_enabled) && <Divider />}\n </>\n )}\n\n {ccp.sms_notifications_enabled && (\n <>\n <ToggleListItem\n isChecked={!!user.phone && !ucp.opted_out_of_sms_notifications}\n isDisabled={!user.phone}\n onToggle={() =>\n onProfileChange('opted_out_of_sms_notifications', !ucp.opted_out_of_sms_notifications)\n }\n primaryText={copy.delivery_method_sms_title}\n secondaryText={\n !!user.phone && !ucp.opted_out_of_sms_notifications\n ? copy.notification_enabled\n : copy.notification_disabled\n }\n useExtraPadding={false}\n />\n\n {ccp.push_notifications_enabled && <Divider />}\n </>\n )}\n\n {ccp.push_notifications_enabled && (\n <ToggleListItem\n isChecked={!ucp.opted_out_of_push_notifications}\n isDisabled={true}\n onToggle={() => {}}\n primaryText={copy.delivery_method_push_title}\n secondaryText={copy.delivery_method_push_subtitle}\n useExtraPadding={false}\n />\n )}\n\n {ccp.sms_notifications_enabled && (\n <Card sx={{ backgroundColor: 'background.default', mt: 12 }} variant=\"outlined\">\n <CardContent>\n <Stack alignItems=\"flex-start\" direction=\"row\" gap={6}>\n <Star color=\"primary\" filled={true} />\n <Text variant=\"caption\">{copy.delivery_method_sms_note_1}</Text>\n </Stack>\n </CardContent>\n </Card>\n )}\n </Stack>\n )\n})\n","import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { useSettingsStore } from '../../../common'\n\nimport { NotificationProfile } from './NotificationProfile'\n\nexport const InsightsNotificationProfiles = observer(() => {\n const { insightsProfiles } = useSettingsStore()\n\n return (\n <Stack>\n {insightsProfiles.map((profile) => (\n <NotificationProfile key={profile.guid} profile={profile} />\n ))}\n </Stack>\n )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\n\nimport { H3 } from '@mxenabled/mxui'\n\nimport { useAppConfig, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../common'\nimport { type EditableUser } from '../../../core'\nimport { useDimensions } from '../../../common/hooks/useDimensions'\n\nimport VerifyEmailAction from '../profile/actions/VerifyEmailAction'\nimport VerifyPhoneAction from '../profile/actions/VerifyPhoneAction'\n\nconst PersonalDetails = () => {\n const { config } = useAppConfig()\n const [containerRef, { width }] = useDimensions()\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { updateUser } = useSettingsStore()\n const { user } = useUserStore()\n\n const [hasUnsavedChanges, setHasUnsavedChanges] = React.useState(false)\n const [modifiedUser, setModifiedUser] = React.useState<EditableUser>({\n email: user.email,\n phone: user.phone,\n })\n\n const showVerifyEmail = modifiedUser.email && !user.email_is_verified && !hasUnsavedChanges\n const showVerifyPhone = modifiedUser.phone && !user.phone_is_verified && !hasUnsavedChanges\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { name, value } = event.target\n const changedUser = { ...modifiedUser, [name]: value }\n\n setModifiedUser(changedUser)\n setHasUnsavedChanges(JSON.stringify({ ...user, ...changedUser }) !== JSON.stringify(user))\n }\n\n const handleSave = async () => {\n await updateUser({ ...user, ...modifiedUser })\n setHasUnsavedChanges(false)\n }\n\n return (\n <Stack ref={containerRef}>\n <Divider />\n <Stack sx={{ pt: 12 }}>\n <H3 sx={{ lineHeight: '20px', pb: 4, pt: 16 }}>{settingsCopy.personal_details}</H3>\n <Stack sx={{ flexDirection: width <= 768 ? 'column' : 'row', gap: 24, py: 16 }}>\n {config.display_email_edit_field_in_settings && (\n <Stack sx={{ flex: 1, pb: 14 }}>\n <TextField\n defaultValue={user.email}\n fullWidth={true}\n label={settingsCopy.email_address}\n name=\"email\"\n onChange={handleChange}\n />\n {showVerifyEmail && (\n <Box\n sx={{\n height: 20,\n '.MuiButton-root': {\n px: 0,\n ':hover': {\n bgcolor: 'transparent',\n },\n },\n }}\n >\n <VerifyEmailAction />\n </Box>\n )}\n </Stack>\n )}\n {config.display_sms_edit_field_in_settings && (\n <Stack sx={{ flex: 1, pb: 14 }}>\n <TextField\n defaultValue={user.phone}\n fullWidth={true}\n label={settingsCopy.mobile_number}\n name=\"phone\"\n onChange={handleChange}\n />\n {showVerifyPhone && (\n <Box\n sx={{\n height: 20,\n '.MuiButton-root': {\n px: 0,\n ':hover': {\n bgcolor: 'transparent',\n },\n },\n }}\n >\n <VerifyPhoneAction />\n </Box>\n )}\n </Stack>\n )}\n </Stack>\n <Button\n disabled={!hasUnsavedChanges}\n onClick={handleSave}\n sx={{ width: 84 }}\n variant=\"contained\"\n >\n {commonCopy.save_button}\n </Button>\n </Stack>\n </Stack>\n )\n}\n\nexport default observer(PersonalDetails)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\nimport ListItem from '@mui/material/ListItem'\nimport ListItemText from '@mui/material/ListItemText'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport Stack from '@mui/material/Stack'\n\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { H3 } from '@mxenabled/mxui'\n\nimport {\n Drawer,\n Loader,\n useAccountStore,\n useAppConfig,\n useGlobalCopyStore,\n useGlobalUiStore,\n useInsightsEnabled,\n useSettingsStore,\n useWidgetLoadTimer,\n} from '../../../common'\nimport { NotificationTypes } from '../../../core'\n\nimport { AccountNotificationProfiles } from './AccountNotificationProfiles'\nimport { BudgetNotificationProfiles } from './BudgetNotificationProfiles'\nimport { DeliveryMethods } from './DeliveryMethods'\nimport { InsightsNotificationProfiles } from './InsightsNotificationProfiles'\nimport PersonalDetails from './PersonalDetails'\n\nexport interface NotificationSettingsProps {\n notificationTypes?: NotificationTypes[]\n showPersonalDetails?: boolean\n view?: string | undefined\n}\n\nexport const NotificationSettings: React.FC<NotificationSettingsProps> = observer(\n ({\n notificationTypes = [NotificationTypes.Accounts, NotificationTypes.Budgets],\n showPersonalDetails = false,\n view,\n }) => {\n const { config } = useAppConfig()\n const { settings: copy } = useGlobalCopyStore()\n const { isInitialized } = useGlobalUiStore()\n const { isAccountDataLoaded, loadAccountData } = useAccountStore()\n const { clientCommunicationProfile: ccp, loadNotificationProfiles } = useSettingsStore()\n const isInsightsEnabled = useInsightsEnabled()\n\n const [isLoaded, setIsLoaded] = React.useState(false)\n const [profileTypeOpen, setProfileTypeOpen] = React.useState<NotificationTypes | undefined>(\n undefined,\n )\n\n if (notificationTypes.length > 0 && isInsightsEnabled)\n notificationTypes.push(NotificationTypes.Insights)\n\n useWidgetLoadTimer({\n widgetName: 'NotificationSettingsWidget',\n isLoaded: isLoaded,\n })\n\n React.useEffect(() => {\n if (!isAccountDataLoaded) {\n loadAccountData().finally()\n }\n }, [])\n\n React.useEffect(() => {\n if (isInitialized) {\n loadNotificationProfiles().finally(() => setIsLoaded(true))\n }\n }, [isInitialized])\n\n if (!isInitialized) {\n return <Loader />\n }\n\n let drawerTitle = copy.manage_account_notifications\n if (profileTypeOpen === NotificationTypes.Budgets) {\n drawerTitle = copy.manage_budget_notifications\n } else if (profileTypeOpen === NotificationTypes.Insights) {\n drawerTitle = copy.manage_insights_notifications\n }\n\n const {\n email_notifications_enabled: emailEnabled,\n sms_notifications_enabled: smsEnabled,\n push_notifications_enabled: pushEnabled,\n } = ccp\n\n const hasDeliveryMethods = emailEnabled || smsEnabled || pushEnabled\n\n if (view === 'accounts') {\n return <AccountNotificationProfiles />\n } else if (view === 'budgets') {\n return <BudgetNotificationProfiles />\n } else if (view === 'insights') {\n return <InsightsNotificationProfiles />\n }\n\n const canEditFields =\n config.display_email_edit_field_in_settings || config.display_sms_edit_field_in_settings\n const shouldShowPersonalDetails =\n showPersonalDetails && ccp.can_edit_contact_info && canEditFields\n\n return (\n <Stack sx={{ pt: hasDeliveryMethods ? 0 : 24 }}>\n <Stack sx={{ px: 24 }}>\n {hasDeliveryMethods && (\n <>\n <DeliveryMethods />\n <Divider sx={{ my: 24 }} />\n </>\n )}\n\n <H3 sx={{ mb: 4 }}>{copy.notification_types_title}</H3>\n </Stack>\n <List>\n {notificationTypes.includes(NotificationTypes.Accounts) && (\n <ListItem>\n <ListItemButton onClick={() => setProfileTypeOpen(NotificationTypes.Accounts)}>\n <ListItemText primary={copy.accounts_title} secondary={copy.accounts_subtitle} />\n <ChevronRight />\n </ListItemButton>\n </ListItem>\n )}\n {notificationTypes.includes(NotificationTypes.Budgets) && (\n <ListItem>\n <ListItemButton onClick={() => setProfileTypeOpen(NotificationTypes.Budgets)}>\n <ListItemText primary={copy.budgets_title} secondary={copy.budgets_subtitle} />\n <ChevronRight />\n </ListItemButton>\n </ListItem>\n )}\n {notificationTypes.includes(NotificationTypes.Insights) && (\n <ListItem>\n <ListItemButton onClick={() => setProfileTypeOpen(NotificationTypes.Insights)}>\n <ListItemText primary={copy.insights_title} secondary={copy.insights_subtitle} />\n <ChevronRight />\n </ListItemButton>\n </ListItem>\n )}\n </List>\n\n {shouldShowPersonalDetails && (\n <Stack sx={{ px: 24 }}>\n <PersonalDetails />\n </Stack>\n )}\n\n <Drawer\n isOpen={Boolean(profileTypeOpen)}\n onClose={() => setProfileTypeOpen(undefined)}\n title={drawerTitle}\n >\n <Stack>\n {profileTypeOpen === NotificationTypes.Accounts && <AccountNotificationProfiles />}\n {profileTypeOpen === NotificationTypes.Budgets && <BudgetNotificationProfiles />}\n {profileTypeOpen === NotificationTypes.Insights && <InsightsNotificationProfiles />}\n </Stack>\n </Drawer>\n </Stack>\n )\n },\n)\n"],"names":["VerifyEmailAction","observer","commonCopy","settingsCopy","useGlobalCopyStore","sendEmailVerification","useSettingsStore","user","useUserStore","theme","useTheme","isOpen","setIsOpen","React","handleClose","handleOpen","jsxs","Button","jsx","Text","ChevronRight","Dialog","Stack","VerifyTokenAction","handleVerify","token","setToken","TextField","e","VerifyPhoneAction","sendPhoneVerification","verifyPhoneToken","showVerifyToken","setShowVerifyToken","handlePhoneVerify","handleTokenVerify","AccountProfileListItem","onProfileUpdated","profile","recurringCopy","copy","updateAccount","useAccountStore","isPaymentReminder","AccountNotificationTypes","amount","setAmount","paymentDay","setPaymentDay","accountName","accountPaymentDate","buildDynamicCopy","formatOrdinal","secondaryText","formatCurrency","handleUpdateProfile","ToggleButtonListItem","InstitutionLogo","LocalizationProvider","AdapterDateFns","DateCalendar","endOfMonth","startOfMonth","date","CurrencyInput","value","AccountNotificationProfile","onUpdateProfile","clientCommunicationProfile","userCommunicationsProfile","isMobile","useScreenSize","isAccountProfile","emailDisabled","pushDisabled","smsDisabled","showEmail","showPush","showSms","Fragment","List","ToggleListItem","Divider","child","AccountNotificationProfiles","accountProfiles","updateNotificationProfile","selectedProfileGuid","setSelectedProfileGuid","selectedProfile","handleProfileToggle","handleProfileUpdate","Drawer","NotificationProfile","userDetails","isExpanded","setIsExpanded","updatedProfile","hasDeliveryMethods","ExpandMore","Collapse","BudgetNotificationProfiles","budgetProfiles","DeliveryMethods","onEvent","useEvent","ccp","updateUserCommunicationProfile","ucp","onProfileChange","key","notificationType","H3","Card","CardContent","Star","InsightsNotificationProfiles","insightsProfiles","PersonalDetails","config","useAppConfig","containerRef","width","useDimensions","updateUser","hasUnsavedChanges","setHasUnsavedChanges","modifiedUser","setModifiedUser","showVerifyEmail","showVerifyPhone","handleChange","event","name","changedUser","handleSave","Box","PersonalDetails$1","NotificationSettings","notificationTypes","NotificationTypes","showPersonalDetails","view","isInitialized","useGlobalUiStore","isAccountDataLoaded","loadAccountData","loadNotificationProfiles","isInsightsEnabled","useInsightsEnabled","isLoaded","setIsLoaded","profileTypeOpen","setProfileTypeOpen","useWidgetLoadTimer","Loader","drawerTitle","emailEnabled","smsEnabled","pushEnabled","canEditFields","shouldShowPersonalDetails","ListItem","ListItemButton","ListItemText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,KAAoBC,EAAS,MAAM;AACvC,QAAM,EAAE,QAAQC,GAAY,UAAUC,EAAA,IAAiBC,EAAA,GACjD,EAAE,uBAAAC,EAAA,IAA0BC,EAAA,GAC5B,EAAE,MAAAC,EAAA,IAASC,EAAA,GACXC,IAAQC,EAAA,GAER,CAACC,GAAQC,CAAS,IAAIC,EAAM,SAAS,EAAK,GAE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AAE,IAAI,GAAA,GACf,UAAA,gBAAAJ,EAACoG,IAAA,CAAA,CAAgB,EAAA,CACnB;AAAA,MAGF,gBAAApG;AAAA,QAAC0E;AAAA,QAAA;AAAA,UACC,QAAQ,EAAQ4D;AAAA,UAChB,SAAS,MAAMC,EAAmB,MAAS;AAAA,UAC3C,OAAOG;AAAA,UAEP,4BAACtI,GAAA,EACE,UAAA;AAAA,YAAAkI,MAAoBZ,EAAkB,YAAY,gBAAA1H,EAACkE,GAAA,CAAA,CAA4B;AAAA,YAC/EoE,MAAoBZ,EAAkB,WAAW,gBAAA1H,EAACmF,GAAA,CAAA,CAA2B;AAAA,YAC7EmD,MAAoBZ,EAAkB,YAAY,gBAAA1H,EAACkG,GAAA,CAAA,CAA6B;AAAA,UAAA,EAAA,CACnF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,GACF;AAAA,EAEJ;AACF;"}
1
+ {"version":3,"file":"NotificationSettings-DltXMrnb.mjs","sources":["../src/settings/components/profile/actions/VerifyEmailAction.tsx","../src/settings/components/profile/actions/VerifyTokenAction.tsx","../src/settings/components/profile/actions/VerifyPhoneAction.tsx","../src/settings/components/notifications/AccountProfileListItem.tsx","../src/settings/components/notifications/AccountNotificationProfile.tsx","../src/settings/components/notifications/AccountNotificationProfiles.tsx","../src/settings/components/notifications/NotificationProfile.tsx","../src/settings/components/notifications/BudgetNotificationProfiles.tsx","../src/settings/components/notifications/DeliveryMethods.tsx","../src/settings/components/notifications/InsightsNotificationProfiles.tsx","../src/settings/components/notifications/PersonalDetails.tsx","../src/settings/components/notifications/NotificationSettings.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { Dialog, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../../common'\n\nconst VerifyEmailAction = observer(() => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { sendEmailVerification } = useSettingsStore()\n const { user } = useUserStore()\n const theme = useTheme()\n\n const [isOpen, setIsOpen] = React.useState(false)\n\n const handleClose = (): void => {\n setIsOpen(false)\n }\n\n const handleOpen = (): void => {\n setIsOpen(true)\n }\n\n return (\n <React.Fragment>\n <Button onClick={handleOpen} sx={{ height: 'auto', p: 4, width: 'fit-content' }}>\n <Text variant=\"body2\">{settingsCopy.verify_email}</Text>\n <ChevronRight />\n </Button>\n <Dialog\n copy={{ title: '' }}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={sendEmailVerification}\n onSecondaryAction={handleClose}\n primaryText={settingsCopy.send_verification}\n secondaryText={commonCopy.back}\n sx={{\n '& .MuiDialogContent-root': { pt: 0, width: 400 },\n\n '& .MuiToolbar-root:last-child': {\n gap: 16,\n padding: '32px 60px 48px',\n justifyContent: 'center',\n },\n }}\n >\n <Stack spacing={16} sx={{ px: 40, textAlign: 'center', width: '100%' }}>\n <Text bold={true} truncate={false} variant=\"body1\">\n {settingsCopy.confirm_your_email}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.confirm_email}\n </Text>\n <Text\n sx={{\n border: `1px solid ${theme.palette.neutral.light}`,\n borderRadius: '4px',\n p: '16px 32px',\n }}\n variant=\"h3\"\n >\n {user.email}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.verification_notice_email}\n </Text>\n </Stack>\n </Dialog>\n </React.Fragment>\n )\n})\n\nexport default VerifyEmailAction\n","import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\n\nimport { Dialog, useGlobalCopyStore } from '../../../../common'\n\ninterface ActionProps {\n handleClose: () => void\n handleVerify: (token: string) => void\n isOpen: boolean\n}\n\nconst VerifyTokenAction: React.FC<ActionProps> = observer(\n ({ handleClose, handleVerify, isOpen }) => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const [token, setToken] = React.useState('')\n\n return (\n <Dialog\n copy={{ title: settingsCopy.enter_verification_code }}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={() => handleVerify(token)}\n onSecondaryAction={handleClose}\n primaryText={settingsCopy.verify}\n secondaryText={commonCopy.cancel_button}\n sx={{\n '& .MuiDialogContent-root': { pt: 0, width: 400 },\n '& .MuiToolbar-root:last-child': {\n gap: 8,\n padding: 24,\n justifyContent: 'flex-end',\n },\n }}\n >\n <Stack>\n <TextField onChange={(e) => setToken(e.target.value)} sx={{ width: 352 }} value={token} />\n </Stack>\n </Dialog>\n )\n },\n)\n\nexport default VerifyTokenAction\n","import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { ChevronRight } from '@mxenabled/mx-icons'\nimport { Dialog, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../../common'\nimport VerifyTokenAction from './VerifyTokenAction'\n\nconst VerifyPhoneAction = observer(() => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { sendPhoneVerification, verifyPhoneToken } = useSettingsStore()\n const { user } = useUserStore()\n const theme = useTheme()\n\n const [isOpen, setIsOpen] = React.useState(false)\n const [showVerifyToken, setShowVerifyToken] = React.useState(false)\n\n const handleClose = (): void => {\n setIsOpen(false)\n }\n\n const handleOpen = (): void => {\n setIsOpen(true)\n }\n\n const handlePhoneVerify = () => {\n sendPhoneVerification().finally(() => {\n setShowVerifyToken(true)\n })\n }\n\n const handleTokenVerify = (token: string) => {\n verifyPhoneToken(token).finally(() => {\n setShowVerifyToken(false)\n })\n }\n\n return (\n <React.Fragment>\n <Button onClick={handleOpen} sx={{ height: 'auto', p: 4, width: 'fit-content' }}>\n <Text variant=\"body2\">{settingsCopy.verify_phone}</Text>\n <ChevronRight />\n </Button>\n <Dialog\n copy={{ title: '' }}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={handlePhoneVerify}\n onSecondaryAction={handleClose}\n primaryText={settingsCopy.send_verification}\n secondaryText={commonCopy.back}\n sx={{\n '& .MuiDialogContent-root': { pt: 0, width: 400 },\n\n '& .MuiToolbar-root:last-child': {\n gap: 16,\n padding: '32px 60px 48px',\n justifyContent: 'center',\n },\n }}\n >\n <Stack spacing={16} sx={{ px: 40, textAlign: 'center', width: '100%' }}>\n <Text bold={true} truncate={false} variant=\"body1\">\n {settingsCopy.confirm_your_phone}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.confirm_phone}\n </Text>\n <Text\n sx={{\n border: `1px solid ${theme.palette.neutral.light}`,\n borderRadius: '4px',\n p: '16px 32px',\n }}\n variant=\"h3\"\n >\n {user.phone}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.verification_notice_phone}\n </Text>\n </Stack>\n </Dialog>\n <VerifyTokenAction\n handleClose={() => setShowVerifyToken(false)}\n handleVerify={handleTokenVerify}\n isOpen={showVerifyToken}\n />\n </React.Fragment>\n )\n})\n\nexport default VerifyPhoneAction\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\n\nimport Stack from '@mui/material/Stack'\nimport { DateCalendar } from '@mui/x-date-pickers/DateCalendar'\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'\n\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { InstitutionLogo } from '@mxenabled/mxui'\n\nimport {\n CurrencyInput,\n Dialog,\n ToggleButtonListItem,\n useAccountStore,\n useGlobalCopyStore,\n} from '../../../common'\nimport { AccountNotificationTypes, DetailedNotificationProfile } from '../../../core'\nimport { formatCurrency, formatOrdinal } from '../../../core/utils/NumberFormatting'\nimport { buildDynamicCopy } from '../../../core/utils/Localization'\n\ninterface AccountProfileListItemProps {\n onProfileUpdated: (profile: DetailedNotificationProfile) => void\n profile: DetailedNotificationProfile\n}\n\nexport const AccountProfileListItem = observer(\n ({ onProfileUpdated, profile }: AccountProfileListItemProps) => {\n const { common: commonCopy, recurring: recurringCopy, settings: copy } = useGlobalCopyStore()\n const { updateAccount } = useAccountStore()\n\n const isPaymentReminder =\n profile.notification_type === AccountNotificationTypes.DebtPaymentReminder\n\n const [isOpen, setIsOpen] = React.useState(false)\n const [amount, setAmount] = React.useState<number>(profile.threshold || 0)\n const [paymentDay, setPaymentDay] = React.useState<number>(\n profile.account?.day_payment_is_due || 0,\n )\n\n const accountName = profile.account?.name || profile.account?.feed_name || ''\n const accountPaymentDate = profile.account?.day_payment_is_due\n ? (buildDynamicCopy(\n copy.notification_debt_payment_date,\n formatOrdinal(profile.account?.day_payment_is_due),\n ) as string)\n : copy.notification_debt_payment_zero_state\n\n const secondaryText = isPaymentReminder\n ? accountPaymentDate\n : formatCurrency(profile.threshold ?? 0, '0,0')\n\n const handleUpdateProfile = async () => {\n if (isPaymentReminder && profile.account) {\n await updateAccount({ ...profile.account, day_payment_is_due: paymentDay })\n } else {\n onProfileUpdated({ ...profile, threshold: amount })\n }\n }\n\n return (\n <Stack>\n <ToggleButtonListItem\n avatar={\n profile.account?.institution_guid ? (\n <InstitutionLogo\n alt={profile.label}\n institutionGuid={profile.account?.institution_guid}\n />\n ) : undefined\n }\n endIcon={<ChevronRight />}\n isChecked={profile.is_enabled}\n isDisabled={!profile.is_enabled}\n isPrimaryTextBold={true}\n onClick={() => setIsOpen(true)}\n onToggle={() =>\n onProfileUpdated({\n ...profile,\n is_enabled: !profile.is_enabled,\n })\n }\n primaryText={accountName}\n secondaryText={!profile.is_enabled ? copy.notification_disabled : secondaryText}\n />\n\n <Dialog\n copy={{\n title: isPaymentReminder\n ? recurringCopy.day_of_the_month\n : copy.notification_threshold_label,\n close_aria: commonCopy.close_aria,\n }}\n disablePrimaryButton={isPaymentReminder && paymentDay === 0}\n isOpen={isOpen}\n onClose={() => setIsOpen(false)}\n onPrimaryAction={handleUpdateProfile}\n primaryText={commonCopy.save_button}\n >\n {isPaymentReminder ? (\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DateCalendar\n maxDate={endOfMonth(new Date())}\n minDate={startOfMonth(new Date())}\n onChange={(date: Date) => {\n setPaymentDay(date.getDate())\n }}\n slots={{\n // Hides the arrows\n leftArrowIcon: () => null,\n rightArrowIcon: () => null,\n }}\n sx={{\n // TODO: Needs to be updated in MXUI\n '& .MuiPickersDay-today': {\n color: 'primary.main',\n },\n }}\n views={['day']}\n />\n </LocalizationProvider>\n ) : (\n <CurrencyInput\n amount={amount}\n autoFocus={true}\n fullWidth={true}\n minAmount={0}\n setAmount={(value) => setAmount(Number(value) || 0)}\n sx={{ '.MuiTypography-body1': { p: 0 } }}\n />\n )}\n </Dialog>\n </Stack>\n )\n },\n)\n","import { observer } from 'mobx-react-lite'\n\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport {\n ToggleListItem,\n useGlobalCopyStore,\n useScreenSize,\n useSettingsStore,\n useUserStore,\n} from '../../../common'\nimport { DetailedNotificationProfile } from '../../../core'\n\nimport { AccountProfileListItem } from './AccountProfileListItem'\n\ninterface AccountNotificationProfileProps {\n onUpdateProfile: (profile: DetailedNotificationProfile) => void\n profile: DetailedNotificationProfile\n}\n\nexport const AccountNotificationProfile = observer(\n ({ onUpdateProfile, profile }: AccountNotificationProfileProps) => {\n const { settings: copy } = useGlobalCopyStore()\n const { user } = useUserStore()\n const { clientCommunicationProfile, userCommunicationsProfile } = useSettingsStore()\n const { isMobile } = useScreenSize()\n\n const isAccountProfile = profile.notification_type > 2\n const {\n opted_out_of_email_notifications: emailDisabled,\n opted_out_of_push_notifications: pushDisabled,\n opted_out_of_sms_notifications: smsDisabled,\n } = userCommunicationsProfile\n\n const {\n email_notifications_enabled: showEmail,\n push_notifications_enabled: showPush,\n sms_notifications_enabled: showSms,\n } = clientCommunicationProfile\n\n return (\n <Stack>\n {(showEmail || showSms || showPush) && (\n <>\n <Text bold={true} sx={{ mb: 4, ml: 24, mt: 12 }} variant=\"caption\">\n {copy.delivery_method_title}\n </Text>\n <List sx={{ bgcolor: 'background.paper' }}>\n {showEmail && (\n <Stack sx={{ pl: 24 }}>\n <ToggleListItem\n isChecked={!emailDisabled && profile.email_channel && !!user.email}\n isDisabled={emailDisabled || !user.email}\n onToggle={() =>\n onUpdateProfile({ ...profile, email_channel: !profile.email_channel })\n }\n primaryText={copy.delivery_method_email_label}\n secondaryText={\n emailDisabled || !profile.email_channel || !user.email\n ? copy.notification_disabled\n : copy.notification_enabled\n }\n useExtraPadding={false}\n />\n </Stack>\n )}\n\n {showEmail && (showSms || showPush) && <Divider sx={{ ml: isMobile ? 0 : 24 }} />}\n\n {showSms && (\n <Stack sx={{ pl: 24 }}>\n <ToggleListItem\n isChecked={!smsDisabled && profile.sms_channel && !!user.phone}\n isDisabled={smsDisabled || !user.phone}\n onToggle={() =>\n onUpdateProfile({ ...profile, sms_channel: !profile.sms_channel })\n }\n primaryText={`${copy.delivery_method_sms_label}`}\n secondaryText={\n smsDisabled || !profile.sms_channel || !user.phone\n ? copy.notification_disabled\n : copy.notification_enabled\n }\n useExtraPadding={false}\n />\n </Stack>\n )}\n\n {showSms && showPush && <Divider sx={{ ml: isMobile ? 0 : 24 }} />}\n\n {showPush && (\n <Stack sx={{ pl: 24 }}>\n <ToggleListItem\n isChecked={!pushDisabled && profile.push_channel}\n isDisabled={pushDisabled}\n onToggle={() =>\n onUpdateProfile({ ...profile, push_channel: !profile.push_channel })\n }\n primaryText={copy.delivery_method_push_label}\n secondaryText={copy.delivery_method_push_subtitle}\n useExtraPadding={false}\n />\n </Stack>\n )}\n <Divider />\n </List>\n </>\n )}\n\n {isAccountProfile && Boolean(profile.children?.length) && (\n <Stack>\n <Text bold={true} sx={{ mb: 4, ml: 24, mt: 12 }} variant=\"caption\">\n {copy.accounts_threshold_title}\n </Text>\n\n <List sx={{ bgcolor: 'background.paper' }}>\n {profile.children?.map((child) => (\n <AccountProfileListItem\n key={child.guid}\n onProfileUpdated={onUpdateProfile}\n profile={child}\n />\n ))}\n </List>\n </Stack>\n )}\n </Stack>\n )\n },\n)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { Drawer, ToggleButtonListItem, useSettingsStore } from '../../../common'\nimport { DetailedNotificationProfile } from '../../../core'\n\nimport { AccountNotificationProfile } from './AccountNotificationProfile'\n\nexport const AccountNotificationProfiles = observer(() => {\n const { accountProfiles, updateNotificationProfile } = useSettingsStore()\n\n const [selectedProfileGuid, setSelectedProfileGuid] = React.useState('')\n\n const selectedProfile = React.useMemo(\n () => accountProfiles.find((profile) => profile.guid === selectedProfileGuid),\n [accountProfiles, selectedProfileGuid],\n )\n\n const handleProfileToggle = async (profile: DetailedNotificationProfile) => {\n await updateNotificationProfile({\n ...profile,\n is_enabled: !profile.is_enabled,\n })\n }\n\n const handleProfileUpdate = async (profile: DetailedNotificationProfile) => {\n await updateNotificationProfile(profile)\n }\n\n return (\n <Stack sx={{ backgroundColor: 'background.paper' }}>\n {accountProfiles\n // Don't show notification profiles that have no associated accounts (children)\n .filter((profile) => profile.children && profile.children.length > 0)\n .map((profile) => (\n <ToggleButtonListItem\n endIcon={<ChevronRight />}\n isChecked={profile.is_enabled}\n isDisabled={!profile.is_enabled}\n key={profile.guid}\n onClick={() => setSelectedProfileGuid(profile.guid)}\n onToggle={() => handleProfileToggle(profile)}\n primaryText={profile.label}\n secondaryText={profile.is_enabled ? profile.deliveryMethodsLabel : undefined}\n />\n ))}\n <Drawer\n isOpen={Boolean(selectedProfile)}\n onClose={() => setSelectedProfileGuid('')}\n title={selectedProfile ? selectedProfile.label : ''}\n >\n {selectedProfile && (\n <AccountNotificationProfile\n onUpdateProfile={handleProfileUpdate}\n profile={selectedProfile}\n />\n )}\n </Drawer>\n </Stack>\n )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Collapse from '@mui/material/Collapse'\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\n\nimport { ExpandMore } from '@mxenabled/mx-icons'\n\nimport {\n ToggleButtonListItem,\n ToggleListItem,\n useGlobalCopyStore,\n useSettingsStore,\n useUserStore,\n} from '../../../common'\nimport { type DetailedNotificationProfile } from '../../../core'\n\ninterface BudgetNotificationProfileProps {\n profile: DetailedNotificationProfile\n}\n\nexport const NotificationProfile = observer(({ profile }: BudgetNotificationProfileProps) => {\n const { settings: copy } = useGlobalCopyStore()\n const {\n clientCommunicationProfile: {\n email_notifications_enabled: showEmail,\n push_notifications_enabled: showPush,\n sms_notifications_enabled: showSms,\n },\n updateNotificationProfile,\n userCommunicationsProfile: {\n opted_out_of_email_notifications: emailDisabled,\n opted_out_of_push_notifications: pushDisabled,\n opted_out_of_sms_notifications: smsDisabled,\n },\n } = useSettingsStore()\n\n const { user: userDetails } = useUserStore()\n\n const [isExpanded, setIsExpanded] = React.useState(false)\n\n const handleProfileToggle = async () => {\n await handleUpdateProfile({ ...profile, is_enabled: !profile.is_enabled })\n\n if (profile.is_enabled) {\n setIsExpanded(false)\n }\n }\n\n const handleUpdateProfile = async (updatedProfile: DetailedNotificationProfile) => {\n await updateNotificationProfile(updatedProfile)\n }\n\n const hasDeliveryMethods = showEmail || showSms || showPush\n\n return (\n <List key={profile.guid} sx={{ bgcolor: 'background.paper' }}>\n <ToggleButtonListItem\n endIcon={\n hasDeliveryMethods ? (\n <ExpandMore\n sx={{\n transition: 'transform 0.3s ease-in-out',\n transform: isExpanded ? 'rotate(180deg)' : 'rotate(0deg)',\n }}\n />\n ) : undefined\n }\n isChecked={profile.is_enabled}\n isDisabled={!profile.is_enabled}\n key={profile.guid}\n onClick={() => setIsExpanded(!isExpanded)}\n onToggle={() => handleProfileToggle()}\n primaryText={profile.label}\n secondaryText={profile.is_enabled ? profile.deliveryMethodsLabel : undefined}\n />\n {hasDeliveryMethods && (\n <Collapse in={isExpanded}>\n <List sx={{ bgcolor: 'background.paper' }}>\n {showEmail && (\n <ToggleListItem\n isChecked={!emailDisabled && profile.email_channel && !!userDetails.email}\n isDisabled={emailDisabled || !userDetails.email}\n onToggle={() =>\n handleUpdateProfile({\n ...profile,\n email_channel: !profile.email_channel,\n })\n }\n primaryText={copy.delivery_method_email_label}\n />\n )}\n\n {showEmail && (showSms || showPush) && <Divider sx={{ ml: 48 }} />}\n\n {showSms && (\n <ToggleListItem\n isChecked={!smsDisabled && profile.sms_channel && !!userDetails.phone}\n isDisabled={smsDisabled || !userDetails.phone}\n onToggle={() =>\n handleUpdateProfile({\n ...profile,\n sms_channel: !profile.sms_channel,\n })\n }\n primaryText={copy.delivery_method_sms_label}\n />\n )}\n\n {showSms && showPush && <Divider sx={{ ml: 48 }} />}\n\n {showPush && (\n <ToggleListItem\n isChecked={!pushDisabled && profile.push_channel}\n isDisabled={pushDisabled}\n onToggle={() =>\n handleUpdateProfile({\n ...profile,\n push_channel: !profile.push_channel,\n })\n }\n primaryText={copy.delivery_method_push_label}\n />\n )}\n </List>\n </Collapse>\n )}\n <Divider />\n </List>\n )\n})\n","import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { NotificationProfile } from './NotificationProfile'\n\nimport { useSettingsStore } from '../../../common'\n\nexport const BudgetNotificationProfiles = observer(() => {\n const { budgetProfiles } = useSettingsStore()\n\n return (\n <Stack>\n {budgetProfiles.map((profile) => (\n <NotificationProfile key={profile.guid} profile={profile} />\n ))}\n </Stack>\n )\n})\n","import { observer } from 'mobx-react-lite'\n\nimport Card from '@mui/material/Card'\nimport CardContent from '@mui/material/CardContent'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Star } from '@mxenabled/mx-icons'\n\nimport { H3, Text } from '@mxenabled/mxui'\n\nimport {\n ToggleListItem,\n useEvent,\n useGlobalCopyStore,\n useSettingsStore,\n useUserStore,\n} from '../../../common'\nimport { type UserCommunicationProfile } from '../../../core'\n\nexport const DeliveryMethods = observer(() => {\n const { onEvent } = useEvent()\n const { settings: copy } = useGlobalCopyStore()\n const {\n clientCommunicationProfile: ccp,\n updateUserCommunicationProfile,\n userCommunicationsProfile: ucp,\n } = useSettingsStore()\n const { user } = useUserStore()\n\n const onProfileChange = async <K extends keyof UserCommunicationProfile>(\n key: K,\n value: UserCommunicationProfile[K],\n ) => {\n const updatedProfile = { ...ucp, [key]: value }\n\n if (onEvent) {\n const keyParts = key.split('_')\n const notificationType = keyParts[3] // e.g., 'email', 'sms', 'push' 'all'\n if (value === false) {\n onEvent('opt_in_notification_method', { notificationType })\n } else {\n onEvent('opt_out_notification_method', { notificationType })\n }\n }\n\n await updateUserCommunicationProfile(updatedProfile)\n }\n\n return (\n <Stack>\n <H3 sx={{ mt: 24 }}>{copy.delivery_method_title}</H3>\n\n {ccp.email_notifications_enabled && (\n <>\n <ToggleListItem\n isChecked={!!user.email && !ucp.opted_out_of_email_notifications}\n isDisabled={!user.email}\n onToggle={() =>\n onProfileChange(\n 'opted_out_of_email_notifications',\n !ucp.opted_out_of_email_notifications,\n )\n }\n primaryText={copy.delivery_method_email_title}\n secondaryText={\n !!user.email && !ucp.opted_out_of_email_notifications\n ? copy.notification_enabled\n : copy.notification_disabled\n }\n useExtraPadding={false}\n />\n\n {(ccp.sms_notifications_enabled || ccp.push_notifications_enabled) && <Divider />}\n </>\n )}\n\n {ccp.sms_notifications_enabled && (\n <>\n <ToggleListItem\n isChecked={!!user.phone && !ucp.opted_out_of_sms_notifications}\n isDisabled={!user.phone}\n onToggle={() =>\n onProfileChange('opted_out_of_sms_notifications', !ucp.opted_out_of_sms_notifications)\n }\n primaryText={copy.delivery_method_sms_title}\n secondaryText={\n !!user.phone && !ucp.opted_out_of_sms_notifications\n ? copy.notification_enabled\n : copy.notification_disabled\n }\n useExtraPadding={false}\n />\n\n {ccp.push_notifications_enabled && <Divider />}\n </>\n )}\n\n {ccp.push_notifications_enabled && (\n <ToggleListItem\n isChecked={!ucp.opted_out_of_push_notifications}\n isDisabled={true}\n onToggle={() => {}}\n primaryText={copy.delivery_method_push_title}\n secondaryText={copy.delivery_method_push_subtitle}\n useExtraPadding={false}\n />\n )}\n\n {ccp.sms_notifications_enabled && (\n <Card sx={{ backgroundColor: 'background.default', mt: 12 }} variant=\"outlined\">\n <CardContent>\n <Stack alignItems=\"flex-start\" direction=\"row\" gap={6}>\n <Star color=\"primary\" filled={true} />\n <Text variant=\"caption\">{copy.delivery_method_sms_note_1}</Text>\n </Stack>\n </CardContent>\n </Card>\n )}\n </Stack>\n )\n})\n","import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { useSettingsStore } from '../../../common'\n\nimport { NotificationProfile } from './NotificationProfile'\n\nexport const InsightsNotificationProfiles = observer(() => {\n const { insightsProfiles } = useSettingsStore()\n\n return (\n <Stack>\n {insightsProfiles.map((profile) => (\n <NotificationProfile key={profile.guid} profile={profile} />\n ))}\n </Stack>\n )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\n\nimport { H3 } from '@mxenabled/mxui'\n\nimport { useAppConfig, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../common'\nimport { type EditableUser } from '../../../core'\nimport { useDimensions } from '../../../common/hooks/useDimensions'\n\nimport VerifyEmailAction from '../profile/actions/VerifyEmailAction'\nimport VerifyPhoneAction from '../profile/actions/VerifyPhoneAction'\n\nconst PersonalDetails = () => {\n const { config } = useAppConfig()\n const [containerRef, { width }] = useDimensions()\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { updateUser } = useSettingsStore()\n const { user } = useUserStore()\n\n const [hasUnsavedChanges, setHasUnsavedChanges] = React.useState(false)\n const [modifiedUser, setModifiedUser] = React.useState<EditableUser>({\n email: user.email,\n phone: user.phone,\n })\n\n const showVerifyEmail = modifiedUser.email && !user.email_is_verified && !hasUnsavedChanges\n const showVerifyPhone = modifiedUser.phone && !user.phone_is_verified && !hasUnsavedChanges\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { name, value } = event.target\n const changedUser = { ...modifiedUser, [name]: value }\n\n setModifiedUser(changedUser)\n setHasUnsavedChanges(JSON.stringify({ ...user, ...changedUser }) !== JSON.stringify(user))\n }\n\n const handleSave = async () => {\n await updateUser({ ...user, ...modifiedUser })\n setHasUnsavedChanges(false)\n }\n\n return (\n <Stack ref={containerRef}>\n <Divider />\n <Stack sx={{ pt: 12 }}>\n <H3 sx={{ lineHeight: '20px', pb: 4, pt: 16 }}>{settingsCopy.personal_details}</H3>\n <Stack sx={{ flexDirection: width <= 768 ? 'column' : 'row', gap: 24, py: 16 }}>\n {config.display_email_edit_field_in_settings && (\n <Stack sx={{ flex: 1, pb: 14 }}>\n <TextField\n defaultValue={user.email}\n fullWidth={true}\n label={settingsCopy.email_address}\n name=\"email\"\n onChange={handleChange}\n />\n {showVerifyEmail && (\n <Box\n sx={{\n height: 20,\n '.MuiButton-root': {\n px: 0,\n ':hover': {\n bgcolor: 'transparent',\n },\n },\n }}\n >\n <VerifyEmailAction />\n </Box>\n )}\n </Stack>\n )}\n {config.display_sms_edit_field_in_settings && (\n <Stack sx={{ flex: 1, pb: 14 }}>\n <TextField\n defaultValue={user.phone}\n fullWidth={true}\n label={settingsCopy.mobile_number}\n name=\"phone\"\n onChange={handleChange}\n />\n {showVerifyPhone && (\n <Box\n sx={{\n height: 20,\n '.MuiButton-root': {\n px: 0,\n ':hover': {\n bgcolor: 'transparent',\n },\n },\n }}\n >\n <VerifyPhoneAction />\n </Box>\n )}\n </Stack>\n )}\n </Stack>\n <Button\n disabled={!hasUnsavedChanges}\n onClick={handleSave}\n sx={{ width: 84 }}\n variant=\"contained\"\n >\n {commonCopy.save_button}\n </Button>\n </Stack>\n </Stack>\n )\n}\n\nexport default observer(PersonalDetails)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\nimport ListItem from '@mui/material/ListItem'\nimport ListItemText from '@mui/material/ListItemText'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport Stack from '@mui/material/Stack'\n\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { H3 } from '@mxenabled/mxui'\n\nimport {\n Drawer,\n Loader,\n useAccountStore,\n useAppConfig,\n useGlobalCopyStore,\n useGlobalUiStore,\n useInsightsEnabled,\n useSettingsStore,\n useWidgetLoadTimer,\n} from '../../../common'\nimport { NotificationTypes } from '../../../core'\n\nimport { AccountNotificationProfiles } from './AccountNotificationProfiles'\nimport { BudgetNotificationProfiles } from './BudgetNotificationProfiles'\nimport { DeliveryMethods } from './DeliveryMethods'\nimport { InsightsNotificationProfiles } from './InsightsNotificationProfiles'\nimport PersonalDetails from './PersonalDetails'\n\nexport interface NotificationSettingsProps {\n notificationTypes?: NotificationTypes[]\n showPersonalDetails?: boolean\n view?: string | undefined\n}\n\nexport const NotificationSettings: React.FC<NotificationSettingsProps> = observer(\n ({\n notificationTypes = [NotificationTypes.Accounts, NotificationTypes.Budgets],\n showPersonalDetails = false,\n view,\n }) => {\n const { config } = useAppConfig()\n const { settings: copy } = useGlobalCopyStore()\n const { isInitialized } = useGlobalUiStore()\n const { isAccountDataLoaded, loadAccountData } = useAccountStore()\n const { clientCommunicationProfile: ccp, loadNotificationProfiles } = useSettingsStore()\n const isInsightsEnabled = useInsightsEnabled()\n\n const [isLoaded, setIsLoaded] = React.useState(false)\n const [profileTypeOpen, setProfileTypeOpen] = React.useState<NotificationTypes | undefined>(\n undefined,\n )\n\n if (notificationTypes.length > 0 && isInsightsEnabled)\n notificationTypes.push(NotificationTypes.Insights)\n\n useWidgetLoadTimer({\n widgetName: 'NotificationSettingsWidget',\n isLoaded: isLoaded,\n })\n\n React.useEffect(() => {\n if (!isAccountDataLoaded) {\n loadAccountData().finally()\n }\n }, [])\n\n React.useEffect(() => {\n if (isInitialized) {\n loadNotificationProfiles().finally(() => setIsLoaded(true))\n }\n }, [isInitialized])\n\n if (!isInitialized) {\n return <Loader />\n }\n\n let drawerTitle = copy.manage_account_notifications\n if (profileTypeOpen === NotificationTypes.Budgets) {\n drawerTitle = copy.manage_budget_notifications\n } else if (profileTypeOpen === NotificationTypes.Insights) {\n drawerTitle = copy.manage_insights_notifications\n }\n\n const {\n email_notifications_enabled: emailEnabled,\n sms_notifications_enabled: smsEnabled,\n push_notifications_enabled: pushEnabled,\n } = ccp\n\n const hasDeliveryMethods = emailEnabled || smsEnabled || pushEnabled\n\n if (view === 'accounts') {\n return <AccountNotificationProfiles />\n } else if (view === 'budgets') {\n return <BudgetNotificationProfiles />\n } else if (view === 'insights') {\n return <InsightsNotificationProfiles />\n }\n\n const canEditFields =\n config.display_email_edit_field_in_settings || config.display_sms_edit_field_in_settings\n const shouldShowPersonalDetails =\n showPersonalDetails && ccp.can_edit_contact_info && canEditFields\n\n return (\n <Stack sx={{ pt: hasDeliveryMethods ? 0 : 24 }}>\n <Stack sx={{ px: 24 }}>\n {hasDeliveryMethods && (\n <>\n <DeliveryMethods />\n <Divider sx={{ my: 24 }} />\n </>\n )}\n\n <H3 sx={{ mb: 4 }}>{copy.notification_types_title}</H3>\n </Stack>\n <List>\n {notificationTypes.includes(NotificationTypes.Accounts) && (\n <ListItem>\n <ListItemButton onClick={() => setProfileTypeOpen(NotificationTypes.Accounts)}>\n <ListItemText primary={copy.accounts_title} secondary={copy.accounts_subtitle} />\n <ChevronRight />\n </ListItemButton>\n </ListItem>\n )}\n {notificationTypes.includes(NotificationTypes.Budgets) && (\n <ListItem>\n <ListItemButton onClick={() => setProfileTypeOpen(NotificationTypes.Budgets)}>\n <ListItemText primary={copy.budgets_title} secondary={copy.budgets_subtitle} />\n <ChevronRight />\n </ListItemButton>\n </ListItem>\n )}\n {notificationTypes.includes(NotificationTypes.Insights) && (\n <ListItem>\n <ListItemButton onClick={() => setProfileTypeOpen(NotificationTypes.Insights)}>\n <ListItemText primary={copy.insights_title} secondary={copy.insights_subtitle} />\n <ChevronRight />\n </ListItemButton>\n </ListItem>\n )}\n </List>\n\n {shouldShowPersonalDetails && (\n <Stack sx={{ px: 24 }}>\n <PersonalDetails />\n </Stack>\n )}\n\n <Drawer\n isOpen={Boolean(profileTypeOpen)}\n onClose={() => setProfileTypeOpen(undefined)}\n title={drawerTitle}\n >\n <Stack>\n {profileTypeOpen === NotificationTypes.Accounts && <AccountNotificationProfiles />}\n {profileTypeOpen === NotificationTypes.Budgets && <BudgetNotificationProfiles />}\n {profileTypeOpen === NotificationTypes.Insights && <InsightsNotificationProfiles />}\n </Stack>\n </Drawer>\n </Stack>\n )\n },\n)\n"],"names":["VerifyEmailAction","observer","commonCopy","settingsCopy","useGlobalCopyStore","sendEmailVerification","useSettingsStore","user","useUserStore","theme","useTheme","isOpen","setIsOpen","React","handleClose","handleOpen","jsxs","Button","jsx","Text","ChevronRight","Dialog","Stack","VerifyTokenAction","handleVerify","token","setToken","TextField","e","VerifyPhoneAction","sendPhoneVerification","verifyPhoneToken","showVerifyToken","setShowVerifyToken","handlePhoneVerify","handleTokenVerify","AccountProfileListItem","onProfileUpdated","profile","recurringCopy","copy","updateAccount","useAccountStore","isPaymentReminder","AccountNotificationTypes","amount","setAmount","paymentDay","setPaymentDay","accountName","accountPaymentDate","buildDynamicCopy","formatOrdinal","secondaryText","formatCurrency","handleUpdateProfile","ToggleButtonListItem","InstitutionLogo","LocalizationProvider","AdapterDateFns","DateCalendar","endOfMonth","startOfMonth","date","CurrencyInput","value","AccountNotificationProfile","onUpdateProfile","clientCommunicationProfile","userCommunicationsProfile","isMobile","useScreenSize","isAccountProfile","emailDisabled","pushDisabled","smsDisabled","showEmail","showPush","showSms","Fragment","List","ToggleListItem","Divider","child","AccountNotificationProfiles","accountProfiles","updateNotificationProfile","selectedProfileGuid","setSelectedProfileGuid","selectedProfile","handleProfileToggle","handleProfileUpdate","Drawer","NotificationProfile","userDetails","isExpanded","setIsExpanded","updatedProfile","hasDeliveryMethods","ExpandMore","Collapse","BudgetNotificationProfiles","budgetProfiles","DeliveryMethods","onEvent","useEvent","ccp","updateUserCommunicationProfile","ucp","onProfileChange","key","notificationType","H3","Card","CardContent","Star","InsightsNotificationProfiles","insightsProfiles","PersonalDetails","config","useAppConfig","containerRef","width","useDimensions","updateUser","hasUnsavedChanges","setHasUnsavedChanges","modifiedUser","setModifiedUser","showVerifyEmail","showVerifyPhone","handleChange","event","name","changedUser","handleSave","Box","PersonalDetails$1","NotificationSettings","notificationTypes","NotificationTypes","showPersonalDetails","view","isInitialized","useGlobalUiStore","isAccountDataLoaded","loadAccountData","loadNotificationProfiles","isInsightsEnabled","useInsightsEnabled","isLoaded","setIsLoaded","profileTypeOpen","setProfileTypeOpen","useWidgetLoadTimer","Loader","drawerTitle","emailEnabled","smsEnabled","pushEnabled","canEditFields","shouldShowPersonalDetails","ListItem","ListItemButton","ListItemText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,KAAoBC,EAAS,MAAM;AACvC,QAAM,EAAE,QAAQC,GAAY,UAAUC,EAAA,IAAiBC,EAAA,GACjD,EAAE,uBAAAC,EAAA,IAA0BC,EAAA,GAC5B,EAAE,MAAAC,EAAA,IAASC,EAAA,GACXC,IAAQC,EAAA,GAER,CAACC,GAAQC,CAAS,IAAIC,EAAM,SAAS,EAAK,GAE1CC,IAAc,MAAY;AAC9B,IAAAF,EAAU,EAAK;AAAA,EACjB,GAEMG,IAAa,MAAY;AAC7B,IAAAH,EAAU,EAAI;AAAA,EAChB;AAEA,SACE,gBAAAI,EAACH,EAAM,UAAN,EACC,UAAA;AAAA,IAAA,gBAAAG,EAACC,GAAA,EAAO,SAASF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AOG;AAAA,UAEP,4BAACtI,GAAA,EACE,UAAA;AAAA,YAAAkI,MAAoBZ,EAAkB,YAAY,gBAAA1H,EAACkE,GAAA,CAAA,CAA4B;AAAA,YAC/EoE,MAAoBZ,EAAkB,WAAW,gBAAA1H,EAACmF,GAAA,CAAA,CAA2B;AAAA,YAC7EmD,MAAoBZ,EAAkB,YAAY,gBAAA1H,EAACkG,GAAA,CAAA,CAA6B;AAAA,UAAA,EAAA,CACnF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,GACF;AAAA,EAEJ;AACF;"}
@@ -3,9 +3,9 @@ import _ from "react";
3
3
  import { observer as p } from "mobx-react-lite";
4
4
  import v from "@mui/material/TextField";
5
5
  import { a as T, f as S } from "./NumberFormatting--XMeeBfr.mjs";
6
- import { u as y, k as h } from "./hooks-97sNJ_lf.mjs";
7
- import { L as b } from "./ListItemAction-BqUCLj_w.mjs";
8
- import { C as f } from "./CurrencyInput-DaGEQaLW.mjs";
6
+ import { u as y, k as h } from "./hooks-DWOrMnfZ.mjs";
7
+ import { L as b } from "./ListItemAction-GDU5z4BN.mjs";
8
+ import { C as f } from "./CurrencyInput-CABYmqBh.mjs";
9
9
  const F = p(({ goal: e }) => {
10
10
  const { goals: n } = y(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = h(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
11
11
  const a = { ...e, interest_rate: t };
@@ -112,4 +112,4 @@ export {
112
112
  M,
113
113
  z as O
114
114
  };
115
- //# sourceMappingURL=OriginalBalanceAction-YrvxBYAl.mjs.map
115
+ //# sourceMappingURL=OriginalBalanceAction-KuJSsZCA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"OriginalBalanceAction-YrvxBYAl.mjs","sources":["../src/goals/components/actions/InterestRateAction.tsx","../src/goals/components/actions/MonthlyPaymentAction.tsx","../src/goals/components/actions/OriginalBalanceAction.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport TextField from '@mui/material/TextField'\n\nimport { ListItemAction, useGlobalCopyStore, useGoalStore } from '../../../common'\nimport { Goal } from '../../../core'\nimport { formatPercentage } from '../../../core/utils/NumberFormatting'\n\ninterface InterestRateActionProps {\n goal: Goal\n}\n\nexport const InterestRateAction = observer(({ goal }: InterestRateActionProps) => {\n const { goals: copy } = useGlobalCopyStore()\n const { setAlert, setSelectedGoal, updateGoal } = useGoalStore()\n\n const [rate, setRate] = React.useState<number>(goal.interest_rate ?? 0)\n\n const isNew = !goal.guid\n const isInvalid = rate < 0\n\n const handleSave = async () => {\n const updatedGoal = { ...goal, interest_rate: rate }\n goal.interest_rate = rate\n\n if (isNew) {\n setSelectedGoal(updatedGoal)\n } else {\n await updateGoal(updatedGoal)\n setAlert(copy.alert_goal_updated_interest_rate)\n }\n }\n\n const handleCancel = () => {\n setTimeout(() => {\n setRate(goal.interest_rate ?? 0)\n }, 250)\n }\n\n return (\n <ListItemAction\n isDisabled={goal.is_complete}\n isSaveDisabled={isInvalid}\n label={`${copy.details_interest_rate} (%)`}\n onCancel={handleCancel}\n onSave={handleSave}\n primaryText={copy.details_interest_rate}\n secondaryText={formatPercentage(Number(goal.interest_rate) / 100) as string}\n zeroStateText={!goal.interest_rate ? copy.add_interest_rate : undefined}\n >\n <TextField\n error={isInvalid}\n fullWidth={true}\n onChange={(e) =>\n setRate(!isNaN(parseFloat(e.target.value)) ? parseFloat(e.target.value) : 0)\n }\n type=\"number\"\n value={rate}\n />\n </ListItemAction>\n )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport { CurrencyInput, ListItemAction, useGlobalCopyStore, useGoalStore } from '../../../common'\nimport { Goal } from '../../../core'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\n\ninterface MonthlyPaymentActionProps {\n goal: Goal\n}\n\nexport const MonthlyPaymentAction = observer(({ goal }: MonthlyPaymentActionProps) => {\n const { goals: copy } = useGlobalCopyStore()\n const { setAlert, setSelectedGoal, updateGoal } = useGoalStore()\n\n const [payment, setPayment] = React.useState<number>(goal.monthly_payment ?? 0)\n\n const isNew = !goal.guid\n const isInvalid = payment < 0 || payment > 99999999.99\n\n const handleSave = async () => {\n const updatedGoal = { ...goal, monthly_payment: payment }\n goal.monthly_payment = payment\n if (isNew) {\n setSelectedGoal(updatedGoal)\n } else {\n await updateGoal({ ...goal, monthly_payment: payment })\n setAlert(copy.alert_goal_updated_payment)\n }\n }\n\n const handleCancel = () => {\n setTimeout(() => {\n setPayment(goal.monthly_payment || 0)\n }, 250)\n }\n\n return (\n <ListItemAction\n isDisabled={goal.is_complete}\n isSaveDisabled={isInvalid}\n label={copy.details_monthly_payment}\n onCancel={handleCancel}\n onSave={handleSave}\n primaryText={copy.details_monthly_payment}\n secondaryText={formatCurrency(goal.monthly_payment, '0,0')}\n zeroStateText={!goal.monthly_payment ? copy.add_monthly_payment : undefined}\n >\n <CurrencyInput\n amount={payment}\n autoFocus={true}\n error={isInvalid}\n fullWidth={true}\n minAmount={0}\n setAmount={(v) => setPayment(!isNaN(Number(v)) ? Number(v) : payment)}\n sx={{ '.MuiTypography-body1': { p: 0 } }}\n />\n </ListItemAction>\n )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport { CurrencyInput, ListItemAction, useGlobalCopyStore, useGoalStore } from '../../../common'\nimport { Goal } from '../../../core'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\n\ninterface OriginalBalanceActionProps {\n goal: Goal\n}\n\nexport const OriginalBalanceAction = observer(({ goal }: OriginalBalanceActionProps) => {\n const { goals: copy } = useGlobalCopyStore()\n const { setAlert, setSelectedGoal, updateGoal } = useGoalStore()\n\n const [balance, setBalance] = React.useState<number>(goal.initial_amount)\n\n const isNew = !goal.guid\n const isInvlaid = balance < 0 || balance > 99999999.99\n\n const handleSave = async () => {\n const updatedGoal = { ...goal, initial_amount: balance }\n goal.initial_amount = balance\n if (isNew) {\n setSelectedGoal(updatedGoal)\n } else {\n await updateGoal({ ...goal, initial_amount: balance })\n setAlert(copy.alert_goal_updated_balance)\n }\n }\n\n const handleCancel = () => {\n setTimeout(() => {\n setBalance(goal.initial_amount)\n }, 250)\n }\n\n return (\n <ListItemAction\n isDisabled={goal.is_complete}\n isSaveDisabled={isInvlaid}\n label={copy.details_original_balance}\n onCancel={handleCancel}\n onSave={handleSave}\n primaryText={copy.details_original_balance}\n secondaryText={formatCurrency(goal.initial_amount, '0,0')}\n zeroStateText={\n !goal.initial_amount && !goal.is_complete ? copy.add_original_balance : undefined\n }\n >\n <CurrencyInput\n amount={balance}\n autoFocus={true}\n error={isInvlaid}\n fullWidth={true}\n minAmount={0}\n setAmount={(v) => setBalance(!isNaN(Number(v)) ? Number(v) : balance)}\n sx={{ '.MuiTypography-body1': { p: 0 } }}\n />\n </ListItemAction>\n )\n})\n"],"names":["InterestRateAction","observer","goal","copy","useGlobalCopyStore","setAlert","setSelectedGoal","updateGoal","useGoalStore","rate","setRate","React","isNew","isInvalid","handleSave","updatedGoal","handleCancel","jsx","ListItemAction","formatPercentage","TextField","e","MonthlyPaymentAction","payment","setPayment","formatCurrency","CurrencyInput","v","OriginalBalanceAction","balance","setBalance","isInvlaid"],"mappings":";;;;;;;;AAaO,MAAMA,IAAqBC,EAAS,CAAC,EAAE,MAAAC,QAAoC;AAChF,QAAM,EAAE,OAAOC,EAAA,IAASC,EAAA,GAClB,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,YAAAC,EAAA,IAAeC,EAAA,GAE5C,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAiBT,EAAK,iBAAiB,CAAC,GAEhEU,IAAQ,CAACV,EAAK,MACdW,IAAYJ,IAAO,GAEnBK,IAAa,YAAY;AAC7B,UAAMC,IAAc,EAAE,GAAGb,GAAM,eAAeO,EAAA;AAC9C,IAAAP,EAAK,gBAAgBO,GAEjBG,IACFN,EAAgBS,CAAW,KAE3B,MAAMR,EAAWQ,CAAW,GAC5BV,EAASF,EAAK,gCAAgC;AAAA,EAElD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0BAA0B;AAAA,EAE5C,GAEMa,IAAe,MAAM;AACzB,eAAW,MAAM;AACf,MAAAc,EAAW5B,EAAK,cAAc;AAAA,IAChC,GAAG,GAAG;AAAA,EACR;AAEA,SACE,gBAAAe;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYhB,EAAK;AAAA,MACjB,gBAAgB6B;AAAA,MAChB,OAAO5B,EAAK;AAAA,MACZ,UAAUa;AAAA,MACV,QAAQF;AAAA,MACR,aAAaX,EAAK;AAAA,MAClB,eAAesB,EAAevB,EAAK,gBAAgB,KAAK;AAAA,MACxD,eACE,CAACA,EAAK,kBAAkB,CAACA,EAAK,cAAcC,EAAK,uBAAuB;AAAA,MAG1E,UAAA,gBAAAc;AAAA,QAACS;AAAA,QAAA;AAAA,UACC,QAAQG;AAAA,UACR,WAAW;AAAA,UACX,OAAOE;AAAA,UACP,WAAW;AAAA,UACX,WAAW;AAAA,UACX,WAAW,CAACJ,MAAMG,EAAY,MAAM,OAAOH,CAAC,CAAC,IAAgBE,IAAZ,OAAOF,CAAC,CAAW;AAAA,UACpE,IAAI,EAAE,wBAAwB,EAAE,GAAG,IAAE;AAAA,QAAE;AAAA,MAAA;AAAA,IACzC;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"OriginalBalanceAction-KuJSsZCA.mjs","sources":["../src/goals/components/actions/InterestRateAction.tsx","../src/goals/components/actions/MonthlyPaymentAction.tsx","../src/goals/components/actions/OriginalBalanceAction.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport TextField from '@mui/material/TextField'\n\nimport { ListItemAction, useGlobalCopyStore, useGoalStore } from '../../../common'\nimport { Goal } from '../../../core'\nimport { formatPercentage } from '../../../core/utils/NumberFormatting'\n\ninterface InterestRateActionProps {\n goal: Goal\n}\n\nexport const InterestRateAction = observer(({ goal }: InterestRateActionProps) => {\n const { goals: copy } = useGlobalCopyStore()\n const { setAlert, setSelectedGoal, updateGoal } = useGoalStore()\n\n const [rate, setRate] = React.useState<number>(goal.interest_rate ?? 0)\n\n const isNew = !goal.guid\n const isInvalid = rate < 0\n\n const handleSave = async () => {\n const updatedGoal = { ...goal, interest_rate: rate }\n goal.interest_rate = rate\n\n if (isNew) {\n setSelectedGoal(updatedGoal)\n } else {\n await updateGoal(updatedGoal)\n setAlert(copy.alert_goal_updated_interest_rate)\n }\n }\n\n const handleCancel = () => {\n setTimeout(() => {\n setRate(goal.interest_rate ?? 0)\n }, 250)\n }\n\n return (\n <ListItemAction\n isDisabled={goal.is_complete}\n isSaveDisabled={isInvalid}\n label={`${copy.details_interest_rate} (%)`}\n onCancel={handleCancel}\n onSave={handleSave}\n primaryText={copy.details_interest_rate}\n secondaryText={formatPercentage(Number(goal.interest_rate) / 100) as string}\n zeroStateText={!goal.interest_rate ? copy.add_interest_rate : undefined}\n >\n <TextField\n error={isInvalid}\n fullWidth={true}\n onChange={(e) =>\n setRate(!isNaN(parseFloat(e.target.value)) ? parseFloat(e.target.value) : 0)\n }\n type=\"number\"\n value={rate}\n />\n </ListItemAction>\n )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport { CurrencyInput, ListItemAction, useGlobalCopyStore, useGoalStore } from '../../../common'\nimport { Goal } from '../../../core'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\n\ninterface MonthlyPaymentActionProps {\n goal: Goal\n}\n\nexport const MonthlyPaymentAction = observer(({ goal }: MonthlyPaymentActionProps) => {\n const { goals: copy } = useGlobalCopyStore()\n const { setAlert, setSelectedGoal, updateGoal } = useGoalStore()\n\n const [payment, setPayment] = React.useState<number>(goal.monthly_payment ?? 0)\n\n const isNew = !goal.guid\n const isInvalid = payment < 0 || payment > 99999999.99\n\n const handleSave = async () => {\n const updatedGoal = { ...goal, monthly_payment: payment }\n goal.monthly_payment = payment\n if (isNew) {\n setSelectedGoal(updatedGoal)\n } else {\n await updateGoal({ ...goal, monthly_payment: payment })\n setAlert(copy.alert_goal_updated_payment)\n }\n }\n\n const handleCancel = () => {\n setTimeout(() => {\n setPayment(goal.monthly_payment || 0)\n }, 250)\n }\n\n return (\n <ListItemAction\n isDisabled={goal.is_complete}\n isSaveDisabled={isInvalid}\n label={copy.details_monthly_payment}\n onCancel={handleCancel}\n onSave={handleSave}\n primaryText={copy.details_monthly_payment}\n secondaryText={formatCurrency(goal.monthly_payment, '0,0')}\n zeroStateText={!goal.monthly_payment ? copy.add_monthly_payment : undefined}\n >\n <CurrencyInput\n amount={payment}\n autoFocus={true}\n error={isInvalid}\n fullWidth={true}\n minAmount={0}\n setAmount={(v) => setPayment(!isNaN(Number(v)) ? Number(v) : payment)}\n sx={{ '.MuiTypography-body1': { p: 0 } }}\n />\n </ListItemAction>\n )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport { CurrencyInput, ListItemAction, useGlobalCopyStore, useGoalStore } from '../../../common'\nimport { Goal } from '../../../core'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\n\ninterface OriginalBalanceActionProps {\n goal: Goal\n}\n\nexport const OriginalBalanceAction = observer(({ goal }: OriginalBalanceActionProps) => {\n const { goals: copy } = useGlobalCopyStore()\n const { setAlert, setSelectedGoal, updateGoal } = useGoalStore()\n\n const [balance, setBalance] = React.useState<number>(goal.initial_amount)\n\n const isNew = !goal.guid\n const isInvlaid = balance < 0 || balance > 99999999.99\n\n const handleSave = async () => {\n const updatedGoal = { ...goal, initial_amount: balance }\n goal.initial_amount = balance\n if (isNew) {\n setSelectedGoal(updatedGoal)\n } else {\n await updateGoal({ ...goal, initial_amount: balance })\n setAlert(copy.alert_goal_updated_balance)\n }\n }\n\n const handleCancel = () => {\n setTimeout(() => {\n setBalance(goal.initial_amount)\n }, 250)\n }\n\n return (\n <ListItemAction\n isDisabled={goal.is_complete}\n isSaveDisabled={isInvlaid}\n label={copy.details_original_balance}\n onCancel={handleCancel}\n onSave={handleSave}\n primaryText={copy.details_original_balance}\n secondaryText={formatCurrency(goal.initial_amount, '0,0')}\n zeroStateText={\n !goal.initial_amount && !goal.is_complete ? copy.add_original_balance : undefined\n }\n >\n <CurrencyInput\n amount={balance}\n autoFocus={true}\n error={isInvlaid}\n fullWidth={true}\n minAmount={0}\n setAmount={(v) => setBalance(!isNaN(Number(v)) ? Number(v) : balance)}\n sx={{ '.MuiTypography-body1': { p: 0 } }}\n />\n </ListItemAction>\n )\n})\n"],"names":["InterestRateAction","observer","goal","copy","useGlobalCopyStore","setAlert","setSelectedGoal","updateGoal","useGoalStore","rate","setRate","React","isNew","isInvalid","handleSave","updatedGoal","handleCancel","jsx","ListItemAction","formatPercentage","TextField","e","MonthlyPaymentAction","payment","setPayment","formatCurrency","CurrencyInput","v","OriginalBalanceAction","balance","setBalance","isInvlaid"],"mappings":";;;;;;;;AAaO,MAAMA,IAAqBC,EAAS,CAAC,EAAE,MAAAC,QAAoC;AAChF,QAAM,EAAE,OAAOC,EAAA,IAASC,EAAA,GAClB,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,YAAAC,EAAA,IAAeC,EAAA,GAE5C,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAiBT,EAAK,iBAAiB,CAAC,GAEhEU,IAAQ,CAACV,EAAK,MACdW,IAAYJ,IAAO,GAEnBK,IAAa,YAAY;AAC7B,UAAMC,IAAc,EAAE,GAAGb,GAAM,eAAeO,EAAA;AAC9C,IAAAP,EAAK,gBAAgBO,GAEjBG,IACFN,EAAgBS,CAAW,KAE3B,MAAMR,EAAWQ,CAAW,GAC5BV,EAASF,EAAK,gCAAgC;AAAA,EAElD,GAEMa,IAAe,MAAM;AACzB,eAAW,MAAM;AACf,MAAAN,EAAQR,EAAK,iBAAiB,CAAC;AAAA,IACjC,GAAG,GAAG;AAAA,EACR;AAEA,SACE,gBAAAe;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYhB,EAAK;AAAA,MACjB,gBAAgBW;AAAA,MAChB,OAAO,GAAGV,EAAK,qBAAqB;AAAA,MACpC,UAAUa;AAAA,MACV,QAAQ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