@mx-cartographer/experiences 7.0.17-alpha.mm.0 → 7.0.18

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 (99) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{Account-DY2axAET.mjs → Account-BW3-oYEs.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-Jsg4ZDC1.mjs → AccountDetailsContent-BzD6CDIm.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-EU_2u2Iq.mjs → AccountDetailsHeader-Eb3WvBGm.mjs} +5 -5
  5. package/dist/{AccountFields-CSUS7pGn.mjs → AccountFields-CIz-r3gP.mjs} +2 -2
  6. package/dist/{AccountListItem-CMYZQg8M.mjs → AccountListItem-B-ZjJ4Gp.mjs} +3 -3
  7. package/dist/{AccountStore-CIX2RAmG.mjs → AccountStore-BaMynkQT.mjs} +26 -26
  8. package/dist/{Accounts-xi9RGRIU.mjs → Accounts-CA-nqAjT.mjs} +1 -1
  9. package/dist/{BeatApi-D0WcLW3O.mjs → BeatApi-DLu87ijw.mjs} +3 -3
  10. package/dist/{BeatStore-y6WVs07e.mjs → BeatStore-By4aGoRM.mjs} +17 -17
  11. package/dist/{BudgetUtil-DmWvHV7C.mjs → BudgetUtil-CeSLAcsl.mjs} +1 -1
  12. package/dist/{CategorySelectorDrawer-BHqOpBNr.mjs → CategorySelectorDrawer-BJ9jlCyt.mjs} +1 -1
  13. package/dist/{CategoryStore-BfYppD3g.mjs → CategoryStore-BOyzQjQp.mjs} +4 -4
  14. package/dist/{ConnectDrawer-CU5dEdrU.mjs → ConnectDrawer-phFH6OHt.mjs} +1 -1
  15. package/dist/{ConnectionsDrawer-BUJuQrgF.mjs → ConnectionsDrawer-ihxkAi1P.mjs} +2 -2
  16. package/dist/{CurrencyInput-BtrNBP3z.mjs → CurrencyInput-bEx2Mbd0.mjs} +1 -1
  17. package/dist/{DebtsStore-BL_0pQEd.mjs → DebtsStore-Dp-CraCD.mjs} +1 -1
  18. package/dist/{ExportCsvAction-CUGnEaHw.mjs → ExportCsvAction-CbMfQ2Wa.mjs} +3 -3
  19. package/dist/{Fetch-CJ9cgjgV.mjs → Fetch-CkFKy79O.mjs} +8 -9
  20. package/dist/{FinstrongStore-rC2F4Tq3.mjs → FinstrongStore-mkALvztw.mjs} +4 -4
  21. package/dist/{GoalStore-CFx47exL.mjs → GoalStore-eSOkI6uE.mjs} +6 -6
  22. package/dist/{Help-CCuoAZT3.mjs → Help-KAAMEubC.mjs} +1 -1
  23. package/dist/{LineChart-D5uLCys4.mjs → LineChart-BWWmmJxV.mjs} +1 -1
  24. package/dist/{ListItemAction-Cwadpg85.mjs → ListItemAction-DNZZ5fSa.mjs} +1 -1
  25. package/dist/{ManageIncome-B91zIeYo.mjs → ManageIncome-DcKHpJ9V.mjs} +4 -4
  26. package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
  27. package/dist/{MicroWidgetContainer-DwTAjSdX.mjs → MicroWidgetContainer-Dxz8uBN9.mjs} +1 -1
  28. package/dist/{MiniWidgetContainer-CxggrnHk.mjs → MiniWidgetContainer-CTyjmE1h.mjs} +1 -1
  29. package/dist/{NetWorthStore-CYYTpP9O.mjs → NetWorthStore-B6xF9eGH.mjs} +2 -2
  30. package/dist/{NotificationSettings-BEFyqBTj.mjs → NotificationSettings-Dhf_u5o-.mjs} +47 -47
  31. package/dist/{NotificationStore-DpV9hXSE.mjs → NotificationStore-DHtSGySy.mjs} +4 -8
  32. package/dist/{OriginalBalanceAction-DDMRgIBU.mjs → OriginalBalanceAction-DepsKiJz.mjs} +3 -3
  33. package/dist/{RecurringSettings-CGGFhlhh.mjs → RecurringSettings-C9r4s1Cz.mjs} +3 -3
  34. package/dist/{RecurringTransactionsStore-CXhnipfd.mjs → RecurringTransactionsStore-D62XJtdL.mjs} +16 -20
  35. package/dist/{SettingsStore-CLLqNa_S.mjs → SettingsStore-B4gi6oOw.mjs} +29 -33
  36. package/dist/{TransactionApi-C0HMGDBV.mjs → TransactionApi-DbbcjI2L.mjs} +29 -29
  37. package/dist/{TransactionDetails-Bc0iW26I.mjs → TransactionDetails-bja6hKJk.mjs} +5 -5
  38. package/dist/{TransactionStore-Va_jug-g.mjs → TransactionStore-0tLtBEIC.mjs} +25 -29
  39. package/dist/{TrendsStore-DmuQennN.mjs → TrendsStore-WrHxzdbQ.mjs} +1 -1
  40. package/dist/{User-B9T_314z.mjs → User-Dq9Qj764.mjs} +1 -1
  41. package/dist/{ViewMoreMicroCard-61VqFx4x.mjs → ViewMoreMicroCard-BPEzFZRG.mjs} +2 -5
  42. package/dist/{WidgetContainer-CTrp2veH.mjs → WidgetContainer-CdBs9WOZ.mjs} +2 -2
  43. package/dist/accounts/api/AccountApi.d.ts +2 -2
  44. package/dist/accounts/index.es.js +12 -12
  45. package/dist/analytics/index.es.js +2 -2
  46. package/dist/budgets/api/BudgetsApi.d.ts +2 -2
  47. package/dist/budgets/index.es.js +209 -209
  48. package/dist/cashflow/api/CashflowApi.d.ts +2 -3
  49. package/dist/cashflow/index.es.js +10 -10
  50. package/dist/categories/index.es.js +2 -2
  51. package/dist/common/api/AnalyticsApi.d.ts +2 -2
  52. package/dist/common/api/AppDataApi.d.ts +2 -2
  53. package/dist/common/api/BeatApi.d.ts +2 -2
  54. package/dist/common/api/CategoryApi.d.ts +3 -2
  55. package/dist/common/api/GlobalCopyApi.d.ts +1 -2
  56. package/dist/common/api/LocalizedCopyApi.d.ts +1 -2
  57. package/dist/common/api/NotificationApi.d.ts +2 -2
  58. package/dist/common/api/ScheduledPaymentsApi.d.ts +2 -3
  59. package/dist/common/api/UserApi.d.ts +2 -2
  60. package/dist/common/context/GlobalDataProvider.d.ts +2 -3
  61. package/dist/common/context/hooks.d.ts +1 -4
  62. package/dist/common/context/index.d.ts +1 -1
  63. package/dist/common/index.es.js +315 -321
  64. package/dist/common/stores/GlobalStore.d.ts +1 -2
  65. package/dist/common/types/index.d.ts +0 -1
  66. package/dist/common/utils/Fetch.d.ts +1 -3
  67. package/dist/dashboard/index.es.js +2 -2
  68. package/dist/debts/index.es.js +9 -9
  69. package/dist/{exportTransactionsToCSV-ct1RkLbj.mjs → exportTransactionsToCSV-BDlt8u0n.mjs} +1 -1
  70. package/dist/finstrong/api/FinstrongApi.d.ts +1 -2
  71. package/dist/finstrong/index.es.js +7 -7
  72. package/dist/goals/api/GoalApi.d.ts +2 -3
  73. package/dist/goals/index.es.js +11 -11
  74. package/dist/help/api/HelpApi.d.ts +2 -2
  75. package/dist/help/index.es.js +3 -3
  76. package/dist/hooks-DkUqN6JE.mjs +71 -0
  77. package/dist/insights/index.es.js +1 -1
  78. package/dist/investments/api/HoldingApi.d.ts +2 -3
  79. package/dist/investments/index.es.js +3 -3
  80. package/dist/merchants/api/MerchantApi.d.ts +1 -2
  81. package/dist/merchants/index.es.js +2 -2
  82. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -2
  83. package/dist/microinsights/context/hooks.d.ts +1 -1
  84. package/dist/microinsights/index.es.js +1 -1
  85. package/dist/networth/index.es.js +7 -7
  86. package/dist/notifications/index.es.js +5 -5
  87. package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -2
  88. package/dist/recurringtransactions/index.es.js +10 -10
  89. package/dist/settings/api/SettingsApi.d.ts +2 -3
  90. package/dist/settings/index.es.js +7 -7
  91. package/dist/spending/index.es.js +4 -4
  92. package/dist/transactions/api/TransactionApi.d.ts +2 -3
  93. package/dist/transactions/index.es.js +14 -14
  94. package/dist/trends/index.es.js +10 -10
  95. package/dist/{useCombineEvents-Dbjzfwvo.mjs → useCombineEvents-DaDBSR_1.mjs} +29 -29
  96. package/package.json +1 -1
  97. package/dist/MerchantStore-h96aTml7.mjs +0 -37
  98. package/dist/common/types/Handlers.d.ts +0 -2
  99. package/dist/hooks-DcS6DyRl.mjs +0 -74
