@mx-cartographer/experiences 7.10.29 → 7.10.30

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,8 @@
1
+ ## [7.10.30] - 02-23-2026
2
+
3
+ - **UPDATED** - Use `recentNotifications` instead of `newNotifications` in `NotificationList`
4
+ - **UPDATED** - Adjust `filterRecentNotifications` to filter for last 30 days instead of 7 days
5
+
1
6
  ## [7.10.29] - 02-23-2026
2
7
 
3
8
  - **FIXED** - `Cashback` Mobile | Info hover bug
@@ -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 w = (e, t) => {
20
+ const I = (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 <= 604800;
28
+ return i - r <= 2592e3;
29
29
  });
30
30
  }
31
- class A {
31
+ class w {
32
32
  globalStore;
33
33
  api = new s("/", "");
34
34
  isLoading = !0;
@@ -72,8 +72,8 @@ class A {
72
72
  };
73
73
  }
74
74
  export {
75
- A as N,
75
+ w as N,
76
76
  s as a,
77
77
  u as f,
78
- w as s
78
+ I as s
79
79
  };
@@ -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-Ck2KdNmT.mjs";
8
- import { a as Oe } from "../NotificationStore-Ck2KdNmT.mjs";
7
+ import { N as $ } from "../NotificationStore-CA8WNgcR.mjs";
8
+ import { a as Oe } from "../NotificationStore-CA8WNgcR.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";
@@ -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-Ck2KdNmT.mjs";
4
- import { N as xt, f as Nt } from "../NotificationStore-Ck2KdNmT.mjs";
3
+ import { s as k } from "../NotificationStore-CA8WNgcR.mjs";
4
+ import { N as xt, f as Nt } from "../NotificationStore-CA8WNgcR.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: 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 = {
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 = {
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 o || d ? /* @__PURE__ */ t("div", { style: u.badge, children: /* @__PURE__ */ t(
48
+ return n || d ? /* @__PURE__ */ t("div", { style: u.badge, children: /* @__PURE__ */ t(
49
49
  B,
50
50
  {
51
- alt: o?.institutionName || a.institution_logo_alt,
52
- institutionGuid: o?.institution_guid ?? "",
51
+ alt: n?.institutionName || s.institution_logo_alt,
52
+ institutionGuid: n?.institution_guid ?? "",
53
53
  size: 33
54
54
  }
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 = {
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 = {
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: a.palette.background.default
66
+ backgroundColor: s.palette.background.default
67
67
  },
68
68
  "&:hover": {
69
- backgroundColor: a.palette.background.default
69
+ backgroundColor: s.palette.background.default
70
70
  }
71
71
  },
72
72
  dot: {
73
- backgroundColor: a.palette.primary.main,
73
+ backgroundColor: s.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
- 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 }),
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
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: n } = _();
91
+ const { notifications: o } = _();
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: n.notification_empty_state.no_new_notifications }),
94
+ /* @__PURE__ */ t(m, { sx: { pt: 32 }, variant: "H3", children: o.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: n.notification_empty_state.notification_description
106
+ children: o.notification_empty_state.notification_description
107
107
  }
108
108
  ),
109
- /* @__PURE__ */ t(F, { onClick: e, sx: { p: "12px 16px" }, variant: "outlined", children: n.notification_empty_state.manage_notifications })
109
+ /* @__PURE__ */ t(F, { onClick: e, sx: { p: "12px 16px" }, variant: "outlined", children: o.notification_empty_state.manage_notifications })
110
110
  ] });
111
111
  }
112
- ), q = ({ onClick: e, onManageNotifications: n }) => {
113
- const { isLoading: r, loadNotifications: a, newNotifications: o, markAllAsViewed: s } = x(), { isInitialized: d } = N(), u = (i) => {
112
+ ), q = ({ onClick: e, onManageNotifications: o }) => {
113
+ const { isLoading: r, loadNotifications: s, markAllAsViewed: n, recentNotifications: a } = x(), { isInitialized: d } = N(), u = (i) => {
114
114
  e?.(i);
115
115
  };
116
116
  return L(() => {
117
- a().then(() => s()).finally();
117
+ s().then(() => n()).finally();
118
118
  }, []), !d || r ? /* @__PURE__ */ t(S, {}) : /* @__PURE__ */ l(C, { children: [
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);
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
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: n, onClose: r, onNotificationClick: a }) => {
133
- const { config: o } = j(), { notifications: s, settings: d } = _(), { isCopyLoaded: u } = N(), [i, c] = v.useState(!1);
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
134
  return u ? /* @__PURE__ */ l(C, { children: [
135
135
  /* @__PURE__ */ l(
136
136
  b,
137
137
  {
138
- ariaLabelClose: s.close_notifications,
139
- isOpen: n,
138
+ ariaLabelClose: a.close_notifications,
139
+ isOpen: o,
140
140
  onClose: r,
141
- title: s.notifications_title,
141
+ title: a.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: a,
159
+ onClick: s,
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: s.close_notification_settings,
169
+ ariaLabelClose: a.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: !o.display_user_profile_in_settings
177
+ showPersonalDetails: !n.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",
3
+ "version": "7.10.30",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",