@mx-cartographer/experiences 7.2.14-alpha.san7 → 7.2.14-alpha.san8

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.
@@ -1,17 +1,17 @@
1
1
  import { makeAutoObservable as D, runInAction as l } from "mobx";
2
- import { format as R } from "date-fns/format";
2
+ import { format as y } from "date-fns/format";
3
3
  import { fromUnixTime as b } from "date-fns/fromUnixTime";
4
4
  import { getUnixTime as I } from "date-fns/getUnixTime";
5
5
  import { subMonths as H } from "date-fns/subMonths";
6
- import { F as x, A as h } from "./Fetch-87LIQbEA.mjs";
6
+ import { F as v, A as h } from "./Fetch-87LIQbEA.mjs";
7
7
  import { jsx as c, jsxs as T } from "react/jsx-runtime";
8
- import { addDays as v } from "date-fns/addDays";
8
+ import { addDays as x } from "date-fns/addDays";
9
9
  import { addMonths as M } from "date-fns/addMonths";
10
10
  import { addYears as G } from "date-fns/addYears";
11
11
  import { differenceInDays as L } from "date-fns/differenceInDays";
12
- import { differenceInMonths as w } from "date-fns/differenceInMonths";
12
+ import { differenceInMonths as N } from "date-fns/differenceInMonths";
13
13
  import { differenceInWeeks as A } from "date-fns/differenceInWeeks";
14
- import { startOfToday as N } from "date-fns/startOfToday";
14
+ import { startOfToday as w } from "date-fns/startOfToday";
15
15
  import { ChevronRight as P, Check as k } from "@mxenabled/mx-icons";
16
16
  import $ from "react";
17
17
  import K from "@mui/material/Avatar";
@@ -91,7 +91,7 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(B, { sx: { bgcolor:
91
91
  n < e.length - 1 && /* @__PURE__ */ c(Y, { sx: { color: "divider", ml: 68 } })
92
92
  ] }, r.key))
93
93
  }
