@mx-cartographer/experiences 6.26.33-alpha.mm0 → 7.0.0-alpha.mega1

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.
Files changed (104) hide show
  1. package/CHANGELOG.md +2 -3
  2. package/dist/Account-DY6nxO7y.mjs +30 -0
  3. package/dist/AccountDetailsContent-DvPs81kL.mjs +677 -0
  4. package/dist/AccountDetailsHeader-W2U7ZVm_.mjs +119 -0
  5. package/dist/AccountFields-DAVcbZy5.mjs +135 -0
  6. package/dist/AccountListItem-DFlbdcmT.mjs +90 -0
  7. package/dist/AccountStore-CU7qV3vg.mjs +230 -0
  8. package/dist/Accounts-BLlrQA5m.mjs +9 -0
  9. package/dist/BeatApi-DLu87ijw.mjs +21 -0
  10. package/dist/BeatStore-By4aGoRM.mjs +81 -0
  11. package/dist/BudgetUtil-Ci1TN0J5.mjs +101 -0
  12. package/dist/CashflowStore-D9Dpuz7X.mjs +91 -0
  13. package/dist/Category-5S6uwuXz.mjs +301 -0
  14. package/dist/CategorySelectorDrawer-rHyHHYuh.mjs +397 -0
  15. package/dist/CategoryStore-B5EW6I1d.mjs +183 -0
  16. package/dist/CategoryUtil-DRyruNgi.mjs +78 -0
  17. package/dist/ConnectDrawer-D9cR5phc.mjs +508 -0
  18. package/dist/ConnectionsDrawer-BzGqljSp.mjs +52 -0
  19. package/dist/CurrencyInput-D74cemI2.mjs +83 -0
  20. package/dist/CurrencyText-YUhH2caW.mjs +20 -0
  21. package/dist/DateUtil-BcuH7ErC.mjs +48 -0
  22. package/dist/DebtsStore-S0l9kr0r.mjs +60 -0
  23. package/dist/Dialog-CWW597AF.mjs +123 -0
  24. package/dist/Donut-1UMNcG67.mjs +57 -0
  25. package/dist/Drawer-kEE73B87.mjs +113 -0
  26. package/dist/EmptyState-Dcb-o2tl.mjs +55 -0
  27. package/dist/Fetch-CkFKy79O.mjs +116 -0
  28. package/dist/FinstrongStore-mkALvztw.mjs +101 -0
  29. package/dist/GoalStore-DioeeL-s.mjs +263 -0
  30. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  31. package/dist/Help-DhcC-C05.mjs +320 -0
  32. package/dist/Help-DpYRO8oA.mjs +3181 -0
  33. package/dist/IconBacking-B9oC6uL2.mjs +39 -0
  34. package/dist/InvestmentUtil-jOyOgzIB.mjs +134 -0
  35. package/dist/LineChart-CcyX38kK.mjs +499 -0
  36. package/dist/ListItemAction-BabpYivr.mjs +69 -0
  37. package/dist/Loader-Dp1P2gNw.mjs +14 -0
  38. package/dist/Localization-2MODESHW.mjs +30 -0
  39. package/dist/ManageIncome-ndMuhJMG.mjs +535 -0
  40. package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
  41. package/dist/MicroWidgetContainer-CsvHLYKX.mjs +45 -0
  42. package/dist/MiniWidgetContainer-BoOp-A05.mjs +39 -0
  43. package/dist/NetWorthStore-PD-RUe09.mjs +150 -0
  44. package/dist/Notification-AMGWM1Al.mjs +78 -0
  45. package/dist/NotificationSettings-VhHuMAFU.mjs +667 -0
  46. package/dist/NotificationStore-DHtSGySy.mjs +67 -0
  47. package/dist/NumberFormatting-CtWHhyBX.mjs +40 -0
  48. package/dist/OriginalBalanceAction-D39mx6uE.mjs +115 -0
  49. package/dist/RecurringSettings-D_HnMYZP.mjs +57 -0
  50. package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +263 -0
  51. package/dist/RepeatingTransaction-BPWfaB3f.mjs +282 -0
  52. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  53. package/dist/SettingsStore-CE7jDVFL.mjs +265 -0
  54. package/dist/SingleSegmentDonut-BgbLgwHi.mjs +69 -0
  55. package/dist/SpendingData-BkrxzHdr.mjs +55 -0
  56. package/dist/StatusBar-BK_uYHAB.mjs +30 -0
  57. package/dist/TabContentContainer-j01JYR_7.mjs +21 -0
  58. package/dist/Transaction-CA0FW2Ij.mjs +312 -0
  59. package/dist/TransactionApi-DbbcjI2L.mjs +86 -0
  60. package/dist/TransactionDetails-WBHFmbxL.mjs +1283 -0
  61. package/dist/TransactionStore-CeLdmVnC.mjs +669 -0
  62. package/dist/TrendsStore-BHJUapXF.mjs +487 -0
  63. package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +1959 -0
  64. package/dist/WidgetContainer-DWCusxYI.mjs +556 -0
  65. package/dist/accounts/index.es.js +752 -0
  66. package/dist/analytics/index.es.js +171 -0
  67. package/dist/budgets/index.es.js +1075 -0
  68. package/dist/cashflow/index.es.js +1098 -0
  69. package/dist/categories/index.es.js +9 -0
  70. package/dist/common/components/WidgetContainer.d.ts +1 -1
  71. package/dist/common/components/charts/LineChart.d.ts +0 -1
  72. package/dist/common/constants/Analytics.d.ts +10 -20
  73. package/dist/common/context/hooks.d.ts +13 -13
  74. package/dist/common/index.es.js +1451 -0
  75. package/dist/dashboard/index.es.js +181 -0
  76. package/dist/debts/index.es.js +1460 -0
  77. package/dist/exportTransactionsToCSV-CmwsKl2D.mjs +47 -0
  78. package/dist/finstrong/index.es.js +1455 -0
  79. package/dist/goals/index.es.js +1209 -0
  80. package/dist/help/components/content/section/index.d.ts +15 -15
  81. package/dist/help/index.es.js +14 -0
  82. package/dist/hooks-30y_BLwc.mjs +71 -0
  83. package/dist/index.d.ts +0 -22
  84. package/dist/insights/index.d.ts +1 -0
  85. package/dist/insights/index.es.js +4 -0
  86. package/dist/investments/index.es.js +1638 -0
  87. package/dist/merchants/index.es.js +79 -0
  88. package/dist/microinsights/components/carouselheader/CarouselHeader.d.ts +0 -1
  89. package/dist/microinsights/components/microBeatCarousel/MicroBeatCarousel.d.ts +0 -1
  90. package/dist/microinsights/index.es.js +16 -0
  91. package/dist/networth/index.es.js +576 -0
  92. package/dist/notifications/index.es.js +192 -0
  93. package/dist/recurringtransactions/index.es.js +879 -0
  94. package/dist/settings/index.es.js +879 -0
  95. package/dist/spending/index.es.js +570 -0
  96. package/dist/transactions/index.es.js +587 -0
  97. package/dist/trends/index.es.js +1086 -0
  98. package/dist/useCombineEvents-DaDBSR_1.mjs +92 -0
  99. package/dist/useDimensions-27p2evRx.mjs +36 -0
  100. package/dist/useScreenSize-B6JyS_Lj.mjs +36 -0
  101. package/package.json +155 -3
  102. package/dist/index.es.js +0 -30564
  103. package/dist/index.es.js.map +0 -1
  104. package/dist/trends/constants/TrendsWidget.d.ts +0 -3