@@ -0,0 +1,37 @@
1
+ import { makeAutoObservable as m, runInAction as s } from "mobx";
2
+ import { F as p, A as c } from "./Fetch-CkFKy79O.mjs";
3
+ class h {
4
+ fetchInstance;
5
+ constructor(t, n) {
6
+ this.fetchInstance = new p(t, n);
7
+ }
8
+ getMerchants = async (t = [], n = [], r = 1, o = 25) => {
9
+ let a = c.MERCHANTS;
10
+ return a += `?page=${r}&per_page=${o}`, t.length && t.forEach((e) => a += `&fuzzy_name[]=${e}`), n.length && n.forEach((e) => a += `&guid[]=${e}`), this.fetchInstance.get(a).then((e) => e.merchants);
11
+ };
12
+ getMerchantByGuid = async (t) => this.fetchInstance.get(`${c.MERCHANTS}/${t}`).then((n) => n.merchant);
13
+ }
14
+ class l {
15
+ globalStore;
16
+ api = new h("/", "");
17
+ merchant = null;
18
+ merchants = [];
19
+ isLoading = !1;
20
+ constructor(t) {
21
+ this.globalStore = t, this.api = new h(t.endpoint, t.sessionToken), m(this);
22
+ }
23
+ loadMerchants = async (t = "") => {
24
+ this.isLoading = !0;
25
+ const n = await this.api.getMerchants([t]);
26
+ s(() => {
27
+ this.merchants = n, this.isLoading = !1;
28
+ });
29
+ };
30
+ loadMerchantByGuid = async (t) => {
31
+ const n = await this.api.getMerchantByGuid(t);
32
+ s(() => this.merchant = n);
33
+ };
34
+ }
35
+ export {
36
+ l as M
37
+ };
@@ -6,7 +6,7 @@ import b from "@mui/material/CardHeader";
6
6
  import { P as u, H3 as v } from "@mxenabled/mxui";
7
7
  import { ChevronRight as W } from "@mxenabled/mx-icons";
8
8
  import { u as M } from "./useDimensions-27p2evRx.mjs";
