@mx-cartographer/experiences 7.0.14-alpha-debts-missing-sorting-option-ram1 → 7.0.15

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,6 +1,6 @@
1
1
  ## [7.0.15] - 09-22-2025
2
2
 
3
- - **UPDATED** - Added a missing sorting option in the DebtsWidget - Fastest Payoff First
3
+ - **FIXED** - Connect Accounts CTA was showing in trends widget when aggregation disabled
4
4
 
5
5
  ## [7.0.14] - 09-22-2025
6
6
 
@@ -1,32 +1,31 @@
1
1
  import { makeAutoObservable as l } from "mobx";
2
- import { getDate as r, fromUnixTime as _, startOfMonth as m } from "date-fns";
3
- import { A as p } from "./ConnectDrawer-phFH6OHt.mjs";
4
- const E = 12, T = 100;
5
- var c = /* @__PURE__ */ ((a) => (a[a.FASTEST_PAYOFF_FIRST = 1] = "FASTEST_PAYOFF_FIRST", a[a.HIGHEST_INTEREST = 2] = "HIGHEST_INTEREST", a[a.LOWEST_BALANCE = 3] = "LOWEST_BALANCE", a[a.HIGHEST_BALANCE = 4] = "HIGHEST_BALANCE", a))(c || {});
6
- const b = {
2
+ import { getDate as o, fromUnixTime as m, startOfMonth as _ } from "date-fns";
3
+ import { A as b } from "./ConnectDrawer-phFH6OHt.mjs";
4
+ var u = /* @__PURE__ */ ((a) => (a[a.HIGHEST_INTEREST = 1] = "HIGHEST_INTEREST", a[a.LOWEST_BALANCE = 2] = "LOWEST_BALANCE", a[a.HIGHEST_BALANCE = 3] = "HIGHEST_BALANCE", a))(u || {});
5
+ const p = {
7
6
  unnamed_label: "Unnamed Debt"
8
7
  };
9
8
  function y(a, e) {
10
- const t = a.filter((n) => n.account_type === p.CHECKING_LINE_OF_CREDIT ? Number(n.balance) <= 0 : n.is_excluded_from_debts !== !0), s = e.filter((n) => t.some((i) => i.guid === n.account_guid)).map(
9
+ const t = a.filter((n) => n.account_type === b.CHECKING_LINE_OF_CREDIT ? Number(n.balance) <= 0 : n.is_excluded_from_debts !== !0), s = e.filter((n) => t.some((i) => i.guid === n.account_guid)).map(
11
10
  (n) => d(t.find((i) => i.guid === n.account_guid), n)
12
- ), o = t.filter((n) => !s.some((i) => i.account.guid === n.guid)).map((n) => d(n));
13
- return [...s, ...o];
11
+ ), r = t.filter((n) => !s.some((i) => i.account.guid === n.guid)).map((n) => d(n));
12
+ return [...s, ...r];
14
13
  }
15
14
  function d(a, e) {
16
15
  const t = { account: a, goal: e, guid: a.guid };
17
16
  if (e) {
18
- const s = e.payment_due_at ? r(_(e.payment_due_at)) : 1, o = m(/* @__PURE__ */ new Date()).setDate(s);
19
- t.balance = Math.abs(e.amount - e.current_amount), t.interest_rate = e.interest_rate, t.is_paid_off = e.is_complete, t.monthly_payment = e.monthly_payment, t.name = e.name, t.original_balance = e.initial_amount, t.payment_due_date = o;
17
+ const s = e.payment_due_at ? o(m(e.payment_due_at)) : 1, r = _(/* @__PURE__ */ new Date()).setDate(s);
18
+ t.balance = Math.abs(e.amount - e.current_amount), t.interest_rate = e.interest_rate, t.is_paid_off = e.is_complete, t.monthly_payment = e.monthly_payment, t.name = e.name, t.original_balance = e.initial_amount, t.payment_due_date = r;
20
19
  } else {
21
- const s = a.payment_due_at ? r(_(a.payment_due_at)) : 1, o = m(/* @__PURE__ */ new Date()).setDate(s), n = a.balance ?? 0, i = a.minimum_payment ?? void 0, u = a.interest_rate ?? a.apr ?? a.apy;
22
- t.balance = Math.max(n, 0), t.interest_rate = u, t.is_paid_off = n === 0, t.monthly_payment = i, t.name = a?.name ?? b.unnamed_label, t.original_balance = a.original_balance, t.payment_due_date = o;
20
+ const s = a.payment_due_at ? o(m(a.payment_due_at)) : 1, r = _(/* @__PURE__ */ new Date()).setDate(s), n = a.balance ?? 0, i = a.minimum_payment ?? void 0, c = a.interest_rate ?? a.apr ?? a.apy;
21
+ t.balance = Math.max(n, 0), t.interest_rate = c, t.is_paid_off = n === 0, t.monthly_payment = i, t.name = a?.name ?? p.unnamed_label, t.original_balance = a.original_balance, t.payment_due_date = r;
23
22
  }
24
23
  return t.is_impossible = !1, t.priority = void 0, t.projected_payoff_date = void 0, t;
25
24
  }
26
25
  class h {
27
26
  isLoading = !1;
28
27
  selectedDebtChartData = {};
29
- selectedDebtPriority = c.LOWEST_BALANCE;
28
+ selectedDebtPriority = u.LOWEST_BALANCE;
30
29
  constructor() {
31
30
  l(this);
32
31
  }
@@ -41,7 +40,7 @@ class h {
41
40
  setSelectedDebtChartData = (e) => this.selectedDebtChartData = e;
42
41
  setSelectedDebtPriority = (e) => this.selectedDebtPriority = e;
43
42
  }
44
- class A {
43
+ class E {
45
44
  globalStore;
46
45
  uiStore;
47
46
  constructor(e) {
@@ -56,8 +55,6 @@ class A {
56
55
  }
57
56
  }
58
57
  export {
59
- c as D,
60
- T as I,
61
- E as M,
62
- A as a
58
+ u as D,
59
+ E as a
63
60
  };
@@ -0,0 +1,72 @@
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import o from "@mui/material/Button";
3
+ import i from "@mui/material/Stack";
4
+ import { Icon as d } from "@mxenabled/mx-icons";
5
+ import { H2 as f, Text as h } from "@mxenabled/mxui";
6
+ const S = ({
7
+ iconColor: x,
8
+ header: c,
9
+ icon: s,
10
+ onClick: a,
11
+ primaryButton: r,
12
+ secondaryButton: e,
13
+ subText: p,
14
+ sx: l,
15
+ variant: m = "buttons"
16
+ }) => /* @__PURE__ */ n(
17
+ i,
18
+ {
19
+ sx: {
20
+ mt: 54,
21
+ alignItems: "center",
22
+ alignSelf: "center",
23
+ ...l
24
+ },
25
+ children: [
26
+ /* @__PURE__ */ t(d, { name: s, size: 54, sx: { color: x } }),
27
+ /* @__PURE__ */ t(f, { color: "text.primary", sx: { textWrap: "wrap", textAlign: "center" }, children: c }),
28
+ /* @__PURE__ */ t(
29
+ h,
30
+ {
31
+ color: "text.secondary",
32
+ sx: { textAlign: "center", textWrap: "wrap" },
33
+ variant: "Paragraph",
34
+ children: p
35
+ }
36
+ ),
37
+ m === "buttons" && (r || e) && /* @__PURE__ */ n(
38
+ i,
39
+ {
40
+ className: "buttons-footer",
41
+ sx: {
42
+ gap: 12,
43
+ mt: 48
44
+ },
45
+ children: [
46
+ r && /* @__PURE__ */ t(
47
+ o,
48
+ {
49
+ onClick: () => a?.("primary"),
50
+ sx: { textWrap: "nowrap" },
51
+ variant: "contained",
52
+ children: r
53
+ }
54
+ ),
55
+ e && /* @__PURE__ */ t(
56
+ o,
57
+ {
58
+ onClick: () => a?.("secondary"),
59
+ sx: { textWrap: "nowrap" },
60
+ variant: "text",
61
+ children: e
62
+ }
63
+ )
64
+ ]
65
+ }
66
+ )
67
+ ]
68
+ }
69
+ );
70
+ export {
71
+ S as E
72
+ };
@@ -13,7 +13,7 @@ import * as E from "d3";
13
13
  import je from "@mui/material/Tooltip";
14
14
  import { g as w, k as j, u as D, e as X, a as ee, p as ze, h as te, f as ne, m as Ue, c as Se } from "../hooks-DkUqN6JE.mjs";
15
15
  import { L as P } from "../Loader-DUaFpDGv.mjs";
16
- import { E as ce } from "../EmptyState-Dcb-o2tl.mjs";
16
+ import { E as ce } from "../EmptyState-C0lr9E5T.mjs";
17
17
  import { u as me } from "../useScreenSize-B6JyS_Lj.mjs";
18
18
  import { A as k, W as Fe } from "../WidgetContainer-CdBs9WOZ.mjs";
19
19
  import K from "@mui/material/List";
@@ -4,11 +4,12 @@ interface EmptyWidgetProps {
4
4
  iconColor?: string;
5
5
  header: string;
6
6
  icon: string;
7
- onClick: (buttonType: string) => void;
8
- primaryButton: string;
7
+ onClick?: (buttonType: string) => void;
8
+ primaryButton?: string;
9
9
  secondaryButton?: string;
10
10
  subText: string;
11
11
  sx?: SxProps;
12
+ variant?: 'buttons' | 'no-buttons';
12
13
  }
13
14
  export declare const EmptyState: React.FC<EmptyWidgetProps>;
14
15
  export {};
@@ -28,7 +28,7 @@ import { I as la } from "../CashflowStore-D9Dpuz7X.mjs";
28
28
  import { d as it } from "../GoalStore-DJp7YL_M.mjs";
29
29
  import { C as ha, G as ga, M as pa, T as ma } from "../GoalStore-DJp7YL_M.mjs";
30
30
  import { C as ya } from "../CurrencyText-YUhH2caW.mjs";
31
- import { E as Sa } from "../EmptyState-Dcb-o2tl.mjs";
31
+ import { E as Sa } from "../EmptyState-C0lr9E5T.mjs";
32
32
  import { L as wa } from "../ListItemAction-DNZZ5fSa.mjs";
33
33
  import { T as ct } from "../TrendsStore-WrHxzdbQ.mjs";
34
34
  import { L as Ca, S as Da, u as va } from "../TrendsStore-WrHxzdbQ.mjs";
@@ -61,7 +61,7 @@ import { startOfMonth as J } from "date-fns/startOfMonth";
61
61
  import { startOfToday as L } from "date-fns/startOfToday";
62
62
  import { f as bt, a as wt, b as O } from "../BudgetUtil-CeSLAcsl.mjs";
63
63
  import { g as Yr, e as zr, c as Xr, d as Kr, i as jr } from "../BudgetUtil-CeSLAcsl.mjs";
64
- import { a as xt } from "../DebtsStore-VkyMADzd.mjs";
64
+ import { a as xt } from "../DebtsStore-Dp-CraCD.mjs";
65
65
  import { a as Ct } from "../FinstrongStore-mkALvztw.mjs";
66
66
  import { A as Dt, m as vt, a as At, b as Et } from "../InvestmentUtil-jOyOgzIB.mjs";
67
67
  import { M as Tt } from "../MerchantStore-DVH-QOf0.mjs";
@@ -23,7 +23,6 @@ export interface DebtsCopy {
23
23
  paydown_drawer_subtitle: string;
24
24
  paydown_drawer_title: string;
25
25
  paydown_drawer_total_payment: string;
26
- priority_sort_fastest_payoff: string;
27
26
  priority_sort_highest_balance: string;
28
27
  priority_sort_highest_interest: string;
29
28
  priority_sort_lowest_balance: string;
@@ -1,8 +1,5 @@
1
- export declare const MONTHS = 12;
2
- export declare const INTEREST_TO_DECIMAL = 100;
3
- export declare enum DebtPriority {
4
- FASTEST_PAYOFF_FIRST = 1,
5
- HIGHEST_INTEREST = 2,
6
- LOWEST_BALANCE = 3,
7
- HIGHEST_BALANCE = 4
1
+ export declare enum DebtPrioriy {
2
+ HIGHEST_INTEREST = 1,
3
+ LOWEST_BALANCE = 2,
4
+ HIGHEST_BALANCE = 3
8
5
  }