@mx-cartographer/experiences 6.26.18-alpha.mega4 → 6.26.18-alpha.sms2

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 (98) hide show
  1. package/dist/budgets/index.d.ts +1 -0
  2. package/dist/common/context/hooks.d.ts +13 -13
  3. package/dist/help/components/content/section/index.d.ts +15 -15
  4. package/dist/index.d.ts +22 -0
  5. package/dist/index.es.js +30336 -0
  6. package/dist/index.es.js.map +1 -0
  7. package/package.json +3 -155
  8. package/dist/Account-DM32_5k9.mjs +0 -30
  9. package/dist/AccountDetailsContent-B_qRSB8l.mjs +0 -677
  10. package/dist/AccountDetailsHeader-CAm6ADMq.mjs +0 -119
  11. package/dist/AccountFields-Bb4pds0q.mjs +0 -135
  12. package/dist/AccountListItem-G7iAesaO.mjs +0 -90
  13. package/dist/AccountStore-RSanus_m.mjs +0 -230
  14. package/dist/Accounts-BfAQRG8R.mjs +0 -9
  15. package/dist/BeatApi-DLu87ijw.mjs +0 -21
  16. package/dist/BeatStore-By4aGoRM.mjs +0 -81
  17. package/dist/BudgetUtil-DcqclhiQ.mjs +0 -101
  18. package/dist/CashflowStore-D9Dpuz7X.mjs +0 -91
  19. package/dist/Category-5S6uwuXz.mjs +0 -301
  20. package/dist/CategorySelectorDrawer-DgrePTRg.mjs +0 -397
  21. package/dist/CategoryStore-B5EW6I1d.mjs +0 -183
  22. package/dist/CategoryUtil-DRyruNgi.mjs +0 -78
  23. package/dist/ConnectDrawer-DPnfeIfn.mjs +0 -508
  24. package/dist/ConnectionsDrawer-BCzpuNsK.mjs +0 -52
  25. package/dist/CurrencyInput-DzsPiUsU.mjs +0 -83
  26. package/dist/CurrencyText-YUhH2caW.mjs +0 -20
  27. package/dist/DateUtil-BcuH7ErC.mjs +0 -48
  28. package/dist/DebtsStore-C6VcBnpG.mjs +0 -60
  29. package/dist/Dialog-CWW597AF.mjs +0 -123
  30. package/dist/Donut-1UMNcG67.mjs +0 -57
  31. package/dist/Drawer-kEE73B87.mjs +0 -113
  32. package/dist/EmptyState-Dcb-o2tl.mjs +0 -55
  33. package/dist/Fetch-CkFKy79O.mjs +0 -116
  34. package/dist/FinstrongStore-mkALvztw.mjs +0 -101
  35. package/dist/GoalStore-DyCr4wNc.mjs +0 -263
  36. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  37. package/dist/Help-DhcC-C05.mjs +0 -320
  38. package/dist/Help-toqAK5eD.mjs +0 -3173
  39. package/dist/IconBacking-B9oC6uL2.mjs +0 -39
  40. package/dist/InvestmentUtil-jOyOgzIB.mjs +0 -134
  41. package/dist/LineChart-CQWu5KoO.mjs +0 -403
  42. package/dist/ListItemAction-Df3OPMOW.mjs +0 -69
  43. package/dist/Loader-Dp1P2gNw.mjs +0 -14
  44. package/dist/Localization-2MODESHW.mjs +0 -30
  45. package/dist/ManageIncome-BVt_XQbo.mjs +0 -535
  46. package/dist/MerchantStore-DVH-QOf0.mjs +0 -37
  47. package/dist/MicroWidgetContainer-DaLW43tE.mjs +0 -45
  48. package/dist/MiniWidgetContainer-BcNPxZt2.mjs +0 -39
  49. package/dist/NetWorthStore-DE8CQBMM.mjs +0 -150
  50. package/dist/Notification-AMGWM1Al.mjs +0 -78
  51. package/dist/NotificationSettings-CPZN0l8X.mjs +0 -667
  52. package/dist/NotificationStore-DHtSGySy.mjs +0 -67
  53. package/dist/NumberFormatting-CtWHhyBX.mjs +0 -40
  54. package/dist/OriginalBalanceAction-s9sUxofR.mjs +0 -115
  55. package/dist/RecurringSettings-DIEsympT.mjs +0 -57
  56. package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +0 -263
  57. package/dist/RepeatingTransaction-BPWfaB3f.mjs +0 -282
  58. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  59. package/dist/SettingsStore-CE7jDVFL.mjs +0 -265
  60. package/dist/SingleSegmentDonut-BgbLgwHi.mjs +0 -69
  61. package/dist/SpendingData-ByFCw95X.mjs +0 -53
  62. package/dist/StatusBar-BK_uYHAB.mjs +0 -30
  63. package/dist/TabContentContainer-j01JYR_7.mjs +0 -21
  64. package/dist/Transaction-C-5-Iuab.mjs +0 -312
  65. package/dist/TransactionApi-DbbcjI2L.mjs +0 -86
  66. package/dist/TransactionDetails-B5qfs9Zh.mjs +0 -1283
  67. package/dist/TransactionStore-BWi6_2Ny.mjs +0 -669
  68. package/dist/TrendsStore-Borh98aN.mjs +0 -448
  69. package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +0 -1959
  70. package/dist/WidgetContainer-CmGNZW0M.mjs +0 -548
  71. package/dist/accounts/index.es.js +0 -752
  72. package/dist/analytics/index.es.js +0 -171
  73. package/dist/budgets/index.es.js +0 -1070
  74. package/dist/cashflow/index.es.js +0 -1098
  75. package/dist/categories/index.es.js +0 -9
  76. package/dist/common/index.es.js +0 -1451
  77. package/dist/dashboard/index.es.js +0 -181
  78. package/dist/debts/index.es.js +0 -1460
  79. package/dist/exportTransactionsToCSV-j4g8bdVZ.mjs +0 -47
  80. package/dist/finstrong/index.es.js +0 -1455
  81. package/dist/goals/index.es.js +0 -1209
  82. package/dist/help/index.es.js +0 -14
  83. package/dist/hooks-ClhFlg78.mjs +0 -71
  84. package/dist/insights/index.d.ts +0 -1
  85. package/dist/insights/index.es.js +0 -4
  86. package/dist/investments/index.es.js +0 -1638
  87. package/dist/merchants/index.es.js +0 -79
  88. package/dist/microinsights/index.es.js +0 -16
  89. package/dist/networth/index.es.js +0 -542
  90. package/dist/notifications/index.es.js +0 -192
  91. package/dist/recurringtransactions/index.es.js +0 -879
  92. package/dist/settings/index.es.js +0 -879
  93. package/dist/spending/index.es.js +0 -570
  94. package/dist/transactions/index.es.js +0 -587
  95. package/dist/trends/index.es.js +0 -1103
  96. package/dist/useCombineEvents-DaDBSR_1.mjs +0 -92
  97. package/dist/useDimensions-27p2evRx.mjs +0 -36
  98. package/dist/useScreenSize-B6JyS_Lj.mjs +0 -36
@@ -1,150 +0,0 @@
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-BfAQRG8R.mjs";
7
- import { e as N, a as M, f as v } from "./ConnectDrawer-DPnfeIfn.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
- };
@@ -1,78 +0,0 @@
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
- };