94
- ) }), vt = q, Mt = (e) => e * (180 / Math.PI), Gt = (e, t) => [
94
+ ) }), xt = q, Mt = (e) => e * (180 / Math.PI), Gt = (e, t) => [
95
95
  {
96
96
  description: t.vulnerable_description,
97
97
  max: 25,
@@ -143,7 +143,7 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(B, { sx: { bgcolor:
143
143
  } : e >= 800 && e <= 850 ? {
144
144
  status: r.exceptional,
145
145
  color: t ? u.EXCEPTIONAL : g.EXCEPTIONAL
146
- } : { status: r.missing_data }, wt = (e, t, r, n) => {
146
+ } : { status: r.missing_data }, Nt = (e, t, r, n) => {
147
147
  const o = e.reduce((i, d) => i + d.value, 0);
148
148
  let a = 0;
149
149
  const s = e.map((i) => {
@@ -155,7 +155,7 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(B, { sx: { bgcolor:
155
155
  };
156
156
  });
157
157
  return [s[n].startAngle, s[n].endAngle];
158
- }, Nt = (e, t, r, n, o) => {
158
+ }, wt = (e, t, r, n, o) => {
159
159
  let a = 0, s = 0;
160
160
  const i = Math.floor(n), d = n - i;
161
161
  return i > r ? (a = e, s = t) : i === r && d > 0 && (a = e, s = o), [a, s];
@@ -179,7 +179,7 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(B, { sx: { bgcolor:
179
179
  secondaryText: i
180
180
  };
181
181
  }, J = (e, t) => ({
182
- [O.DateOfBirth]: (n) => R(new Date(Number(n) * 1e3), "MMM d, yyyy"),
182
+ [O.DateOfBirth]: (n) => y(new Date(Number(n) * 1e3), "MMM d, yyyy"),
183
183
  [O.MonthlyIncome]: (n) => `$${n}`
184
184
  })[e]?.(t) ?? String(t), $t = (e) => e !== null ? Math.round(e * 100) : null, Kt = (e) => {
185
185
  const t = new Date((/* @__PURE__ */ new Date()).getFullYear(), e - 1, 1);
@@ -218,9 +218,9 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(B, { sx: { bgcolor:
218
218
  })[e], Z = 1, tt = 1, et = {
219
219
  1: M,
220
220
  2: G,
221
- 3: v
221
+ 3: x
222
222
  }, rt = {
223
- 1: w,
223
+ 1: N,
224
224
  2: (e, t) => A(e, t) / 2,
225
225
  3: A,
226
226
  4: L
@@ -237,7 +237,7 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(B, { sx: { bgcolor:
237
237
  }) => {
238
238
  const a = t - o;
239
239
  if (a <= 0) return 0;
240
- const s = N(), i = et[n], d = rt[e];
240
+ const s = w(), i = et[n], d = rt[e];
241
241
  if (!i || !d) return a;
242
242
  const p = i(s, r), f = d(p, s);
243
243
  return Math.max(a / (f || 1), 1);
@@ -253,10 +253,10 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(B, { sx: { bgcolor:
253
253
  })), ot = (e) => e.sort((r, n) => n.transaction.date - r.transaction.date).map(({ transaction: r }) => ({
254
254
  ...r
255
255
  }));
256
- class y {
256
+ class R {
257
257
  fetchInstance;
258
258
  constructor(t, r, n) {
259
- this.fetchInstance = new x(t, r, void 0, n);
259
+ this.fetchInstance = new v(t, r, void 0, n);
260
260
  }
261
261
  calculateHealthScore = async () => this.fetchInstance.post(`${h.HEALTH_SCORES}/calculate`).then((t) => t.health_score);
262
262
  getAverageHealthScores = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_averages`).then((t) => t);
@@ -269,7 +269,7 @@ class y {
269
269
  getStandardSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/standard_spend`).then((t) => t);
270
270
  }
271
271
  class te {
272
- api = new y("/", "");
272
+ api = new R("/", "");
273
273
  augmentedChartData = [];
274
274
  averageHealthScores = [];
275
275
  monthlySummaries = [];
@@ -285,7 +285,7 @@ class te {
285
285
  healthScoreChangeReports = [];
286
286
  peerScore = null;
287
287
  constructor(t) {
288
- this.globalStore = t, this.api = new y(t.endpoint, t.sessionToken, t.onError), D(this);
288
+ this.globalStore = t, this.api = new R(t.endpoint, t.sessionToken, t.onError), D(this);
289
289
  }
290
290
  calculateHealthScore = async () => {
291
291
  try {
@@ -355,7 +355,7 @@ class te {
355
355
  }
356
356
  };
357
357
  loadPeerScore = async () => {
358
- const t = R(b(this.globalStore.appDataStore.user.birthday), "yyyy");
358
+ const t = y(b(this.globalStore.appDataStore.user.birthday), "yyyy");
359
359
  try {
360
360
  const r = await this.api.getPeerScore(t);
361
361
  l(() => {
@@ -399,21 +399,20 @@ class te {
399
399
  return [...this.allTransactions.spend, ...this.allTransactions.debtSpend];
400
400
  }
401
401
  handleFinstrongWidgetPrimaryCtaClick = (t) => () => {
402
- console.log("Finstrong widget primary CTA clicked:", t);
403
402
  };
404
403
  }
405
404
  export {
406
405
  O as A,
407
406
  u as C,
408
407
  te as F,
409
- vt as P,
410
- Nt as a,
408
+ xt as P,
409
+ wt as a,
411
410
  Pt as b,
412
411
  Gt as c,
413
412
  Lt as d,
414
413
  g as e,
415
414
  Zt as f,
416
- wt as g,
415
+ Nt as g,
417
416
  jt as h,
418
417
  S as i,
419
418
  Vt as j,
@@ -431,5 +430,5 @@ export {
431
430
  Ut as v,
432
431
  Xt as w,
433
432
  kt as x,
434
- y
433
+ R as y
435
434
  };
@@ -64,7 +64,7 @@ import { startOfToday as U } from "date-fns/startOfToday";
64
64
  import { f as bt, a as wt, b as L } from "../BudgetUtil-wjoNuj7B.mjs";
65
65
  import { g as ta, e as ea, c as sa, d as ra, i as oa } from "../BudgetUtil-wjoNuj7B.mjs";
66
66
  import { a as xt } from "../DebtsStore-Bu8rRRSL.mjs";
67
- import { F as Ct } from "../FinstrongStore-1MFI6RcM.mjs";
67
+ import { F as Ct } from "../FinstrongStore-BbnA6Crl.mjs";
68
68
  import { A as vt, m as Dt, a as At, b as Et } from "../InvestmentUtil-jOyOgzIB.mjs";
69
69
  import { M as Tt } from "../MerchantStore-DrFvsUyy.mjs";
70
70
  import { N as Bt } from "../NetWorthStore-CpL_kqvx.mjs";
@@ -1,5 +1,3 @@
1
1
  import { default as React } from 'react';
2
- interface KeyIndicatorsSpendTabProps {
3
- }
4
- declare const _default: React.FunctionComponent<KeyIndicatorsSpendTabProps>;
2
+ declare const _default: React.FunctionComponent<{}>;
5
3
  export default _default;
@@ -3,7 +3,6 @@ interface KeyIndicatorsTabItemDrawerProps {
3
3
  drawerFor: KeyIndicatorsTabItemType;
4
4
  isOpen: boolean;
5
5
  onClose: () => void;
6
- onPrimaryCtaClick?: (value: string) => () => void;
7
6
  }
8
7
  declare const _default: (({ drawerFor, isOpen, onClose, }: KeyIndicatorsTabItemDrawerProps) => import("react/jsx-runtime").JSX.Element) & {
9
8
  displayName: string;
@@ -1,5 +1,3 @@
1
1
  import { default as React } from 'react';
2
- interface KeyIndicatorsTabsWidgetProps {
3
- }
4
- declare const _default: React.FunctionComponent<KeyIndicatorsTabsWidgetProps>;
2
+ declare const _default: React.FunctionComponent<{}>;
5
3
  export default _default;
@@ -1,15 +1,15 @@
1
1
  import { jsxs as i, Fragment as z, jsx as e } from "react/jsx-runtime";
2
2
  import C from "@mui/material/Box";
3
3
  import u from "@mui/material/Stack";
4
- import { useTheme as E, alpha as be } from "@mui/material/styles";
4
+ import { useTheme as E, alpha as fe } from "@mui/material/styles";
5
5
  import { PieChart as _n, BarPlot as hn } from "@mui/x-charts";
6
6
  import { TrendingUp as gt, ArrowRightAlt as mn, TrendingDown as gn, AccountBalance as yt, ChevronRight as Z, MultilineChart as bt, CreditCard as Ke, CheckCircle as yn, Cancel as bn, Savings as fn, ContentCopy as xn, Add as ft, Cardiology as Sn, Payments as Cn, CalendarMonth as vn, ExpandMore as wn } from "@mxenabled/mx-icons";
7
7
  import { P as k, H3 as N, Text as I, InstitutionLogo as xt, H2 as Pe, MerchantLogo as kn, Icon as Mn } from "@mxenabled/mxui";
8
- import { g as Dn, a as In, r as rt, b as An, c as je, d as St, C as Ce, e as ve, f as Tn, h as On, i as Rn, j as Ct, k as at, l as Fn, m as it, n as Pn, o as vt, p as Bn, q as wt, s as Te, t as Ln, u as Wn, v as $n, w as zn, A as ee, x as En, P as Gn } from "../FinstrongStore-1MFI6RcM.mjs";
9
- import { y as Gi, F as Hi } from "../FinstrongStore-1MFI6RcM.mjs";
8
+ import { g as Dn, a as In, r as rt, b as An, c as je, d as St, C as ve, e as we, f as Tn, h as On, i as Rn, j as Ct, k as at, l as Fn, m as it, n as Pn, o as vt, p as Bn, q as wt, s as Te, t as Ln, u as Wn, v as $n, w as zn, A as ee, x as En, P as Gn } from "../FinstrongStore-BbnA6Crl.mjs";
9
+ import { y as Gi, F as Hi } from "../FinstrongStore-BbnA6Crl.mjs";
10
10
  import * as st from "d3";
11
11
  import { observer as S } from "mobx-react-lite";
12
- import { u as v, b as j, p as Q, z as F, q as Hn, a as kt, d as ke, m as Ye, g as Nn, f as Kn, j as Ve, h as jn, i as Yn } from "../hooks-C41HAxM5.mjs";
12
+ import { u as v, b as j, p as Q, z as F, q as Hn, a as kt, d as Me, m as Ye, g as Nn, f as Kn, j as Ve, h as jn, i as Yn } from "../hooks-C41HAxM5.mjs";
13
13
  import { L as J } from "../Loader-DUaFpDGv.mjs";
14
14
  import m from "react";
15
15
  import $ from "@mui/material/Button";
@@ -26,9 +26,9 @@ import { u as It } from "../useDimensions-27p2evRx.mjs";
26
26
  import Un from "@mui/material/Chip";
27
27
  import { D as te } from "../Drawer-BEtCk82g.mjs";
28
28
  import ne from "@mui/material/Divider";
29
- import ge from "@mui/material/ListItem";
29
+ import ye from "@mui/material/ListItem";
30
30
  import At from "@mui/material/ListItemAvatar";
31
- import ye from "@mui/material/ListItemText";
31
+ import be from "@mui/material/ListItemText";
32
32
  import { g as Tt } from "../AccountFields-CPkGZ3SD.mjs";
33
33
  import Re from "@mui/material/List";
34
34
  import Zn from "@mui/material/ListItemButton";
@@ -141,7 +141,7 @@ const zo = ({
141
141
  footerRightContent: h,
142
142
  isFinacialStrengthGraph: _ = !1
143
143
  }) => {
144
- const b = E(), f = -Math.PI / 1.35, w = Math.PI / 1.35, y = w - f, D = y / (a - c), g = (r - c) * D, x = f + g + 0.02, M = n !== "SM" ? 0.1 : 0.12, W = t, G = t * (1 - M), H = W * 2.5, T = H / 2, V = H / 2, re = (G + W) / 2, ae = r !== 25 && r !== 50 && r !== 75 && r !== 100 ? 0 : 0.12, [Se, ie] = An(re, x, ae), X = r / 25, se = {
144
+ const b = E(), f = -Math.PI / 1.35, w = Math.PI / 1.35, y = w - f, D = y / (a - c), g = (r - c) * D, x = f + g + 0.02, M = n !== "SM" ? 0.1 : 0.12, W = t, G = t * (1 - M), H = W * 2.5, T = H / 2, V = H / 2, re = (G + W) / 2, ae = r !== 25 && r !== 50 && r !== 75 && r !== 100 ? 0 : 0.12, [Ce, ie] = An(re, x, ae), X = r / 25, se = {
145
145
  L: { markerSize: 12, healthScoreFontSize: 64 },
146
146
  M: { markerSize: 10, healthScoreFontSize: 48 },
147
147
  SM: { markerSize: 3, healthScoreFontSize: 14 }
@@ -177,15 +177,15 @@ const zo = ({
177
177
  legend: { hidden: !0 }
178
178
  },
179
179
  slots: {
180
- pieArc: (Me) => /* @__PURE__ */ e(
180
+ pieArc: (he) => /* @__PURE__ */ e(
181
181
  zo,
182
182
  {
183
- arcColor: Me.color,
183
+ arcColor: he.color,
184
184
  arcRadius: t,
185
185
  arcStartAngle: f,
186
186
  centerX: T,
187
187
  centerY: V,
188
- dataIndex: Me.dataIndex,
188
+ dataIndex: he.dataIndex,
189
189
  dialScoreData: o,
190
190
  innerArcRadius: G,
191
191
  isFinacialStrengthGraph: _,
@@ -205,7 +205,7 @@ const zo = ({
205
205
  children: r >= c && r <= a && /* @__PURE__ */ e(
206
206
  "circle",
207
207
  {
208
- cx: T + Se,
208
+ cx: T + Ce,
209
209
  cy: V + ie,
210
210
  fill: b.palette.common.white,
211
211
  r: se[n].markerSize,
@@ -339,31 +339,31 @@ const zo = ({
339
339
  id: 1,
340
340
  label: "Poor",
341
341
  value: 29,
342
- color: d ? Ce.POOR : ve.POOR
342
+ color: d ? ve.POOR : we.POOR
343
343
  },
344
344
  {
345
345
  id: 2,
346
346
  label: "Fair",
347
347
  value: 25,
348
- color: d ? Ce.FAIR : ve.FAIR
348
+ color: d ? ve.FAIR : we.FAIR
349
349
  },
350
350
  {
351
351
  id: 3,
352
352
  label: "Good",
353
353
  value: 17,
354
- color: d ? Ce.GOOD : ve.GOOD
354
+ color: d ? ve.GOOD : we.GOOD
355
355
  },
356
356
  {
357
357
  id: 4,
358
358
  label: "Very Good",
359
359
  value: 17,
360
- color: d ? Ce.VERY_GOOD : ve.VERY_GOOD
360
+ color: d ? ve.VERY_GOOD : we.VERY_GOOD
361
361
  },
362
362
  {
363
363
  id: 5,
364
364
  label: "Exceptional",
365
365
  value: 12,
366
- color: d ? Ce.EXCEPTIONAL : ve.EXCEPTIONAL
366
+ color: d ? ve.EXCEPTIONAL : we.EXCEPTIONAL
367
367
  }
368
368
  ], { finstrong: p } = v(), { isCopyLoaded: h } = j();
369
369
  if (!h) return /* @__PURE__ */ e(J, {});
@@ -742,7 +742,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
742
742
  }), y = /* @__PURE__ */ i(z, { children: [
743
743
  /* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: _.institution_guid ?? "" }) }),
744
744
  /* @__PURE__ */ e(
745
- ye,
745
+ be,
746
746
  {
747
747
  primary: `${w}${_.account_number ? ` *${_.account_number}` : ""}`,
748
748
  primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
@@ -751,7 +751,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
751
751
  r && /* @__PURE__ */ e(k, { bold: !0, variant: "body2", children: L(f ?? 0, "0,0.00") })
752
752
  ] });
753
753
  return /* @__PURE__ */ i(m.Fragment, { children: [
754
- /* @__PURE__ */ e(ge, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(Zn, { onClick: () => s(_), children: y }) : y }),
754
+ /* @__PURE__ */ e(ye, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(Zn, { onClick: () => s(_), children: y }) : y }),
755
755
  b !== p.length - 1 && /* @__PURE__ */ e(ne, { variant: "inset" })
756
756
  ] }, _.guid);
757
757
  }),
@@ -773,10 +773,10 @@ const Go = ({ isOpen: t, onClose: r }) => {
773
773
  };
774
774
  return b.length >= 1 ? /* @__PURE__ */ i(z, { children: [
775
775
  /* @__PURE__ */ e(C, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children: f.map((y, D) => /* @__PURE__ */ i(m.Fragment, { children: [
776
- /* @__PURE__ */ i(ge, { sx: { px: 24 }, children: [
776
+ /* @__PURE__ */ i(ye, { sx: { px: 24 }, children: [
777
777
  /* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: y.institution_guid ?? "" }) }),
778
778
  /* @__PURE__ */ e(
779
- ye,
779
+ be,
780
780
  {
781
781
  primary: `${Dt(y, {
782
782
  allowNickname: o?.show_account_nicknames_in_master
@@ -826,7 +826,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
826
826
  }
827
827
  )
828
828
  ] });
829
- }, Kt = S(Zo), xe = ({ balance: t, title: r, sx: n }) => /* @__PURE__ */ i(
829
+ }, Kt = S(Zo), Se = ({ balance: t, title: r, sx: n }) => /* @__PURE__ */ i(
830
830
  u,
831
831
  {
832
832
  sx: {
@@ -844,7 +844,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
844
844
  ]
845
845
  }
846
846
  );
847
- var O = /* @__PURE__ */ ((t) => (t[t.ConnectAccounts = 1] = "ConnectAccounts", t[t.MonthlyIncome = 2] = "MonthlyIncome", t[t.Birthday = 3] = "Birthday", t[t.CreditScore = 4] = "CreditScore", t))(O || {}), we = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(we || {}), U = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(U || {});
847
+ var O = /* @__PURE__ */ ((t) => (t[t.ConnectAccounts = 1] = "ConnectAccounts", t[t.MonthlyIncome = 2] = "MonthlyIncome", t[t.Birthday = 3] = "Birthday", t[t.CreditScore = 4] = "CreditScore", t))(O || {}), ke = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(ke || {}), U = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(U || {});
848
848
  const B = {
849
849
  bi_weekly: "Bi-Weekly",
850
850
  calculate: "Calculate",
@@ -875,13 +875,13 @@ const B = {
875
875
  [U.Weekly]: B.estimated_period_weekly,
876
876
  [U.Daily]: B.estimated_period_daily
877
877
  }, er = [
878
- { id: we.Months, label: B.months },
879
- { id: we.Years, label: B.years },
880
- { id: we.Days, label: B.days }
878
+ { id: ke.Months, label: B.months },
879
+ { id: ke.Years, label: B.years },
880
+ { id: ke.Days, label: B.days }
881
881
  ], tr = ({ total: t }) => {
882
882
  const r = Math.ceil((t + 1) / 1e3) * 1e3, [n, o] = m.useState(0), [c, a] = m.useState(at(t)), [s, d] = m.useState(
883
883
  at(t)
884
- ), [l, p] = m.useState(r), [h, _] = m.useState(Fn(t)), [b, f] = m.useState(we.Months);
884
+ ), [l, p] = m.useState(r), [h, _] = m.useState(Fn(t)), [b, f] = m.useState(ke.Months);
885
885
  m.useEffect(() => {
886
886
  o(
887
887
  it({
@@ -906,7 +906,7 @@ const B = {
906
906
  };
907
907
  return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("form", { onSubmit: w, children: /* @__PURE__ */ i(u, { sx: { gap: 24, pb: 24, pt: 16, px: 16 }, children: [
908
908
  /* @__PURE__ */ e(
909
- xe,
909
+ Se,
910
910
  {
911
911
  balance: /* @__PURE__ */ i(u, { sx: { flexDirection: "row", height: 32 }, children: [
912
912
  /* @__PURE__ */ e(I, { variant: "h2", children: L(n, "0,0") }),
@@ -991,13 +991,13 @@ const B = {
991
991
  more_accounts: "More Accounts",
992
992
  your_savings: "Your Savings"
993
993
  }, or = () => {
994
- const { savingsAccounts: t } = ke(), [r, n] = m.useState(!1), o = m.useMemo(
994
+ const { savingsAccounts: t } = Me(), [r, n] = m.useState(!1), o = m.useMemo(
995
995
  () => t.reduce((c, a) => c + (a.balance ?? 0), 0),
996
996
  [t]
997
997
  );
998
998
  return /* @__PURE__ */ i(u, { sx: { gap: 24 }, children: [
999
999
  /* @__PURE__ */ e(K, { sx: { bgcolor: "background.paper", p: 16 }, children: /* @__PURE__ */ i(u, { sx: { gap: 16 }, children: [
1000
- /* @__PURE__ */ e(xe, { balance: o, title: Ae.your_savings }),
1000
+ /* @__PURE__ */ e(Se, { balance: o, title: Ae.your_savings }),
1001
1001
  t.length ? /* @__PURE__ */ e(Kt, { loadAccounts: [He.SAVINGS], loadMoreLabel: Ae.connect_accounts }) : /* @__PURE__ */ e(eo, { onClick: () => n(!0), variant: "contained", children: Ae.connect_accounts })
1002
1002
  ] }) }),
1003
1003
  /* @__PURE__ */ e(nr, { total: o }),
@@ -1355,10 +1355,10 @@ const B = {
1355
1355
  }
1356
1356
  );
1357
1357
  }, hr = S(_r), mr = () => {
1358
- const { savingsAndCheckingAccountsBalance: t } = ke(), { finstrong: r } = v();
1358
+ const { savingsAndCheckingAccountsBalance: t } = Me(), { finstrong: r } = v();
1359
1359
  return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
1360
1360
  /* @__PURE__ */ e(
1361
- xe,
1361
+ Se,
1362
1362
  {
1363
1363
  balance: t,
1364
1364
  title: r.key_indicators_save.drawer_available_balance
@@ -1383,7 +1383,7 @@ const B = {
1383
1383
  }, [n.spend, n.debtSpend]);
1384
1384
  return a ? /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
1385
1385
  /* @__PURE__ */ e(
1386
- xe,
1386
+ Se,
1387
1387
  {
1388
1388
  balance: r.ninety_day_spend / 90,
1389
1389
  title: t.key_indicators_save.drawer_daily_spend
@@ -1563,7 +1563,7 @@ const B = {
1563
1563
  const { healthScore: t, allTransactions: r } = F(), { connect: n, finstrong: o } = v(), [c, a] = m.useState(!1);
1564
1564
  return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
1565
1565
  /* @__PURE__ */ e(
1566
- xe,
1566
+ Se,
1567
1567
  {
1568
1568
  balance: t.ninety_day_income,
1569
1569
  sx: { flexDirection: "column-reverse" },
@@ -1596,7 +1596,7 @@ const B = {
1596
1596
  const { allTransactions: t, healthScore: r } = F(), { connect: n, finstrong: o } = v(), [c, a] = m.useState(!1);
1597
1597
  return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
1598
1598
  /* @__PURE__ */ e(
1599
- xe,
1599
+ Se,
1600
1600
  {
1601
1601
  balance: r.ninety_day_debt_spend,
1602
1602
  sx: { flexDirection: "column-reverse" },
@@ -2237,7 +2237,7 @@ const B = {
2237
2237
  children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children: a.content })
2238
2238
  }
2239
2239
  );
2240
- }, Wr = S(Lr), fe = ({
2240
+ }, Wr = S(Lr), xe = ({
2241
2241
  drawerFor: t,
2242
2242
  title: r,
2243
2243
  description: n,
@@ -2308,7 +2308,7 @@ const B = {
2308
2308
  ]);
2309
2309
  return /* @__PURE__ */ i(u, { sx: { gap: 24, p: 8, pt: 24 }, children: [
2310
2310
  /* @__PURE__ */ e(
2311
- fe,
2311
+ xe,
2312
2312
  {
2313
2313
  cardState: c.cardState,
2314
2314
  description: c.description,
@@ -2317,7 +2317,7 @@ const B = {
2317
2317
  }
2318
2318
  ),
2319
2319
  /* @__PURE__ */ e(
2320
- fe,
2320
+ xe,
2321
2321
  {
2322
2322
  cardState: a.cardState,
2323
2323
  description: a.description,
@@ -2366,7 +2366,7 @@ const B = {
2366
2366
  ]);
2367
2367
  return /* @__PURE__ */ i(u, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
2368
2368
  /* @__PURE__ */ e(
2369
- fe,
2369
+ xe,
2370
2370
  {
2371
2371
  cardState: a.cardState,
2372
2372
  description: a.description,
@@ -2375,7 +2375,7 @@ const B = {
2375
2375
  }
2376
2376
  ),
2377
2377
  /* @__PURE__ */ e(
2378
- fe,
2378
+ xe,
2379
2379
  {
2380
2380
  cardState: s.cardState,
2381
2381
  description: s.description,
@@ -2418,7 +2418,7 @@ const B = {
2418
2418
  }, [t.debt_to_income_ratio, o.credit_score, n, r]);
2419
2419
  return /* @__PURE__ */ i(u, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
2420
2420
  /* @__PURE__ */ e(
2421
- fe,
2421
+ xe,
2422
2422
  {
2423
2423
  cardState: s.cardState,
2424
2424
  description: s.description,
@@ -2427,7 +2427,7 @@ const B = {
2427
2427
  }
2428
2428
  ),
2429
2429
  /* @__PURE__ */ e(
2430
- fe,
2430
+ xe,
2431
2431
  {
2432
2432
  cardState: d.cardState,
2433
2433
  description: d.description,
@@ -2583,13 +2583,13 @@ const B = {
2583
2583
  nextIconButton: {
2584
2584
  sx: {
2585
2585
  color: "primary.main",
2586
- "&:hover": { bgcolor: be(n.palette.primary.light, 0.1) }
2586
+ "&:hover": { bgcolor: fe(n.palette.primary.light, 0.1) }
2587
2587
  }
2588
2588
  },
2589
2589
  previousIconButton: {
2590
2590
  sx: {
2591
2591
  color: "primary.main",
2592
- "&:hover": { bgcolor: be(n.palette.primary.light, 0.1) }
2592
+ "&:hover": { bgcolor: fe(n.palette.primary.light, 0.1) }
2593
2593
  }
2594
2594
  }
2595
2595
  },
@@ -2597,7 +2597,7 @@ const B = {
2597
2597
  width: "100%",
2598
2598
  "& .MuiIconButton-edgeEnd": {
2599
2599
  color: "primary.main",
2600
- "&:hover": { bgcolor: be(n.palette.primary.light, 0.1) }
2600
+ "&:hover": { bgcolor: fe(n.palette.primary.light, 0.1) }
2601
2601
  }
2602
2602
  },
2603
2603
  value: t ? new Date(t * 1e3) : null
@@ -2673,9 +2673,9 @@ const B = {
2673
2673
  do_it_later: "Do It Later",
2674
2674
  next: "Next"
2675
2675
  }, ra = ({ isOpen: t, onClose: r }) => {
2676
- const { visibleAccounts: n } = ke(), { calculateHealthScore: o } = F(), { finstrong: c } = v(), { setSelectedAccounts: a } = j(), { addRepeatingTransaction: s, setDateRange: d } = Ve(), { filter: l, setFilter: p, transactions: h } = jn(), { user: _, userProfile: b, updateUser: f, updateUserProfile: w } = Q(), [y, D] = m.useState(_.credit_score || 0), [g, x] = m.useState(
2676
+ const { visibleAccounts: n } = Me(), { calculateHealthScore: o } = F(), { finstrong: c } = v(), { setSelectedAccounts: a } = j(), { addRepeatingTransaction: s, setDateRange: d } = Ve(), { filter: l, setFilter: p, transactions: h } = jn(), { user: _, userProfile: b, updateUser: f, updateUserProfile: w } = Q(), [y, D] = m.useState(_.credit_score || 0), [g, x] = m.useState(
2677
2677
  ht
2678
- ), [M, W] = m.useState(1), [G, H] = m.useState(Ot.EveryMonth), [T, V] = m.useState([]), [re, ae] = m.useState(!1), [Se, ie] = m.useState(!1), [X, se] = m.useState(_.birthday), [ce, Me] = m.useState(15), [q, Je] = m.useState("");
2678
+ ), [M, W] = m.useState(1), [G, H] = m.useState(Ot.EveryMonth), [T, V] = m.useState([]), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(_.birthday), [ce, he] = m.useState(15), [q, Je] = m.useState("");
2679
2679
  m.useEffect(() => {
2680
2680
  d({ start: Lt(dt()), end: Wt(dt()) });
2681
2681
  }, []), m.useEffect(() => {
@@ -2729,7 +2729,7 @@ const B = {
2729
2729
  },
2730
2730
  setFirstDay: W,
2731
2731
  setFrequency: H,
2732
- setSecondDay: Me,
2732
+ setSecondDay: he,
2733
2733
  transaction: et
2734
2734
  }
2735
2735
  ),
@@ -2779,8 +2779,8 @@ const B = {
2779
2779
  y && y !== _.credit_score && f({ ..._, credit_score: y }), nt();
2780
2780
  return;
2781
2781
  case O.MonthlyIncome:
2782
- q && T.findIndex(({ guid: me }) => me === q) === -1 && V((me) => [
2783
- ...me,
2782
+ q && T.findIndex(({ guid: ge }) => ge === q) === -1 && V((ge) => [
2783
+ ...ge,
2784
2784
  { ...et, firstDay: M, frequency: G, secondDay: ce }
2785
2785
  ]);
2786
2786
  break;
@@ -2806,7 +2806,7 @@ const B = {
2806
2806
  }, en = async (A) => {
2807
2807
  for (const R of A) {
2808
2808
  const {
2809
- account_guid: me,
2809
+ account_guid: ge,
2810
2810
  amount: Ie,
2811
2811
  date: de,
2812
2812
  description: on,
@@ -2818,7 +2818,7 @@ const B = {
2818
2818
  payee: ln,
2819
2819
  transaction_type: dn
2820
2820
  } = R, pn = Jn(ot, yo(de)), un = {
2821
- account_guid: me,
2821
+ account_guid: ge,
2822
2822
  amount: Ie,
2823
2823
  created_by: 0,
2824
2824
  description: ln || on || rn,
@@ -2833,7 +2833,7 @@ const B = {
2833
2833
  };
2834
2834
  await s(un, R);
2835
2835
  }
2836
- }, he = Ut[g.step], De = g.step === O.ConnectAccounts, tn = {
2836
+ }, me = Ut[g.step], De = g.step === O.ConnectAccounts, tn = {
2837
2837
  fullWidth: !0,
2838
2838
  ...De && !le && { startIcon: /* @__PURE__ */ e(ft, {}) }
2839
2839
  }, nn = !De || De && !le;
@@ -2848,7 +2848,7 @@ const B = {
2848
2848
  onClose: tt,
2849
2849
  onSecondaryAction: Jt,
2850
2850
  primaryButtonProps: tn,
2851
- primaryText: he?.mainActionContent,
2851
+ primaryText: me?.mainActionContent,
2852
2852
  secondaryColor: "primary",
2853
2853
  secondaryText: P.back,
2854
2854
  title: c.title,
@@ -2858,21 +2858,21 @@ const B = {
2858
2858
  /* @__PURE__ */ e(Pe, { children: P.calculate_primary }),
2859
2859
  /* @__PURE__ */ e(k, { sx: { textAlign: "center" }, variant: "subtitle1", children: P.calculate_secondary })
2860
2860
  ] }),
2861
- he && !re && /* @__PURE__ */ i(m.Fragment, { children: [
2861
+ me && !re && /* @__PURE__ */ i(m.Fragment, { children: [
2862
2862
  /* @__PURE__ */ e(
2863
2863
  oa,
2864
2864
  {
2865
2865
  completeCopy: c.complete,
2866
- primaryText: he.primaryText,
2867
- secondaryText: he.secondaryText,
2866
+ primaryText: me.primaryText,
2867
+ secondaryText: me.secondaryText,
2868
2868
  value: Xt
2869
2869
  }
2870
2870
  ),
2871
2871
  g.type === "main" && /* @__PURE__ */ i(C, { children: [
2872
- he.main,
2872
+ me.main,
2873
2873
  nn && /* @__PURE__ */ e(u, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e($, { fullWidth: !0, onClick: Zt, children: P.do_it_later }) })
2874
2874
  ] }),
2875
- g.type === "detail" && he.detail
2875
+ g.type === "detail" && me.detail
2876
2876
  ] })
2877
2877
  ]
2878
2878
  }
@@ -2881,7 +2881,7 @@ const B = {
2881
2881
  oe,
2882
2882
  {
2883
2883
  onClose: () => ie(!1),
2884
- showConnectWidget: Se,
2884
+ showConnectWidget: Ce,
2885
2885
  title: P.connect_accounts
2886
2886
  }
2887
2887
  )
@@ -2940,13 +2940,13 @@ const B = {
2940
2940
  nextIconButton: {
2941
2941
  sx: {
2942
2942
  color: "primary.main",
2943
- "&:hover": { bgcolor: be(o.palette.primary.light, 0.1) }
2943
+ "&:hover": { bgcolor: fe(o.palette.primary.light, 0.1) }
2944
2944
  }
2945
2945
  },
2946
2946
  previousIconButton: {
2947
2947
  sx: {
2948
2948
  color: "primary.main",
2949
- "&:hover": { bgcolor: be(o.palette.primary.light, 0.1) }
2949
+ "&:hover": { bgcolor: fe(o.palette.primary.light, 0.1) }
2950
2950
  }
2951
2951
  }
2952
2952
  },
@@ -2958,7 +2958,7 @@ const B = {
2958
2958
  width: "100%",
2959
2959
  "& .MuiIconButton-edgeEnd": {
2960
2960
  color: "primary.main",
2961
- "&:hover": { bgcolor: be(o.palette.primary.light, 0.1) }
2961
+ "&:hover": { bgcolor: fe(o.palette.primary.light, 0.1) }
2962
2962
  }
2963
2963
  },
2964
2964
  value: s ? new Date(s * 1e3) : /* @__PURE__ */ new Date()
@@ -2967,7 +2967,7 @@ const B = {
2967
2967
  }
2968
2968
  );
2969
2969
  }, ca = S(sa), la = ({ isOpen: t, onClose: r }) => {
2970
- const { visibleFinstrongAccounts: n } = ke(), {
2970
+ const { visibleFinstrongAccounts: n } = Me(), {
2971
2971
  accounts: o,
2972
2972
  common: c,
2973
2973
  finstrong: a
@@ -3303,15 +3303,15 @@ const B = {
3303
3303
  }
3304
3304
  },
3305
3305
  children: [
3306
- /* @__PURE__ */ e(ge, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(
3307
- ye,
3306
+ /* @__PURE__ */ e(ye, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(
3307
+ be,
3308
3308
  {
3309
3309
  primary: n.understand_your_habits,
3310
3310
  secondary: n.understand_your_habits_description
3311
3311
  }
3312
3312
  ) }),
3313
- /* @__PURE__ */ e(ge, { sx: { display: "list-item", pt: 16 }, children: /* @__PURE__ */ e(
3314
- ye,
3313
+ /* @__PURE__ */ e(ye, { sx: { display: "list-item", pt: 16 }, children: /* @__PURE__ */ e(
3314
+ be,
3315
3315
  {
3316
3316
  primary: n.see_whats_possible,
3317
3317
  secondary: n.see_whats_possible_description
@@ -3344,8 +3344,8 @@ const B = {
3344
3344
  }
3345
3345
  },
3346
3346
  children: [
3347
- /* @__PURE__ */ e(ge, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(ye, { secondary: n.we_ask_questions_description_1 }) }),
3348
- /* @__PURE__ */ e(ge, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(ye, { secondary: n.we_ask_questions_description_2 }) })
3347
+ /* @__PURE__ */ e(ye, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(be, { secondary: n.we_ask_questions_description_1 }) }),
3348
+ /* @__PURE__ */ e(ye, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(be, { secondary: n.we_ask_questions_description_2 }) })
3349
3349
  ]
3350
3350
  }
3351
3351
  )
@@ -3452,13 +3452,13 @@ const B = {
3452
3452
  )
3453
3453
  ] });
3454
3454
  }), fa = ({ onBackClick: t, sx: r, onPrimaryCtaClick: n }) => {
3455
- const { visibleAccounts: o } = ke(), { dateRange: c, isDataLoaded: a, loadBudgetData: s, setTheme: d } = Yn(), { reloadCategoryTotals: l } = Ye(), p = F(), {
3455
+ const { visibleAccounts: o } = Me(), { dateRange: c, isDataLoaded: a, loadBudgetData: s, setTheme: d } = Yn(), { reloadCategoryTotals: l } = Ye(), p = F(), {
3456
3456
  augmentedChartData: h,
3457
3457
  calculateHealthScore: _,
3458
3458
  healthScore: b,
3459
3459
  loadAugmentedChartData: f,
3460
3460
  loadMonthlySummaries: w
3461
- } = p, { finstrong: y, connect: D } = v(), { isCopyLoaded: g, isInitialized: x, selectedAccounts: M, setSelectedAccounts: W } = j(), { loadRepeatingTransactions: G } = Ve(), { isMobile: H } = Ue(), T = E(), { userProfile: V } = Q(), [re, ae] = m.useState(!1), [Se, ie] = m.useState(!1), [X, se] = m.useState(!1);
3461
+ } = p, { finstrong: y, connect: D } = v(), { isCopyLoaded: g, isInitialized: x, selectedAccounts: M, setSelectedAccounts: W } = j(), { loadRepeatingTransactions: G } = Ve(), { isMobile: H } = Ue(), T = E(), { userProfile: V } = Q(), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(!1);
3462
3462
  if (m.useEffect(() => {
3463
3463
  d(T);
3464
3464
  }, []), m.useEffect(() => {
@@ -3468,7 +3468,8 @@ const B = {
3468
3468
  }, [x]), m.useEffect(() => {
3469
3469
  x && (l(M, c.start, c.end), a || (s(), G().finally()));
3470
3470
  }, [c, a, x, M]), !g || !x) return /* @__PURE__ */ e(J, {});
3471
- const ce = () => ae(!0);
3471
+ const ce = () => {
3472
+ }, he = () => ae(!0);
3472
3473
  return /* @__PURE__ */ i(
3473
3474
  io,
3474
3475
  {
@@ -3477,10 +3478,11 @@ const B = {
3477
3478
  {
3478
3479
  iconName: "person",
3479
3480
  label: y.profile,
3480
- onClick: ce
3481
+ onClick: he
3481
3482
  }
3482
3483
  ],
3483
3484
  hasDivider: !0,
3485
+ onAccountsFilterClick: ce,
3484
3486
  onBackClick: t,
3485
3487
  sx: r,
3486
3488
  title: y.title,
@@ -3565,7 +3567,7 @@ const B = {
3565
3567
  /* @__PURE__ */ e(
3566
3568
  ha,
3567
3569
  {
3568
- isOpen: Se,
3570
+ isOpen: Ce,
3569
3571
  onClose: () => ie(!1)
3570
3572
  }
3571
3573
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.14-alpha.san7",
3
+ "version": "7.2.14-alpha.san8",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",