@mx-cartographer/experiences 7.10.36 → 7.10.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [7.10.37] - 02-26-2026
2
+
3
+ - **FIXED** - `InsightsNotificaiton` | Clickable Notification moves beat to top of feed fix
4
+
1
5
  ## [7.10.36] - 02-25-2026
2
6
 
3
7
  - **UPDATED** - MXUI to get new toggle button styling
@@ -0,0 +1,95 @@
1
+ import { jsx as e, jsxs as S } from "react/jsx-runtime";
2
+ import D from "@mui/material/ListItem";
3
+ import M from "@mui/material/ListItemButton";
4
+ import g from "@mui/material/ListItemIcon";
5
+ import C from "@mui/material/ListItemText";
6
+ import u from "@mui/material/Stack";
7
+ import L from "@mui/material/Switch";
8
+ import { Text as x } from "@mxenabled/mxui";
9
+ import w from "@mui/material/ListItemAvatar";
10
+ const G = ({
11
+ avatar: r,
12
+ endIcon: a,
13
+ isChecked: l,
14
+ isDisabled: d = !1,
15
+ isPrimaryTextBold: n = !1,
16
+ onClick: m,
17
+ onToggle: B,
18
+ primaryText: P,
19
+ secondaryText: v
20
+ }) => (
21
+ //TODO: implement common/components/ListItemRow.tsx
22
+ /* @__PURE__ */ e(
23
+ D,
24
+ {
25
+ secondaryAction: /* @__PURE__ */ e(L, { checked: l, onChange: B }),
26
+ sx: {
27
+ "& .MuiListItemSecondaryAction-root": { right: a ? 64 : 24 },
28
+ "& .MuiListItemButton-root": { pr: 24 }
29
+ },
30
+ children: /* @__PURE__ */ S(M, { onClick: d ? void 0 : () => m(), children: [
31
+ r && /* @__PURE__ */ e(w, { children: r }),
32
+ /* @__PURE__ */ e(C, { primaryTypographyProps: { fontWeight: 400 }, children: /* @__PURE__ */ e(u, { alignItems: "center", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ S(u, { sx: { width: "100%" }, children: [
33
+ /* @__PURE__ */ e(
34
+ x,
35
+ {
36
+ bold: n,
37
+ color: "text.primary",
38
+ sx: {
39
+ mr: 80
40
+ },
41
+ variant: "body1",
42
+ children: P
43
+ }
44
+ ),
45
+ /* @__PURE__ */ e(x, { color: "text.secondary", variant: "caption", children: v })
46
+ ] }) }) }),
47
+ !d && a && /* @__PURE__ */ e(g, { children: a })
48
+ ] })
49
+ }
50
+ )
51
+ ), H = ({
52
+ isChecked: r,
53
+ isDisabled: a = !1,
54
+ onToggle: l,
55
+ primaryText: d,
56
+ secondaryText: n = void 0,
57
+ useExtraPadding: m = !0
58
+ }) => /* @__PURE__ */ e(
59
+ D,
60
+ {
61
+ secondaryAction: /* @__PURE__ */ e(L, { checked: r, disabled: a, onChange: l }),
62
+ sx: {
63
+ pl: m ? 48 : 0,
64
+ "& .MuiListItemSecondaryAction-root": { right: m ? 64 : 24 }
65
+ },
66
+ children: /* @__PURE__ */ e(
67
+ C,
68
+ {
69
+ primary: d,
70
+ primaryTypographyProps: {
71
+ fontWeight: 400,
72
+ variant: "body1",
73
+ maxWidth: "calc(100% - 60px)",
74
+ color: "text.primary"
75
+ },
76
+ secondary: n,
77
+ secondaryTypographyProps: {
78
+ color: "text.secondary",
79
+ maxWidth: "calc(100% - 60px)",
80
+ variant: "caption",
81
+ whiteSpace: "wrap"
82
+ }
83
+ }
84
+ )
85
+ }
86
+ );
87
+ var b = /* @__PURE__ */ ((r) => (r.Accounts = "accounts", r.Budgets = "budgets", r.Insights = "insights", r.Personal = "personal", r))(b || {}), A = /* @__PURE__ */ ((r) => (r[r.DebtPaymentReminder = 3] = "DebtPaymentReminder", r[r.AccountBalanceLow = 6] = "AccountBalanceLow", r[r.AccountDepositLarge = 7] = "AccountDepositLarge", r[r.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", r[r.TransactionFeeCharge = 9] = "TransactionFeeCharge", r[r.InternationalTransaction = 23] = "InternationalTransaction", r[r.AccountDepositLargePosted = 48] = "AccountDepositLargePosted", r))(A || {}), E = /* @__PURE__ */ ((r) => (r[r.BudgetExceeded = 1] = "BudgetExceeded", r[r.BudgetOffTarget = 2] = "BudgetOffTarget", r))(E || {}), c = /* @__PURE__ */ ((r) => (r[r.AccountBalanceLow = 33] = "AccountBalanceLow", r[r.AccountDepositHigh = 34] = "AccountDepositHigh", r[r.BillAmountNotStandard = 49] = "BillAmountNotStandard", r[r.BudgetExceeded = 35] = "BudgetExceeded", r[r.BudgetOffTarget = 36] = "BudgetOffTarget", r[r.CategoryBudget = 43] = "CategoryBudget", r[r.CategorySpending = 50] = "CategorySpending", r[r.CreditCardCloseToLimit = 51] = "CreditCardCloseToLimit", r[r.DebtPaymentReminder = 37] = "DebtPaymentReminder", r[r.DebtPaymentReminderV3 = 66] = "DebtPaymentReminderV3", r[r.DiscoveredAccounts = 52] = "DiscoveredAccounts", r[r.DuplicatePayment = 42] = "DuplicatePayment", r[r.GoalProgress = 38] = "GoalProgress", r[r.MonthlySpendComparison = 53] = "MonthlySpendComparison", r[r.MonthlySpendToIncomeComparison = 54] = "MonthlySpendToIncomeComparison", r[r.MonthlySubscriptionAggregate = 55] = "MonthlySubscriptionAggregate", r[r.MonthlyTopMerchantSpending = 56] = "MonthlyTopMerchantSpending", r[r.PromotionalCampaignMessages = 67] = "PromotionalCampaignMessages", r[r.SaveAnExtra100Dollars = 57] = "SaveAnExtra100Dollars", r[r.SavingsOpportunity = 58] = "SavingsOpportunity", r[r.SetUpDirectDeposit = 59] = "SetUpDirectDeposit", r[r.SpendingPlanBudgetExceeded = 45] = "SpendingPlanBudgetExceeded", r[r.SpendingPlanCategorySpending = 44] = "SpendingPlanCategorySpending", r[r.SwitchDirectDeposit = 60] = "SwitchDirectDeposit", r[r.TransactionExpenseLarge = 39] = "TransactionExpenseLarge", r[r.TransactionFeeCharge = 40] = "TransactionFeeCharge", r[r.TransactionIsInternational = 41] = "TransactionIsInternational", r[r.TransparentOverdraft = 68] = "TransparentOverdraft", r[r.UncategorizedTransactions = 61] = "UncategorizedTransactions", r[r.UnifiedDeposit = 62] = "UnifiedDeposit", r[r.UpcomingBill = 63] = "UpcomingBill", r[r.WeekendSpendingSummary = 64] = "WeekendSpendingSummary", r[r.WeeklyNewMerchants = 65] = "WeeklyNewMerchants", r))(c || {});
88
+ export {
89
+ A,
90
+ E as B,
91
+ c as I,
92
+ b as N,
93
+ G as T,
94
+ H as a
95
+ };
@@ -14,7 +14,7 @@ import { startOfMonth as oe } from "date-fns/startOfMonth";
14
14
  import { DateCalendar as se } from "@mui/x-date-pickers/DateCalendar";
15
15
  import { LocalizationProvider as ae } from "@mui/x-date-pickers/LocalizationProvider";
16
16
  import { AdapterDateFns as ce } from "@mui/x-date-pickers/AdapterDateFnsV3";
17
- import { A as le, T as R, a as D, N as b } from "./Notification-Bs1fdbzI.mjs";
17
+ import { A as le, T as R, a as D, N as b } from "./Notification-CMBNDGC-.mjs";
18
18
  import { u as S, r as T, o as A, d as J, g as re, a as X, b as de } from "./hooks-0kWPTHNb.mjs";
19
19
  import { b as me } from "./Localization-2MODESHW.mjs";
20
20
  import { b as _e, f as he } from "./NumberFormatting-DjTD0t3W.mjs";
@@ -1,10 +1,11 @@
1
- import { makeAutoObservable as c, observable as f, runInAction as d } from "mobx";
2
- import { fromUnixTime as a, isSameDay as h } from "date-fns";
3
- import { F as l, A as o } from "./Fetch-DecPFeGU.mjs";
4
- class s {
1
+ import { makeAutoObservable as f, observable as l, runInAction as h } from "mobx";
2
+ import { fromUnixTime as s, isSameDay as u } from "date-fns";
3
+ import { I as d } from "./Notification-CMBNDGC-.mjs";
4
+ import { F as N, A as o } from "./Fetch-DecPFeGU.mjs";
5
+ class r {
5
6
  fetchInstance;
6
7
  constructor(t, i, n) {
7
- this.fetchInstance = new l(t, i, void 0, n);
8
+ this.fetchInstance = new N(t, i, void 0, n);
8
9
  }
9
10
  getNotifications = () => this.fetchInstance.get(o.NOTIFICATIONS).then(
10
11
  (t) => t.notifications.map((i) => i.notification)
@@ -17,36 +18,41 @@ class s {
17
18
  // A bug ticket has been filed to fix it, but should not require any changes here.
18
19
  markAllAsViewed = (t) => this.fetchInstance.put(`${o.NOTIFICATIONS}/mark_all_as_viewed`, { channel: t }).finally();
19
20
  }
20
- const I = (e, t) => {
21
- const i = a(t[e].delivered_at), n = a(t[e - 1]?.delivered_at);
22
- return !h(i, n);
21
+ let a = null;
22
+ const A = () => (a || (a = new Set(
23
+ Object.values(d).filter(
24
+ (e) => typeof e == "number"
25
+ )
26
+ )), a), g = (e, t) => {
27
+ const i = s(t[e].delivered_at), n = s(t[e - 1]?.delivered_at);
28
+ return !u(i, n);
23
29
  };
24
- function u(e) {
30
+ function p(e) {
25
31
  const i = Math.floor(Date.now() / 1e3);
26
32
  return e.filter((n) => {
27
- const r = n.delivered_at;
28
- return i - r <= 2592e3;
33
+ const c = n.delivered_at;
34
+ return i - c <= 2592e3;
29
35
  });
30
36
  }
31
- class w {
37
+ class T {
32
38
  globalStore;
33
- api = new s("/", "");
39
+ api = new r("/", "");
34
40
  isLoading = !0;
35
41
  notifications = [];
36
42
  notificationsLoaded = !1;
37
43
  constructor(t) {
38
- this.globalStore = t, this.api = new s(
44
+ this.globalStore = t, this.api = new r(
39
45
  t.endpoint,
40
46
  t.sessionToken,
41
47
  t.onError
42
- ), c(this, { notifications: f });
48
+ ), f(this, { notifications: l });
43
49
  }
44
50
  // Used in Money Dashboard
45
51
  get newNotifications() {
46
52
  return this.recentNotifications.filter((t) => !t.has_been_viewed);
47
53
  }
48
54
  get recentNotifications() {
49
- return u(this.notifications);
55
+ return p(this.notifications);
50
56
  }
51
57
  setNotifications = (t) => {
52
58
  this.notifications = t, this.notificationsLoaded = !0;
@@ -59,7 +65,7 @@ class w {
59
65
  } catch (t) {
60
66
  console.error(`Error occurred while loading notifications: ${t}`);
61
67
  } finally {
62
- d(() => {
68
+ h(() => {
63
69
  this.isLoading = !1;
64
70
  });
65
71
  }
@@ -72,8 +78,9 @@ class w {
72
78
  };
73
79
  }
74
80
  export {
75
- w as N,
76
- s as a,
77
- u as f,
78
- I as s
81
+ T as N,
82
+ r as a,
83
+ p as f,
84
+ A as g,
85
+ g as s
79
86
  };
@@ -1,6 +1,6 @@
1
1
  import { makeAutoObservable as N, runInAction as l } from "mobx";
2
2
  import { F as D, A as r } from "./Fetch-DecPFeGU.mjs";
3
- import { B as f, A as n, I as i } from "./Notification-Bs1fdbzI.mjs";
3
+ import { B as f, A as n, I as i } from "./Notification-CMBNDGC-.mjs";
4
4
  import { T as m } from "./TransactionApi-CjBoLleL.mjs";
5
5
  class y {
6
6
  fetchInstance;
@@ -4,8 +4,8 @@ import { F as h, A as a } from "../Fetch-DecPFeGU.mjs";
4
4
  import { B as Me } from "../BeatApi-De2IaqH2.mjs";
5
5
  import { C as F } from "../CategoryStore-Cg6hsxza.mjs";
6
6
  import { a as Ue } from "../CategoryStore-Cg6hsxza.mjs";
7
- import { N as $ } from "../NotificationStore-CA8WNgcR.mjs";
8
- import { a as Oe } from "../NotificationStore-CA8WNgcR.mjs";
7
+ import { N as $ } from "../NotificationStore-DBs11ZBH.mjs";
8
+ import { a as Oe } from "../NotificationStore-DBs11ZBH.mjs";
9
9
  import { T as G } from "../Transaction-BNO5Yz-B.mjs";
10
10
  import { L as Re, a as Fe } from "../Transaction-BNO5Yz-B.mjs";
11
11
  import { H } from "../Help-B8mD4aLJ.mjs";
@@ -34,7 +34,7 @@ import { E as Os } from "../EmptyState-DHAkGsjk.mjs";
34
34
  import { L as Rs } from "../ListItemAction-Dq1lMdxh.mjs";
35
35
  import { T as z } from "../TrendsStore-Ys6BY_Uo.mjs";
36
36
  import { L as $s } from "../TrendsStore-Ys6BY_Uo.mjs";
37
- import { A as Hs, B as Ws, I as qs, N as Ys, T as Qs, a as Ks } from "../Notification-Bs1fdbzI.mjs";
37
+ import { A as Hs, B as Ws, I as qs, N as Ys, T as Qs, a as Ks } from "../Notification-CMBNDGC-.mjs";
38
38
  import { C as js, a as Vs } from "../User-C8w4H0cj.mjs";
39
39
  import { S as Zs } from "../StatusBar-BK_uYHAB.mjs";
40
40
  import { D as tr } from "../Donut-DSGXraiS.mjs";
@@ -70,7 +70,7 @@ import { F as it } from "../FinstrongStore-DBSoLGSE.mjs";
70
70
  import { A as nt, m as ct, a as ut, b as dt } from "../InvestmentUtil-BItV7uEs.mjs";
71
71
  import { M as lt } from "../MerchantStore-WvZ4gnQe.mjs";
72
72
  import { N as ht } from "../NetWorthStore-yV43kJro.mjs";
73
- import { a as pt } from "../SettingsStore-uQ4s2d0P.mjs";
73
+ import { a as pt } from "../SettingsStore-BqPjOIWk.mjs";
74
74
  import { addMonths as gt } from "date-fns/addMonths";
75
75
  import { getMonth as m } from "date-fns/getMonth";
76
76
  import { a as bo, e as wo, d as Co, A as Do, f as Ao, C as Eo, g as xo, E as To, M as Io, N as vo, c as Bo, P as ko, h as Mo, S as No } from "../Account-BiB1F8lL.mjs";
@@ -49,26 +49,36 @@ export declare enum BudgetNotificationTypes {
49
49
  }
50
50
  export declare enum InsightNotificationTypes {
51
51
  AccountBalanceLow = 33,
52
+ AccountDepositHigh = 34,
52
53
  BillAmountNotStandard = 49,
54
+ BudgetExceeded = 35,
55
+ BudgetOffTarget = 36,
56
+ CategoryBudget = 43,
53
57
  CategorySpending = 50,
54
58
  CreditCardCloseToLimit = 51,
55
59
  DebtPaymentReminder = 37,
60
+ DebtPaymentReminderV3 = 66,
61
+ DiscoveredAccounts = 52,
56
62
  DuplicatePayment = 42,
63
+ GoalProgress = 38,
57
64
  MonthlySpendComparison = 53,
58
65
  MonthlySpendToIncomeComparison = 54,
59
66
  MonthlySubscriptionAggregate = 55,
60
67
  MonthlyTopMerchantSpending = 56,
68
+ PromotionalCampaignMessages = 67,
61
69
  SaveAnExtra100Dollars = 57,
62
70
  SavingsOpportunity = 58,
63
71
  SetUpDirectDeposit = 59,
72
+ SpendingPlanBudgetExceeded = 45,
73
+ SpendingPlanCategorySpending = 44,
64
74
  SwitchDirectDeposit = 60,
75
+ TransactionExpenseLarge = 39,
76
+ TransactionFeeCharge = 40,
77
+ TransactionIsInternational = 41,
78
+ TransparentOverdraft = 68,
65
79
  UncategorizedTransactions = 61,
66
80
  UnifiedDeposit = 62,
67
81
  UpcomingBill = 63,
68
82
  WeekendSpendingSummary = 64,
69
- WeeklyNewMerchants = 65,
70
- DiscoveredAccounts = 52,
71
- TransactionExpenseLarge = 39,
72
- PromotionalCampaignMessages = 67,
73
- TransparentOverdraft = 68
83
+ WeeklyNewMerchants = 65
74
84
  }
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
- import { Notification } from '../../common';
2
+ import { NotificationTypes, Notification } from '../../common';
3
3
  export interface NotificationListProps {
4
+ notificationTypes?: NotificationTypes[];
4
5
  onClick?: (notification: Notification) => void;
5
6
  onManageNotifications: () => void;
6
7
  }
@@ -1,42 +1,42 @@
1
- import { A as f, B as y } from "../Notification-Bs1fdbzI.mjs";
2
- import { A as g } from "../Fetch-DecPFeGU.mjs";
3
- import { s as k } from "../NotificationStore-CA8WNgcR.mjs";
4
- import { N as xt, f as Nt } from "../NotificationStore-CA8WNgcR.mjs";
5
- import { jsx as t, jsxs as l, Fragment as C } from "react/jsx-runtime";
6
- import v, { useEffect as L } from "react";
1
+ import { A as f, B as N, N as A } from "../Notification-CMBNDGC-.mjs";
2
+ import { A as y } from "../Fetch-DecPFeGU.mjs";
3
+ import { g as T, s as D } from "../NotificationStore-DBs11ZBH.mjs";
4
+ import { N as vt, f as Lt } from "../NotificationStore-DBs11ZBH.mjs";
5
+ import { jsx as t, jsxs as l, Fragment as S } from "react/jsx-runtime";
6
+ import B, { useEffect as I } from "react";
7
7
  import { observer as p } from "mobx-react-lite";
8
- import h from "@mui/material/Box";
9
- import A from "@mui/material/Divider";
10
- import D from "@mui/material/List";
11
- import { Text as m, InstitutionLogo as B, CategoryIcon as T } from "@mxenabled/mxui";
12
- import { h as I } from "../DateUtil-CVXVMbjf.mjs";
13
- import { useTheme as R, Card as O } from "@mui/material";
14
- import { d as G, k as E, u as _, n as x, b as N, a as j } from "../hooks-0kWPTHNb.mjs";
15
- import { Icon as z, Settings as U } from "@mxenabled/mx-icons";
16
- import F from "@mui/material/Button";
17
- import P from "@mui/material/Stack";
18
- import { L as S } from "../Loader-D3rjKx72.mjs";
19
- import W from "@mui/material/IconButton";
20
- import { N as $ } from "../NotificationSettings-CgtRBUXP.mjs";
21
- import { D as b } from "../Drawer-DV4NTsFg.mjs";
22
- const _t = (e) => {
23
- switch (e) {
24
- case y.BudgetExceeded:
25
- case y.BudgetOffTarget:
26
- return g.BUDGETS;
8
+ import b from "@mui/material/Box";
9
+ import R from "@mui/material/Divider";
10
+ import O from "@mui/material/List";
11
+ import { Text as g, InstitutionLogo as G, CategoryIcon as E } from "@mxenabled/mxui";
12
+ import { h as j } from "../DateUtil-CVXVMbjf.mjs";
13
+ import { useTheme as z, Card as U } from "@mui/material";
14
+ import { d as F, k as P, u as C, n as w, b as k, a as V } from "../hooks-0kWPTHNb.mjs";
15
+ import { Icon as W, Settings as $ } from "@mxenabled/mx-icons";
16
+ import H from "@mui/material/Button";
17
+ import M from "@mui/material/Stack";
18
+ import { L as v } from "../Loader-D3rjKx72.mjs";
19
+ import X from "@mui/material/IconButton";
20
+ import { N as Y } from "../NotificationSettings-Bw4fdVRU.mjs";
21
+ import { D as x } from "../Drawer-DV4NTsFg.mjs";
22
+ const xt = (i) => {
23
+ switch (i) {
24
+ case N.BudgetExceeded:
25
+ case N.BudgetOffTarget:
26
+ return y.BUDGETS;
27
27
  case f.DebtPaymentReminder:
28
28
  case f.AccountBalanceLow:
29
29
  case f.AccountDepositLarge:
30
- return g.ACCOUNTS;
30
+ return y.ACCOUNTS;
31
31
  case f.TransactionExpenseLarge:
32
32
  case f.TransactionFeeCharge:
33
33
  case f.InternationalTransaction:
34
- return g.TRANSACTIONS;
34
+ return y.TRANSACTIONS;
35
35
  default:
36
36
  return null;
37
37
  }
38
- }, H = ({ date: e }) => /* @__PURE__ */ t(h, { sx: { display: "flex", justifyContent: "center", mt: 12, py: 8 }, children: /* @__PURE__ */ t(m, { bold: !0, variant: "Small", children: I(e) }) }), M = ({ notification: e }) => {
39
- const { accounts: o } = G(), { budgets: r } = E(), { accounts: s } = _(), n = o.find((i) => i.guid === e.entity_guid), a = r.find((i) => i.guid === e.entity_guid), d = e.entity_guid.includes("GOL"), u = {
38
+ }, q = ({ date: i }) => /* @__PURE__ */ t(b, { sx: { display: "flex", justifyContent: "center", mt: 12, py: 8 }, children: /* @__PURE__ */ t(g, { bold: !0, variant: "Small", children: j(i) }) }), J = ({ notification: i }) => {
39
+ const { accounts: e } = F(), { budgets: r } = P(), { accounts: n } = C(), o = e.find((c) => c.guid === i.entity_guid), a = r.find((c) => c.guid === i.entity_guid), d = i.entity_guid.includes("GOL"), u = {
40
40
  badge: {
41
41
  display: "flex",
42
42
  alignItems: "center",
@@ -45,16 +45,16 @@ const _t = (e) => {
45
45
  marginRight: 12
46
46
  }
47
47
  };
48
- return n || d ? /* @__PURE__ */ t("div", { style: u.badge, children: /* @__PURE__ */ t(
49
- B,
48
+ return o || d ? /* @__PURE__ */ t("div", { style: u.badge, children: /* @__PURE__ */ t(
49
+ G,
50
50
  {
51
- alt: n?.institutionName || s.institution_logo_alt,
52
- institutionGuid: n?.institution_guid ?? "",
51
+ alt: o?.institutionName || n.institution_logo_alt,
52
+ institutionGuid: o?.institution_guid ?? "",
53
53
  size: 33
54
54
  }
55
- ) }) : /* @__PURE__ */ t("div", { style: u.badge, children: /* @__PURE__ */ t(T, { categoryGuid: a?.category_guid, size: 36 }) });
56
- }, V = p(M), X = ({ notification: e, onClick: o }) => {
57
- const { updateNotification: r } = x(), s = R(), n = {
55
+ ) }) : /* @__PURE__ */ t("div", { style: u.badge, children: /* @__PURE__ */ t(E, { categoryGuid: a?.category_guid, size: 36 }) });
56
+ }, K = p(J), Q = ({ notification: i, onClick: e }) => {
57
+ const { updateNotification: r } = w(), n = z(), o = {
58
58
  card: {
59
59
  alignItems: "center",
60
60
  cursor: "pointer",
@@ -63,14 +63,14 @@ const _t = (e) => {
63
63
  paddingX: 24,
64
64
  paddingY: 12,
65
65
  "&:focus": {
66
- backgroundColor: s.palette.background.default
66
+ backgroundColor: n.palette.background.default
67
67
  },
68
68
  "&:hover": {
69
- backgroundColor: s.palette.background.default
69
+ backgroundColor: n.palette.background.default
70
70
  }
71
71
  },
72
72
  dot: {
73
- backgroundColor: s.palette.primary.main,
73
+ backgroundColor: n.palette.primary.main,
74
74
  borderRadius: "100%",
75
75
  flex: "0 0 auto",
76
76
  marginLeft: -8,
@@ -79,21 +79,21 @@ const _t = (e) => {
79
79
  width: 8
80
80
  }
81
81
  };
82
- return /* @__PURE__ */ l(O, { onClick: () => {
83
- o(e), r({ ...e, has_been_viewed: !0 }).finally();
84
- }, sx: n.card, children: [
85
- e.has_been_viewed ? null : /* @__PURE__ */ t("div", { "data-testid": "new-message-dot", style: n.dot }),
86
- /* @__PURE__ */ t(V, { notification: e }),
87
- /* @__PURE__ */ t(m, { bold: !e.has_been_viewed, truncate: !1, variant: "Small", children: e.content })
82
+ return /* @__PURE__ */ l(U, { onClick: () => {
83
+ e(i), r({ ...i, has_been_viewed: !0 }).finally();
84
+ }, sx: o.card, children: [
85
+ i.has_been_viewed ? null : /* @__PURE__ */ t("div", { "data-testid": "new-message-dot", style: o.dot }),
86
+ /* @__PURE__ */ t(K, { notification: i }),
87
+ /* @__PURE__ */ t(g, { bold: !i.has_been_viewed, truncate: !1, variant: "Small", children: i.content })
88
88
  ] });
89
- }, Y = p(
90
- ({ onManageNotifications: e }) => {
91
- const { notifications: o } = _();
92
- return /* @__PURE__ */ l(P, { sx: { alignItems: "center", height: "95%", justifyContent: "center" }, children: [
93
- /* @__PURE__ */ t(z, { name: "notifications", size: 32 }),
94
- /* @__PURE__ */ t(m, { sx: { pt: 32 }, variant: "H3", children: o.notification_empty_state.no_new_notifications }),
89
+ }, Z = p(
90
+ ({ onManageNotifications: i }) => {
91
+ const { notifications: e } = C();
92
+ return /* @__PURE__ */ l(M, { sx: { alignItems: "center", height: "95%", justifyContent: "center" }, children: [
93
+ /* @__PURE__ */ t(W, { name: "notifications", size: 32 }),
94
+ /* @__PURE__ */ t(g, { sx: { pt: 32 }, variant: "H3", children: e.notification_empty_state.no_new_notifications }),
95
95
  /* @__PURE__ */ t(
96
- m,
96
+ g,
97
97
  {
98
98
  sx: {
99
99
  maxWidth: 327,
@@ -103,89 +103,101 @@ const _t = (e) => {
103
103
  whiteSpace: "normal"
104
104
  },
105
105
  variant: "subtitle1",
106
- children: o.notification_empty_state.notification_description
106
+ children: e.notification_empty_state.notification_description
107
107
  }
108
108
  ),
109
- /* @__PURE__ */ t(F, { onClick: e, sx: { p: "12px 16px" }, variant: "outlined", children: o.notification_empty_state.manage_notifications })
109
+ /* @__PURE__ */ t(H, { onClick: i, sx: { p: "12px 16px" }, variant: "outlined", children: e.notification_empty_state.manage_notifications })
110
110
  ] });
111
111
  }
112
- ), q = ({ onClick: e, onManageNotifications: o }) => {
113
- const { isLoading: r, loadNotifications: s, markAllAsViewed: n, recentNotifications: a } = x(), { isInitialized: d } = N(), u = (i) => {
114
- e?.(i);
112
+ ), tt = ({
113
+ notificationTypes: i,
114
+ onClick: e,
115
+ onManageNotifications: r
116
+ }) => {
117
+ const { isLoading: n, loadNotifications: o, markAllAsViewed: a, recentNotifications: d } = w(), { isInitialized: u } = k(), c = (s) => {
118
+ e?.(s);
115
119
  };
116
- return L(() => {
117
- s().then(() => n()).finally();
118
- }, []), !d || r ? /* @__PURE__ */ t(S, {}) : /* @__PURE__ */ l(C, { children: [
119
- a.length === 0 && /* @__PURE__ */ t(Y, { onManageNotifications: o }),
120
- /* @__PURE__ */ t(D, { sx: { p: 16 }, children: a.slice().sort((i, c) => c.delivered_at - i.delivered_at).map((i, c) => {
121
- const w = k(c, a);
122
- return /* @__PURE__ */ l(h, { sx: { mb: 12 }, children: [
123
- w && /* @__PURE__ */ l(h, { sx: { mb: 12 }, children: [
124
- /* @__PURE__ */ t(H, { date: i.delivered_at }),
125
- /* @__PURE__ */ t(A, {})
120
+ I(() => {
121
+ o().then(() => a()).finally();
122
+ }, []);
123
+ const m = i?.includes(A.Insights);
124
+ if (!u || n)
125
+ return /* @__PURE__ */ t(v, {});
126
+ const h = d.slice().sort((s, _) => _.delivered_at - s.delivered_at).filter(
127
+ (s) => m ? T().has(s.notification_type) : !0
128
+ );
129
+ return /* @__PURE__ */ l(S, { children: [
130
+ h.length === 0 && /* @__PURE__ */ t(Z, { onManageNotifications: r }),
131
+ /* @__PURE__ */ t(O, { sx: { p: 16 }, children: h.map((s, _) => {
132
+ const L = D(_, h);
133
+ return /* @__PURE__ */ l(b, { sx: { mb: 12 }, children: [
134
+ L && /* @__PURE__ */ l(b, { sx: { mb: 12 }, children: [
135
+ /* @__PURE__ */ t(q, { date: s.delivered_at }),
136
+ /* @__PURE__ */ t(R, {})
126
137
  ] }),
127
- /* @__PURE__ */ t(X, { notification: i, onClick: u })
128
- ] }, i.guid);
138
+ /* @__PURE__ */ t(Q, { notification: s, onClick: c })
139
+ ] }, s.guid);
129
140
  }) })
130
141
  ] });
131
- }, J = p(q), yt = p(
132
- ({ notificationTypes: e, isOpen: o, onClose: r, onNotificationClick: s }) => {
133
- const { config: n } = j(), { notifications: a, settings: d } = _(), { isCopyLoaded: u } = N(), [i, c] = v.useState(!1);
134
- return u ? /* @__PURE__ */ l(C, { children: [
142
+ }, it = p(tt), St = p(
143
+ ({ notificationTypes: i, isOpen: e, onClose: r, onNotificationClick: n }) => {
144
+ const { config: o } = V(), { notifications: a, settings: d } = C(), { isCopyLoaded: u } = k(), [c, m] = B.useState(!1);
145
+ return u ? /* @__PURE__ */ l(S, { children: [
135
146
  /* @__PURE__ */ l(
136
- b,
147
+ x,
137
148
  {
138
149
  ariaLabelClose: a.close_notifications,
139
- isOpen: o,
150
+ isOpen: e,
140
151
  onClose: r,
141
152
  title: a.notifications_title,
142
153
  children: [
143
154
  /* @__PURE__ */ t(
144
- W,
155
+ X,
145
156
  {
146
157
  "aria-label": d.open_notification_settings_btn_aria,
147
- onClick: () => c(!0),
158
+ onClick: () => m(!0),
148
159
  sx: {
149
160
  position: "absolute",
150
161
  right: 8,
151
162
  top: 8
152
163
  },
153
- children: /* @__PURE__ */ t(U, { size: 24 })
164
+ children: /* @__PURE__ */ t($, { size: 24 })
154
165
  }
155
166
  ),
156
167
  /* @__PURE__ */ t(
157
- J,
168
+ it,
158
169
  {
159
- onClick: s,
160
- onManageNotifications: () => c(!0)
170
+ notificationTypes: i,
171
+ onClick: n,
172
+ onManageNotifications: () => m(!0)
161
173
  }
162
174
  )
163
175
  ]
164
176
  }
165
177
  ),
166
178
  /* @__PURE__ */ t(
167
- b,
179
+ x,
168
180
  {
169
181
  ariaLabelClose: a.close_notification_settings,
170
- isOpen: i,
171
- onClose: () => c(!1),
182
+ isOpen: c,
183
+ onClose: () => m(!1),
172
184
  title: d.notification_settings_title,
173
185
  children: /* @__PURE__ */ t(
174
- $,
186
+ Y,
175
187
  {
176
- notificationTypes: e,
177
- showPersonalDetails: !n.display_user_profile_in_settings
188
+ notificationTypes: i,
189
+ showPersonalDetails: !o.display_user_profile_in_settings
178
190
  }
179
191
  )
180
192
  }
181
193
  )
182
- ] }) : /* @__PURE__ */ t(S, {});
194
+ ] }) : /* @__PURE__ */ t(v, {});
183
195
  }
184
196
  );
185
197
  export {
186
- yt as NotificationDrawer,
187
- J as NotificationList,
188
- xt as NotificationStore,
189
- Nt as filterRecentNotifications,
190
- _t as getNotificationDetailRoute
198
+ St as NotificationDrawer,
199
+ it as NotificationList,
200
+ vt as NotificationStore,
201
+ Lt as filterRecentNotifications,
202
+ xt as getNotificationDetailRoute
191
203
  };
@@ -1,4 +1,5 @@
1
1
  import { Notification } from '../../common';
2
+ export declare const getInsightNotificationTypeValues: () => Set<number>;
2
3
  export declare const sortByDate: (a: Notification, b: Notification) => number;
3
4
  export declare const shouldShowDate: (index: number, notifications: Notification[]) => boolean;
4
5
  export declare const hasInsetBorder: (index: number, notifications: Notification[]) => boolean;
@@ -1,4 +1,4 @@
1
- import { S as Xt, a as Yt } from "../SettingsStore-uQ4s2d0P.mjs";
1
+ import { S as Xt, a as Yt } from "../SettingsStore-BqPjOIWk.mjs";
2
2
  import { jsxs as c, Fragment as Q, jsx as e } from "react/jsx-runtime";
3
3
  import p from "react";
4
4
  import { observer as C } from "mobx-react-lite";
@@ -16,8 +16,8 @@ import V from "@mui/material/Box";
16
16
  import Z from "@mui/material/Button";
17
17
  import I from "@mui/material/TextField";
18
18
  import { H3 as K, P as N, Text as v, Icon as L, ChevronRightIcon as ve } from "@mxenabled/mxui";
19
- import { V as Ce, a as De, N as j } from "../NotificationSettings-CgtRBUXP.mjs";
20
- import { A as Qt, B as Zt, I as eo } from "../NotificationSettings-CgtRBUXP.mjs";
19
+ import { V as Ce, a as De, N as j } from "../NotificationSettings-Bw4fdVRU.mjs";
20
+ import { A as Qt, B as Zt, I as eo } from "../NotificationSettings-Bw4fdVRU.mjs";
21
21
  import { u as D, a as $, r as A, o as Se, b as ee, m as z } from "../hooks-0kWPTHNb.mjs";
22
22
  import { u as O } from "../useScreenSize-B6JyS_Lj.mjs";
23
23
  import { D as G } from "../Dialog-BqUCsQvo.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.10.36",
3
+ "version": "7.10.37",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,95 +0,0 @@
1
- import { jsx as e, jsxs as S } from "react/jsx-runtime";
2
- import o from "@mui/material/ListItem";
3
- import c from "@mui/material/ListItemButton";
4
- import p from "@mui/material/ListItemIcon";
5
- import u from "@mui/material/ListItemText";
6
- import x from "@mui/material/Stack";
7
- import D from "@mui/material/Switch";
8
- import { Text as L } from "@mxenabled/mxui";
9
- import w from "@mui/material/ListItemAvatar";
10
- const z = ({
11
- avatar: r,
12
- endIcon: a,
13
- isChecked: l,
14
- isDisabled: d = !1,
15
- isPrimaryTextBold: n = !1,
16
- onClick: m,
17
- onToggle: C,
18
- primaryText: v,
19
- secondaryText: M
20
- }) => (
21
- //TODO: implement common/components/ListItemRow.tsx
22
- /* @__PURE__ */ e(
23
- o,
24
- {
25
- secondaryAction: /* @__PURE__ */ e(D, { checked: l, onChange: C }),
26
- sx: {
27
- "& .MuiListItemSecondaryAction-root": { right: a ? 64 : 24 },
28
- "& .MuiListItemButton-root": { pr: 24 }
29
- },
30
- children: /* @__PURE__ */ S(c, { onClick: d ? void 0 : () => m(), children: [
31
- r && /* @__PURE__ */ e(w, { children: r }),
32
- /* @__PURE__ */ e(u, { primaryTypographyProps: { fontWeight: 400 }, children: /* @__PURE__ */ e(x, { alignItems: "center", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ S(x, { sx: { width: "100%" }, children: [
33
- /* @__PURE__ */ e(
34
- L,
35
- {
36
- bold: n,
37
- color: "text.primary",
38
- sx: {
39
- mr: 80
40
- },
41
- variant: "body1",
42
- children: v
43
- }
44
- ),
45
- /* @__PURE__ */ e(L, { color: "text.secondary", variant: "caption", children: M })
46
- ] }) }) }),
47
- !d && a && /* @__PURE__ */ e(p, { children: a })
48
- ] })
49
- }
50
- )
51
- ), F = ({
52
- isChecked: r,
53
- isDisabled: a = !1,
54
- onToggle: l,
55
- primaryText: d,
56
- secondaryText: n = void 0,
57
- useExtraPadding: m = !0
58
- }) => /* @__PURE__ */ e(
59
- o,
60
- {
61
- secondaryAction: /* @__PURE__ */ e(D, { checked: r, disabled: a, onChange: l }),
62
- sx: {
63
- pl: m ? 48 : 0,
64
- "& .MuiListItemSecondaryAction-root": { right: m ? 64 : 24 }
65
- },
66
- children: /* @__PURE__ */ e(
67
- u,
68
- {
69
- primary: d,
70
- primaryTypographyProps: {
71
- fontWeight: 400,
72
- variant: "body1",
73
- maxWidth: "calc(100% - 60px)",
74
- color: "text.primary"
75
- },
76
- secondary: n,
77
- secondaryTypographyProps: {
78
- color: "text.secondary",
79
- maxWidth: "calc(100% - 60px)",
80
- variant: "caption",
81
- whiteSpace: "wrap"
82
- }
83
- }
84
- )
85
- }
86
- );
87
- var B = /* @__PURE__ */ ((r) => (r.Accounts = "accounts", r.Budgets = "budgets", r.Insights = "insights", r.Personal = "personal", r))(B || {}), P = /* @__PURE__ */ ((r) => (r[r.DebtPaymentReminder = 3] = "DebtPaymentReminder", r[r.AccountBalanceLow = 6] = "AccountBalanceLow", r[r.AccountDepositLarge = 7] = "AccountDepositLarge", r[r.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", r[r.TransactionFeeCharge = 9] = "TransactionFeeCharge", r[r.InternationalTransaction = 23] = "InternationalTransaction", r[r.AccountDepositLargePosted = 48] = "AccountDepositLargePosted", r))(P || {}), b = /* @__PURE__ */ ((r) => (r[r.BudgetExceeded = 1] = "BudgetExceeded", r[r.BudgetOffTarget = 2] = "BudgetOffTarget", r))(b || {}), A = /* @__PURE__ */ ((r) => (r[r.AccountBalanceLow = 33] = "AccountBalanceLow", r[r.BillAmountNotStandard = 49] = "BillAmountNotStandard", r[r.CategorySpending = 50] = "CategorySpending", r[r.CreditCardCloseToLimit = 51] = "CreditCardCloseToLimit", r[r.DebtPaymentReminder = 37] = "DebtPaymentReminder", r[r.DuplicatePayment = 42] = "DuplicatePayment", r[r.MonthlySpendComparison = 53] = "MonthlySpendComparison", r[r.MonthlySpendToIncomeComparison = 54] = "MonthlySpendToIncomeComparison", r[r.MonthlySubscriptionAggregate = 55] = "MonthlySubscriptionAggregate", r[r.MonthlyTopMerchantSpending = 56] = "MonthlyTopMerchantSpending", r[r.SaveAnExtra100Dollars = 57] = "SaveAnExtra100Dollars", r[r.SavingsOpportunity = 58] = "SavingsOpportunity", r[r.SetUpDirectDeposit = 59] = "SetUpDirectDeposit", r[r.SwitchDirectDeposit = 60] = "SwitchDirectDeposit", r[r.UncategorizedTransactions = 61] = "UncategorizedTransactions", r[r.UnifiedDeposit = 62] = "UnifiedDeposit", r[r.UpcomingBill = 63] = "UpcomingBill", r[r.WeekendSpendingSummary = 64] = "WeekendSpendingSummary", r[r.WeeklyNewMerchants = 65] = "WeeklyNewMerchants", r[r.DiscoveredAccounts = 52] = "DiscoveredAccounts", r[r.TransactionExpenseLarge = 39] = "TransactionExpenseLarge", r[r.PromotionalCampaignMessages = 67] = "PromotionalCampaignMessages", r[r.TransparentOverdraft = 68] = "TransparentOverdraft", r))(A || {});
88
- export {
89
- P as A,
90
- b as B,
91
- A as I,
92
- B as N,
93
- z as T,
94
- F as a
95
- };