@mx-cartographer/experiences 9.0.2 → 9.1.0-alpha.bb1
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/Analytics-BKzTPees.mjs +61 -0
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
- package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
- package/dist/Loader-BlVzRtUd.mjs +73 -0
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
- package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
- package/dist/accounts/index.es.js +12 -1598
- package/dist/accounts-DkyAiLpg.mjs +15632 -0
- package/dist/analytics/index.es.js +155 -139
- package/dist/budgets/index.es.js +1317 -1266
- package/dist/cashflow/index.es.js +1047 -942
- package/dist/categories/index.es.js +4 -4
- package/dist/common/index.es.js +101 -310
- package/dist/core/index.es.js +80 -104
- package/dist/core-BexP5oiV.mjs +4047 -0
- package/dist/dashboard/index.es.js +185 -141
- package/dist/debts/index.es.js +1384 -1272
- package/dist/finstrong/index.es.js +3366 -3471
- package/dist/goals/index.es.js +1103 -984
- package/dist/help/index.es.js +3 -25
- package/dist/help-CctDYrAH.mjs +2308 -0
- package/dist/insights/index.es.js +93 -4843
- package/dist/investments/index.es.js +1533 -1522
- package/dist/merchants/index.es.js +75 -64
- package/dist/microinsights/index.es.js +15 -824
- package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
- package/dist/networth/index.es.js +550 -503
- package/dist/notifications/index.es.js +169 -161
- package/dist/recurringtransactions/index.es.js +10 -962
- package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
- package/dist/settings/index.es.js +13 -880
- package/dist/settings-ZMHe439l.mjs +1526 -0
- package/dist/spending/index.es.js +400 -456
- package/dist/transactions/index.es.js +10 -603
- package/dist/trends/index.es.js +1268 -1407
- package/package.json +28 -28
- package/dist/Account-BaJmiJAG.mjs +0 -118
- package/dist/Account-BxHMlV9R.mjs +0 -30
- package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
- package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
- package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
- package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
- package/dist/AccountUtils-T5_Odvos.mjs +0 -27
- package/dist/Accounts-CseLC3lL.mjs +0 -5
- package/dist/Analytics-CkYXKvco.mjs +0 -53
- package/dist/Analytics-CzGzz_sE.mjs +0 -136
- package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
- package/dist/Category-DEKZGLYe.mjs +0 -301
- package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
- package/dist/Connect-Dk6GZEsA.mjs +0 -39
- package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
- package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
- package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
- package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
- package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
- package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
- package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
- package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
- package/dist/DebtUtils-DD3186U-.mjs +0 -153
- package/dist/Dialog-Bvd2n8hz.mjs +0 -66
- package/dist/Donut-SzzfZDHF.mjs +0 -88
- package/dist/Drawer-BXqqBMxg.mjs +0 -174
- package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
- package/dist/EmptyState-CJUDc3kD.mjs +0 -84
- package/dist/Error-Dogaw2jO.mjs +0 -84
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
- package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
- package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
- package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Help-CkQTjORd.mjs +0 -299
- package/dist/Help-DJ8PrVHX.mjs +0 -3209
- package/dist/IconBacking-DgT8DCeh.mjs +0 -39
- package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
- package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
- package/dist/LineChart-CejWS_rh.mjs +0 -612
- package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
- package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
- package/dist/Loader-CxeBwuPG.mjs +0 -21
- package/dist/Localization-DnoVyBNK.mjs +0 -38
- package/dist/ManageIncome-D1yBODQi.mjs +0 -595
- package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
- package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
- package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
- package/dist/Notification-DTNYSd8P.mjs +0 -7
- package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
- package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
- package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
- package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
- package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
- package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
- package/dist/Select-BFt-HD-L.mjs +0 -55
- package/dist/SelectionBox-B4xELRgp.mjs +0 -48
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
- package/dist/Sizes-DISGrlUg.mjs +0 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-PKlh8caU.mjs +0 -53
- package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
- package/dist/StatusBar-CPfSXe80.mjs +0 -30
- package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
- package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
- package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
- package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
- package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
- package/dist/UserStore-CRpKQjpP.mjs +0 -3002
- package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
- package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
- package/dist/hooks-BaO_gOI6.mjs +0 -77
- package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
- package/dist/useAriaLive-MkYebyUR.mjs +0 -35
- package/dist/useDimensions-CeDR9V8N.mjs +0 -36
- package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
- package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
- package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import o from "numeral";
|
|
2
|
-
import { g as a } from "./Localization-DnoVyBNK.mjs";
|
|
3
|
-
const D = 9999999999e-2;
|
|
4
|
-
var c = /* @__PURE__ */ ((t) => (t.CAD = "CAD", t.USD = "USD", t))(c || {});
|
|
5
|
-
const h = (t, r, e) => {
|
|
6
|
-
const s = [], l = (r - t) / (e - 1);
|
|
7
|
-
for (let n = 0; n < e; n++) {
|
|
8
|
-
const i = t + n * l;
|
|
9
|
-
s.push(i);
|
|
10
|
-
}
|
|
11
|
-
return s[e - 1] = r, s.map(Math.round);
|
|
12
|
-
}, w = (t, r, e) => {
|
|
13
|
-
switch (a()) {
|
|
14
|
-
case "fr-ca":
|
|
15
|
-
return o(t).format(`${r} $`, e);
|
|
16
|
-
default:
|
|
17
|
-
return o(t).format(`$${r}`, e);
|
|
18
|
-
}
|
|
19
|
-
}, $ = () => {
|
|
20
|
-
switch (a()) {
|
|
21
|
-
case "fr-ca":
|
|
22
|
-
return c.CAD;
|
|
23
|
-
default:
|
|
24
|
-
return c.USD;
|
|
25
|
-
}
|
|
26
|
-
}, f = (t) => t != null && t !== "" && isFinite(t), m = {
|
|
27
|
-
style: "percent",
|
|
28
|
-
minimumFractionDigits: 2,
|
|
29
|
-
maximumFractionDigits: 2
|
|
30
|
-
}, N = (t, r = m) => f(t) ? new Intl.NumberFormat(a(), r).format(Number(t)) : t, u = (t) => new Intl.PluralRules(a(), t), P = (t, r = { type: "ordinal" }, e = {
|
|
31
|
-
one: "st",
|
|
32
|
-
two: "nd",
|
|
33
|
-
few: "rd",
|
|
34
|
-
other: "th"
|
|
35
|
-
}) => {
|
|
36
|
-
const s = u(r).select(t);
|
|
37
|
-
return `${t}${e[s]}`;
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
c as C,
|
|
41
|
-
D as M,
|
|
42
|
-
N as a,
|
|
43
|
-
P as b,
|
|
44
|
-
h as c,
|
|
45
|
-
u as d,
|
|
46
|
-
w as f,
|
|
47
|
-
$ as g,
|
|
48
|
-
f as i
|
|
49
|
-
};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import _ from "react";
|
|
3
|
-
import { observer as p } from "mobx-react-lite";
|
|
4
|
-
import v from "@mui/material/TextField";
|
|
5
|
-
import { a as T, f as S } from "./NumberFormatting--XMeeBfr.mjs";
|
|
6
|
-
import { u as y, k as h } from "./hooks-BaO_gOI6.mjs";
|
|
7
|
-
import { L as b } from "./ListItemAction-CzZ8s39Z.mjs";
|
|
8
|
-
import { C as f } from "./CurrencyInput-adTIRtL3.mjs";
|
|
9
|
-
const F = p(({ goal: e }) => {
|
|
10
|
-
const { goals: n } = y(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = h(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
|
|
11
|
-
const a = { ...e, interest_rate: t };
|
|
12
|
-
e.interest_rate = t, c ? l(a) : (await m(a), r(n.alert_goal_updated_interest_rate));
|
|
13
|
-
}, u = () => {
|
|
14
|
-
setTimeout(() => {
|
|
15
|
-
s(e.interest_rate ?? 0);
|
|
16
|
-
}, 250);
|
|
17
|
-
};
|
|
18
|
-
return /* @__PURE__ */ o(
|
|
19
|
-
b,
|
|
20
|
-
{
|
|
21
|
-
isDisabled: e.is_complete,
|
|
22
|
-
isSaveDisabled: i,
|
|
23
|
-
label: `${n.details_interest_rate} (%)`,
|
|
24
|
-
onCancel: u,
|
|
25
|
-
onSave: d,
|
|
26
|
-
primaryText: n.details_interest_rate,
|
|
27
|
-
secondaryText: T(Number(e.interest_rate) / 100),
|
|
28
|
-
zeroStateText: e.interest_rate ? void 0 : n.add_interest_rate,
|
|
29
|
-
children: /* @__PURE__ */ o(
|
|
30
|
-
v,
|
|
31
|
-
{
|
|
32
|
-
error: i,
|
|
33
|
-
fullWidth: !0,
|
|
34
|
-
onChange: (a) => s(isNaN(parseFloat(a.target.value)) ? 0 : parseFloat(a.target.value)),
|
|
35
|
-
type: "number",
|
|
36
|
-
value: t
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}), M = p(({ goal: e }) => {
|
|
42
|
-
const { goals: n } = y(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = h(), [t, s] = _.useState(e.monthly_payment ?? 0), c = !e.guid, i = t < 0 || t > 9999999999e-2, d = async () => {
|
|
43
|
-
const a = { ...e, monthly_payment: t };
|
|
44
|
-
e.monthly_payment = t, c ? l(a) : (await m({ ...e, monthly_payment: t }), r(n.alert_goal_updated_payment));
|
|
45
|
-
}, u = () => {
|
|
46
|
-
setTimeout(() => {
|
|
47
|
-
s(e.monthly_payment || 0);
|
|
48
|
-
}, 250);
|
|
49
|
-
};
|
|
50
|
-
return /* @__PURE__ */ o(
|
|
51
|
-
b,
|
|
52
|
-
{
|
|
53
|
-
isDisabled: e.is_complete,
|
|
54
|
-
isSaveDisabled: i,
|
|
55
|
-
label: n.details_monthly_payment,
|
|
56
|
-
onCancel: u,
|
|
57
|
-
onSave: d,
|
|
58
|
-
primaryText: n.details_monthly_payment,
|
|
59
|
-
secondaryText: S(e.monthly_payment, "0,0"),
|
|
60
|
-
zeroStateText: e.monthly_payment ? void 0 : n.add_monthly_payment,
|
|
61
|
-
children: /* @__PURE__ */ o(
|
|
62
|
-
f,
|
|
63
|
-
{
|
|
64
|
-
amount: t,
|
|
65
|
-
autoFocus: !0,
|
|
66
|
-
error: i,
|
|
67
|
-
fullWidth: !0,
|
|
68
|
-
minAmount: 0,
|
|
69
|
-
setAmount: (a) => s(isNaN(Number(a)) ? t : Number(a)),
|
|
70
|
-
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
}), z = p(({ goal: e }) => {
|
|
76
|
-
const { goals: n } = y(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = h(), [t, s] = _.useState(e.initial_amount), c = !e.guid, i = t < 0 || t > 9999999999e-2, d = async () => {
|
|
77
|
-
const a = { ...e, initial_amount: t };
|
|
78
|
-
e.initial_amount = t, c ? l(a) : (await m({ ...e, initial_amount: t }), r(n.alert_goal_updated_balance));
|
|
79
|
-
}, u = () => {
|
|
80
|
-
setTimeout(() => {
|
|
81
|
-
s(e.initial_amount);
|
|
82
|
-
}, 250);
|
|
83
|
-
};
|
|
84
|
-
return /* @__PURE__ */ o(
|
|
85
|
-
b,
|
|
86
|
-
{
|
|
87
|
-
isDisabled: e.is_complete,
|
|
88
|
-
isSaveDisabled: i,
|
|
89
|
-
label: n.details_original_balance,
|
|
90
|
-
onCancel: u,
|
|
91
|
-
onSave: d,
|
|
92
|
-
primaryText: n.details_original_balance,
|
|
93
|
-
secondaryText: S(e.initial_amount, "0,0"),
|
|
94
|
-
zeroStateText: !e.initial_amount && !e.is_complete ? n.add_original_balance : void 0,
|
|
95
|
-
children: /* @__PURE__ */ o(
|
|
96
|
-
f,
|
|
97
|
-
{
|
|
98
|
-
amount: t,
|
|
99
|
-
autoFocus: !0,
|
|
100
|
-
error: i,
|
|
101
|
-
fullWidth: !0,
|
|
102
|
-
minAmount: 0,
|
|
103
|
-
setAmount: (a) => s(isNaN(Number(a)) ? t : Number(a)),
|
|
104
|
-
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
});
|
|
110
|
-
export {
|
|
111
|
-
F as I,
|
|
112
|
-
M,
|
|
113
|
-
z as O
|
|
114
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { jsx as e, Fragment as x, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import u from "react";
|
|
3
|
-
import { observer as h } from "mobx-react-lite";
|
|
4
|
-
import c from "@mui/material/Box";
|
|
5
|
-
import p from "@mui/material/Tab";
|
|
6
|
-
import R from "@mui/material/Tabs";
|
|
7
|
-
import d from "@mui/material/Divider";
|
|
8
|
-
import b from "@mui/material/List";
|
|
9
|
-
import T from "@mui/material/Stack";
|
|
10
|
-
import { R as C, A as S, a as E, M as v } from "./ManageIncome-D1yBODQi.mjs";
|
|
11
|
-
import { u as _, i as A, g as f } from "./hooks-BaO_gOI6.mjs";
|
|
12
|
-
import { R as y, F as N } from "./RecurringTransactionsUtil-B3rLEx_g.mjs";
|
|
13
|
-
import { A as m } from "./Analytics-CzGzz_sE.mjs";
|
|
14
|
-
const I = h(() => {
|
|
15
|
-
const { recurring: g } = _(), { detailedRepeatingTransactions: n } = A(), { onEvent: a } = f(), l = (r) => {
|
|
16
|
-
a(m.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
|
17
|
-
repeating_transaction_guid: r.guid
|
|
18
|
-
});
|
|
19
|
-
}, o = () => {
|
|
20
|
-
a(m.RECURRING_TRANSACTIONS_CLICK_ADD_EXPENSE);
|
|
21
|
-
}, i = n.filter(
|
|
22
|
-
(r) => r.repeating_transaction_type !== y.Income && (r.transactions.length > 0 || r.recurrence_type === N.EveryYear)
|
|
23
|
-
);
|
|
24
|
-
return /* @__PURE__ */ e(x, { children: i.length !== 0 ? /* @__PURE__ */ t(
|
|
25
|
-
T,
|
|
26
|
-
{
|
|
27
|
-
sx: {
|
|
28
|
-
height: "calc(100vh - 109px)",
|
|
29
|
-
maxHeight: "calc(100vh - 109px)"
|
|
30
|
-
},
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ e(c, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(b, { sx: { bgcolor: "background.paper" }, children: i.map((r, s) => /* @__PURE__ */ t(u.Fragment, { children: [
|
|
33
|
-
/* @__PURE__ */ e(C, { onClick: l, repeatingTransaction: r }),
|
|
34
|
-
/* @__PURE__ */ e(
|
|
35
|
-
d,
|
|
36
|
-
{
|
|
37
|
-
variant: s < i.length - 1 ? "inset" : "fullWidth"
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
] }, r.guid)) }) }),
|
|
41
|
-
/* @__PURE__ */ t(c, { children: [
|
|
42
|
-
/* @__PURE__ */ e(d, {}),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
44
|
-
c,
|
|
45
|
-
{
|
|
46
|
-
sx: {
|
|
47
|
-
alignContent: "center",
|
|
48
|
-
bgcolor: "background.paper",
|
|
49
|
-
justifyContent: "flex-end",
|
|
50
|
-
px: 24,
|
|
51
|
-
py: 12,
|
|
52
|
-
textAlign: "right"
|
|
53
|
-
},
|
|
54
|
-
children: /* @__PURE__ */ e(S, { label: g.add_expense, onAddRecurringTransaction: o })
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
] })
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
) : /* @__PURE__ */ e(E, { zeroStateFor: "expenses" }) });
|
|
61
|
-
}), X = h(({ defaultSelectedTab: g = 0 }) => {
|
|
62
|
-
const [n, a] = u.useState(g), { onEvent: l } = f(), { recurring: o } = _();
|
|
63
|
-
return /* @__PURE__ */ t(c, { bgcolor: "background.default", height: "100%", children: [
|
|
64
|
-
/* @__PURE__ */ t(
|
|
65
|
-
R,
|
|
66
|
-
{
|
|
67
|
-
onChange: (r, s) => {
|
|
68
|
-
a(s), l(
|
|
69
|
-
s === 0 ? "recurring_transactions_widget_manage_expenses" : "recurring_transactions_widget_edit_income"
|
|
70
|
-
);
|
|
71
|
-
},
|
|
72
|
-
sx: { bgcolor: "background.paper", mb: 0 },
|
|
73
|
-
value: n,
|
|
74
|
-
variant: "fullWidth",
|
|
75
|
-
children: [
|
|
76
|
-
/* @__PURE__ */ e(p, { label: o.expenses }),
|
|
77
|
-
/* @__PURE__ */ e(p, { label: o.income })
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
n === 0 && /* @__PURE__ */ e(I, {}),
|
|
82
|
-
n === 1 && /* @__PURE__ */ e(v, {})
|
|
83
|
-
] });
|
|
84
|
-
});
|
|
85
|
-
export {
|
|
86
|
-
I as M,
|
|
87
|
-
X as R
|
|
88
|
-
};
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import { addDays as W } from "date-fns/addDays";
|
|
2
|
-
import { addMonths as l } from "date-fns/addMonths";
|
|
3
|
-
import { addQuarters as Q } from "date-fns/addQuarters";
|
|
4
|
-
import { addWeeks as M } from "date-fns/addWeeks";
|
|
5
|
-
import { addYears as B } from "date-fns/addYears";
|
|
6
|
-
import { formatISO as I } from "date-fns/formatISO";
|
|
7
|
-
import { fromUnixTime as U } from "date-fns/fromUnixTime";
|
|
8
|
-
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
9
|
-
import { isAfter as f } from "date-fns/isAfter";
|
|
10
|
-
import { isBefore as i } from "date-fns/isBefore";
|
|
11
|
-
import { isSameDay as G } from "date-fns/isSameDay";
|
|
12
|
-
import { lastDayOfMonth as P } from "date-fns/lastDayOfMonth";
|
|
13
|
-
import { nextDay as p } from "date-fns/nextDay";
|
|
14
|
-
import { parseISO as S } from "date-fns/parseISO";
|
|
15
|
-
import { setDate as D } from "date-fns/setDate";
|
|
16
|
-
import { setDay as L } from "date-fns/setDay";
|
|
17
|
-
import { setDayOfYear as Y } from "date-fns/setDayOfYear";
|
|
18
|
-
import { startOfToday as O } from "date-fns/startOfToday";
|
|
19
|
-
import { subDays as g } from "date-fns/subDays";
|
|
20
|
-
import { subMonths as $ } from "date-fns/subMonths";
|
|
21
|
-
import { subQuarters as A } from "date-fns/subQuarters";
|
|
22
|
-
import { subWeeks as K } from "date-fns/subWeeks";
|
|
23
|
-
import { subYears as C } from "date-fns/subYears";
|
|
24
|
-
import { g as H, a as j, b as z, c as J, d as V, e as X, h as Z } from "./DateUtil-Bhq59ZVg.mjs";
|
|
25
|
-
import { b as w } from "./NumberFormatting--XMeeBfr.mjs";
|
|
26
|
-
import { b as h } from "./Localization-DnoVyBNK.mjs";
|
|
27
|
-
import { f as x, D as E } from "./DateFormats-HudZ3Bjs.mjs";
|
|
28
|
-
var n = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EveryWeek = 1] = "EveryWeek", e[e.EveryOtherWeek = 2] = "EveryOtherWeek", e[e.EveryMonth = 3] = "EveryMonth", e[e.EveryOtherMonth = 4] = "EveryOtherMonth", e[e.EveryQuarter = 5] = "EveryQuarter", e[e.EveryOtherQuarter = 6] = "EveryOtherQuarter", e[e.EveryYear = 7] = "EveryYear", e[e.TwiceAMonth = 8] = "TwiceAMonth", e))(n || {}), _ = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(_ || {}), b = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(b || {}), N = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Subscription = 1] = "Subscription", e[e.Bill = 2] = "Bill", e[e.Income = 3] = "Income", e[e.Transfer = 4] = "Transfer", e))(N || {});
|
|
29
|
-
const F = (e) => {
|
|
30
|
-
if (!e) return "";
|
|
31
|
-
let o = e.user_name || e.feed_name || "";
|
|
32
|
-
return e.account_number && (o = `${o} *${e.account_number}`), o;
|
|
33
|
-
}, q = (e, o) => {
|
|
34
|
-
const r = [], s = e.recurrence_type === n.EveryYear, t = e.transactions.find(
|
|
35
|
-
(d) => d.repeating_transaction_guid === e.guid
|
|
36
|
-
);
|
|
37
|
-
if (!s && !t) return [];
|
|
38
|
-
const a = S(e.predicted_occurs_on), u = {
|
|
39
|
-
accountGuid: e.account?.guid || "",
|
|
40
|
-
amount: e.amount,
|
|
41
|
-
categoryGuid: t?.category_guid || "",
|
|
42
|
-
expectedDate: a,
|
|
43
|
-
frequency: e.recurrence_type,
|
|
44
|
-
institutionGuid: e.account?.institution_guid || "",
|
|
45
|
-
institutionName: F(e.account),
|
|
46
|
-
merchantGuid: e.merchant_guid,
|
|
47
|
-
name: e.description,
|
|
48
|
-
recurrenceDay: e.recurrence_day,
|
|
49
|
-
repeatingTransactionGuid: e.guid,
|
|
50
|
-
secondRecurrenceDay: e.second_recurrence_day,
|
|
51
|
-
status: _.Upcoming,
|
|
52
|
-
type: e.repeating_transaction_type === N.Income ? b.Income : b.Expense,
|
|
53
|
-
transaction: void 0
|
|
54
|
-
}, c = o.start, m = o.end;
|
|
55
|
-
switch (e.recurrence_type) {
|
|
56
|
-
case n.EveryWeek:
|
|
57
|
-
r.push(...R(u, c, m));
|
|
58
|
-
break;
|
|
59
|
-
case n.EveryOtherWeek:
|
|
60
|
-
r.push(...T(u, c, m));
|
|
61
|
-
break;
|
|
62
|
-
case n.TwiceAMonth:
|
|
63
|
-
r.push(...ee(u, c, m));
|
|
64
|
-
break;
|
|
65
|
-
case n.EveryMonth:
|
|
66
|
-
r.push(...te(u, c, m));
|
|
67
|
-
break;
|
|
68
|
-
case n.EveryOtherMonth:
|
|
69
|
-
r.push(...re(u, c, m));
|
|
70
|
-
break;
|
|
71
|
-
case n.EveryQuarter:
|
|
72
|
-
r.push(...se(u, c, m));
|
|
73
|
-
break;
|
|
74
|
-
case n.EveryOtherQuarter:
|
|
75
|
-
r.push(...oe(u, c, m));
|
|
76
|
-
break;
|
|
77
|
-
case n.EveryYear:
|
|
78
|
-
r.push(...ae(u, c, m));
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
for (const d of r) {
|
|
82
|
-
const v = e.transactions.find(
|
|
83
|
-
(k) => k.repeating_transaction_guid === e.guid && k.date > y(g(d.expectedDate, 5)) && k.date < y(W(d.expectedDate, 5))
|
|
84
|
-
);
|
|
85
|
-
v ? (d.transaction = v, d.status = _.Paid, d.occurredOnDate = U(v.date)) : i(d.expectedDate, g(O(), 3)) && (d.status = _.Missed);
|
|
86
|
-
}
|
|
87
|
-
return r;
|
|
88
|
-
}, R = (e, o, r) => {
|
|
89
|
-
const s = [];
|
|
90
|
-
let t = p(o, e.recurrenceDay);
|
|
91
|
-
for (; i(t, r); )
|
|
92
|
-
s.push({ ...e, expectedDate: t }), t = p(t, e.recurrenceDay);
|
|
93
|
-
return s;
|
|
94
|
-
}, T = (e, o, r) => {
|
|
95
|
-
const s = [];
|
|
96
|
-
let t = e.expectedDate;
|
|
97
|
-
if (i(t, o))
|
|
98
|
-
for (; i(t, o); )
|
|
99
|
-
t = M(t, 2);
|
|
100
|
-
else {
|
|
101
|
-
for (; f(t, o) || G(t, o); )
|
|
102
|
-
t = K(t, 2);
|
|
103
|
-
t = M(t, 2);
|
|
104
|
-
}
|
|
105
|
-
for (; i(t, r); )
|
|
106
|
-
s.push({ ...e, expectedDate: t }), t = W(t, 14);
|
|
107
|
-
return s;
|
|
108
|
-
}, ee = (e, o, r) => {
|
|
109
|
-
const s = [];
|
|
110
|
-
let t = D(o, e.recurrenceDay);
|
|
111
|
-
for (; i(t, r); )
|
|
112
|
-
s.push({ ...e, expectedDate: t }), t = l(t, 1);
|
|
113
|
-
let a = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? D(o, e.secondRecurrenceDay) : P(o);
|
|
114
|
-
for (; i(a, r); )
|
|
115
|
-
s.push({ ...e, expectedDate: a }), a = l(a, 1);
|
|
116
|
-
return s;
|
|
117
|
-
}, te = (e, o, r) => {
|
|
118
|
-
const s = [];
|
|
119
|
-
let t = D(o, e.recurrenceDay);
|
|
120
|
-
for (s.push({ ...e, expectedDate: t }), t = l(t, 1); i(t, r); )
|
|
121
|
-
s.push({ ...e, expectedDate: t }), t = l(t, 1);
|
|
122
|
-
return s;
|
|
123
|
-
}, re = (e, o, r) => {
|
|
124
|
-
const s = [], t = e.expectedDate;
|
|
125
|
-
let a = i(t, r) ? t : $(t, 2);
|
|
126
|
-
for (; i(a, r); )
|
|
127
|
-
f(a, o) && s.push({ ...e, expectedDate: a }), a = l(a, 2);
|
|
128
|
-
return s;
|
|
129
|
-
}, se = (e, o, r) => {
|
|
130
|
-
const s = [], t = e.expectedDate;
|
|
131
|
-
let a = i(t, r) ? t : A(t, 1);
|
|
132
|
-
for (; i(a, r); )
|
|
133
|
-
f(a, o) && s.push({ ...e, expectedDate: a }), a = Q(a, 1);
|
|
134
|
-
return s;
|
|
135
|
-
}, oe = (e, o, r) => {
|
|
136
|
-
const s = [], t = e.expectedDate;
|
|
137
|
-
let a = i(t, r) ? t : A(t, 2);
|
|
138
|
-
for (; i(a, r); )
|
|
139
|
-
f(a, o) && s.push({ ...e, expectedDate: a }), a = Q(a, 2);
|
|
140
|
-
return s;
|
|
141
|
-
}, ae = (e, o, r) => {
|
|
142
|
-
const s = [], t = e.expectedDate;
|
|
143
|
-
let a = i(t, r) ? t : C(t, 1);
|
|
144
|
-
for (; i(a, r); )
|
|
145
|
-
f(a, o) && s.push({ ...e, expectedDate: a }), a = B(a, 1);
|
|
146
|
-
return s;
|
|
147
|
-
}, Be = (e, o) => {
|
|
148
|
-
const r = [];
|
|
149
|
-
for (const s of e) {
|
|
150
|
-
const t = q(s, o);
|
|
151
|
-
r.push(...t);
|
|
152
|
-
}
|
|
153
|
-
return r.sort(
|
|
154
|
-
(s, t) => y(s.occurredOnDate || s.expectedDate) - y(t.occurredOnDate || t.expectedDate)
|
|
155
|
-
);
|
|
156
|
-
}, Ie = (e, o, r) => {
|
|
157
|
-
const s = [];
|
|
158
|
-
for (const t of o) {
|
|
159
|
-
const a = r.filter(
|
|
160
|
-
(u) => u.repeating_transaction_guid === t.guid
|
|
161
|
-
);
|
|
162
|
-
r.length > 0 && s.push({
|
|
163
|
-
...t,
|
|
164
|
-
account: e.find((u) => u.guid === t.account_guid),
|
|
165
|
-
transactions: a
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
return s;
|
|
169
|
-
}, Ue = (e) => e.reduce((o, r) => {
|
|
170
|
-
const s = I(r.expectedDate, { representation: "date" }), t = o.find(
|
|
171
|
-
(a) => a.date.toString() === r.expectedDate.toString()
|
|
172
|
-
);
|
|
173
|
-
return t ? t.recurrences.push(r) : o.push({
|
|
174
|
-
date: r.expectedDate,
|
|
175
|
-
id: `date-${s}`,
|
|
176
|
-
recurrences: [r]
|
|
177
|
-
}), o;
|
|
178
|
-
}, []), Ge = (e, o, r) => {
|
|
179
|
-
const s = p(O(), o.recurrence_day), t = Y(O(), o.recurrence_day), a = w(o.recurrence_day), u = o.second_recurrence_day ? w(o.second_recurrence_day) : "";
|
|
180
|
-
let c = r ? h(e.monthly_ordinal, a) : e.monthly;
|
|
181
|
-
switch (o.recurrence_type) {
|
|
182
|
-
case n.EveryQuarter:
|
|
183
|
-
c = r ? h(e.quarterly_ordinal, a) : e.quarterly;
|
|
184
|
-
break;
|
|
185
|
-
case n.EveryWeek:
|
|
186
|
-
c = r ? h(
|
|
187
|
-
e.weekly_ordinal,
|
|
188
|
-
x(s, E.DAY_OF_WEEK)
|
|
189
|
-
) : e.weekly;
|
|
190
|
-
break;
|
|
191
|
-
case n.EveryYear:
|
|
192
|
-
c = r ? h(
|
|
193
|
-
e.anually_ordinal,
|
|
194
|
-
x(t, E.MONTH_DAY)
|
|
195
|
-
) : e.anually;
|
|
196
|
-
break;
|
|
197
|
-
case n.EveryOtherWeek:
|
|
198
|
-
c = r ? h(
|
|
199
|
-
e.every_other_week_ordinal,
|
|
200
|
-
x(s, E.DAY_OF_WEEK)
|
|
201
|
-
) : e.every_other_week;
|
|
202
|
-
break;
|
|
203
|
-
case n.EveryOtherMonth:
|
|
204
|
-
c = r ? h(e.every_other_month_ordinal, a) : e.every_other_month;
|
|
205
|
-
break;
|
|
206
|
-
case n.EveryOtherQuarter:
|
|
207
|
-
c = r ? h(e.every_other_quarter_ordinal, a) : e.every_other_quarter;
|
|
208
|
-
break;
|
|
209
|
-
case n.TwiceAMonth:
|
|
210
|
-
c = r ? h(e.twice_a_month_ordinal, a, u) : e.twice_a_month;
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
return c;
|
|
214
|
-
}, Pe = (e, o, r) => {
|
|
215
|
-
let s = o;
|
|
216
|
-
r !== void 0 && (e === n.EveryWeek || e === n.EveryOtherWeek ? s = L(o, r) : e === n.EveryYear ? s = Y(o, r) : s = D(o, r));
|
|
217
|
-
let t = s;
|
|
218
|
-
switch (e) {
|
|
219
|
-
case n.EveryWeek:
|
|
220
|
-
t = Z(s);
|
|
221
|
-
break;
|
|
222
|
-
case n.EveryOtherWeek:
|
|
223
|
-
t = X(s);
|
|
224
|
-
break;
|
|
225
|
-
case n.EveryMonth:
|
|
226
|
-
t = V(s);
|
|
227
|
-
break;
|
|
228
|
-
case n.EveryOtherMonth:
|
|
229
|
-
t = J(s);
|
|
230
|
-
break;
|
|
231
|
-
case n.EveryQuarter:
|
|
232
|
-
t = z(s);
|
|
233
|
-
break;
|
|
234
|
-
case n.EveryOtherQuarter:
|
|
235
|
-
t = j(s);
|
|
236
|
-
break;
|
|
237
|
-
case n.EveryYear:
|
|
238
|
-
t = H(s);
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
return t;
|
|
242
|
-
};
|
|
243
|
-
export {
|
|
244
|
-
n as F,
|
|
245
|
-
N as R,
|
|
246
|
-
_ as a,
|
|
247
|
-
b,
|
|
248
|
-
Pe as c,
|
|
249
|
-
Ue as d,
|
|
250
|
-
Ie as e,
|
|
251
|
-
Be as f,
|
|
252
|
-
Ge as g
|
|
253
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import p from "react";
|
|
3
|
-
import d from "@mui/material/Button";
|
|
4
|
-
import a from "@mui/material/IconButton";
|
|
5
|
-
import f from "@mui/material/Tooltip";
|
|
6
|
-
import { useTheme as c } from "@mui/material/styles";
|
|
7
|
-
const B = ({
|
|
8
|
-
icon: e,
|
|
9
|
-
label: i,
|
|
10
|
-
onClick: o,
|
|
11
|
-
placement: s = "bottom",
|
|
12
|
-
tooltipText: r,
|
|
13
|
-
variant: l = "text"
|
|
14
|
-
}) => {
|
|
15
|
-
const n = c();
|
|
16
|
-
return /* @__PURE__ */ m(p.Fragment, { children: [
|
|
17
|
-
/* @__PURE__ */ t(
|
|
18
|
-
d,
|
|
19
|
-
{
|
|
20
|
-
onClick: o,
|
|
21
|
-
startIcon: e,
|
|
22
|
-
sx: {
|
|
23
|
-
[n.breakpoints.down("lg")]: { display: "none" },
|
|
24
|
-
[n.breakpoints.up("lg")]: { display: "inline-flex" }
|
|
25
|
-
},
|
|
26
|
-
title: r,
|
|
27
|
-
variant: l,
|
|
28
|
-
children: i
|
|
29
|
-
}
|
|
30
|
-
),
|
|
31
|
-
/* @__PURE__ */ t(
|
|
32
|
-
f,
|
|
33
|
-
{
|
|
34
|
-
describeChild: !0,
|
|
35
|
-
placement: s,
|
|
36
|
-
sx: { display: { xs: "inline-flex", lg: "none" } },
|
|
37
|
-
title: r,
|
|
38
|
-
children: /* @__PURE__ */ t(a, { onClick: o, children: e })
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
] });
|
|
42
|
-
};
|
|
43
|
-
export {
|
|
44
|
-
B as R
|
|
45
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { observer as s } from "mobx-react-lite";
|
|
3
|
-
import m from "@mui/material/Box";
|
|
4
|
-
import p from "@mui/material/IconButton";
|
|
5
|
-
import t from "@mui/material/InputAdornment";
|
|
6
|
-
import { TextField as d, Icon as n } from "@mxenabled/mxui";
|
|
7
|
-
const x = ({
|
|
8
|
-
ariaLabel: c = "Search",
|
|
9
|
-
cancelAriaLabel: a = "Cancel Search",
|
|
10
|
-
onChange: e,
|
|
11
|
-
placeholder: i = "Search",
|
|
12
|
-
searchValue: r
|
|
13
|
-
}) => /* @__PURE__ */ o(m, { className: "mx-cmn-search-box", px: 24, py: 16, children: /* @__PURE__ */ o(
|
|
14
|
-
d,
|
|
15
|
-
{
|
|
16
|
-
"aria-label": c,
|
|
17
|
-
name: "search",
|
|
18
|
-
onChange: (l) => e(l.target.value),
|
|
19
|
-
placeholder: i,
|
|
20
|
-
slotProps: {
|
|
21
|
-
input: {
|
|
22
|
-
startAdornment: /* @__PURE__ */ o(t, { position: "start", children: /* @__PURE__ */ o(n, { name: "search", size: 26, sx: { color: "action.active" } }) }),
|
|
23
|
-
endAdornment: /* @__PURE__ */ o(t, { position: "end", sx: { p: 0 }, children: r ? /* @__PURE__ */ o(
|
|
24
|
-
p,
|
|
25
|
-
{
|
|
26
|
-
"aria-label": a,
|
|
27
|
-
className: "mx-cat-cancel-search-button",
|
|
28
|
-
color: "primary",
|
|
29
|
-
onClick: () => e(""),
|
|
30
|
-
children: /* @__PURE__ */ o(n, { name: "cancel", size: 24 })
|
|
31
|
-
}
|
|
32
|
-
) : null }),
|
|
33
|
-
sx: {
|
|
34
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
35
|
-
borderColor: "text.secondary",
|
|
36
|
-
opacity: 0.5
|
|
37
|
-
},
|
|
38
|
-
"& input::placeholder": { color: "text.secondary", opacity: 1 }
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
sx: {
|
|
43
|
-
width: "100%"
|
|
44
|
-
},
|
|
45
|
-
value: r
|
|
46
|
-
}
|
|
47
|
-
) }), v = s(x);
|
|
48
|
-
export {
|
|
49
|
-
v as S
|
|
50
|
-
};
|
package/dist/Select-BFt-HD-L.mjs
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsx as r, jsxs as m, Fragment as d } from "react/jsx-runtime";
|
|
2
|
-
import c from "@mui/material/Avatar";
|
|
3
|
-
import l from "@mui/material/ListItem";
|
|
4
|
-
import h from "@mui/material/ListItemAvatar";
|
|
5
|
-
import p from "@mui/material/ListItemButton";
|
|
6
|
-
import u from "@mui/material/ListItemIcon";
|
|
7
|
-
import f from "@mui/material/ListItemText";
|
|
8
|
-
import { Icon as s } from "@mxenabled/mxui";
|
|
9
|
-
import g from "@mui/material/MenuItem";
|
|
10
|
-
import x from "@mui/material/TextField";
|
|
11
|
-
import { ExpandMore as b } from "@mxenabled/mx-icons";
|
|
12
|
-
const G = ({ iconName: a, label: n, onClick: e, value: i }) => {
|
|
13
|
-
const o = /* @__PURE__ */ m(d, { children: [
|
|
14
|
-
/* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(c, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ r(s, { name: a, sx: { color: "text.primary" } }) }) }),
|
|
15
|
-
/* @__PURE__ */ r(
|
|
16
|
-
f,
|
|
17
|
-
{
|
|
18
|
-
primary: n,
|
|
19
|
-
secondary: i,
|
|
20
|
-
slotProps: {
|
|
21
|
-
primary: { variant: "caption", fontWeight: "normal" },
|
|
22
|
-
secondary: { color: "text.default", variant: "body1", fontWeight: 600 }
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
)
|
|
26
|
-
] });
|
|
27
|
-
return e ? /* @__PURE__ */ r(l, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ m(p, { onClick: e, children: [
|
|
28
|
-
o,
|
|
29
|
-
/* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(s, { name: "chevron_right", size: 24 }) })
|
|
30
|
-
] }) }) : /* @__PURE__ */ r(l, { disableGutters: !1, disablePadding: !1, children: o });
|
|
31
|
-
}, M = ({ label: a, onChange: n, options: e, value: i, ...o }) => /* @__PURE__ */ r(
|
|
32
|
-
x,
|
|
33
|
-
{
|
|
34
|
-
defaultValue: 0,
|
|
35
|
-
label: a,
|
|
36
|
-
onChange: (t) => {
|
|
37
|
-
n(Number(t.target.value));
|
|
38
|
-
},
|
|
39
|
-
select: !0,
|
|
40
|
-
slotProps: {
|
|
41
|
-
inputLabel: { shrink: !0 },
|
|
42
|
-
select: {
|
|
43
|
-
IconComponent: (t) => /* @__PURE__ */ r(b, { size: 20, sx: { mr: 4 }, ...t })
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
value: i,
|
|
47
|
-
variant: "outlined",
|
|
48
|
-
...o,
|
|
49
|
-
children: e.map((t) => /* @__PURE__ */ r(g, { value: t.id, children: t.label }, t.id))
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
export {
|
|
53
|
-
G as D,
|
|
54
|
-
M as S
|
|
55
|
-
};
|