9
- import { W as w } from "./hooks-DcS6DyRl.mjs";
9
+ import { W as w } from "./hooks-DkUqN6JE.mjs";
10
10
  const H = ({
11
11
  children: e,
12
12
  className: o,
@@ -7,7 +7,7 @@ import b from "@mui/material/IconButton";
7
7
  import { Icon as C, ChevronRight as v } from "@mxenabled/mx-icons";
8
8
  import { Text as W, H3 as H } from "@mxenabled/mxui";
9
9
  import { u as I } from "./useDimensions-27p2evRx.mjs";
10
- import { W as M } from "./hooks-DcS6DyRl.mjs";
10
+ import { W as M } from "./hooks-DkUqN6JE.mjs";
11
11
  const j = ({
12
12
  className: t = "mx-cmn-mini-widget",
13
13
  closeLabel: a,
@@ -3,8 +3,8 @@ import { format as A } from "date-fns/format";
3
3
  import { fromUnixTime as W } from "date-fns/fromUnixTime";
4
4
  import { startOfMonth as _ } from "date-fns/startOfMonth";
5
5
  import { subMonths as B } from "date-fns/subMonths";
6
- import { a as b } from "./Accounts-xi9RGRIU.mjs";
7
- import { e as N, a as M, f as v } from "./ConnectDrawer-CU5dEdrU.mjs";
6
+ import { a as b } from "./Accounts-CA-nqAjT.mjs";
7
+ import { e as N, a as M, f as v } from "./ConnectDrawer-phFH6OHt.mjs";
8
8
  const f = 13, L = (n, t) => n.filter((e) => {
9
9
  const { is_closed: r, is_deleted: s, is_hidden: a, is_manual: i } = e;
10
10
  return r || s || a ? !1 : i || !e.guid ? !0 : t.some((l) => n.some((g) => l.guid === g.member_guid));
@@ -15,11 +15,11 @@ import { DateCalendar as te } from "@mui/x-date-pickers/DateCalendar";
15
15
  import { LocalizationProvider as ne } from "@mui/x-date-pickers/LocalizationProvider";
16
16
  import { AdapterDateFns as ie } from "@mui/x-date-pickers/AdapterDateFnsV3";
17
17
  import { A as oe, T as F, a as P, N as b } from "./Notification-ByMBpJ5u.mjs";
18
- import { u as D, r as T, o as w, c as se, e as ae, m as W, a as ce } from "./hooks-DcS6DyRl.mjs";
18
+ import { u as D, r as T, o as w, c as se, e as ae, m as W, a as ce } from "./hooks-DkUqN6JE.mjs";
19
19
  import { b as le } from "./Localization-2MODESHW.mjs";
20
20
  import { b as re, f as de } from "./NumberFormatting-CtWHhyBX.mjs";
21
21
  import { a as M } from "./Dialog-CWW597AF.mjs";
22
- import { C as me } from "./CurrencyInput-BtrNBP3z.mjs";
22
+ import { C as me } from "./CurrencyInput-bEx2Mbd0.mjs";
23
23
  import { u as _e } from "./useScreenSize-B6JyS_Lj.mjs";
24
24
  import { D as J } from "./Drawer-kEE73B87.mjs";
25
25
  import he from "@mui/material/Collapse";
@@ -34,11 +34,11 @@ import { L as ge } from "./Loader-DUaFpDGv.mjs";
34
34
  const ye = C(() => {
35
35
  const { common: n, settings: t } = D(), { sendEmailVerification: s } = T(), { user: l } = w(), i = X(), [r, a] = f.useState(!1), o = () => {
36
36
  a(!1);
37
- }, m = () => {
37
+ }, d = () => {
38
38
  a(!0);
39
39
  };
40
40
  return /* @__PURE__ */ c(f.Fragment, { children: [
41
- /* @__PURE__ */ c(R, { onClick: m, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
41
+ /* @__PURE__ */ c(R, { onClick: d, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
42
42
  /* @__PURE__ */ e(x, { variant: "Small", children: t.verify_email }),
43
43
  /* @__PURE__ */ e(k, {})
44
44
  ] }),
@@ -106,17 +106,17 @@ const ye = C(() => {
106
106
  );
107
107
  }
108
108
  ), xe = C(() => {
109
- const { common: n, settings: t } = D(), { sendPhoneVerification: s, verifyPhoneToken: l } = T(), { user: i } = w(), r = X(), [a, o] = f.useState(!1), [m, d] = f.useState(!1), h = () => {
109
+ const { common: n, settings: t } = D(), { sendPhoneVerification: s, verifyPhoneToken: l } = T(), { user: i } = w(), r = X(), [a, o] = f.useState(!1), [d, m] = f.useState(!1), h = () => {
110
110
  o(!1);
111
111
  }, u = () => {
112
112
  o(!0);
113
113
  }, g = () => {
114
114
  s().finally(() => {
115
- d(!0);
115
+ m(!0);
116
116
  });
117
117
  }, p = (y) => {
118
118
  l(y).finally(() => {
119
- d(!1);
119
+ m(!1);
120
120
  });
121
121
  };
122
122
  return /* @__PURE__ */ c(f.Fragment, { children: [
@@ -164,21 +164,21 @@ const ye = C(() => {
164
164
  /* @__PURE__ */ e(
165
165
  be,
166
166
  {
167
- handleClose: () => d(!1),
167
+ handleClose: () => m(!1),
168
168
  handleVerify: p,
169
- isOpen: m
169
+ isOpen: d
170
170
  }
171
171
  )
172
172
  ] });
173
173
  }), Ce = C(
174
174
  ({ onProfileUpdated: n, profile: t }) => {
175
- const { common: s, recurring: l, settings: i } = D(), { updateAccount: r } = se(), a = t.notification_type === oe.DebtPaymentReminder, [o, m] = f.useState(!1), [d, h] = f.useState(t.threshold || 0), [u, g] = f.useState(
175
+ const { common: s, recurring: l, settings: i } = D(), { updateAccount: r } = se(), a = t.notification_type === oe.DebtPaymentReminder, [o, d] = f.useState(!1), [m, h] = f.useState(t.threshold || 0), [u, g] = f.useState(
176
176
  t.account?.day_payment_is_due || 0
177
177
  ), p = t.account?.name || t.account?.feed_name || "", y = t.account?.day_payment_is_due ? le(
178
178
  i.notification_debt_payment_date,
179
179
  re(t.account?.day_payment_is_due)
180
180
  ) : i.notification_debt_payment_zero_state, S = a ? y : de(t.threshold ?? 0, "0,0"), A = async () => {
181
- a && t.account ? await r({ ...t.account, day_payment_is_due: u }) : n({ ...t, threshold: d });
181
+ a && t.account ? await r({ ...t.account, day_payment_is_due: u }) : n({ ...t, threshold: m });
182
182
  };
183
183
  return /* @__PURE__ */ c(_, { children: [
184
184
  /* @__PURE__ */ e(
@@ -194,7 +194,7 @@ const ye = C(() => {
194
194
  endIcon: /* @__PURE__ */ e(k, {}),
195
195
  isChecked: t.is_enabled,
196
196
  isPrimaryTextBold: !0,
197
- onClick: () => m(!0),
197
+ onClick: () => d(!0),
198
198
  onToggle: () => n({
199
199
  ...t,
200
200
  is_enabled: !t.is_enabled
@@ -212,7 +212,7 @@ const ye = C(() => {
212
212
  },
213
213
  disablePrimaryButton: a && u === 0,
214
214
  isOpen: o,
215
- onClose: () => m(!1),
215
+ onClose: () => d(!1),
216
216
  onPrimaryAction: A,
217
217
  primaryText: s.save_button,
218
218
  children: a ? /* @__PURE__ */ e(ne, { dateAdapter: ie, children: /* @__PURE__ */ e(
@@ -239,7 +239,7 @@ const ye = C(() => {
239
239
  ) }) : /* @__PURE__ */ e(
240
240
  me,
241
241
  {
242
- amount: d,
242
+ amount: m,
243
243
  autoFocus: !0,
244
244
  fullWidth: !0,
245
245
  minAmount: 0,
@@ -254,8 +254,8 @@ const ye = C(() => {
254
254
  ), ve = C(
255
255
  ({ onUpdateProfile: n, profile: t }) => {
256
256
  const { settings: s } = D(), { user: l } = w(), { clientCommunicationProfile: i, userCommunicationsProfile: r } = T(), { isMobile: a } = _e(), o = t.notification_type > 2, {
257
- opted_out_of_email_notifications: m,
258
- opted_out_of_push_notifications: d,
257
+ opted_out_of_email_notifications: d,
258
+ opted_out_of_push_notifications: m,
259
259
  opted_out_of_sms_notifications: h
260
260
  } = r, {
261
261
  email_notifications_enabled: u,
@@ -269,11 +269,11 @@ const ye = C(() => {
269
269
  u && /* @__PURE__ */ e(_, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
270
270
  P,
271
271
  {
272
- isChecked: !m && t.email_channel && !!l.email,
273
- isDisabled: m || !l.email,
272
+ isChecked: !d && t.email_channel && !!l.email,
273
+ isDisabled: d || !l.email,
274
274
  onToggle: () => n({ ...t, email_channel: !t.email_channel }),
275
275
  primaryText: s.delivery_method_email_label,
276
- secondaryText: t.email_channel ? s.notification_enabled : s.notification_disabled,
276
+ secondaryText: d || !t.email_channel ? s.notification_disabled : s.notification_enabled,
277
277
  useExtraPadding: !1
278
278
  }
279
279
  ) }),
@@ -285,7 +285,7 @@ const ye = C(() => {
285
285
  isDisabled: h || !l.phone,
286
286
  onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
287
287
  primaryText: `${s.delivery_method_sms_label}`,
288
- secondaryText: t.sms_channel ? s.notification_enabled : s.notification_disabled,
288
+ secondaryText: h || !t.sms_channel ? s.notification_disabled : s.notification_enabled,
289
289
  useExtraPadding: !1
290
290
  }
291
291
  ) }),
@@ -293,8 +293,8 @@ const ye = C(() => {
293
293
  g && /* @__PURE__ */ e(_, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
294
294
  P,
295
295
  {
296
- isChecked: !d && t.push_channel,
297
- isDisabled: d,
296
+ isChecked: !m && t.push_channel,
297
+ isDisabled: m,
298
298
  onToggle: () => n({ ...t, push_channel: !t.push_channel }),
299
299
  primaryText: s.delivery_method_push_label,
300
300
  secondaryText: s.delivery_method_push_subtitle,
@@ -370,9 +370,9 @@ const ye = C(() => {
370
370
  userCommunicationsProfile: {
371
371
  opted_out_of_email_notifications: a,
372
372
  opted_out_of_push_notifications: o,
373
- opted_out_of_sms_notifications: m
373
+ opted_out_of_sms_notifications: d
374
374
  }
375
- } = T(), { user: d } = w(), [h, u] = f.useState(!1), g = async () => {
375
+ } = T(), { user: m } = w(), [h, u] = f.useState(!1), g = async () => {
376
376
  await p({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && u(!1);
377
377
  }, p = async (S) => {
378
378
  await r(S);
@@ -403,8 +403,8 @@ const ye = C(() => {
403
403
  s && /* @__PURE__ */ e(
404
404
  P,
405
405
  {
406
- isChecked: !a && n.email_channel && !!d.email,
407
- isDisabled: a || !d.email,
406
+ isChecked: !a && n.email_channel && !!m.email,
407
+ isDisabled: a || !m.email,
408
408
  onToggle: () => p({
409
409
  ...n,
410
410
  email_channel: !n.email_channel
@@ -416,8 +416,8 @@ const ye = C(() => {
416
416
  i && /* @__PURE__ */ e(
417
417
  P,
418
418
  {
419
- isChecked: !m && n.sms_channel && !!d.phone,
420
- isDisabled: m || !d.phone,
419
+ isChecked: !d && n.sms_channel && !!m.phone,
420
+ isDisabled: d || !m.phone,
421
421
  onToggle: () => p({
422
422
  ...n,
423
423
  sms_channel: !n.sms_channel
@@ -449,13 +449,13 @@ const ye = C(() => {
449
449
  clientCommunicationProfile: s,
450
450
  updateUserCommunicationProfile: l,
451
451
  userCommunicationsProfile: i
452
- } = T(), { user: r } = w(), a = async (o, m) => {
453
- const d = { ...i, [o]: m };
452
+ } = T(), { user: r } = w(), a = async (o, d) => {
453
+ const m = { ...i, [o]: d };
454
454
  if (n) {
455
455
  const u = o.split("_")[3];
456
- m === !1 ? n("opt_in_notification_method", { notificationType: u }) : n("opt_out_notification_method", { notificationType: u });
456
+ d === !1 ? n("opt_in_notification_method", { notificationType: u }) : n("opt_out_notification_method", { notificationType: u });
457
457
  }
458
- await l(d);
458
+ await l(m);
459
459
  };
460
460
  return /* @__PURE__ */ c(_, { children: [
461
461
  /* @__PURE__ */ e(U, { sx: { mt: 24 }, children: t.delivery_method_title }),
@@ -511,14 +511,14 @@ const ye = C(() => {
511
511
  const { insightsProfiles: n } = T();
512
512
  return /* @__PURE__ */ e(_, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
513
513
  }), Pe = () => {
514
- const { config: n } = W(), [t, { width: s }] = fe(), { common: l, settings: i } = D(), { updateUser: r } = T(), { user: a } = w(), [o, m] = f.useState(!1), [d, h] = f.useState({
514
+ const { config: n } = W(), [t, { width: s }] = fe(), { common: l, settings: i } = D(), { updateUser: r } = T(), { user: a } = w(), [o, d] = f.useState(!1), [m, h] = f.useState({
515
515
  email: a.email,
516
516
  phone: a.phone
517
- }), u = d.email && !a.email_is_verified && !o, g = d.phone && !a.phone_is_verified && !o, p = (S) => {
518
- const { name: A, value: I } = S.target, j = { ...d, [A]: I };
519
- h(j), m(JSON.stringify({ ...a, ...j }) !== JSON.stringify(a));
517
+ }), u = m.email && !a.email_is_verified && !o, g = m.phone && !a.phone_is_verified && !o, p = (S) => {
518
+ const { name: A, value: I } = S.target, j = { ...m, [A]: I };
519
+ h(j), d(JSON.stringify({ ...a, ...j }) !== JSON.stringify(a));
520
520
  }, y = async () => {
521
- await r({ ...a, ...d }), m(!1);
521
+ await r({ ...a, ...m }), d(!1);
522
522
  };
523
523
  return /* @__PURE__ */ c(_, { ref: t, children: [
524
524
  /* @__PURE__ */ e(v, {}),
@@ -598,7 +598,7 @@ const ye = C(() => {
598
598
  showPersonalDetails: t = !1,
599
599
  view: s
600
600
  }) => {
601
- const { config: l } = W(), { settings: i } = D(), { isInitialized: r } = ce(), { clientCommunicationProfile: a, loadNotificationProfiles: o } = T(), [m, d] = f.useState(
601
+ const { config: l } = W(), { settings: i } = D(), { isInitialized: r } = ce(), { clientCommunicationProfile: a, loadNotificationProfiles: o } = T(), [d, m] = f.useState(
602
602
  void 0
603
603
  );
604
604
  if (f.useEffect(() => {
@@ -606,7 +606,7 @@ const ye = C(() => {
606
606
  }, [r]), !r)
607
607
  return /* @__PURE__ */ e(ge, {});
608
608
  let h = i.manage_account_notifications;
609
- m === b.Budgets ? h = i.manage_budget_notifications : m === b.Insights && (h = i.manage_insights_notifications);
609
+ d === b.Budgets ? h = i.manage_budget_notifications : d === b.Insights && (h = i.manage_insights_notifications);
610
610
  const {
611
611
  email_notifications_enabled: u,
612
612
  sms_notifications_enabled: g,
@@ -628,15 +628,15 @@ const ye = C(() => {
628
628
  /* @__PURE__ */ e(U, { sx: { mb: 4 }, children: i.notification_types_title })
629
629
  ] }),
630
630
  /* @__PURE__ */ c(B, { children: [
631
- n.includes(b.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => d(b.Accounts), children: [
631
+ n.includes(b.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => m(b.Accounts), children: [
632
632
  /* @__PURE__ */ e(N, { primary: i.accounts_title, secondary: i.accounts_subtitle }),
633
633
  /* @__PURE__ */ e(k, {})
634
634
  ] }) }),
635
- n.includes(b.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => d(b.Budgets), children: [
635
+ n.includes(b.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => m(b.Budgets), children: [
636
636
  /* @__PURE__ */ e(N, { primary: i.budgets_title, secondary: i.budgets_subtitle }),
637
637
  /* @__PURE__ */ e(k, {})
638
638
  ] }) }),
639
- n.includes(b.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => d(b.Insights), children: [
639
+ n.includes(b.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => m(b.Insights), children: [
640
640
  /* @__PURE__ */ e(N, { primary: i.insights_title, secondary: i.insights_subtitle }),
641
641
  /* @__PURE__ */ e(k, {})
642
642
  ] }) })
@@ -645,13 +645,13 @@ const ye = C(() => {
645
645
  /* @__PURE__ */ e(
646
646
  J,
647
647
  {
648
- isOpen: !!m,
649
- onClose: () => d(void 0),
648
+ isOpen: !!d,
649
+ onClose: () => m(void 0),
650
650
  title: h,
651
651
  children: /* @__PURE__ */ c(_, { children: [
652
- m === b.Accounts && /* @__PURE__ */ e(H, {}),
653
- m === b.Budgets && /* @__PURE__ */ e(z, {}),
654
- m === b.Insights && /* @__PURE__ */ e($, {})
652
+ d === b.Accounts && /* @__PURE__ */ e(H, {}),
653
+ d === b.Budgets && /* @__PURE__ */ e(z, {}),
654
+ d === b.Insights && /* @__PURE__ */ e($, {})
655
655
  ] })
656
656
  }
657
657
  )
@@ -1,10 +1,10 @@
1
1
  import { makeAutoObservable as c, observable as f, runInAction as h } from "mobx";
2
2
  import { fromUnixTime as o, isSameDay as d } from "date-fns";
3
- import { F as l, A as n } from "./Fetch-CJ9cgjgV.mjs";
3
+ import { F as l, A as n } from "./Fetch-CkFKy79O.mjs";
4
4
  class s {
5
5
  fetchInstance;
6
- constructor(t, i, a) {
7
- this.fetchInstance = new l(t, i, void 0, a);
6
+ constructor(t, i) {
7
+ this.fetchInstance = new l(t, i);
8
8
  }
9
9
  getNotifications = () => this.fetchInstance.get(n.NOTIFICATIONS).then(
10
10
  (t) => t.notifications.map((i) => i.notification)
@@ -35,11 +35,7 @@ class A {
35
35
  notifications = [];
36
36
  recentNotifications = [];
37
37
  constructor(t) {
38
- this.globalStore = t, this.api = new s(
39
- t.endpoint,
40
- t.sessionToken,
41
- t.onError
42
- ), c(this, { notifications: f });
38
+ this.globalStore = t, this.api = new s(t.endpoint, t.sessionToken), c(this, { notifications: f });
43
39
  }
44
40
  // Used in Money Dashboard
45
41
  get newNotifications() {
@@ -2,10 +2,10 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import _ from "react";
3
3
  import { observer as p } from "mobx-react-lite";
4
4
  import v from "@mui/material/TextField";
5
- import { L as y } from "./ListItemAction-Cwadpg85.mjs";
6
- import { u as h, j as b } from "./hooks-DcS6DyRl.mjs";
5
+ import { L as y } from "./ListItemAction-DNZZ5fSa.mjs";
6
+ import { u as h, j as b } from "./hooks-DkUqN6JE.mjs";
7
7
  import { a as T, f as S } from "./NumberFormatting-CtWHhyBX.mjs";
8
- import { C as f } from "./CurrencyInput-BtrNBP3z.mjs";
8
+ import { C as f } from "./CurrencyInput-bEx2Mbd0.mjs";
9
9
  const F = p(({ goal: e }) => {
10
10
  const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
11
11
  const n = { ...e, interest_rate: t };
@@ -7,10 +7,10 @@ import R from "@mui/material/Tabs";
7
7
  import l from "@mui/material/Divider";
8
8
  import T from "@mui/material/List";
9
9
  import C from "@mui/material/Stack";
10
- import { R as x, A as S, a as E, M as A } from "./ManageIncome-B91zIeYo.mjs";
11
- import { u as h, h as y, e as _ } from "./hooks-DcS6DyRl.mjs";
10
+ import { R as x, A as S, a as E, M as A } from "./ManageIncome-DcKHpJ9V.mjs";
11
+ import { u as h, h as y, e as _ } from "./hooks-DkUqN6JE.mjs";
12
12
  import { R as v, F as N } from "./RepeatingTransaction-BW4J-jeJ.mjs";
13
- import { A as d } from "./WidgetContainer-CTrp2veH.mjs";
13
+ import { A as d } from "./WidgetContainer-CdBs9WOZ.mjs";
14
14
  const I = u(() => {
15
15
  const { recurring: r } = h(), { repeatingTransactions: s } = y(), { onEvent: o } = _(), a = (n) => {
16
16
  o(d.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
@@ -1,20 +1,20 @@
1
1
  import { makeAutoObservable as f, runInAction as i } from "mobx";
2
2
  import { endOfMonth as R } from "date-fns/endOfMonth";
3
3
  import { isAfter as p } from "date-fns/isAfter";
4
- import { isBefore as I } from "date-fns/isBefore";
4
+ import { isBefore as S } from "date-fns/isBefore";
5
5
  import { isSameDay as g } from "date-fns/isSameDay";
6
6
  import { isWithinInterval as m } from "date-fns/isWithinInterval";
7
- import { startOfMonth as S } from "date-fns/startOfMonth";
7
+ import { startOfMonth as I } from "date-fns/startOfMonth";
8
8
  import { startOfToday as c } from "date-fns/startOfToday";
9
9
  import { subDays as y } from "date-fns/subDays";
10
- import { F as x, A as o } from "./Fetch-CJ9cgjgV.mjs";
11
- import { b as E, a, c as d, d as u } from "./RepeatingTransaction-BW4J-jeJ.mjs";
12
- var A = /* @__PURE__ */ ((r) => (r.Small = "small", r.Medium = "medium", r.Large = "large", r))(A || {});
10
+ import { F as x, A as o } from "./Fetch-CkFKy79O.mjs";
11
+ import { b as A, a, c as h, d as u } from "./RepeatingTransaction-BW4J-jeJ.mjs";
12
+ var E = /* @__PURE__ */ ((r) => (r.Small = "small", r.Medium = "medium", r.Large = "large", r))(E || {});
13
13
  const U = 44;
14
- class h {
14
+ class d {
15
15
  fetchInstance;
16
- constructor(e, t, n) {
17
- this.fetchInstance = new x(e, t, void 0, n);
16
+ constructor(e, t) {
17
+ this.fetchInstance = new x(e, t);
18
18
  }
19
19
  addRepeatingTransaction = async (e) => this.fetchInstance.post(o.REPEATING_TRANSACTIONS, e).then((t) => t.repeating_transaction);
20
20
  getRepeatingTransactions = async () => this.fetchInstance.get(o.REPEATING_TRANSACTIONS).then((e) => e.repeating_transactions);
@@ -27,25 +27,21 @@ class h {
27
27
  const l = (r, e) => m(e.expectedDate, r), s = (r, e) => r + e.amount;
28
28
  class C {
29
29
  globalStore;
30
- api = new h("/", "");
30
+ api = new d("/", "");
31
31
  transactions = [];
32
32
  repeatingTransactions = [];
33
33
  selectedDay;
34
- dateRange = { start: S(c()), end: R(c()) };
34
+ dateRange = { start: I(c()), end: R(c()) };
35
35
  isDataLoaded = !1;
36
36
  constructor(e) {
37
- this.globalStore = e, this.api = new h(
38
- e.endpoint,
39
- e.sessionToken,
40
- e.onError
41
- ), f(this);
37
+ this.globalStore = e, this.api = new d(e.endpoint, e.sessionToken), f(this);
42
38
  }
43
39
  /**
44
40
  * Returns all recurrences built from repeating transactions and filtered by accounts.
45
41
  */
46
42
  get recurrences() {
47
43
  const e = this.globalStore.accountStore.visibleAccounts;
48
- return E(this.repeatingTransactions, this.dateRange).filter((t) => e.some((n) => n.guid === t.accountGuid && !n.is_excluded_from_accounts)).filter((t) => m(t.expectedDate, this.dateRange));
44
+ return A(this.repeatingTransactions, this.dateRange).filter((t) => e.some((n) => n.guid === t.accountGuid && !n.is_excluded_from_accounts)).filter((t) => m(t.expectedDate, this.dateRange));
49
45
  }
50
46
  /**
51
47
  * Returns all recurrences that have occurred in the past, including those that are paid or missed
@@ -61,7 +57,7 @@ class C {
61
57
  */
62
58
  get upcomingRecurrences() {
63
59
  return this.recurrences.filter(
64
- (e) => p(e.expectedDate, y(c(), 3)) && I(e.expectedDate, this.dateRange.end) && e.status === a.Upcoming
60
+ (e) => p(e.expectedDate, y(c(), 3)) && S(e.expectedDate, this.dateRange.end) && e.status === a.Upcoming
65
61
  );
66
62
  }
67
63
  /**
@@ -69,7 +65,7 @@ class C {
69
65
  */
70
66
  get expenses() {
71
67
  return this.recurrences.filter(
72
- (e) => e.type === d.Expense
68
+ (e) => e.type === h.Expense
73
69
  );
74
70
  }
75
71
  /**
@@ -85,7 +81,7 @@ class C {
85
81
  */
86
82
  get income() {
87
83
  return this.recurrences.filter(
88
- (e) => e.type === d.Income
84
+ (e) => e.type === h.Income
89
85
  );
90
86
  }
91
87
  /**
@@ -262,6 +258,6 @@ class C {
262
258
  }
263
259
  export {
264
260
  C as R,
265
- A as S,
261
+ E as S,
266
262
  U as T
267
263
  };
@@ -1,24 +1,24 @@
1
1
  import { makeAutoObservable as N, runInAction as l } from "mobx";
2
- import { F as D, A as r } from "./Fetch-CJ9cgjgV.mjs";
2
+ import { F as D, A as o } from "./Fetch-CkFKy79O.mjs";
3
3
  import { B as f, A as n, I as i } from "./Notification-ByMBpJ5u.mjs";
4
- import { T as m } from "./TransactionApi-C0HMGDBV.mjs";
4
+ import { T as m } from "./TransactionApi-DbbcjI2L.mjs";
5
5
  class y {
6
6
  fetchInstance;
7
- constructor(e, t, o) {
8
- this.fetchInstance = new D(e, t, void 0, o);
7
+ constructor(e, t) {
8
+ this.fetchInstance = new D(e, t);
9
9
  }
10
- deleteDevice = async (e) => this.fetchInstance.delete(`${r.DEVICES}/${e}`).then((t) => t);
11
- generateDeviceToken = async () => this.fetchInstance.get(`${r.USER}/mobile_token`).then((e) => e.mobile_token);
12
- getDevices = async () => this.fetchInstance.get(r.DEVICES).then((e) => e.map((t) => t.device));
13
- getNotificationProfiles = async () => this.fetchInstance.get(r.NOTIFICATION_PROFILES).then((e) => e.notification_profiles);
10
+ deleteDevice = async (e) => this.fetchInstance.delete(`${o.DEVICES}/${e}`).then((t) => t);
11
+ generateDeviceToken = async () => this.fetchInstance.get(`${o.USER}/mobile_token`).then((e) => e.mobile_token);
12
+ getDevices = async () => this.fetchInstance.get(o.DEVICES).then((e) => e.map((t) => t.device));
13
+ getNotificationProfiles = async () => this.fetchInstance.get(o.NOTIFICATION_PROFILES).then((e) => e.notification_profiles);
14
14
  // verifications endpoints respond with HTTP status codes; they error otherwise
15
- sendEmailVerification = async () => this.fetchInstance.post(r.EMAIL_VERIFICATIONS);
16
- sendPhoneVerification = async () => this.fetchInstance.post(r.PHONE_VERIFICATIONS + "/deliver");
17
- verifyPhoneToken = async (e) => this.fetchInstance.post(r.PHONE_VERIFICATIONS + "/verify", { sms_verification_token: e }).then((t) => ({ verified: t.verified }));
18
- updateDevice = async (e) => this.fetchInstance.put(`${r.DEVICES}/${e.guid}`, e).then((t) => t.device);
19
- updateNotificationProfile = async (e) => this.fetchInstance.put(`${r.NOTIFICATION_PROFILES}/${e.guid}`, e).then((t) => t.notification_profile);
20
- updateUserCommunicationProfile = async (e) => this.fetchInstance.put(r.USER_COMMUNICATION_PROFILE, e).then((t) => t.user_communication_profile);
21
- getInsightsNotificationProfiles = async () => this.fetchInstance.get(`${r.NOTIFICATION_PROFILES}/${r.INSIGHTS_NOTIFICATION_PROFILES}`).then((e) => e);
15
+ sendEmailVerification = async () => this.fetchInstance.post(o.EMAIL_VERIFICATIONS);
16
+ sendPhoneVerification = async () => this.fetchInstance.post(o.PHONE_VERIFICATIONS + "/deliver");
17
+ verifyPhoneToken = async (e) => this.fetchInstance.post(o.PHONE_VERIFICATIONS + "/verify", { sms_verification_token: e }).then((t) => ({ verified: t.verified }));
18
+ updateDevice = async (e) => this.fetchInstance.put(`${o.DEVICES}/${e.guid}`, e).then((t) => t.device);
19
+ updateNotificationProfile = async (e) => this.fetchInstance.put(`${o.NOTIFICATION_PROFILES}/${e.guid}`, e).then((t) => t.notification_profile);
20
+ updateUserCommunicationProfile = async (e) => this.fetchInstance.put(o.USER_COMMUNICATION_PROFILE, e).then((t) => t.user_communication_profile);
21
+ getInsightsNotificationProfiles = async () => this.fetchInstance.get(`${o.NOTIFICATION_PROFILES}/${o.INSIGHTS_NOTIFICATION_PROFILES}`).then((e) => e);
22
22
  }
23
23
  const v = "PARENT-ENTITY", C = (s, e) => ({
24
24
  [f.BudgetExceeded]: e.notification_budget_exceeded,
@@ -53,7 +53,7 @@ const v = "PARENT-ENTITY", C = (s, e) => ({
53
53
  [i.TransactionExpenseLarge]: e.large_transaction,
54
54
  [i.PromotionalCampaignMessages]: e.promotional_campaign_messages,
55
55
  [i.TransparentOverdraft]: e.transparent_overdraft
56
- })[s] || "", R = (s, e, t, o, d, p) => {
56
+ })[s] || "", R = (s, e, t, r, d, p) => {
57
57
  const g = [], {
58
58
  email_notifications_enabled: I,
59
59
  sms_notifications_enabled: P,
@@ -61,15 +61,15 @@ const v = "PARENT-ENTITY", C = (s, e) => ({
61
61
  } = e, {
62
62
  opted_out_of_email_notifications: b,
63
63
  opted_out_of_sms_notifications: E,
64
- opted_out_of_push_notifications: A
64
+ opted_out_of_push_notifications: S
65
65
  } = d;
66
- for (const a of o.filter((u) => u.entity_guid === v)) {
67
- const u = C(a.notification_type, t), S = o.filter(
66
+ for (const a of r.filter((u) => u.entity_guid === v)) {
67
+ const u = C(a.notification_type, t), A = r.filter(
68
68
  (c) => c.entity_guid !== v && c.notification_type === a.notification_type && s.some((h) => h.guid === c.entity_guid)
69
69
  ), _ = [];
70
- I && !b && a.email_channel && p.email && _.push(t.delivery_method_email_label), P && !E && a.sms_channel && p.phone && _.push(t.delivery_method_sms_label), T && !A && a.push_channel && _.push(t.delivery_method_push_label), g.push({
70
+ I && !b && a.email_channel && p.email && _.push(t.delivery_method_email_label), P && !E && a.sms_channel && p.phone && _.push(t.delivery_method_sms_label), T && !S && a.push_channel && _.push(t.delivery_method_push_label), g.push({
71
71
  ...a,
72
- children: S.map((c) => ({
72
+ children: A.map((c) => ({
73
73
  ...c,
74
74
  account: s.find((h) => h.guid === c.entity_guid),
75
75
  label: u
@@ -90,11 +90,7 @@ class x {
90
90
  selectedRule = void 0;
91
91
  transactionRules = [];
92
92
  constructor(e) {
93
- this.globalStore = e, this.api = new y(e.endpoint, e.sessionToken, e.onError), this.transactionApi = new m(
94
- e.endpoint,
95
- e.sessionToken,
96
- e.onError
97
- ), N(this);
93
+ this.globalStore = e, this.api = new y(e.endpoint, e.sessionToken), this.transactionApi = new m(e.endpoint, e.sessionToken), N(this);
98
94
  }
99
95
  get accountProfiles() {
100
96
  const e = this.globalStore.appDataStore.clientCommunicationProfile;
@@ -135,7 +131,7 @@ class x {
135
131
  deleteDevice = async (e) => {
136
132
  try {
137
133
  await this.api.deleteDevice(e);
138
- const t = this.devices.findIndex((o) => o.guid === e);
134
+ const t = this.devices.findIndex((r) => r.guid === e);
139
135
  return t >= 0 && l(() => {
140
136
  this.devices.splice(t, 1);
141
137
  }), { success: !0 };
@@ -207,9 +203,9 @@ class x {
207
203
  };
208
204
  updateDevice = async (e) => {
209
205
  try {
210
- const t = await this.api.updateDevice(e), o = this.devices.findIndex((d) => d.guid === e.guid);
211
- return o >= 0 && l(() => {
212
- this.devices[o] = t;
206
+ const t = await this.api.updateDevice(e), r = this.devices.findIndex((d) => d.guid === e.guid);
207
+ return r >= 0 && l(() => {
208
+ this.devices[r] = t;
213
209
  }), { success: !0 };
214
210
  } catch (t) {
215
211
  return console.error(`Error updating device: ${t}`), { success: !1 };
@@ -217,9 +213,9 @@ class x {
217
213
  };
218
214
  updateNotificationProfile = async (e) => {
219
215
  try {
220
- const t = await this.api.updateNotificationProfile(e), o = this.notificationProfiles.findIndex((d) => d.guid === e.guid);
221
- o >= 0 && l(() => {
222
- this.notificationProfiles[o] = t;
216
+ const t = await this.api.updateNotificationProfile(e), r = this.notificationProfiles.findIndex((d) => d.guid === e.guid);
217
+ r >= 0 && l(() => {
218
+ this.notificationProfiles[r] = t;
223
219
  });
224
220
  } catch (t) {
225
221
  console.error(`Error updating notification profile: ${t}`);