@mx-cartographer/experiences 6.24.1-alpha.mega1 → 6.24.1-alpha.sms1

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/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 k1(e) {
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 G1 {
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 = k1(n), this.isLoading = !1;
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 B1 = (e, n) => {
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 } = be(), { 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 = B1(u, o);
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 }),
@@ -23132,7 +23132,7 @@ class C2 {
23132
23132
  // UI Stores
23133
23133
  globalUiStore;
23134
23134
  constructor(n = qr, i = "/") {
23135
- 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 G1(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);
23135
+ 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);
23136
23136
  }
23137
23137
  get isInitialized() {
23138
23138
  return this.globalUiStore.isInitialized;
@@ -27646,13 +27646,13 @@ const ab = ({ widgets: e, isLoading: n }) => {
27646
27646
  );
27647
27647
  d.push({
27648
27648
  guid: "other",
27649
- color: i.palette.categories.others || "",
27649
+ color: "",
27650
27650
  name: n.saving_goal_other,
27651
27651
  categoryTotals: u,
27652
27652
  amount: h
27653
27653
  }), _.push({
27654
27654
  id: "other",
27655
- color: i.palette.categories.others || "",
27655
+ color: "",
27656
27656
  label: n.saving_goal_other,
27657
27657
  value: h / s * 100
27658
27658
  });
@@ -27854,8 +27854,8 @@ const ab = ({ widgets: e, isLoading: n }) => {
27854
27854
  ] }) })
27855
27855
  ] }) : /* @__PURE__ */ t(le, { height: 250 });
27856
27856
  }, vb = T(wb), Nb = ({ onPrimaryCtaClick: e, sx: n = {} }) => {
27857
- const { spending: i } = x(), { isCopyLoaded: a, isInitialized: o } = se();
27858
- return !a || !o ? /* @__PURE__ */ t(le, {}) : /* @__PURE__ */ t(
27857
+ const { spending: i } = x(), { isCopyLoaded: a } = se();
27858
+ return a ? /* @__PURE__ */ t(
27859
27859
  Mn,
27860
27860
  {
27861
27861
  className: "mx-exp-spending-miniwidget",
@@ -27865,7 +27865,7 @@ const ab = ({ widgets: e, isLoading: n }) => {
27865
27865
  title: i.mini_title,
27866
27866
  children: /* @__PURE__ */ t(vb, {})
27867
27867
  }
27868
- );
27868
+ ) : /* @__PURE__ */ t(le, {});
27869
27869
  }, I2 = T(Nb), Db = ({
27870
27870
  data: e,
27871
27871
  onSelected: n,
@@ -28273,7 +28273,7 @@ export {
28273
28273
  K1 as NotificationList,
28274
28274
  ta as NotificationSettings,
28275
28275
  c2 as NotificationSettingsWidget,
28276
- G1 as NotificationStore,
28276
+ B1 as NotificationStore,
28277
28277
  Nt as NotificationTypes,
28278
28278
  cu as ORDINAL_DATE_FORMAT,
28279
28279
  T4 as ORDINAL_MONTH_DAY_YEAR_FORMAT,
@@ -28353,6 +28353,7 @@ export {
28353
28353
  S as buildDynamicCopy,
28354
28354
  R4 as buildPluralCopy,
28355
28355
  ac as exportTransactionsToCSV,
28356
+ G1 as filterRecentNotifications,
28356
28357
  P as formatCurrency,
28357
28358
  oe as formatDate,
28358
28359
  bi as formatOrdinal,