@mx-cartographer/experiences 7.10.29-alpha.mm0 → 7.10.29

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,7 +1,6 @@
1
- ## [7.10.28] - 02-20-2026
1
+ ## [7.10.29] - 02-23-2026
2
2
 
3
- - **UPDATED** - Use `recentNotifications` instead of `newNotifications` in `NotificationList`
4
- - **UPDATED** - Adjust `filterRecentNotifications` to filter for last 30 days instead of 7 days
3
+ - **FIXED** - `Cashback` Mobile | Info hover bug
5
4
 
6
5
  ## [7.10.28] - 02-20-2026
7
6
 
@@ -0,0 +1,98 @@
1
+ import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
+ import { useState as l } from "react";
3
+ import p from "@mui/material/IconButton";
4
+ import f from "@mui/material/Stack";
5
+ import h from "@mui/material/Tooltip";
6
+ import { Text as a, Icon as d, IconWeight as u } from "@mxenabled/mxui";
7
+ import { makeAutoObservable as c } from "mobx";
8
+ import { addDays as x } from "date-fns/addDays";
9
+ import { differenceInDays as g } from "date-fns/differenceInDays";
10
+ import { endOfMonth as S } from "date-fns/endOfMonth";
11
+ import { isBefore as I } from "date-fns/isBefore";
12
+ import { startOfToday as s } from "date-fns/startOfToday";
13
+ const b = ({
14
+ body: o,
15
+ iconName: e = "info",
16
+ title: n
17
+ }) => {
18
+ const [i, r] = l(!1);
19
+ return /* @__PURE__ */ t(
20
+ h,
21
+ {
22
+ open: i,
23
+ title: /* @__PURE__ */ m(f, { gap: 2, p: 12, sx: { textOverflow: "none" }, children: [
24
+ /* @__PURE__ */ t(a, { bold: !0, variant: "Body", children: n }),
25
+ /* @__PURE__ */ t(a, { sx: { whiteSpace: "unset" }, variant: "Small", children: o })
26
+ ] }),
27
+ children: /* @__PURE__ */ t(
28
+ p,
29
+ {
30
+ "aria-label": n,
31
+ onClick: () => r(!i),
32
+ onMouseEnter: () => r(!0),
33
+ onMouseLeave: () => r(!1),
34
+ sx: {
35
+ minHeight: 0,
36
+ minWidth: 0,
37
+ p: 0
38
+ },
39
+ children: /* @__PURE__ */ t(
40
+ d,
41
+ {
42
+ name: e,
43
+ sx: { color: "primary.main", fontSize: 16 },
44
+ weight: u.Dark
45
+ }
46
+ )
47
+ }
48
+ )
49
+ }
50
+ );
51
+ }, B = b;
52
+ class w {
53
+ // Cashflow is hard-coded to display 30 days starting from today
54
+ dateRange = { start: s(), end: x(s(), 30) };
55
+ isDirty = !1;
56
+ nextIncome = void 0;
57
+ upcomingExpenses = [];
58
+ selectedCashAccounts = [];
59
+ constructor() {
60
+ c(this);
61
+ }
62
+ // Returns the number of days until the next income activity or 0 if there is no income activity
63
+ get daysUntilNextIncome() {
64
+ return this.nextIncome ? Math.abs(g(s(), this.nextIncome.expectedDate)) : 0;
65
+ }
66
+ // Returns the expenses (Activities) until the next income activity or the end of the month
67
+ // if there is no income activity
68
+ get expensesTilNextIncome() {
69
+ return this.upcomingExpenses.filter(
70
+ (e) => I(e.expectedDate, this.nextIncome?.expectedDate || S(/* @__PURE__ */ new Date()))
71
+ );
72
+ }
73
+ setNextIncome = (e) => {
74
+ this.nextIncome = e;
75
+ };
76
+ setUpcomingExpenses = (e) => {
77
+ this.upcomingExpenses = e;
78
+ };
79
+ setSelectedCashAccounts = (e) => this.selectedCashAccounts = e;
80
+ }
81
+ class N {
82
+ globalStore;
83
+ uiStore;
84
+ constructor(e) {
85
+ this.globalStore = e, this.uiStore = new w(), c(this);
86
+ }
87
+ completeOnboarding = async () => {
88
+ const e = {
89
+ ...this.globalStore.userStore.userProfile,
90
+ has_completed_cash_flow_onboarding: !0
91
+ };
92
+ await this.globalStore.userStore.updateUserProfile(e);
93
+ };
94
+ }
95
+ export {
96
+ N as C,
97
+ B as I
98
+ };
@@ -17,7 +17,7 @@ class s {
17
17
  // A bug ticket has been filed to fix it, but should not require any changes here.
18
18
  markAllAsViewed = (t) => this.fetchInstance.put(`${o.NOTIFICATIONS}/mark_all_as_viewed`, { channel: t }).finally();
19
19
  }
