@mx-cartographer/experiences 6.24.2 → 6.24.3
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
package/dist/index.es.js
CHANGED
|
@@ -15096,15 +15096,18 @@ const w1 = ({ amount: e, copy: n, trendValue: i }) => {
|
|
|
15096
15096
|
default:
|
|
15097
15097
|
return null;
|
|
15098
15098
|
}
|
|
15099
|
+
}, k1 = (e, n) => {
|
|
15100
|
+
const i = fi(n[e].delivered_at), a = fi(n[e - 1]?.delivered_at);
|
|
15101
|
+
return !vd(i, a);
|
|
15099
15102
|
};
|
|
15100
|
-
function
|
|
15103
|
+
function G1(e) {
|
|
15101
15104
|
const i = Math.floor(Date.now() / 1e3);
|
|
15102
15105
|
return e.filter((a) => {
|
|
15103
15106
|
const o = a.delivered_at;
|
|
15104
15107
|
return i - o <= 604800;
|
|
15105
15108
|
});
|
|
15106
15109
|
}
|
|
15107
|
-
class
|
|
15110
|
+
class B1 {
|
|
15108
15111
|
globalStore;
|
|
15109
15112
|
api = new nr("/", "");
|
|
15110
15113
|
isLoading = !0;
|
|
@@ -15122,7 +15125,7 @@ class G1 {
|
|
|
15122
15125
|
this.isLoading = !0;
|
|
15123
15126
|
const n = await this.api.getNotifications();
|
|
15124
15127
|
q(() => {
|
|
15125
|
-
this.notifications = n, this.recentNotifications =
|
|
15128
|
+
this.notifications = n, this.recentNotifications = G1(n), this.isLoading = !1;
|
|
15126
15129
|
});
|
|
15127
15130
|
} catch (n) {
|
|
15128
15131
|
console.error(`Error occurred while loading notifications: ${n}`);
|
|
@@ -15135,10 +15138,7 @@ class G1 {
|
|
|
15135
15138
|
n.has_been_viewed = !0, await this.api.updateNotification(n);
|
|
15136
15139
|
};
|
|
15137
15140
|
}
|
|
15138
|
-
const
|
|
15139
|
-
const i = fi(n[e].delivered_at), a = fi(n[e - 1]?.delivered_at);
|
|
15140
|
-
return !vd(i, a);
|
|
15141
|
-
}, H1 = ({ date: e }) => /* @__PURE__ */ t(k, { sx: { display: "flex", justifyContent: "center", mt: 12, py: 8 }, children: /* @__PURE__ */ t(C, { bold: !0, variant: "Small", children: ua(e) }) }), P1 = ({ notification: e }) => {
|
|
15141
|
+
const H1 = ({ date: e }) => /* @__PURE__ */ t(k, { sx: { display: "flex", justifyContent: "center", mt: 12, py: 8 }, children: /* @__PURE__ */ t(C, { bold: !0, variant: "Small", children: ua(e) }) }), P1 = ({ notification: e }) => {
|
|
15142
15142
|
const { accounts: n } = Ce(), { budgets: i } = ht(), { accounts: a } = x(), o = n.find((d) => d.guid === e.entity_guid), r = i.find((d) => d.guid === e.entity_guid), s = e.entity_guid.includes("GOL"), c = {
|
|
15143
15143
|
badge: {
|
|
15144
15144
|
display: "flex",
|
|
@@ -15222,7 +15222,7 @@ const B1 = (e, n) => {
|
|
|
15222
15222
|
(!c || i) && /* @__PURE__ */ t(le, { label: s?.loading, size: 40 }),
|
|
15223
15223
|
c && !i && o.length === 0 && /* @__PURE__ */ t(U1, { onManageNotifications: n }),
|
|
15224
15224
|
/* @__PURE__ */ t(ie, { sx: { p: 16 }, children: c && !i && o.slice().sort((_, u) => u.delivered_at - _.delivered_at).map((_, u) => {
|
|
15225
|
-
const h =
|
|
15225
|
+
const h = k1(u, o);
|
|
15226
15226
|
return /* @__PURE__ */ l(k, { sx: { mb: 12 }, children: [
|
|
15227
15227
|
h && /* @__PURE__ */ l(k, { sx: { mb: 12 }, children: [
|
|
15228
15228
|
/* @__PURE__ */ t(H1, { date: _.delivered_at }),
|
|
@@ -23134,7 +23134,7 @@ class C2 {
|
|
|
23134
23134
|
// UI Stores
|
|
23135
23135
|
globalUiStore;
|
|
23136
23136
|
constructor(n = qr, i = "/") {
|
|
23137
|
-
this.appConfig = n, this.endpoint = i, this.sessionToken = n.options.session_token ?? "", this.accountStore = new b0(this), this.appDataStore = new Kf(this), this.analyticsStore = new y_(this), this.beatStore = new S_(this), this.budgetsStore = new w_(this), this.cashflowStore = new fm(this), this.categoryStore = new Xh(this), this.connectStore = new Yf(this), this.copyStore = new b_(this), this.debtsStore = new mp(this), this.finstrongStore = new pp(this), this.goalStore = new Bp(this), this.helpStore = new $p(this), this.holdingStore = new o1(this), this.merchantStore = new l1(this), this.netWorthStore = new I1(this), this.notificationStore = new
|
|
23137
|
+
this.appConfig = n, this.endpoint = i, this.sessionToken = n.options.session_token ?? "", this.accountStore = new b0(this), this.appDataStore = new Kf(this), this.analyticsStore = new y_(this), this.beatStore = new S_(this), this.budgetsStore = new w_(this), this.cashflowStore = new fm(this), this.categoryStore = new Xh(this), this.connectStore = new Yf(this), this.copyStore = new b_(this), this.debtsStore = new mp(this), this.finstrongStore = new pp(this), this.goalStore = new Bp(this), this.helpStore = new $p(this), this.holdingStore = new o1(this), this.merchantStore = new l1(this), this.netWorthStore = new I1(this), this.notificationStore = new B1(this), this.recurringTransactionsStore = new Vg(this), this.settingsStore = new j1(this), this.transactionStore = new dh(this), this.trendsStore = new Vf(this), this.userStore = new jf(this), this.globalUiStore = new zf(this), He(this);
|
|
23138
23138
|
}
|
|
23139
23139
|
get isInitialized() {
|
|
23140
23140
|
return this.globalUiStore.isInitialized;
|
|
@@ -28277,7 +28277,7 @@ export {
|
|
|
28277
28277
|
K1 as NotificationList,
|
|
28278
28278
|
ta as NotificationSettings,
|
|
28279
28279
|
c2 as NotificationSettingsWidget,
|
|
28280
|
-
|
|
28280
|
+
B1 as NotificationStore,
|
|
28281
28281
|
Nt as NotificationTypes,
|
|
28282
28282
|
cu as ORDINAL_DATE_FORMAT,
|
|
28283
28283
|
T4 as ORDINAL_MONTH_DAY_YEAR_FORMAT,
|
|
@@ -28357,6 +28357,7 @@ export {
|
|
|
28357
28357
|
S as buildDynamicCopy,
|
|
28358
28358
|
R4 as buildPluralCopy,
|
|
28359
28359
|
ac as exportTransactionsToCSV,
|
|
28360
|
+
G1 as filterRecentNotifications,
|
|
28360
28361
|
P as formatCurrency,
|
|
28361
28362
|
oe as formatDate,
|
|
28362
28363
|
bi as formatOrdinal,
|