@@ -0,0 +1,45 @@
1
+ import { jsx as r, jsxs as p, Fragment as f } from "react/jsx-runtime";
2
+ import x from "@mui/material/Button";
3
+ import C from "@mui/material/Card";
4
+ import g from "@mui/material/CardContent";
5
+ import b from "@mui/material/CardHeader";
6
+ import { P as u, H3 as v } from "@mxenabled/mxui";
7
+ import { ChevronRight as W } from "@mxenabled/mx-icons";
8
+ import { u as M } from "./useDimensions-27p2evRx.mjs";
9
+ import { W as w } from "./hooks-30y_BLwc.mjs";
10
+ const H = ({
11
+ children: e,
12
+ className: o,
13
+ ctaLabel: n,
14
+ onCTAClick: a,
15
+ subHeader: t,
16
+ sx: s,
17
+ title: c,
18
+ variant: d = "borderless"
19
+ }) => {
20
+ const [m, { height: l, width: h }] = M(), i = /* @__PURE__ */ p(f, { children: [
21
+ /* @__PURE__ */ r(
22
+ b,
23
+ {
24
+ action: /* @__PURE__ */ r(
25
+ x,
26
+ {
27
+ endIcon: /* @__PURE__ */ r(W, { size: 20 }),
28
+ onClick: a,
29
+ size: "small",
30
+ variant: "text",
31
+ children: n
32
+ }
33
+ ),
34
+ subheader: t && /* @__PURE__ */ r(u, { sx: { color: "text.secondary" }, variant: "body2", children: t }),
35
+ sx: { p: 0, pb: 8, width: "calc(100% - 8px)", "& .MuiCardHeader-action": { mt: 0 } },
36
+ title: /* @__PURE__ */ r(v, { sx: { width: "calc(100% - 10px)" }, children: c })
37
+ }
38
+ ),
39
+ /* @__PURE__ */ r(g, { ref: m, sx: { p: 0, ":last-child": { pb: 0 } }, children: /* @__PURE__ */ r(w, { availableHeight: l, availableWidth: h, children: e }) })
40
+ ] });
41
+ return d === "borderless" ? i : /* @__PURE__ */ r(C, { className: o, sx: { alignItems: "center", p: 16, ...s }, children: i });
42
+ }, F = H;
43
+ export {
44
+ F as M
45
+ };
@@ -0,0 +1,39 @@
1
+ import { jsxs as h, jsx as r } from "react/jsx-runtime";
2
+ import f from "@mui/material/Button";
3
+ import u from "@mui/material/Card";
4
+ import x from "@mui/material/CardHeader";
5
+ import g from "@mui/material/CardContent";
6
+ import b from "@mui/material/IconButton";
7
+ import { Icon as C, ChevronRight as v } from "@mxenabled/mx-icons";
8
+ import { Text as W, H3 as H } from "@mxenabled/mxui";
9
+ import { u as I } from "./useDimensions-27p2evRx.mjs";
10
+ import { W as M } from "./hooks-30y_BLwc.mjs";
11
+ const j = ({
12
+ className: t = "mx-cmn-mini-widget",
13
+ closeLabel: a,
14
+ children: m,
15
+ onClose: i,
16
+ onPrimaryCtaClick: o,
17
+ primaryCtaLabel: d = "",
18
+ subTitle: n = "",
19
+ sx: l = {},
20
+ title: e = ""
21
+ }) => {
22
+ const [s, { height: c, width: p }] = I();
23
+ return /* @__PURE__ */ h(u, { className: t, sx: { ...l }, children: [
24
+ /* @__PURE__ */ r(
25
+ x,
26
+ {
27
+ action: i ? /* @__PURE__ */ r(b, { "aria-label": a, onClick: i, children: /* @__PURE__ */ r(C, { name: "close", size: 24 }) }) : o && /* @__PURE__ */ r(f, { endIcon: /* @__PURE__ */ r(v, {}), onClick: o, children: /* @__PURE__ */ r(W, { bold: !0, variant: "Small", children: d }) }),
28
+ subheader: n || null,
29
+ subheaderTypographyProps: { variant: "Small" },
30
+ sx: { pb: 4 },
31
+ title: e ? /* @__PURE__ */ r(H, { sx: { pb: 4 }, children: e }) : null
32
+ }
33
+ ),
34
+ /* @__PURE__ */ r(g, { ref: s, sx: { p: 0 }, children: /* @__PURE__ */ r(M, { availableHeight: c, availableWidth: p, children: m }) })
35
+ ] });
36
+ }, $ = j;
37
+ export {
38
+ $ as M
39
+ };
@@ -0,0 +1,150 @@
1
+ import { makeAutoObservable as D, runInAction as u } from "mobx";
2
+ import { format as A } from "date-fns/format";
3
+ import { fromUnixTime as W } from "date-fns/fromUnixTime";
4
+ import { startOfMonth as _ } from "date-fns/startOfMonth";
5
+ import { subMonths as B } from "date-fns/subMonths";
6
+ import { a as b } from "./Accounts-BLlrQA5m.mjs";
7
+ import { e as N, a as M, f as v } from "./ConnectDrawer-D9cR5phc.mjs";
8
+ const f = 13, L = (n, t) => n.filter((e) => {
9
+ const { is_closed: r, is_deleted: s, is_hidden: a, is_manual: i } = e;
10
+ return r || s || a ? !1 : i || !e.guid ? !0 : t.some((l) => n.some((g) => l.guid === g.member_guid));
11
+ }), S = (n, t) => [...n, ...t], d = (n) => {
12
+ if (n && n.length > 0)
13
+ return n[n.length - 1];
14
+ }, T = (n, t) => n.year_month - t.year_month, w = () => Array.from({ length: f }, (n, t) => Math.floor(_(B(/* @__PURE__ */ new Date(), t)).getTime() / 1e3)).sort(), C = (n, t, e) => !n.length || !t.length ? [] : w().reduceRight((s, a) => {
15
+ const i = t.filter(
16
+ ({ year_month: o }) => o === parseInt(A(W(a), "yyyyMM"))
17
+ ), l = n.map((o) => {
18
+ const c = i.find((h) => h.account_guid === o.guid), m = {
19
+ change: 0,
20
+ guid: o.guid,
21
+ name: o.name,
22
+ type: o.account_type,
23
+ balance: 0
24
+ };
25
+ if (!c && s.length === 0 && !o.balance) return m;
26
+ if (!c && s.length === 0)
27
+ return {
28
+ ...m,
29
+ value: b(o) ? -(o.balance ?? 0) : o.balance ?? 0
30
+ };
31
+ if (!c) {
32
+ const h = s[0].accounts.find((y) => y.guid === o.guid);
33
+ return h || m;
34
+ }
35
+ return {
36
+ change: c.transaction_total,
37
+ guid: o.guid,
38
+ name: o.name,
39
+ type: o.account_type,
40
+ value: c.balance
41
+ };
42
+ }), { y: g, change: p } = l.reduce(
43
+ (o, c) => ({
44
+ y: o.y + (c.value || 0),
45
+ change: o.change + (c.change || 0)
46
+ }),
47
+ { y: 0, change: 0 }
48
+ );
49
+ return [
50
+ {
51
+ accounts: l,
52
+ x: a,
53
+ y: g,
54
+ change: p
55
+ },
56
+ ...s
57
+ ];
58
+ }, []).slice(f - e), E = (n) => {
59
+ const t = [], e = [];
60
+ let r = 0, s = 0;
61
+ return n?.accounts.forEach((a) => {
62
+ a.change > 0 && (t.push({ accountName: a.name, gain: a.change }), r += a.change), a.change < 0 && (e.push({ accountName: a.name, loss: a.change }), s += a.change);
63
+ }), { netWorth: n, gains: t, losses: e, totalGains: r, totalLosses: s };
64
+ }, k = (n) => {
65
+ const t = [], e = [];
66
+ let r = 0, s = 0;
67
+ return n.forEach((a) => {
68
+ if (b(a)) {
69
+ const i = a.balance ?? 0;
70
+ e.push({ accountName: a.name, accountType: a.account_type, balance: i }), s += i;
71
+ } else {
72
+ const i = a.balance ?? 0;
73
+ t.push({ accountName: a.name, accountType: a.account_type, balance: i }), r += i;
74
+ }
75
+ }), { assets: t, liabilities: e, totalAssets: r, totalLiabilities: s };
76
+ }, j = (n) => {
77
+ const t = n.reduce((e, r) => {
78
+ const s = r.accountType;
79
+ return e[s] || (e[s] = []), e[s].push(r), e;
80
+ }, {});
81
+ return Object.entries(t).map(([e, r]) => ({
82
+ icon: N[+e] || M[+e],
83
+ name: v[+e],
84
+ accounts: r
85
+ }));
86
+ };
87
+ class z {
88
+ globalStore;
89
+ netWorthData = { accounts: [], monthlyAccountBalances: [] };
90
+ netWorthChartData = [];
91
+ hoveredData;
92
+ selectedData;
93
+ constructor(t) {
94
+ this.globalStore = t, D(this);
95
+ }
96
+ loadNetWorthData = async (t) => {
97
+ try {
98
+ const e = this.globalStore.accountStore.members, r = L(t, e), a = await (await Promise.all(
99
+ r.map((i) => this.globalStore.accountStore.api.getMonthlyAccountBalances(i.guid))
100
+ )).reduce(S, []).sort(T);
101
+ u(() => {
102
+ this.netWorthData = {
103
+ accounts: r,
104
+ monthlyAccountBalances: a
105
+ };
106
+ });
107
+ } catch (e) {
108
+ console.error(`Error occured while loading net worth data: ${e}`);
109
+ }
110
+ };
111
+ loadChartData = async (t) => {
112
+ try {
113
+ const { accounts: e, monthlyAccountBalances: r } = this.netWorthData, s = await C(e, r, t), a = d(s);
114
+ u(() => {
115
+ this.netWorthChartData = s, this.selectedData = a;
116
+ });
117
+ } catch (e) {
118
+ console.error(`Error occured while loading chart data: ${e}`);
119
+ }
120
+ };
121
+ get gainsLosses() {
122
+ return E(this.selectedData);
123
+ }
124
+ get assetsLiabilities() {
125
+ const { assets: t, liabilities: e, totalAssets: r, totalLiabilities: s } = k(
126
+ this.netWorthData.accounts
127
+ );
128
+ return {
129
+ netWorth: d(this.netWorthChartData),
130
+ assets: t,
131
+ liabilities: e,
132
+ totalAssets: r,
133
+ totalLiabilities: s
134
+ };
135
+ }
136
+ setSelectedData = (t) => {
137
+ u(() => {
138
+ this.selectedData = this.netWorthChartData[t];
139
+ });
140
+ };
141
+ setHoveredData = (t) => {
142
+ u(() => {
143
+ this.hoveredData = t !== null ? this.netWorthChartData[t] : void 0;
144
+ });
145
+ };
146
+ }
147
+ export {
148
+ z as N,
149
+ j as g
150
+ };
@@ -0,0 +1,78 @@
1
+ import { jsx as e, jsxs as S } from "react/jsx-runtime";
2
+ import D from "@mui/material/ListItem";
3
+ import M from "@mui/material/ListItemButton";
4
+ import c from "@mui/material/ListItemIcon";
5
+ import x from "@mui/material/ListItemText";
6
+ import L from "@mui/material/Stack";
7
+ import C from "@mui/material/Switch";
8
+ import { Text as u } from "@mxenabled/mxui";
9
+ import p from "@mui/material/ListItemAvatar";
10
+ const z = ({
11
+ avatar: r,
12
+ endIcon: a,
13
+ isChecked: l,
14
+ isDisabled: d = !1,
15
+ onClick: n,
16
+ onToggle: m,
17
+ primaryText: o,
18
+ secondaryText: v
19
+ }) => (
20
+ //TODO: implement common/components/ListItemRow.tsx
21
+ /* @__PURE__ */ e(
22
+ D,
23
+ {
24
+ secondaryAction: /* @__PURE__ */ e(C, { checked: l, onChange: m }),
25
+ sx: {
26
+ "& .MuiListItemSecondaryAction-root": { right: a ? 64 : 24 },
27
+ "& .MuiListItemButton-root": { pr: 24 }
28
+ },
29
+ children: /* @__PURE__ */ S(M, { onClick: d ? void 0 : () => n(), children: [
30
+ r && /* @__PURE__ */ e(p, { children: r }),
31
+ /* @__PURE__ */ e(x, { primaryTypographyProps: { fontWeight: 400 }, children: /* @__PURE__ */ e(L, { alignItems: "center", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ S(L, { children: [
32
+ /* @__PURE__ */ e(u, { variant: "body1", children: o }),
33
+ /* @__PURE__ */ e(u, { color: "text.secondary", variant: "caption", children: v })
34
+ ] }) }) }),
35
+ !d && a && /* @__PURE__ */ e(c, { children: a })
36
+ ] })
37
+ }
38
+ )
39
+ ), F = ({
40
+ isChecked: r,
41
+ isDisabled: a = !1,
42
+ onToggle: l,
43
+ primaryText: d,
44
+ secondaryText: n = void 0,
45
+ useExtraPadding: m = !0
46
+ }) => /* @__PURE__ */ e(
47
+ D,
48
+ {
49
+ secondaryAction: /* @__PURE__ */ e(C, { checked: r, disabled: a, onChange: l }),
50
+ sx: {
51
+ pl: m ? 48 : 0,
52
+ "& .MuiListItemSecondaryAction-root": { right: m ? 64 : 24 }
53
+ },
54
+ children: /* @__PURE__ */ e(
55
+ x,
56
+ {
57
+ primary: d,
58
+ primaryTypographyProps: { fontWeight: 400, variant: "body1", maxWidth: "calc(100% - 60px)" },
59
+ secondary: n,
60
+ secondaryTypographyProps: {
61
+ color: "text.secondary",
62
+ maxWidth: "calc(100% - 60px)",
63
+ variant: "caption",
64
+ whiteSpace: "wrap"
65
+ }
66
+ }
67
+ )
68
+ }
69
+ );
70
+ var B = /* @__PURE__ */ ((r) => (r.Accounts = "accounts", r.Budgets = "budgets", r.Insights = "insights", r.Personal = "personal", r))(B || {}), w = /* @__PURE__ */ ((r) => (r[r.DebtPaymentReminder = 3] = "DebtPaymentReminder", r[r.AccountBalanceLow = 6] = "AccountBalanceLow", r[r.AccountDepositLarge = 7] = "AccountDepositLarge", r[r.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", r[r.TransactionFeeCharge = 9] = "TransactionFeeCharge", r[r.InternationalTransaction = 23] = "InternationalTransaction", r[r.AccountDepositLargePosted = 48] = "AccountDepositLargePosted", r))(w || {}), P = /* @__PURE__ */ ((r) => (r[r.BudgetExceeded = 1] = "BudgetExceeded", r[r.BudgetOffTarget = 2] = "BudgetOffTarget", r))(P || {}), b = /* @__PURE__ */ ((r) => (r[r.AccountBalanceLow = 33] = "AccountBalanceLow", r[r.BillAmountNotStandard = 49] = "BillAmountNotStandard", r[r.CategorySpending = 50] = "CategorySpending", r[r.CreditCardCloseToLimit = 51] = "CreditCardCloseToLimit", r[r.DebtPaymentReminder = 37] = "DebtPaymentReminder", r[r.DuplicatePayment = 42] = "DuplicatePayment", r[r.MonthlySpendComparison = 53] = "MonthlySpendComparison", r[r.MonthlySpendToIncomeComparison = 54] = "MonthlySpendToIncomeComparison", r[r.MonthlySubscriptionAggregate = 55] = "MonthlySubscriptionAggregate", r[r.MonthlyTopMerchantSpending = 56] = "MonthlyTopMerchantSpending", r[r.SaveAnExtra100Dollars = 57] = "SaveAnExtra100Dollars", r[r.SavingsOpportunity = 58] = "SavingsOpportunity", r[r.SetUpDirectDeposit = 59] = "SetUpDirectDeposit", r[r.SwitchDirectDeposit = 60] = "SwitchDirectDeposit", r[r.UncategorizedTransactions = 61] = "UncategorizedTransactions", r[r.UnifiedDeposit = 62] = "UnifiedDeposit", r[r.UpcomingBill = 63] = "UpcomingBill", r[r.WeekendSpendingSummary = 64] = "WeekendSpendingSummary", r[r.WeeklyNewMerchants = 65] = "WeeklyNewMerchants", r[r.DiscoveredAccounts = 52] = "DiscoveredAccounts", r[r.TransactionExpenseLarge = 39] = "TransactionExpenseLarge", r[r.PromotionalCampaignMessages = 67] = "PromotionalCampaignMessages", r[r.TransparentOverdraft = 68] = "TransparentOverdraft", r))(b || {});
71
+ export {
72
+ w as A,
73
+ P as B,
74
+ b as I,
75
+ B as N,
76
+ z as T,
77
+ F as a
78
+ };