20
- const I = (e, t) => {
20
+ const w = (e, t) => {
21
21
  const i = a(t[e].delivered_at), n = a(t[e - 1]?.delivered_at);
22
22
  return !h(i, n);
23
23
  };
@@ -25,10 +25,10 @@ function u(e) {
25
25
  const i = Math.floor(Date.now() / 1e3);
26
26
  return e.filter((n) => {
27
27
  const r = n.delivered_at;
28
- return i - r <= 2592e3;
28
+ return i - r <= 604800;
29
29
  });
30
30
  }
31
- class w {
31
+ class A {
32
32
  globalStore;
33
33
  api = new s("/", "");
34
34
  isLoading = !0;
@@ -72,8 +72,8 @@ class w {
72
72
  };
73
73
  }
74
74
  export {
75
- w as N,
75
+ A as N,
76
76
  s as a,
77
77
  u as f,
78
- I as s
78
+ w as s
79
79
  };
@@ -10,8 +10,8 @@ import se from "@mui/material/styles/useTheme";
10
10
  import { Text as m, P as N, Icon as M, InstitutionLogo as Ce, H2 as de, H3 as Ve } from "@mxenabled/mxui";
11
11
  import { G as Ye, t as me, u as L, p as ce, d as Ne, b as P, i as U, g as ke, a as Qe, h as He, o as Ke } from "../hooks-DWJQ4phS.mjs";
12
12
  import { C as R } from "../CurrencyText-C-85TnUF.mjs";
13
- import { I as ue } from "../CashflowStore-D9Dpuz7X.mjs";
14
- import { C as qn } from "../CashflowStore-D9Dpuz7X.mjs";
13
+ import { I as ue } from "../CashflowStore-DEdQJU5i.mjs";
14
+ import { C as qn } from "../CashflowStore-DEdQJU5i.mjs";
15
15
  import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
16
16
  import { L as Z } from "../Loader-D3rjKx72.mjs";
17
17
  import { b as $ } from "../Localization-2MODESHW.mjs";
@@ -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-Ck2KdNmT.mjs";
8
+ import { a as Oe } from "../NotificationStore-Ck2KdNmT.mjs";
9
9
  import { T as G } from "../Transaction-RmKYEKSk.mjs";
10
10
  import { L as Re, a as Fe } from "../Transaction-RmKYEKSk.mjs";
11
11
  import { H } from "../Help-B8mD4aLJ.mjs";
@@ -25,8 +25,8 @@ import { S as gs } from "../TransactionStore-B-fc3CsB.mjs";
25
25
  import { T as fs } from "../TabContentContainer-j01JYR_7.mjs";
26
26
  import { I as ys } from "../IconBacking-B9oC6uL2.mjs";
27
27
  import { D as bs, F as ws, c as Cs, d as Ds, R as As, S as Es } from "../RecurringTransactions-B_I4_FGO.mjs";
28
- import { C as Q } from "../CashflowStore-D9Dpuz7X.mjs";
29
- import { I as Ts } from "../CashflowStore-D9Dpuz7X.mjs";
28
+ import { C as Q } from "../CashflowStore-DEdQJU5i.mjs";
29
+ import { I as Ts } from "../CashflowStore-DEdQJU5i.mjs";
30
30
  import { d as K } from "../GoalStore-ZZir5h81.mjs";
31
31
  import { C as vs, G as Bs, M as ks, T as Ms } from "../GoalStore-ZZir5h81.mjs";
32
32
  import { C as Us } from "../CurrencyText-C-85TnUF.mjs";
@@ -1,7 +1,7 @@
1
1
  import { A as f, B as y } from "../Notification-Bs1fdbzI.mjs";
2
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";
3
+ import { s as k } from "../NotificationStore-Ck2KdNmT.mjs";
4
+ import { N as xt, f as Nt } from "../NotificationStore-Ck2KdNmT.mjs";
5
5
  import { jsx as t, jsxs as l, Fragment as C } from "react/jsx-runtime";
6
6
  import v, { useEffect as L } from "react";
7
7
  import { observer as p } from "mobx-react-lite";
@@ -36,7 +36,7 @@ const _t = (e) => {
36
36
  return null;
37
37
  }
38
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 = {
39
+ const { accounts: n } = G(), { budgets: r } = E(), { accounts: a } = _(), o = n.find((i) => i.guid === e.entity_guid), s = r.find((i) => i.guid === e.entity_guid), d = e.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(
48
+ return o || d ? /* @__PURE__ */ t("div", { style: u.badge, children: /* @__PURE__ */ t(
49
49
  B,
50
50
  {
51
- alt: n?.institutionName || s.institution_logo_alt,
52
- institutionGuid: n?.institution_guid ?? "",
51
+ alt: o?.institutionName || a.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(T, { categoryGuid: s?.category_guid, size: 36 }) });
56
+ }, V = p(M), X = ({ notification: e, onClick: n }) => {
57
+ const { updateNotification: r } = x(), a = R(), 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: a.palette.background.default
67
67
  },
68
68
  "&:hover": {
69
- backgroundColor: s.palette.background.default
69
+ backgroundColor: a.palette.background.default
70
70
  }
71
71
  },
72
72
  dot: {
73
- backgroundColor: s.palette.primary.main,
73
+ backgroundColor: a.palette.primary.main,
74
74
  borderRadius: "100%",
75
75
  flex: "0 0 auto",
76
76
  marginLeft: -8,
@@ -80,18 +80,18 @@ const _t = (e) => {
80
80
  }
81
81
  };
82
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 }),
83
+ n(e), r({ ...e, has_been_viewed: !0 }).finally();
84
+ }, sx: o.card, children: [
85
+ e.has_been_viewed ? null : /* @__PURE__ */ t("div", { "data-testid": "new-message-dot", style: o.dot }),
86
86
  /* @__PURE__ */ t(V, { notification: e }),
87
87
  /* @__PURE__ */ t(m, { bold: !e.has_been_viewed, truncate: !1, variant: "Small", children: e.content })
88
88
  ] });
89
89
  }, Y = p(
90
90
  ({ onManageNotifications: e }) => {
91
- const { notifications: o } = _();
91
+ const { notifications: n } = _();
92
92
  return /* @__PURE__ */ l(P, { sx: { alignItems: "center", height: "95%", justifyContent: "center" }, children: [
93
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 }),
94
+ /* @__PURE__ */ t(m, { sx: { pt: 32 }, variant: "H3", children: n.notification_empty_state.no_new_notifications }),
95
95
  /* @__PURE__ */ t(
96
96
  m,
97
97
  {
@@ -103,22 +103,22 @@ const _t = (e) => {
103
103
  whiteSpace: "normal"
104
104
  },
105
105
  variant: "subtitle1",
106
- children: o.notification_empty_state.notification_description
106
+ children: n.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(F, { onClick: e, sx: { p: "12px 16px" }, variant: "outlined", children: n.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) => {
112
+ ), q = ({ onClick: e, onManageNotifications: n }) => {
113
+ const { isLoading: r, loadNotifications: a, newNotifications: o, markAllAsViewed: s } = x(), { isInitialized: d } = N(), u = (i) => {
114
114
  e?.(i);
115
115
  };
116
116
  return L(() => {
117
- s().then(() => n()).finally();
117
+ a().then(() => s()).finally();
118
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);
119
+ o.length === 0 && /* @__PURE__ */ t(Y, { onManageNotifications: n }),
120
+ /* @__PURE__ */ t(D, { sx: { p: 16 }, children: o.slice().sort((i, c) => c.delivered_at - i.delivered_at).map((i, c) => {
121
+ const w = k(c, o);
122
122
  return /* @__PURE__ */ l(h, { sx: { mb: 12 }, children: [
123
123
  w && /* @__PURE__ */ l(h, { sx: { mb: 12 }, children: [
124
124
  /* @__PURE__ */ t(H, { date: i.delivered_at }),
@@ -129,16 +129,16 @@ const _t = (e) => {
129
129
  }) })
130
130
  ] });
131
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);
132
+ ({ notificationTypes: e, isOpen: n, onClose: r, onNotificationClick: a }) => {
133
+ const { config: o } = j(), { notifications: s, settings: d } = _(), { isCopyLoaded: u } = N(), [i, c] = v.useState(!1);
134
134
  return u ? /* @__PURE__ */ l(C, { children: [
135
135
  /* @__PURE__ */ l(
136
136
  b,
137
137
  {
138
- ariaLabelClose: a.close_notifications,
139
- isOpen: o,
138
+ ariaLabelClose: s.close_notifications,
139
+ isOpen: n,
140
140
  onClose: r,
141
- title: a.notifications_title,
141
+ title: s.notifications_title,
142
142
  children: [
143
143
  /* @__PURE__ */ t(
144
144
  W,
@@ -156,7 +156,7 @@ const _t = (e) => {
156
156
  /* @__PURE__ */ t(
157
157
  J,
158
158
  {
159
- onClick: s,
159
+ onClick: a,
160
160
  onManageNotifications: () => c(!0)
161
161
  }
162
162
  )
@@ -166,7 +166,7 @@ const _t = (e) => {
166
166
  /* @__PURE__ */ t(
167
167
  b,
168
168
  {
169
- ariaLabelClose: a.close_notification_settings,
169
+ ariaLabelClose: s.close_notification_settings,
170
170
  isOpen: i,
171
171
  onClose: () => c(!1),
172
172
  title: d.notification_settings_title,
@@ -174,7 +174,7 @@ const _t = (e) => {
174
174
  $,
175
175
  {
176
176
  notificationTypes: e,
177
- showPersonalDetails: !n.display_user_profile_in_settings
177
+ showPersonalDetails: !o.display_user_profile_in_settings
178
178
  }
179
179
  )
180
180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.10.29-alpha.mm0",
3
+ "version": "7.10.29",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,91 +0,0 @@
1
- import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
- import c from "@mui/material/IconButton";
3
- import m from "@mui/material/Stack";
4
- import l from "@mui/material/Tooltip";
5
- import { Text as s, Icon as p, IconWeight as h } from "@mxenabled/mxui";
6
- import { makeAutoObservable as i } from "mobx";
7
- import { addDays as d } from "date-fns/addDays";
8
- import { differenceInDays as f } from "date-fns/differenceInDays";
9
- import { endOfMonth as x } from "date-fns/endOfMonth";
10
- import { isBefore as u } from "date-fns/isBefore";
11
- import { startOfToday as r } from "date-fns/startOfToday";
12
- const g = ({
13
- body: o,
14
- iconName: e = "info",
15
- title: n
16
- }) => /* @__PURE__ */ t(
17
- l,
18
- {
19
- enterTouchDelay: 500,
20
- title: /* @__PURE__ */ a(m, { gap: 2, p: 12, sx: { textOverflow: "none" }, children: [
21
- /* @__PURE__ */ t(s, { bold: !0, variant: "Body", children: n }),
22
- /* @__PURE__ */ t(s, { sx: { whiteSpace: "unset" }, variant: "Small", children: o })
23
- ] }),
24
- children: /* @__PURE__ */ t(
25
- c,
26
- {
27
- "aria-label": n,
28
- sx: {
29
- minHeight: 0,
30
- minWidth: 0,
31
- p: 0
32
- },
33
- children: /* @__PURE__ */ t(
34
- p,
35
- {
36
- name: e,
37
- sx: { color: "primary.main", fontSize: 16 },
38
- weight: h.Dark
39
- }
40
- )
41
- }
42
- )
43
- }
44
- ), E = g;
45
- class I {
46
- // Cashflow is hard-coded to display 30 days starting from today
47
- dateRange = { start: r(), end: d(r(), 30) };
48
- isDirty = !1;
49
- nextIncome = void 0;
50
- upcomingExpenses = [];
51
- selectedCashAccounts = [];
52
- constructor() {
53
- i(this);
54
- }
55
- // Returns the number of days until the next income activity or 0 if there is no income activity
56
- get daysUntilNextIncome() {
57
- return this.nextIncome ? Math.abs(f(r(), this.nextIncome.expectedDate)) : 0;
58
- }
59
- // Returns the expenses (Activities) until the next income activity or the end of the month
60
- // if there is no income activity
61
- get expensesTilNextIncome() {
62
- return this.upcomingExpenses.filter(
63
- (e) => u(e.expectedDate, this.nextIncome?.expectedDate || x(/* @__PURE__ */ new Date()))
64
- );
65
- }
66
- setNextIncome = (e) => {
67
- this.nextIncome = e;
68
- };
69
- setUpcomingExpenses = (e) => {
70
- this.upcomingExpenses = e;
71
- };
72
- setSelectedCashAccounts = (e) => this.selectedCashAccounts = e;
73
- }
74
- class _ {
75
- globalStore;
76
- uiStore;
77
- constructor(e) {
78
- this.globalStore = e, this.uiStore = new I(), i(this);
79
- }
80
- completeOnboarding = async () => {
81
- const e = {
82
- ...this.globalStore.userStore.userProfile,
83
- has_completed_cash_flow_onboarding: !0
84
- };
85
- await this.globalStore.userStore.updateUserProfile(e);
86
- };
87
- }
88
- export {
89
- _ as C,
90
- E as I
91
- };