@mx-cartographer/experiences 3.10.1-alpha.mm12 → 3.10.1-alpha.mm14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +206 -200
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -11,7 +11,7 @@ import qi from "bowser";
|
|
11
11
|
import { getUnixTime as fA } from "date-fns/getUnixTime";
|
12
12
|
import { Honeybadger as yt } from "@honeybadger-io/react";
|
13
13
|
import or from "numeral";
|
14
|
-
import { intlFormat as
|
14
|
+
import { intlFormat as Ki } from "date-fns/intlFormat";
|
15
15
|
import oA from "@mui/material/Button";
|
16
16
|
import gt from "@mui/material/Tooltip";
|
17
17
|
import RA from "@mui/material/IconButton";
|
@@ -19,7 +19,7 @@ import dn from "@mui/material/FormControlLabel";
|
|
19
19
|
import Z from "@mui/material/ListItem";
|
20
20
|
import hA from "@mui/material/ListItemButton";
|
21
21
|
import uA from "@mui/material/ListItemText";
|
22
|
-
import
|
22
|
+
import Bi from "@mui/material/Popover";
|
23
23
|
import w from "@mui/material/Stack";
|
24
24
|
import Dt from "@mui/material/Checkbox";
|
25
25
|
import pA from "@mui/material/styles/useTheme";
|
@@ -123,8 +123,8 @@ import Pn from "@mui/icons-material/Error";
|
|
123
123
|
import { isToday as Nn } from "date-fns/isToday";
|
124
124
|
import zo from "@mui/icons-material/CheckCircleRounded";
|
125
125
|
import qo from "@mui/icons-material/LanguageRounded";
|
126
|
-
import { isYesterday as
|
127
|
-
import
|
126
|
+
import { isYesterday as Ko } from "date-fns/isYesterday";
|
127
|
+
import Bo from "@mui/material/FormControl";
|
128
128
|
import _o from "@mui/material/InputLabel";
|
129
129
|
import { LocalizationProvider as ko } from "@mui/x-date-pickers-pro";
|
130
130
|
import Go from "@mui/material/Select";
|
@@ -398,7 +398,7 @@ const R = {
|
|
398
398
|
day: "numeric",
|
399
399
|
year: "numeric"
|
400
400
|
}
|
401
|
-
}, J = (A, e) =>
|
401
|
+
}, J = (A, e) => Ki(new Date(A), Object.assign(e), { locale: Se() });
|
402
402
|
var W = /* @__PURE__ */ ((A) => (A[A.ANY = 0] = "ANY", A[A.CHECKING = 1] = "CHECKING", A[A.SAVINGS = 2] = "SAVINGS", A[A.LOAN = 3] = "LOAN", A[A.CREDIT_CARD = 4] = "CREDIT_CARD", A[A.INVESTMENT = 5] = "INVESTMENT", A[A.LINE_OF_CREDIT = 6] = "LINE_OF_CREDIT", A[A.MORTGAGE = 7] = "MORTGAGE", A[A.PROPERTY = 8] = "PROPERTY", A[A.CASH = 9] = "CASH", A[A.INSURANCE = 10] = "INSURANCE", A[A.PREPAID = 11] = "PREPAID", A[A.CHECKING_LINE_OF_CREDIT = 12] = "CHECKING_LINE_OF_CREDIT", A[A.DIGITAL_WALLET = 13] = "DIGITAL_WALLET", A))(W || {}), ts = /* @__PURE__ */ ((A) => (A[A.NONE = 0] = "NONE", A[A.MONEY_MARKET = 1] = "MONEY_MARKET", A[A.CERTIFICATE_OF_DEPOSIT = 2] = "CERTIFICATE_OF_DEPOSIT", A[A.AUTO = 3] = "AUTO", A[A.STUDENT = 4] = "STUDENT", A[A.SMALL_BUSINESS = 5] = "SMALL_BUSINESS", A[A.PERSONAL = 6] = "PERSONAL", A[A.PERSONAL_WITH_COLLATERAL = 7] = "PERSONAL_WITH_COLLATERAL", A[A.HOME_EQUITY = 8] = "HOME_EQUITY", A[A.PLAN_401_K = 9] = "PLAN_401_K", A[A.PLAN_403_B = 10] = "PLAN_403_B", A[A.PLAN_529 = 11] = "PLAN_529", A[A.IRA = 12] = "IRA", A[A.ROLLOVER_IRA = 13] = "ROLLOVER_IRA", A[A.ROTH_IRA = 14] = "ROTH_IRA", A[A.TAXABLE = 15] = "TAXABLE", A[A.NON_TAXABLE = 16] = "NON_TAXABLE", A[A.BROKERAGE = 17] = "BROKERAGE", A[A.TRUST = 18] = "TRUST", A[A.UNIFORM_GIFTS_TO_MINORS_ACT = 19] = "UNIFORM_GIFTS_TO_MINORS_ACT", A[A.PLAN_457 = 20] = "PLAN_457", A[A.PENSION = 21] = "PENSION", A[A.EMPLOYEE_STOCK_OWNERSHIP_PLAN = 22] = "EMPLOYEE_STOCK_OWNERSHIP_PLAN", A[A.SIMPLIFIED_EMPLOYEE_PENSION = 23] = "SIMPLIFIED_EMPLOYEE_PENSION", A[A.SIMPLE_IRA = 24] = "SIMPLE_IRA", A[A.BOAT = 25] = "BOAT", A[A.POWERSPORTS = 26] = "POWERSPORTS", A[A.RV = 27] = "RV", A[A.HELOC = 28] = "HELOC", A[A.PLAN_ROTH_401_K = 29] = "PLAN_ROTH_401_K", A[A.FIXED_ANNUITY = 30] = "FIXED_ANNUITY", A[A.VARIABLE_ANNUITY = 31] = "VARIABLE_ANNUITY", A[A.VEHICLE_INSURANCE = 32] = "VEHICLE_INSURANCE", A[A.DISABILITY = 33] = "DISABILITY", A[A.HEALTH = 34] = "HEALTH", A[A.LONG_TERM_CARE = 35] = "LONG_TERM_CARE", A[A.PROPERTY_AND_CASUALTY = 36] = "PROPERTY_AND_CASUALTY", A[A.UNIVERSAL_LIFE = 37] = "UNIVERSAL_LIFE", A[A.TERM_LIFE = 38] = "TERM_LIFE", A[A.WHOLE_LIFE = 39] = "WHOLE_LIFE", A[A.ACCIDENTAL_DEATH_AND_DISMEMBERMENT = 40] = "ACCIDENTAL_DEATH_AND_DISMEMBERMENT", A[A.VARIABLE_UNIVERSAL_LIFE = 41] = "VARIABLE_UNIVERSAL_LIFE", A[A.HSA = 42] = "HSA", A[A.TAX_FREE_SAVINGS_ACCOUNT = 43] = "TAX_FREE_SAVINGS_ACCOUNT", A[A.INDIVIDUAL = 44] = "INDIVIDUAL", A[A.REGISTERED_RETIREMENT_INCOME_FUND = 45] = "REGISTERED_RETIREMENT_INCOME_FUND", A[A.CASH_MANAGEMENT_ACCOUNT = 46] = "CASH_MANAGEMENT_ACCOUNT", A[A.EMPLOYEE_STOCK_PURCHASE_PLAN = 47] = "EMPLOYEE_STOCK_PURCHASE_PLAN", A[A.REGISTERED_EDUCATION_SAVINGS_PLAN = 48] = "REGISTERED_EDUCATION_SAVINGS_PLAN", A[A.PROFIT_SHARING_PLAN = 49] = "PROFIT_SHARING_PLAN", A[A.UNIFORM_TRANSFER_TO_MINORS_ACT = 50] = "UNIFORM_TRANSFER_TO_MINORS_ACT", A[A.PLAN_401_A = 51] = "PLAN_401_A", A[A.SARSEP_IRA = 52] = "SARSEP_IRA", A[A.FIXED_ANNUITY_TRADITIONAL_IRA = 53] = "FIXED_ANNUITY_TRADITIONAL_IRA", A[A.VARIABLE_ANNUITY_TRADITIONAL_IRA = 54] = "VARIABLE_ANNUITY_TRADITIONAL_IRA", A[A.SEPP_IRA = 55] = "SEPP_IRA", A[A.INHERITED_TRADITIONAL_IRA = 56] = "INHERITED_TRADITIONAL_IRA", A[A.FIXED_ANNUITY_ROTH_IRA = 57] = "FIXED_ANNUITY_ROTH_IRA", A[A.VARIABLE_ANNUITY_ROTH_IRA = 58] = "VARIABLE_ANNUITY_ROTH_IRA", A[A.INHERITED_ROTH_IRA = 59] = "INHERITED_ROTH_IRA", A[A.COVERDELL = 60] = "COVERDELL", A[A.ADVISORY_ACCOUNT = 61] = "ADVISORY_ACCOUNT", A[A.BROKERAGE_MARGIN = 62] = "BROKERAGE_MARGIN", A[A.CHARITABLE_GIFT_ACCOUNT = 63] = "CHARITABLE_GIFT_ACCOUNT", A[A.CHURCH_ACCOUNT = 64] = "CHURCH_ACCOUNT", A[A.CONSERVATORSHIP = 65] = "CONSERVATORSHIP", A[A.CUSTODIAL = 66] = "CUSTODIAL", A[A.DEFINED_BENEFIT_PLAN = 67] = "DEFINED_BENEFIT_PLAN", A[A.DEFINED_CONTRIBUTION_PLAN = 68] = "DEFINED_CONTRIBUTION_PLAN", A[A.EDUCATIONAL = 69] = "EDUCATIONAL", A[A.ESTATE = 70] = "ESTATE", A[A.EXECUTOR = 71] = "EXECUTOR", A[A.GROUP_RETIREMENT_SAVINGS_PLAN = 72] = "GROUP_RETIREMENT_SAVINGS_PLAN", A[A.GUARANTEED_INVESTMENT_CERTIFICATE = 73] = "GUARANTEED_INVESTMENT_CERTIFICATE", A[A.HRA = 74] = "HRA", A[A.INDEXED_ANNUITY = 75] = "INDEXED_ANNUITY", A[A.INVESTMENT_CLUB = 76] = "INVESTMENT_CLUB", A[A.IRREVOCABLE_TRUST = 77] = "IRREVOCABLE_TRUST", A[A.JOINT_TENANTS_BY_ENTIRITY = 78] = "JOINT_TENANTS_BY_ENTIRITY", A[A.JOINT_TENANTS_COMMUNITY_PROPERTY = 79] = "JOINT_TENANTS_COMMUNITY_PROPERTY", A[A.JOINT_TENANTS_IN_COMMON = 80] = "JOINT_TENANTS_IN_COMMON", A[A.JOINT_TENANTS_WITH_RIGHTS_OF_SURVIVORSHIP = 81] = "JOINT_TENANTS_WITH_RIGHTS_OF_SURVIVORSHIP", A[A.KEOUGH_PLAN = 82] = "KEOUGH_PLAN", A[A.LIFE_INCOME_FUND = 83] = "LIFE_INCOME_FUND", A[A.LIVING_TRUST = 84] = "LIVING_TRUST", A[A.LOCKED_IN_RETIREMENT_ACCOUNT = 85] = "LOCKED_IN_RETIREMENT_ACCOUNT", A[A.LOCKED_IN_RETIREMENT_INVESTMENT_FUND = 86] = "LOCKED_IN_RETIREMENT_INVESTMENT_FUND", A[A.LOCKED_IN_RETIREMENT_SAVINGS_ACCOUNT = 87] = "LOCKED_IN_RETIREMENT_SAVINGS_ACCOUNT", A[A.MONEY_PURCHASE_PLAN = 88] = "MONEY_PURCHASE_PLAN", A[A.PARTNERSHIP = 89] = "PARTNERSHIP", A[A.PLAN_409_A = 90] = "PLAN_409_A", A[A.PLAN_ROTH_403_B = 91] = "PLAN_ROTH_403_B", A[A.REGISTERED_DISABILITY_SAVINGS_PLAN = 92] = "REGISTERED_DISABILITY_SAVINGS_PLAN", A[A.REGISTERED_LOCKED_IN_SAVINGS_PLAN = 93] = "REGISTERED_LOCKED_IN_SAVINGS_PLAN", A[A.REGISTERED_PENSION_PLAN = 94] = "REGISTERED_PENSION_PLAN", A[A.REGISTERED_RETIREMENT_SAVINGS_PLAN = 95] = "REGISTERED_RETIREMENT_SAVINGS_PLAN", A[A.REVOCABLE_TRUST = 96] = "REVOCABLE_TRUST", A[A.ROTH_CONVERSION = 97] = "ROTH_CONVERSION", A[A.SOLE_PROPRIETORSHIP = 98] = "SOLE_PROPRIETORSHIP", A[A.SPOUSAL_IRA = 99] = "SPOUSAL_IRA", A[A.SPOUSAL_ROTH_IRA = 100] = "SPOUSAL_ROTH_IRA", A[A.TESTAMENTARY_TRUST = 101] = "TESTAMENTARY_TRUST", A[A.THRIFT_SAVINGS_PLAN = 102] = "THRIFT_SAVINGS_PLAN", A[A.INHERITED_ANNUITY = 103] = "INHERITED_ANNUITY", A[A.CORPORATE_ACCOUNT = 104] = "CORPORATE_ACCOUNT", A[A.LIMITED_LIABILITY_ACCOUNT = 105] = "LIMITED_LIABILITY_ACCOUNT", A[A.HSA_SAVINGS = 106] = "HSA_SAVINGS", A[A.HSA_CHECKING = 107] = "HSA_CHECKING", A))(ts || {}), Ea = /* @__PURE__ */ ((A) => (A[A.REAL_ESTATE = 0] = "REAL_ESTATE", A[A.VEHICLE = 1] = "VEHICLE", A[A.ART = 2] = "ART", A[A.JEWELRY = 3] = "JEWELRY", A[A.FURNITURE = 4] = "FURNITURE", A[A.APPLIANCES = 5] = "APPLIANCES", A[A.COMPUTER = 6] = "COMPUTER", A[A.ELECTRONICS = 7] = "ELECTRONICS", A[A.SPORTS_EQUIPMENT = 8] = "SPORTS_EQUIPMENT", A[A.MISCELLANEOUS = 9] = "MISCELLANEOUS", A))(Ea || {}), MA = /* @__PURE__ */ ((A) => (A[A.CREATED = 0] = "CREATED", A[A.PREVENTED = 1] = "PREVENTED", A[A.DENIED = 2] = "DENIED", A[A.CHALLENGED = 3] = "CHALLENGED", A[A.REJECTED = 4] = "REJECTED", A[A.LOCKED = 5] = "LOCKED", A[A.CONNECTED = 6] = "CONNECTED", A[A.IMPEDED = 7] = "IMPEDED", A[A.RECONNECTED = 8] = "RECONNECTED", A[A.DEGRADED = 9] = "DEGRADED", A[A.DISCONNECTED = 10] = "DISCONNECTED", A[A.DISCONTINUED = 11] = "DISCONTINUED", A[A.CLOSED = 12] = "CLOSED", A[A.DELAYED = 13] = "DELAYED", A[A.FAILED = 14] = "FAILED", A[A.UPDATED = 15] = "UPDATED", A[A.DISABLED = 16] = "DISABLED", A[A.IMPORTED = 17] = "IMPORTED", A[A.RESUMED = 18] = "RESUMED", A[A.EXPIRED = 19] = "EXPIRED", A[A.IMPAIRED = 20] = "IMPAIRED", A[A.PENDING = 21] = "PENDING", A))(MA || {});
|
403
403
|
const ns = [
|
404
404
|
0,
|
@@ -1004,7 +1004,7 @@ const rn = (A, e) => A.reduce((n, r) => (n[r.guid] = e?.includes(r.guid), n), {}
|
|
1004
1004
|
}) => {
|
1005
1005
|
const C = Oi(() => fs(A), [A]), f = A.length < 1, v = !!e, m = Object.values(c).every((E) => !!E);
|
1006
1006
|
return /* @__PURE__ */ t(
|
1007
|
-
|
1007
|
+
Bi,
|
1008
1008
|
{
|
1009
1009
|
anchorEl: e,
|
1010
1010
|
anchorOrigin: {
|
@@ -1493,7 +1493,7 @@ const vs = (A, e) => {
|
|
1493
1493
|
selectedIndex: c,
|
1494
1494
|
valueFormatter: h = (l) => `${l}`
|
1495
1495
|
}) => {
|
1496
|
-
const l = LA(), d = bs(l), C = r.reduce(Ss, []), f = A !== void 0 ? A : C.reduce(Ls, 0) / C.length, v = Math.max(...C), m = Math.min(...C), E = C.reduce(Ts, 0), T = v >= 0, S = m < 0, L = Sr(T, S, a), D = Sr(S, T, a), N = Is(f, v, m, L || D), x = (
|
1496
|
+
const l = LA(), d = bs(l), C = r.reduce(Ss, []), f = A !== void 0 ? A : C.reduce(Ls, 0) / C.length, v = Math.max(...C), m = Math.min(...C), E = C.reduce(Ts, 0), T = v >= 0, S = m < 0, L = Sr(T, S, a), D = Sr(S, T, a), N = Is(f, v, m, L || D), x = (K) => c === void 0 || K === c ? n : `${n}80`, X = () => /* @__PURE__ */ t(
|
1497
1497
|
Tr,
|
1498
1498
|
{
|
1499
1499
|
averageLineHeight: N,
|
@@ -1508,11 +1508,11 @@ const vs = (A, e) => {
|
|
1508
1508
|
return /* @__PURE__ */ u("div", { className: `mx-cmn-bar-chart ${d}`, children: [
|
1509
1509
|
/* @__PURE__ */ u("div", { className: "mx-cmn-chart-container", children: [
|
1510
1510
|
/* @__PURE__ */ t(X, {}),
|
1511
|
-
r.map((
|
1511
|
+
r.map((K, k) => /* @__PURE__ */ u(g.Fragment, { children: [
|
1512
1512
|
/* @__PURE__ */ t(
|
1513
1513
|
Tr,
|
1514
1514
|
{
|
1515
|
-
ariaLabel:
|
1515
|
+
ariaLabel: K.ariaLabel,
|
1516
1516
|
averageLineHeight: N,
|
1517
1517
|
bottomHeight: D,
|
1518
1518
|
color: x(k),
|
@@ -1521,10 +1521,10 @@ const vs = (A, e) => {
|
|
1521
1521
|
range: E,
|
1522
1522
|
selectedIndex: c,
|
1523
1523
|
topHeight: L,
|
1524
|
-
value:
|
1525
|
-
valueLabel: h(
|
1524
|
+
value: K.value,
|
1525
|
+
valueLabel: h(K.value),
|
1526
1526
|
width: e,
|
1527
|
-
xAxisLabel:
|
1527
|
+
xAxisLabel: K.label
|
1528
1528
|
}
|
1529
1529
|
),
|
1530
1530
|
/* @__PURE__ */ t(X, {})
|
@@ -1662,10 +1662,10 @@ const Ms = ({
|
|
1662
1662
|
const v = g.useMemo(() => {
|
1663
1663
|
const L = Gi({ start: wA(c), end: DA(c) }), D = [];
|
1664
1664
|
for (let N = 0; N < L.length; N++) {
|
1665
|
-
const x = L[N], X = ki({ start: x, end: ce(x, 6) }),
|
1665
|
+
const x = L[N], X = ki({ start: x, end: ce(x, 6) }), K = [];
|
1666
1666
|
for (let k = 0; k < X.length; k++)
|
1667
|
-
|
1668
|
-
D.push(
|
1667
|
+
K.push(X[k]);
|
1668
|
+
D.push(K);
|
1669
1669
|
}
|
1670
1670
|
return D;
|
1671
1671
|
}, [c]), m = (L) => {
|
@@ -1749,7 +1749,7 @@ const Ms = ({
|
|
1749
1749
|
marginRight: "auto"
|
1750
1750
|
}
|
1751
1751
|
}
|
1752
|
-
}), Hs = 100, zs = 140, qs = 10,
|
1752
|
+
}), Hs = 100, zs = 140, qs = 10, Ks = ({
|
1753
1753
|
data: A,
|
1754
1754
|
onClick: e,
|
1755
1755
|
selectedId: n,
|
@@ -1793,7 +1793,7 @@ const Ms = ({
|
|
1793
1793
|
}
|
1794
1794
|
)
|
1795
1795
|
] });
|
1796
|
-
},
|
1796
|
+
}, Bs = (A) => {
|
1797
1797
|
const e = ze(), n = Number(A.x), r = Number(A.y);
|
1798
1798
|
return /* @__PURE__ */ u(iA, { children: [
|
1799
1799
|
/* @__PURE__ */ t(
|
@@ -1932,7 +1932,7 @@ const Ms = ({
|
|
1932
1932
|
/* @__PURE__ */ t(
|
1933
1933
|
$i,
|
1934
1934
|
{
|
1935
|
-
slots: s ? { mark: (S) => /* @__PURE__ */ t(
|
1935
|
+
slots: s ? { mark: (S) => /* @__PURE__ */ t(Bs, { ...S, yData: d }) } : void 0
|
1936
1936
|
}
|
1937
1937
|
),
|
1938
1938
|
/* @__PURE__ */ t(
|
@@ -2011,7 +2011,7 @@ const Ms = ({
|
|
2011
2011
|
if (!e)
|
2012
2012
|
throw new Error(`${A}() must be used within the GlobalDataContext`);
|
2013
2013
|
return e;
|
2014
|
-
}, OA = () => kA("useAccountStore").globalStore.accountStore, jt = () => kA("useBudgetsStore").globalStore.budgetsStore,
|
2014
|
+
}, OA = () => kA("useAccountStore").globalStore.accountStore, jt = () => kA("useBudgetsStore").globalStore.budgetsStore, Kn = () => kA("useCashflowStore").globalStore.cashflowStore, xA = () => kA("useCategoryStore").globalStore.categoryStore, Ma = () => kA("useConnectStore").globalStore.connectStore, Bn = () => kA("useGlobalStore").globalStore, mA = () => kA("useGlobalUiStore").globalStore.globalUiStore, b = () => kA("globalCopyStore").globalStore.copyStore.copy, Xs = () => kA("useMerchantStore").globalStore.merchantStore, Ra = () => kA("useNotificationStore").globalStore.notificationStore, KA = () => kA("useRecurringActivityStore").globalStore.recurringActivityStore, dA = () => kA("useTransactionStore").globalStore.transactionStore, Ut = () => kA("useUserStore").globalStore.userStore, V = () => ({ onEvent: kA().onEvent }), Z8 = () => ({ onPageView: kA().onPageView }), Qs = (A = "useWidgetContainerContext") => {
|
2015
2015
|
const e = g.useContext(Pa);
|
2016
2016
|
if (!e)
|
2017
2017
|
throw new Error(`${A}() must be used within the WidgetContainerContext`);
|
@@ -2173,11 +2173,11 @@ const Ms = ({
|
|
2173
2173
|
hoveredAreaData: null,
|
2174
2174
|
isAreaHovered: !1,
|
2175
2175
|
cursorPos: { x: 0, y: 0 }
|
2176
|
-
}), { hoveredSeriesId: v, hoveredAreaData: m, isAreaHovered: E, cursorPos: T } = C, S = E && v && m, L = !S, D = [...r, ...a], N = D[0].dataset.length, x = D.flatMap((z) => z.dataset.map((lA) => lA.x)), X = D.flatMap((z) => z.dataset.map((lA) => lA.y)),
|
2176
|
+
}), { hoveredSeriesId: v, hoveredAreaData: m, isAreaHovered: E, cursorPos: T } = C, S = E && v && m, L = !S, D = [...r, ...a], N = D[0].dataset.length, x = D.flatMap((z) => z.dataset.map((lA) => lA.x)), X = D.flatMap((z) => z.dataset.map((lA) => lA.y)), K = r[0].dataset.map(
|
2177
2177
|
(z, lA) => r.reduce((SA, De) => SA + De.dataset[lA]?.y || 0, 0)
|
2178
|
-
), k = Math.max(...
|
2178
|
+
), k = Math.max(...K), B = Math.max(
|
2179
2179
|
...a.flatMap((z) => z.dataset.map((lA) => lA.y))
|
2180
|
-
), _ = Math.floor(Math.min(...X) / 100) * 100, G = Math.ceil(Math.max(k,
|
2180
|
+
), _ = Math.floor(Math.min(...X) / 100) * 100, G = Math.ceil(Math.max(k, B) / 100) * 100, aA = r.map((z, lA) => ({
|
2181
2181
|
id: `stacked-${lA}`,
|
2182
2182
|
area: !0,
|
2183
2183
|
color: r[lA].category_color ?? s.palette.primary.main,
|
@@ -2195,7 +2195,7 @@ const Ms = ({
|
|
2195
2195
|
label: z.category_name,
|
2196
2196
|
type: "line",
|
2197
2197
|
valueFormatter: (SA) => U(SA, "0,0")
|
2198
|
-
})), TA = [...aA, ...$], F = [...aA.map((z) => z.label), ...$.map((z) => z.label)], sA = (z) => (z.startsWith("stacked-") ? r[parseInt(z.split("-")[1])] : a[parseInt(z.split("-")[1])]).category_guid,
|
2198
|
+
})), TA = [...aA, ...$], F = [...aA.map((z) => z.label), ...$.map((z) => z.label)], sA = (z) => (z.startsWith("stacked-") ? r[parseInt(z.split("-")[1])] : a[parseInt(z.split("-")[1])]).category_guid, BA = (z) => {
|
2199
2199
|
d(z), n?.(z ?? "");
|
2200
2200
|
};
|
2201
2201
|
return /* @__PURE__ */ t(
|
@@ -2318,7 +2318,7 @@ const Ms = ({
|
|
2318
2318
|
{
|
2319
2319
|
hoveredLegend: l,
|
2320
2320
|
labels: F,
|
2321
|
-
setHoveredLegend:
|
2321
|
+
setHoveredLegend: BA,
|
2322
2322
|
stackedColors: aA.map((z) => z.color),
|
2323
2323
|
stackedLabels: aA.map((z) => z.label),
|
2324
2324
|
sx: { px: c ? 0 : 24 },
|
@@ -2513,9 +2513,9 @@ const Ms = ({
|
|
2513
2513
|
g.useEffect(() => {
|
2514
2514
|
E(r);
|
2515
2515
|
}, [r]), g.useEffect(() => {
|
2516
|
-
A.onRangeChanged(
|
2516
|
+
A.onRangeChanged(K());
|
2517
2517
|
}, [N]);
|
2518
|
-
const
|
2518
|
+
const K = () => {
|
2519
2519
|
const G = DA(Re());
|
2520
2520
|
return [DA(Ce(G, N)), G];
|
2521
2521
|
}, k = (G) => {
|
@@ -2529,7 +2529,7 @@ const Ms = ({
|
|
2529
2529
|
aA[0] = G === "previous" ? te($, sA) : ce($, sA), aA[1] = G === "previous" ? te(TA, sA) : ce(TA, sA);
|
2530
2530
|
}
|
2531
2531
|
C(aA), A.onRangeChanged(aA);
|
2532
|
-
},
|
2532
|
+
}, B = () => {
|
2533
2533
|
C(m), D(
|
2534
2534
|
f === n.dateRangePickerCopy.dateRangeThisMonth || f === n.dateRangePickerCopy.dateRangeLastMonth
|
2535
2535
|
), A.onRangeChanged(m);
|
@@ -2677,7 +2677,7 @@ const Ms = ({
|
|
2677
2677
|
isOpen: T,
|
2678
2678
|
onClose: () => S(!1),
|
2679
2679
|
onPrimaryAction: () => {
|
2680
|
-
|
2680
|
+
B(), S(!1);
|
2681
2681
|
},
|
2682
2682
|
primaryText: n.dateRangeEditApply,
|
2683
2683
|
title: n.dateRangeEditTitle,
|
@@ -2701,7 +2701,7 @@ const Ms = ({
|
|
2701
2701
|
copy: { title: n.dateRangeEditTitle },
|
2702
2702
|
isOpen: !0,
|
2703
2703
|
onClose: () => S(!1),
|
2704
|
-
onPrimaryAction: () =>
|
2704
|
+
onPrimaryAction: () => B(),
|
2705
2705
|
primaryText: n.dateRangeEditApply,
|
2706
2706
|
sx: {
|
2707
2707
|
"& .MuiDialogContent-root": {
|
@@ -2908,7 +2908,7 @@ const qe = ({
|
|
2908
2908
|
}) => {
|
2909
2909
|
const [C, { height: f, width: v }] = za(), { onEvent: m } = V(), { isDesktop: E, isMobile: T, isTablet: S } = jA(), { displayedDateRange: L, selectedAccountGuids: D, setSelectedAccountGuids: N } = mA(), { common: x } = b(), X = () => {
|
2910
2910
|
c && (c(), m(j.WIDGET_BACK_CLICK));
|
2911
|
-
},
|
2911
|
+
}, K = {
|
2912
2912
|
accountFilterOptionsCopy: {
|
2913
2913
|
accountTypeAccounts: x.account_filter.account_type_accounts,
|
2914
2914
|
cancelButton: x.cancel_button,
|
@@ -2940,7 +2940,7 @@ const qe = ({
|
|
2940
2940
|
dateRangeEditTitle: x.date_range_picker.edit_title,
|
2941
2941
|
dateRangeNextAria: x.date_range_picker.next_aria,
|
2942
2942
|
dateRangePreviousAria: x.date_range_picker.previous_aria
|
2943
|
-
},
|
2943
|
+
}, B = a ? a.start : L.start, _ = a ? a.end : L.end;
|
2944
2944
|
return /* @__PURE__ */ u(
|
2945
2945
|
Me,
|
2946
2946
|
{
|
@@ -2967,7 +2967,7 @@ const qe = ({
|
|
2967
2967
|
{
|
2968
2968
|
calendarActions: n,
|
2969
2969
|
copy: k,
|
2970
|
-
range: [
|
2970
|
+
range: [B, _],
|
2971
2971
|
shouldShrinkToIcon: !1,
|
2972
2972
|
variant: i
|
2973
2973
|
}
|
@@ -2976,7 +2976,7 @@ const qe = ({
|
|
2976
2976
|
Da,
|
2977
2977
|
{
|
2978
2978
|
accounts: A,
|
2979
|
-
copy:
|
2979
|
+
copy: K,
|
2980
2980
|
onFilterClick: (G) => {
|
2981
2981
|
const aA = A.filter(($) => G.includes($.guid)).map(($) => $.guid);
|
2982
2982
|
N(aA), h?.();
|
@@ -3040,7 +3040,7 @@ const qe = ({
|
|
3040
3040
|
{
|
3041
3041
|
calendarActions: n,
|
3042
3042
|
copy: k,
|
3043
|
-
range: [
|
3043
|
+
range: [B, _],
|
3044
3044
|
shouldShrinkToIcon: !1,
|
3045
3045
|
variant: i
|
3046
3046
|
}
|
@@ -3081,18 +3081,18 @@ const qe = ({
|
|
3081
3081
|
g.useEffect(() => {
|
3082
3082
|
X(n);
|
3083
3083
|
}, [n]);
|
3084
|
-
const X = (
|
3085
|
-
!r && (
|
3084
|
+
const X = (K) => {
|
3085
|
+
!r && (K === "" || K === "." || K === ",") ? (f(""), l?.(!1)) : Number(K) < c ? (f(
|
3086
3086
|
H(
|
3087
3087
|
m.error_amount_must_be_equal_to,
|
3088
3088
|
U(c, "0")
|
3089
3089
|
)
|
3090
|
-
), l?.(!1)) : Number(
|
3090
|
+
), l?.(!1)) : Number(K) > vr ? (f(
|
3091
3091
|
H(
|
3092
3092
|
m.error_amount_must_be_less_than_or_equal_to,
|
3093
3093
|
U(vr, A ? "0,0.00" : "0,0", Math.floor)
|
3094
3094
|
)
|
3095
|
-
), l?.(!1)) :
|
3095
|
+
), l?.(!1)) : K.toString().match(N) ? i() ? (f(""), l?.(!0)) : (f(o), l?.(!1)) : (f(m.error_amount_is_invalid), l?.(!1)), h(K.toString());
|
3096
3096
|
};
|
3097
3097
|
return /* @__PURE__ */ t(
|
3098
3098
|
Te,
|
@@ -3112,7 +3112,7 @@ const qe = ({
|
|
3112
3112
|
},
|
3113
3113
|
label: s,
|
3114
3114
|
name: `currency-input-${x.current}`,
|
3115
|
-
onChange: (
|
3115
|
+
onChange: (K) => X(K.target.value),
|
3116
3116
|
value: n,
|
3117
3117
|
...d
|
3118
3118
|
}
|
@@ -3416,7 +3416,7 @@ class oc {
|
|
3416
3416
|
const Ve = () => {
|
3417
3417
|
if (!g.useContext(Ye))
|
3418
3418
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
3419
|
-
return
|
3419
|
+
return Kn().uiStore;
|
3420
3420
|
}, sc = ({ remaining: A }) => {
|
3421
3421
|
const { cashflow: e } = b();
|
3422
3422
|
return /* @__PURE__ */ u(iA, { children: [
|
@@ -3442,7 +3442,7 @@ const Ve = () => {
|
|
3442
3442
|
setNextIncome: d,
|
3443
3443
|
setSelectedCashAccounts: C,
|
3444
3444
|
setUpcomingExpenses: f
|
3445
|
-
} = Ve(), { nextIncomeActivity: v, upcomingExpenses: m } =
|
3445
|
+
} = Ve(), { nextIncomeActivity: v, upcomingExpenses: m } = KA();
|
3446
3446
|
g.useEffect(() => {
|
3447
3447
|
C(
|
3448
3448
|
r.filter((D) => i.includes(D.guid))
|
@@ -4042,7 +4042,7 @@ const uc = [
|
|
4042
4042
|
return n.every((a) => r.indexOf(a) > -1);
|
4043
4043
|
};
|
4044
4044
|
var EA = /* @__PURE__ */ ((A) => (A[A.Expense = 0] = "Expense", A[A.Income = 1] = "Income", A))(EA || {}), yA = /* @__PURE__ */ ((A) => (A[A.Paid = 0] = "Paid", A[A.Missed = 1] = "Missed", A[A.Upcoming = 2] = "Upcoming", A))(yA || {}), Ec = /* @__PURE__ */ ((A) => (A[A.UNKNOWN = 0] = "UNKNOWN", A[A.CORRECT = 1] = "CORRECT", A[A.INCORRECT = 2] = "INCORRECT", A))(Ec || {}), yc = /* @__PURE__ */ ((A) => (A.Missed = "Missed", A.Paid = "Paid", A.Upcoming = "Upcoming expense", A.Income = "Income", A))(yc || {}), wc = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.Subscription = 1] = "Subscription", A[A.Bill = 2] = "Bill", A))(wc || {}), QA = /* @__PURE__ */ ((A) => (A[A.CREDIT = 1] = "CREDIT", A[A.DEBIT = 2] = "DEBIT", A))(QA || {}), Gn = /* @__PURE__ */ ((A) => (A[A.POSTED = 1] = "POSTED", A[A.PENDING = 2] = "PENDING", A))(Gn || {}), Lc = /* @__PURE__ */ ((A) => (A.Desktop = "Desktop", A.Mobile = "Mobile", A))(Lc || {});
|
4045
|
-
const
|
4045
|
+
const Ka = {
|
4046
4046
|
account_guid: "",
|
4047
4047
|
amount: 0,
|
4048
4048
|
currency_code: "",
|
@@ -4081,7 +4081,7 @@ let Tc = class {
|
|
4081
4081
|
shouldDisableDrawerScroll = !1;
|
4082
4082
|
searchValue = "";
|
4083
4083
|
selectedAccountGuids = [];
|
4084
|
-
manualTransaction =
|
4084
|
+
manualTransaction = Ka;
|
4085
4085
|
isAmountValid = !1;
|
4086
4086
|
showInsights = !1;
|
4087
4087
|
constructor() {
|
@@ -4382,13 +4382,13 @@ const UA = () => {
|
|
4382
4382
|
}, Pc = (A) => {
|
4383
4383
|
const e = Fn(A);
|
4384
4384
|
return WA(e, 1);
|
4385
|
-
},
|
4385
|
+
}, Ba = (A) => {
|
4386
4386
|
let e = xe(A, 1);
|
4387
4387
|
for (; CA(e, AA()); )
|
4388
4388
|
e = xe(e, 1);
|
4389
4389
|
return e;
|
4390
4390
|
}, Nc = (A) => {
|
4391
|
-
const e =
|
4391
|
+
const e = Ba(A);
|
4392
4392
|
return xe(e, 1);
|
4393
4393
|
}, Mc = (A) => it(A, 1), at = (A) => {
|
4394
4394
|
const e = NA(A);
|
@@ -4485,7 +4485,7 @@ const UA = () => {
|
|
4485
4485
|
]
|
4486
4486
|
}
|
4487
4487
|
);
|
4488
|
-
},
|
4488
|
+
}, Kc = I(qc), Bc = (A) => /* @__PURE__ */ t(y, { tabIndex: A.tabIndex, variant: "Small", children: J(NA(A.row.date), Y.MONTH_DAY) }), _c = (A) => {
|
4489
4489
|
const e = ze(), { transactions: n } = b(), { is_flagged: r, is_hidden: a, has_been_viewed: i, parent_guid: o } = A.row, c = !i && !!!o;
|
4490
4490
|
return /* @__PURE__ */ u(
|
4491
4491
|
O,
|
@@ -4542,7 +4542,7 @@ const UA = () => {
|
|
4542
4542
|
headerName: i.date_title,
|
4543
4543
|
width: 103,
|
4544
4544
|
renderHeader: $e,
|
4545
|
-
renderCell:
|
4545
|
+
renderCell: Bc,
|
4546
4546
|
sortingOrder: ["desc", "asc"]
|
4547
4547
|
},
|
4548
4548
|
{
|
@@ -4559,7 +4559,7 @@ const UA = () => {
|
|
4559
4559
|
headerName: i.category_title,
|
4560
4560
|
flex: 0.25,
|
4561
4561
|
renderHeader: $e,
|
4562
|
-
renderCell: (h) => /* @__PURE__ */ t(
|
4562
|
+
renderCell: (h) => /* @__PURE__ */ t(Kc, { ...h }),
|
4563
4563
|
sortingOrder: ["asc", "desc"]
|
4564
4564
|
},
|
4565
4565
|
{
|
@@ -4604,7 +4604,7 @@ const UA = () => {
|
|
4604
4604
|
slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } }
|
4605
4605
|
}
|
4606
4606
|
) });
|
4607
|
-
}, Qc = I(Xc),
|
4607
|
+
}, Qc = I(Xc), Ke = () => {
|
4608
4608
|
if (!g.useContext(Ye))
|
4609
4609
|
throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
|
4610
4610
|
return xA().uiStore;
|
@@ -4629,7 +4629,7 @@ const Fc = ({
|
|
4629
4629
|
isOpen: r,
|
4630
4630
|
type: a
|
4631
4631
|
}) => {
|
4632
|
-
const [i, o] = g.useState(A), { categories: s } = b(), { setShouldDisableDrawerScroll: c } =
|
4632
|
+
const [i, o] = g.useState(A), { categories: s } = b(), { setShouldDisableDrawerScroll: c } = Ke();
|
4633
4633
|
let h = "", l = [];
|
4634
4634
|
const d = a === "delete";
|
4635
4635
|
switch (a) {
|
@@ -4674,7 +4674,7 @@ const Fc = ({
|
|
4674
4674
|
}
|
4675
4675
|
);
|
4676
4676
|
}, jn = I(Fc), jc = ({ parentCategory: A }) => {
|
4677
|
-
const [e, n] = g.useState(!1), { addCategory: r } = xA(), { categories: a } = b(), { onEvent: i } = V(), { setShouldDisableDrawerScroll: o } =
|
4677
|
+
const [e, n] = g.useState(!1), { addCategory: r } = xA(), { categories: a } = b(), { onEvent: i } = V(), { setShouldDisableDrawerScroll: o } = Ke(), s = async (l) => {
|
4678
4678
|
await r(l.trim(), A.guid), i(Ae.ON_SUBCATEGORY_ADDED), n(!1);
|
4679
4679
|
}, c = async () => {
|
4680
4680
|
i(Ae.ON_SUBCATEGORY_ADD_CLICK), o(!0), n(!0);
|
@@ -4749,7 +4749,7 @@ const Fc = ({
|
|
4749
4749
|
showSelected: o,
|
4750
4750
|
unselectable: s,
|
4751
4751
|
unselectableText: c
|
4752
|
-
} =
|
4752
|
+
} = Ke(), { categories: h } = b(), { onEvent: l } = V(), [d, C] = g.useState(!1), [f, v] = g.useState(!1), m = !!e.revision, E = e.guid === r, T = !s.some((L) => L === e.guid);
|
4753
4753
|
return /* @__PURE__ */ u(
|
4754
4754
|
Z,
|
4755
4755
|
{
|
@@ -4824,7 +4824,7 @@ const Fc = ({
|
|
4824
4824
|
}
|
4825
4825
|
);
|
4826
4826
|
}, $c = I(Zc), Al = ({ categories: A, parentCategory: e }) => {
|
4827
|
-
const { expandedGuid: n, searchValue: r } =
|
4827
|
+
const { expandedGuid: n, searchValue: r } = Ke(), a = e.guid === n, i = !!r;
|
4828
4828
|
return /* @__PURE__ */ t(
|
4829
4829
|
Ca,
|
4830
4830
|
{
|
@@ -4850,7 +4850,7 @@ const Fc = ({
|
|
4850
4850
|
}
|
4851
4851
|
);
|
4852
4852
|
}, el = I(Al), tl = ({ category: A, subCategories: e }) => {
|
4853
|
-
const { expandedGuid: n, searchValue: r, setExpandedGuid: a } =
|
4853
|
+
const { expandedGuid: n, searchValue: r, setExpandedGuid: a } = Ke(), { onEvent: i } = V(), o = A.guid === n, s = () => {
|
4854
4854
|
const c = A.guid !== n ? A.guid : null;
|
4855
4855
|
a(c), i(c ? Ae.ON_CATEGORY_EXPANDED : Ae.ON_CATEGORY_COLLAPSED);
|
4856
4856
|
};
|
@@ -4881,7 +4881,7 @@ const Fc = ({
|
|
4881
4881
|
/* @__PURE__ */ t(el, { categories: e, parentCategory: A })
|
4882
4882
|
] });
|
4883
4883
|
}, nl = I(tl), rl = () => {
|
4884
|
-
const { categories: A } = xA(), { searchValue: e } =
|
4884
|
+
const { categories: A } = xA(), { searchValue: e } = Ke(), { categories: n } = b(), a = ((i, o = "") => i.reduce((s, c) => {
|
4885
4885
|
if (c.parent_guid === null) {
|
4886
4886
|
const l = [
|
4887
4887
|
{
|
@@ -4921,7 +4921,7 @@ const Fc = ({
|
|
4921
4921
|
setShowSelected: f,
|
4922
4922
|
setUnselectable: v,
|
4923
4923
|
setUnselectableText: m
|
4924
|
-
} =
|
4924
|
+
} = Ke();
|
4925
4925
|
return g.useEffect(() => {
|
4926
4926
|
e && l(e);
|
4927
4927
|
}), g.useEffect(() => {
|
@@ -5655,22 +5655,22 @@ const _a = ({ transaction: A }) => {
|
|
5655
5655
|
k.push({ ...h }), k[0].amount -= 1, m(k);
|
5656
5656
|
}, T = (k) => {
|
5657
5657
|
if (k > 0) {
|
5658
|
-
const
|
5659
|
-
_.splice(k, 1), _[0].amount +=
|
5658
|
+
const B = v[k], _ = [...v];
|
5659
|
+
_.splice(k, 1), _[0].amount += B.amount, m(_);
|
5660
5660
|
}
|
5661
|
-
}, S = (k,
|
5661
|
+
}, S = (k, B) => {
|
5662
5662
|
const _ = [...v];
|
5663
|
-
_[k].amount =
|
5663
|
+
_[k].amount = B, _[0].amount = A.amount - _.reduce(
|
5664
5664
|
(G, aA, $) => G + ($ !== 0 ? aA.amount : 0),
|
5665
5665
|
0
|
5666
5666
|
), m(_);
|
5667
|
-
}, L = (k,
|
5668
|
-
const _ = [...v], G = s.find((aA) => aA.guid ===
|
5667
|
+
}, L = (k, B) => {
|
5668
|
+
const _ = [...v], G = s.find((aA) => aA.guid === B);
|
5669
5669
|
G && (_[k] = {
|
5670
5670
|
..._[k],
|
5671
|
-
category_guid:
|
5671
|
+
category_guid: B,
|
5672
5672
|
category: G.name,
|
5673
|
-
top_level_category_guid: G.parent_guid ||
|
5673
|
+
top_level_category_guid: G.parent_guid || B
|
5674
5674
|
}, m(_));
|
5675
5675
|
}, D = () => {
|
5676
5676
|
if (A.parent_guid || A.has_been_split) {
|
@@ -5690,9 +5690,9 @@ const _a = ({ transaction: A }) => {
|
|
5690
5690
|
});
|
5691
5691
|
const k = A.parent_guid ?? A.guid;
|
5692
5692
|
await r(k);
|
5693
|
-
},
|
5694
|
-
const k = v.some((_) => !_.category_guid),
|
5695
|
-
return k ||
|
5693
|
+
}, K = g.useMemo(() => {
|
5694
|
+
const k = v.some((_) => !_.category_guid), B = v.some((_) => _.amount <= 0);
|
5695
|
+
return k || B;
|
5696
5696
|
}, [v]);
|
5697
5697
|
return /* @__PURE__ */ u(g.Fragment, { children: [
|
5698
5698
|
A && /* @__PURE__ */ t(Z, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ u(hA, { onClick: D, children: [
|
@@ -5711,7 +5711,7 @@ const _a = ({ transaction: A }) => {
|
|
5711
5711
|
{
|
5712
5712
|
ariaLabelClose: a.close_aria,
|
5713
5713
|
isOpen: l,
|
5714
|
-
isPrimaryDisabled:
|
5714
|
+
isPrimaryDisabled: K,
|
5715
5715
|
onClose: x,
|
5716
5716
|
onPrimaryAction: N,
|
5717
5717
|
primaryText: a.save_button,
|
@@ -6091,7 +6091,7 @@ const _a = ({ transaction: A }) => {
|
|
6091
6091
|
children: /* @__PURE__ */ t(bo, { color: "inherit" })
|
6092
6092
|
}
|
6093
6093
|
) });
|
6094
|
-
}, ql = I(zl),
|
6094
|
+
}, ql = I(zl), Kl = ({
|
6095
6095
|
bottomActions: A = hc,
|
6096
6096
|
topActions: e = uc,
|
6097
6097
|
transaction: n
|
@@ -6151,7 +6151,7 @@ const _a = ({ transaction: A }) => {
|
|
6151
6151
|
n.is_manual && /* @__PURE__ */ t(hl, { transaction: n })
|
6152
6152
|
] }) })
|
6153
6153
|
] }) });
|
6154
|
-
}, Jt = I(
|
6154
|
+
}, Jt = I(Kl), Bl = ({ copy: A, isOpen: e, onClose: n, onPrimaryAction: r }) => {
|
6155
6155
|
const { common: a, transactions: i } = b();
|
6156
6156
|
return /* @__PURE__ */ u(
|
6157
6157
|
HA,
|
@@ -6170,7 +6170,7 @@ const _a = ({ transaction: A }) => {
|
|
6170
6170
|
]
|
6171
6171
|
}
|
6172
6172
|
);
|
6173
|
-
}, _l = I(
|
6173
|
+
}, _l = I(Bl), kl = (A, e) => {
|
6174
6174
|
const n = Xl(Gl(A, e)), r = encodeURIComponent(n), a = document.createElement("a");
|
6175
6175
|
a.href = `data:attachment/csv;charset=utf-8,${r}`, a.download = "transactions.csv", document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
6176
6176
|
}, Gl = (A, e) => A.map((n) => ({
|
@@ -6417,19 +6417,19 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
6417
6417
|
updateManualTransaction: C
|
6418
6418
|
} = UA(), { addTransaction: f, filter: v, setFilter: m, tags: E, transactions: T, updateTransaction: S } = dA(), { common: L, transactions: D } = b(), { userProfile: N } = Ut(), { onEvent: x } = V(), {
|
6419
6419
|
displayedDateRange: X,
|
6420
|
-
isInitialized:
|
6420
|
+
isInitialized: K,
|
6421
6421
|
selectedAccountGuids: k,
|
6422
|
-
selectedAccounts:
|
6422
|
+
selectedAccounts: B,
|
6423
6423
|
setDisplayedDate: _,
|
6424
6424
|
setSelectedAccounts: G
|
6425
|
-
} = mA(), [aA, $] = g.useState(""), [TA, F] = g.useState(""), [sA,
|
6425
|
+
} = mA(), [aA, $] = g.useState(""), [TA, F] = g.useState(""), [sA, BA] = g.useState(!1), [z, lA] = g.useState(!1), [SA, De] = g.useState(!1);
|
6426
6426
|
g.useEffect(() => {
|
6427
6427
|
G(a);
|
6428
6428
|
}, [a]), g.useEffect(() => {
|
6429
6429
|
const IA = wA(AA()), nr = DA(AA());
|
6430
6430
|
_(IA, nr), m({
|
6431
6431
|
dateRange: { start: IA, end: nr },
|
6432
|
-
accounts:
|
6432
|
+
accounts: B.map((Di) => Di.guid)
|
6433
6433
|
}), De(!0), x(j.TRANSACTIONS_VIEW);
|
6434
6434
|
}, []), g.useEffect(() => {
|
6435
6435
|
SA && m({
|
@@ -6454,21 +6454,21 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
6454
6454
|
kl(T, E), x(j.TRANSACTIONS_CLICK_EXPORT);
|
6455
6455
|
}, Ti = () => {
|
6456
6456
|
Je.length > 0 ? (C({
|
6457
|
-
...
|
6457
|
+
...Ka,
|
6458
6458
|
date: fA(AA()),
|
6459
6459
|
user_guid: N?.user_guid || ""
|
6460
6460
|
}), $(
|
6461
6461
|
"addTransaction"
|
6462
6462
|
/* AddTransaction */
|
6463
|
-
), x(j.TRANSACTIONS_CLICK_ADD)) : (
|
6463
|
+
), x(j.TRANSACTIONS_CLICK_ADD)) : (BA(!0), x(j.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
|
6464
6464
|
}, Si = async () => {
|
6465
6465
|
Et && await f(s), $("");
|
6466
6466
|
}, Ii = () => {
|
6467
|
-
|
6467
|
+
BA(!1), lA(!0);
|
6468
6468
|
}, bi = () => {
|
6469
6469
|
lA(!1), i();
|
6470
6470
|
};
|
6471
|
-
return !
|
6471
|
+
return !K || !SA ? /* @__PURE__ */ t(me, {}) : /* @__PURE__ */ u(
|
6472
6472
|
He,
|
6473
6473
|
{
|
6474
6474
|
accountOptions: a,
|
@@ -6587,7 +6587,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
6587
6587
|
copy: { title: D.add_manual_account },
|
6588
6588
|
isOpen: sA,
|
6589
6589
|
onClose: () => {
|
6590
|
-
|
6590
|
+
BA(!1);
|
6591
6591
|
},
|
6592
6592
|
onPrimaryAction: Ii
|
6593
6593
|
}
|
@@ -6635,7 +6635,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
6635
6635
|
occurs_on: Sn(A.expectedDate, { representation: "date" }),
|
6636
6636
|
recurrence_type: A.recurrenceType
|
6637
6637
|
}), $l = ({ activity: A }) => {
|
6638
|
-
const { recurring: e } = b(), { cashflowSequences: n, scheduledPayments: r, updateCashflowSequence: a, updateScheduledPayment: i } =
|
6638
|
+
const { recurring: e } = b(), { cashflowSequences: n, scheduledPayments: r, updateCashflowSequence: a, updateScheduledPayment: i } = KA(), { onEvent: o } = V(), [s, c] = g.useState(!1), h = A.activityType === EA.Income, l = [
|
6639
6639
|
{ id: q.EveryWeek, label: e.frequency_every_week },
|
6640
6640
|
{ id: q.EveryOtherWeek, label: e.frequency_every_other_week },
|
6641
6641
|
{ id: q.EveryMonth, label: e.frequency_every_month },
|
@@ -6701,7 +6701,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
6701
6701
|
)
|
6702
6702
|
] });
|
6703
6703
|
}, Ad = I($l), ed = ({ activity: A }) => {
|
6704
|
-
const { recurring: e } = b(), { cashflowSequences: n, scheduledPayments: r, updateCashflowSequence: a, updateScheduledPayment: i } =
|
6704
|
+
const { recurring: e } = b(), { cashflowSequences: n, scheduledPayments: r, updateCashflowSequence: a, updateScheduledPayment: i } = KA(), { onEvent: o } = V(), [s, c] = g.useState(!1), [h, l] = g.useState(A.expectedDate), d = A.activityType === EA.Income, C = () => {
|
6705
6705
|
l(A.expectedDate), c(!0), o(
|
6706
6706
|
d ? "recurring_transactions_widget_income_details_click_next_payment_due" : "recurring_transactions_widget_expense_details_click_next_payment_due",
|
6707
6707
|
{
|
@@ -6749,7 +6749,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
6749
6749
|
)
|
6750
6750
|
] });
|
6751
6751
|
}, td = I(ed), nd = ({ activity: A, onDeleted: e }) => {
|
6752
|
-
const { recurring: n } = b(), { categories: r } = xA(), { deleteCashflowSequence: a, deleteScheduledPayment: i, paidActivities: o } =
|
6752
|
+
const { recurring: n } = b(), { categories: r } = xA(), { deleteCashflowSequence: a, deleteScheduledPayment: i, paidActivities: o } = KA(), { filter: s, setFilter: c, transactions: h } = dA(), { selectedAccountGuids: l } = mA(), { onEvent: d } = V(), [C, f] = g.useState(!1), [v, m] = g.useState(""), E = r.find((N) => N.guid === A.categoryGuid), T = A.activityType === EA.Income, S = g.useMemo(
|
6753
6753
|
() => h.find((N) => N.guid === v),
|
6754
6754
|
[v]
|
6755
6755
|
);
|
@@ -6865,7 +6865,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
6865
6865
|
gridRow: 1,
|
6866
6866
|
gridColumn: 1,
|
6867
6867
|
zIndex: 2
|
6868
|
-
}, $t = (A) => A ? { margin: "0 0 -6px -4px" } : void 0, Yn = ({ isOffset: A = !1, size: e = 16 }) => /* @__PURE__ */ t(we, { size: e, sx: { ...$t(A) }, children: /* @__PURE__ */ t(xo, { color: "primary", sx: { fontSize: e, ...Zt } }) }), Vn = ({ isOffset: A = !1, size: e = 16 }) => /* @__PURE__ */ t(we, { size: e, sx: { ...$t(A) }, children: /* @__PURE__ */ t(Po, { sx: { color: "categories.income", fontSize: e, ...Zt } }) }), Jn = ({ isOffset: A = !1, size: e = 16 }) => /* @__PURE__ */ t(we, { size: e, sx: { ...$t(A) }, children: /* @__PURE__ */ t(xt, { color: "error", sx: { fontSize: e, ...Zt } }) }), Zn = ({ isOffset: A = !1, size: e = 16 }) => /* @__PURE__ */ t(we, { size: e, sx: { ...$t(A) }, children: /* @__PURE__ */ t(ga, { color: "success", sx: { fontSize: e, ...Zt } }) }),
|
6868
|
+
}, $t = (A) => A ? { margin: "0 0 -6px -4px" } : void 0, Yn = ({ isOffset: A = !1, size: e = 16 }) => /* @__PURE__ */ t(we, { size: e, sx: { ...$t(A) }, children: /* @__PURE__ */ t(xo, { color: "primary", sx: { fontSize: e, ...Zt } }) }), Vn = ({ isOffset: A = !1, size: e = 16 }) => /* @__PURE__ */ t(we, { size: e, sx: { ...$t(A) }, children: /* @__PURE__ */ t(Po, { sx: { color: "categories.income", fontSize: e, ...Zt } }) }), Jn = ({ isOffset: A = !1, size: e = 16 }) => /* @__PURE__ */ t(we, { size: e, sx: { ...$t(A) }, children: /* @__PURE__ */ t(xt, { color: "error", sx: { fontSize: e, ...Zt } }) }), Zn = ({ isOffset: A = !1, size: e = 16 }) => /* @__PURE__ */ t(we, { size: e, sx: { ...$t(A) }, children: /* @__PURE__ */ t(ga, { color: "success", sx: { fontSize: e, ...Zt } }) }), Kr = ({ copy: A, date: e, type: n }) => {
|
6869
6869
|
let r = e && No(e) ? H(A.monthly_ordinal, VA(e, "do")) : A.monthly;
|
6870
6870
|
switch (n) {
|
6871
6871
|
case q.EveryQuarter:
|
@@ -6928,7 +6928,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
6928
6928
|
}) => {
|
6929
6929
|
const { recurring: a } = b(), [i, o] = g.useState(""), s = A.activityType === EA.Income, c = A.activityStatus === yA.Paid, h = A.activityStatus === yA.Missed, l = A.activityStatus === yA.Upcoming;
|
6930
6930
|
let d = a.paid?.toLowerCase();
|
6931
|
-
return h ? d = a.missed?.toLowerCase() : l && (d =
|
6931
|
+
return h ? d = a.missed?.toLowerCase() : l && (d = Kr(r ? {
|
6932
6932
|
copy: a,
|
6933
6933
|
date: A.expectedDate,
|
6934
6934
|
type: A.recurrenceType
|
@@ -7124,7 +7124,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7124
7124
|
i(Pc(d));
|
7125
7125
|
break;
|
7126
7126
|
case q.EveryQuarter:
|
7127
|
-
i(
|
7127
|
+
i(Ba(d));
|
7128
7128
|
break;
|
7129
7129
|
case q.EveryOtherQuarter:
|
7130
7130
|
i(Nc(d));
|
@@ -7174,7 +7174,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7174
7174
|
label: e,
|
7175
7175
|
onAddActivity: n = () => null
|
7176
7176
|
}) => {
|
7177
|
-
const { recurring: r } = b(), { addCashflowEvent: a, addCashflowSequence: i, addScheduledPayment: o } =
|
7177
|
+
const { recurring: r } = b(), { addCashflowEvent: a, addCashflowSequence: i, addScheduledPayment: o } = KA(), { filter: s, setFilter: c, transactions: h } = dA(), [l, d] = g.useState(!1), [C, f] = g.useState(""), [v, m] = g.useState(q.EveryMonth), [E, T] = g.useState(null), S = g.useMemo(
|
7178
7178
|
() => h.find((x) => x.guid === C),
|
7179
7179
|
[C]
|
7180
7180
|
), L = () => {
|
@@ -7187,8 +7187,8 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7187
7187
|
if (A) {
|
7188
7188
|
const x = Ua(S, v, E), X = await i(x);
|
7189
7189
|
if (X) {
|
7190
|
-
const
|
7191
|
-
await a(
|
7190
|
+
const K = Wa(X, S);
|
7191
|
+
await a(K);
|
7192
7192
|
}
|
7193
7193
|
} else {
|
7194
7194
|
const x = sd(S, v, E);
|
@@ -7268,7 +7268,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7268
7268
|
scheduledPaymentGuid: r.guid
|
7269
7269
|
};
|
7270
7270
|
}), gd = () => {
|
7271
|
-
const { recurring: A } = b(), { scheduledPayments: e } =
|
7271
|
+
const { recurring: A } = b(), { scheduledPayments: e } = KA(), { transactions: n } = dA(), { selectedAccounts: r } = mA(), { onEvent: a } = V(), i = hd(r, e, n), o = (c) => {
|
7272
7272
|
a(j.RECURRING_ACTIVITY_CLICK_EXPENSE, {
|
7273
7273
|
transaction_guid: c.transactionGuid
|
7274
7274
|
});
|
@@ -7463,7 +7463,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7463
7463
|
sequenceGuid: i.guid
|
7464
7464
|
};
|
7465
7465
|
}), md = () => {
|
7466
|
-
const { recurring: A } = b(), { selectedAccounts: e } = mA(), { cashflowEvents: n, cashflowSequences: r, projectedEvents: a } =
|
7466
|
+
const { recurring: A } = b(), { selectedAccounts: e } = mA(), { cashflowEvents: n, cashflowSequences: r, projectedEvents: a } = KA(), { transactions: i } = dA(), { onEvent: o } = V(), s = pd(
|
7467
7467
|
e,
|
7468
7468
|
n,
|
7469
7469
|
a,
|
@@ -7519,7 +7519,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7519
7519
|
start: wA(/* @__PURE__ */ new Date()),
|
7520
7520
|
end: ce(AA(), 30)
|
7521
7521
|
}), yd = ({ day: A, outsideCurrentMonth: e, ...n }) => {
|
7522
|
-
const { recurring: r } = b(), { selectedAccountGuids: a } = mA(), { activities: i, setSelectedDay: o } =
|
7522
|
+
const { recurring: r } = b(), { selectedAccountGuids: a } = mA(), { activities: i, setSelectedDay: o } = KA(), c = g.useMemo(
|
7523
7523
|
() => i.filter((v) => a.includes(v.accountGuid || "")),
|
7524
7524
|
[a, i]
|
7525
7525
|
).filter(
|
@@ -7593,11 +7593,11 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7593
7593
|
]
|
7594
7594
|
}
|
7595
7595
|
);
|
7596
|
-
}, Td = I(Ld),
|
7597
|
-
const A = pA(), { onEvent: e } = V(), { selectedDay: n } =
|
7598
|
-
gr(/* @__PURE__ */ new Date()) * Ze +
|
7596
|
+
}, Td = I(Ld), Br = 58, Sd = () => {
|
7597
|
+
const A = pA(), { onEvent: e } = V(), { selectedDay: n } = KA(), [r, a] = g.useState(
|
7598
|
+
gr(/* @__PURE__ */ new Date()) * Ze + Br
|
7599
7599
|
), i = (s) => {
|
7600
|
-
a(gr(s) * Ze +
|
7600
|
+
a(gr(s) * Ze + Br), e(j.RECURRING_ACTIVITY_CLICK_CALENDAR_RIGHT);
|
7601
7601
|
}, o = /* @__PURE__ */ t(
|
7602
7602
|
On,
|
7603
7603
|
{
|
@@ -7751,13 +7751,13 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7751
7751
|
selectedDayActivities: o,
|
7752
7752
|
setSelectedDay: s,
|
7753
7753
|
upcomingActivities: c
|
7754
|
-
} =
|
7755
|
-
l(
|
7754
|
+
} = KA(), [h, l] = g.useState(0), { onEvent: d } = V(), C = n.filter(on), f = a.filter(on), v = r.filter(on), m = C.filter(St).reduce(At, 0), E = f.filter(St).reduce(At, 0), T = v.filter(St).reduce(At, 0), S = C.filter(St).length, L = C.filter(an).reduce(At, 0), D = f.filter(an).reduce(At, 0), N = C.filter(an).length, x = (k, B) => {
|
7755
|
+
l(B);
|
7756
7756
|
}, X = (k) => {
|
7757
7757
|
d(j.RECURRING_ACTIVITY_CLICK_UPCOMING, {
|
7758
7758
|
transaction_guid: k.transactionGuid
|
7759
7759
|
});
|
7760
|
-
},
|
7760
|
+
}, K = (k) => {
|
7761
7761
|
d(j.RECURRING_ACTIVITY_CLICK_PAID, {
|
7762
7762
|
transaction_guid: k.transactionGuid
|
7763
7763
|
});
|
@@ -7813,7 +7813,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7813
7813
|
onActivityClick: X
|
7814
7814
|
}
|
7815
7815
|
),
|
7816
|
-
h === 1 && /* @__PURE__ */ t(tt, { activities: f, onActivityClick:
|
7816
|
+
h === 1 && /* @__PURE__ */ t(tt, { activities: f, onActivityClick: K })
|
7817
7817
|
] })
|
7818
7818
|
] }) }),
|
7819
7819
|
!e && /* @__PURE__ */ t(Pe, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ u(w, { gap: 35, children: [
|
@@ -7822,7 +7822,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7822
7822
|
tt,
|
7823
7823
|
{
|
7824
7824
|
activities: o || f,
|
7825
|
-
onActivityClick:
|
7825
|
+
onActivityClick: K,
|
7826
7826
|
onResetClick: i ? () => s(i) : void 0,
|
7827
7827
|
title: i ? H(
|
7828
7828
|
A.day_transactions,
|
@@ -7833,7 +7833,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7833
7833
|
] }) })
|
7834
7834
|
] });
|
7835
7835
|
}, xd = I(Od), Pd = ({ onBackClick: A, sx: e = {} }) => {
|
7836
|
-
const { accounts: n } = OA(), { recurring: r } = b(), { isInitialized: a, selectedAccountGuids: i, setSelectedAccounts: o } = mA(), { setFilter: s } = dA(), { isLoading: c } =
|
7836
|
+
const { accounts: n } = OA(), { recurring: r } = b(), { isInitialized: a, selectedAccountGuids: i, setSelectedAccounts: o } = mA(), { setFilter: s } = dA(), { isLoading: c } = KA(), { onEvent: h } = V();
|
7837
7837
|
g.useEffect(() => {
|
7838
7838
|
o(n);
|
7839
7839
|
}, [n]), g.useEffect(() => {
|
@@ -7881,7 +7881,7 @@ const Hr = "connect_widget", zr = "connections_widget", Ul = ({
|
|
7881
7881
|
}
|
7882
7882
|
);
|
7883
7883
|
}, iC = I(Pd), Nd = () => {
|
7884
|
-
const { recurring: A } = b(), { selectedAccountGuids: e } = mA(), { selectedDay: n, selectedDayActivities: r, setSelectedDay: a, upcomingActivities: i } =
|
7884
|
+
const { recurring: A } = b(), { selectedAccountGuids: e } = mA(), { selectedDay: n, selectedDayActivities: r, setSelectedDay: a, upcomingActivities: i } = KA(), o = g.useMemo(
|
7885
7885
|
() => i.filter(
|
7886
7886
|
(h) => e.includes(h.accountGuid || "")
|
7887
7887
|
),
|
@@ -8126,7 +8126,7 @@ const zd = {
|
|
8126
8126
|
gridRow: 1,
|
8127
8127
|
gridColumn: 1,
|
8128
8128
|
zIndex: 2
|
8129
|
-
}, qd = ({ size: A = 20 }) => /* @__PURE__ */ t(we, { size: A, children: /* @__PURE__ */ t(Pn, { color: "error", sx: { fontSize: A, ...zd } }) }),
|
8129
|
+
}, qd = ({ size: A = 20 }) => /* @__PURE__ */ t(we, { size: A, children: /* @__PURE__ */ t(Pn, { color: "error", sx: { fontSize: A, ...zd } }) }), Kd = (A) => A && (A.account_type === W.CREDIT_CARD || A.account_type === W.LOAN || A.account_type === W.MORTGAGE || A.account_type === W.LINE_OF_CREDIT || A.account_type === W.CHECKING_LINE_OF_CREDIT), Bd = (A) => A.is_manual || !A.guid, _d = (A) => A.account_type === W.LINE_OF_CREDIT || A.account_type === W.CREDIT_CARD || A.account_type === W.CHECKING_LINE_OF_CREDIT, kd = (A) => A.account_type === W.SAVINGS || A.account_type === W.CHECKING || A.account_type === W.LINE_OF_CREDIT || A.account_type === W.CREDIT_CARD || A.account_type === W.LOAN || A.account_type === W.MORTGAGE, Gd = (A) => A.account_type === W.LOAN || A.account_type === W.MORTGAGE, Xd = (A, e) => {
|
8130
8130
|
const n = [
|
8131
8131
|
{
|
8132
8132
|
event: "account_details_click_account_name",
|
@@ -8138,7 +8138,7 @@ const zd = {
|
|
8138
8138
|
valueFormatter: (r) => r
|
8139
8139
|
}
|
8140
8140
|
];
|
8141
|
-
if (
|
8141
|
+
if (Bd(A)) {
|
8142
8142
|
n.unshift({
|
8143
8143
|
label: e.account_balance,
|
8144
8144
|
name: "balance",
|
@@ -8187,7 +8187,7 @@ const zd = {
|
|
8187
8187
|
valueFormatter: (i) => Cn(i) ? us(i / 100) : i
|
8188
8188
|
});
|
8189
8189
|
}
|
8190
|
-
return
|
8190
|
+
return Kd(A) && (n.push({
|
8191
8191
|
label: e.minimum_payment,
|
8192
8192
|
name: "minimum_payment",
|
8193
8193
|
placeholder: H(e.enter_value, e.minimum_payment),
|
@@ -8359,7 +8359,7 @@ const jd = ({ activity: A }) => /* @__PURE__ */ u(iA, { children: [
|
|
8359
8359
|
/* @__PURE__ */ t(Q, {})
|
8360
8360
|
] });
|
8361
8361
|
}, Gr = I(Ud), Xr = (A, e) => (n) => n.accountGuid === A.guid && (Nn(n.expectedDate) || ot(n.expectedDate, e.start)) && CA(n.expectedDate, e.end), Wd = () => {
|
8362
|
-
const { cashflow: A } = b(), { upcomingExpenses: e, upcomingIncome: n } =
|
8362
|
+
const { cashflow: A } = b(), { upcomingExpenses: e, upcomingIncome: n } = KA(), { dateRange: r, selectedCashAccounts: a } = Ve();
|
8363
8363
|
return /* @__PURE__ */ u(w, { children: [
|
8364
8364
|
/* @__PURE__ */ u(w, { flexDirection: "row", justifyContent: "space-between", children: [
|
8365
8365
|
/* @__PURE__ */ t(y, { bold: !0, sx: { fontSize: 15, mb: 12 }, children: A.accounts_breakdown }),
|
@@ -8431,7 +8431,7 @@ const jd = ({ activity: A }) => /* @__PURE__ */ u(iA, { children: [
|
|
8431
8431
|
}) })
|
8432
8432
|
] });
|
8433
8433
|
}, Yd = I(Wd), Vd = () => {
|
8434
|
-
const { availableWidth: A } = ft(), e = pA(), { cashflow: n } = b(), { upcomingExpenses: r, upcomingIncome: a } =
|
8434
|
+
const { availableWidth: A } = ft(), e = pA(), { cashflow: n } = b(), { upcomingExpenses: r, upcomingIncome: a } = KA(), { dateRange: i, selectedCashAccounts: o } = Ve(), s = [
|
8435
8435
|
{
|
8436
8436
|
field: "account",
|
8437
8437
|
flex: 1.5,
|
@@ -8698,7 +8698,7 @@ const jd = ({ activity: A }) => /* @__PURE__ */ u(iA, { children: [
|
|
8698
8698
|
]
|
8699
8699
|
}
|
8700
8700
|
), Qr = (A, e) => (n) => n.accountGuid && A.includes(n.accountGuid) && (Nn(n.expectedDate) || ot(n.expectedDate, e.start)) && CA(n.expectedDate, e.end), Au = () => {
|
8701
|
-
const [A, e] = g.useState(!1), { availableWidth: n } = ft(), { cashflow: r } = b(), { upcomingExpenses: a, upcomingIncome: i } =
|
8701
|
+
const [A, e] = g.useState(!1), { availableWidth: n } = ft(), { cashflow: r } = b(), { upcomingExpenses: a, upcomingIncome: i } = KA(), { selectedAccountGuids: o } = mA(), { dateRange: s, selectedCashAccounts: c } = Ve(), { userProfile: h } = Ut(), l = g.useMemo(
|
8702
8702
|
() => a.filter(Qr(o, s)),
|
8703
8703
|
[s, o, a]
|
8704
8704
|
), d = g.useMemo(
|
@@ -8814,7 +8814,7 @@ const jd = ({ activity: A }) => /* @__PURE__ */ u(iA, { children: [
|
|
8814
8814
|
)
|
8815
8815
|
] });
|
8816
8816
|
}, eu = I(Au), tu = ({ handleNextStep: A }) => {
|
8817
|
-
const { completeOnboarding: e } =
|
8817
|
+
const { completeOnboarding: e } = Kn(), { cashflow: n } = b(), r = pA();
|
8818
8818
|
return /* @__PURE__ */ u(w, { children: [
|
8819
8819
|
/* @__PURE__ */ t(fe, { pb: 12, children: n.welcome_title }),
|
8820
8820
|
/* @__PURE__ */ t(
|
@@ -8898,7 +8898,7 @@ const jd = ({ activity: A }) => /* @__PURE__ */ u(iA, { children: [
|
|
8898
8898
|
transform: rotate(360deg);
|
8899
8899
|
}
|
8900
8900
|
`, cu = () => {
|
8901
|
-
const { addCashflowEvent: A, addCashflowSequence: e, cashflowSequences: n } =
|
8901
|
+
const { addCashflowEvent: A, addCashflowSequence: e, cashflowSequences: n } = KA(), { cashflow: r, common: a } = b(), { completeOnboarding: i } = Kn(), { isDirty: o } = Ve(), { isMobile: s } = jA(), { setDisplayedDate: c } = mA(), { filter: h, setFilter: l, transactions: d } = dA(), C = pA(), [f, v] = ae(!0), [m, E] = g.useState(q.EveryMonth), [T, S] = ae(!1), [L, D] = g.useState(null), [N, x] = ae(1), [X, K] = ae([]), [k, B] = ae(""), _ = g.useMemo(
|
8902
8902
|
() => d.find((F) => F.guid === k),
|
8903
8903
|
[k]
|
8904
8904
|
), G = !!n.length, aA = async () => {
|
@@ -8911,11 +8911,11 @@ const jd = ({ activity: A }) => /* @__PURE__ */ u(iA, { children: [
|
|
8911
8911
|
if (!(X.length < 1)) {
|
8912
8912
|
S(!0);
|
8913
8913
|
for (let F = 0; F < X.length; F++) {
|
8914
|
-
const sA = X[F],
|
8914
|
+
const sA = X[F], BA = Ua(
|
8915
8915
|
sA,
|
8916
8916
|
sA.frequency,
|
8917
8917
|
sA.nextDate
|
8918
|
-
), z = await e(
|
8918
|
+
), z = await e(BA);
|
8919
8919
|
if (z) {
|
8920
8920
|
const lA = Wa(z, sA);
|
8921
8921
|
await A(lA);
|
@@ -8994,7 +8994,7 @@ const jd = ({ activity: A }) => /* @__PURE__ */ u(iA, { children: [
|
|
8994
8994
|
custom: (sA) => F ? Ja(sA, F) : dt(sA)
|
8995
8995
|
}),
|
8996
8996
|
onSelected: (F) => {
|
8997
|
-
|
8997
|
+
B(F), v(!1);
|
8998
8998
|
}
|
8999
8999
|
}
|
9000
9000
|
),
|
@@ -9019,7 +9019,7 @@ const jd = ({ activity: A }) => /* @__PURE__ */ u(iA, { children: [
|
|
9019
9019
|
"aria-disabled": !_ || !L,
|
9020
9020
|
onClick: () => {
|
9021
9021
|
const F = [...X];
|
9022
|
-
F.push({ ..._, nextDate: L, frequency: m }),
|
9022
|
+
F.push({ ..._, nextDate: L, frequency: m }), K(F), B("");
|
9023
9023
|
},
|
9024
9024
|
variant: "contained",
|
9025
9025
|
children: a.confirm_button
|
@@ -9029,7 +9029,7 @@ const jd = ({ activity: A }) => /* @__PURE__ */ u(iA, { children: [
|
|
9029
9029
|
oA,
|
9030
9030
|
{
|
9031
9031
|
onClick: () => {
|
9032
|
-
|
9032
|
+
B(""), v(!0), aA();
|
9033
9033
|
},
|
9034
9034
|
variant: "outlined",
|
9035
9035
|
children: a.cancel_button
|
@@ -9810,7 +9810,7 @@ const sn = ({
|
|
9810
9810
|
const r = () => {
|
9811
9811
|
const a = A.successfully_aggregated_at ? NA(A.successfully_aggregated_at) : void 0, i = a && J(a, Y.TIME_STAMP_HOUR_MINUTE);
|
9812
9812
|
if (i)
|
9813
|
-
return Nn(a) ? H(e.last_updated_at, e.today, i) :
|
9813
|
+
return Nn(a) ? H(e.last_updated_at, e.today, i) : Ko(a) ? H(e.last_updated_at, e.yesterday, i) : H(
|
9814
9814
|
e.last_updated_at,
|
9815
9815
|
J(a, Y.MONTH_DAY_YEAR),
|
9816
9816
|
i
|
@@ -9907,7 +9907,7 @@ const sn = ({
|
|
9907
9907
|
}, f = () => {
|
9908
9908
|
switch (A.type) {
|
9909
9909
|
case GA.Select:
|
9910
|
-
return /* @__PURE__ */ u(
|
9910
|
+
return /* @__PURE__ */ u(Bo, { fullWidth: !0, children: [
|
9911
9911
|
/* @__PURE__ */ t(_o, { id: `${A.label}-select-label`, children: A.label }),
|
9912
9912
|
/* @__PURE__ */ t(
|
9913
9913
|
Go,
|
@@ -10029,14 +10029,14 @@ const sn = ({
|
|
10029
10029
|
}
|
10030
10030
|
)
|
10031
10031
|
] });
|
10032
|
-
}, qu = I(zu),
|
10032
|
+
}, qu = I(zu), Ku = () => {
|
10033
10033
|
const { onEvent: A } = V();
|
10034
10034
|
return g.useEffect(() => A(j.ACCOUNT_DETAILS_VIEW), []), /* @__PURE__ */ u(cA, { children: [
|
10035
10035
|
/* @__PURE__ */ t(qu, {}),
|
10036
10036
|
/* @__PURE__ */ t(Mu, {}),
|
10037
10037
|
/* @__PURE__ */ t(Pu, {})
|
10038
10038
|
] });
|
10039
|
-
},
|
10039
|
+
}, Bu = I(Ku), _u = ({ setTabValue: A }) => {
|
10040
10040
|
const [e, n] = g.useState(!1), { selectedMember: r } = re(), { accounts: a, connect: i } = b(), o = r.connection_status && La.includes(r.connection_status);
|
10041
10041
|
if (g.useEffect(() => {
|
10042
10042
|
o && A(1);
|
@@ -10145,7 +10145,7 @@ const sn = ({
|
|
10145
10145
|
}
|
10146
10146
|
),
|
10147
10147
|
/* @__PURE__ */ t(Mt, { index: 0, name: "transaction-details", value: A, children: /* @__PURE__ */ t(Xu, {}) }),
|
10148
|
-
/* @__PURE__ */ t(Mt, { index: 1, name: "account-details", value: A, children: /* @__PURE__ */ t(
|
10148
|
+
/* @__PURE__ */ t(Mt, { index: 1, name: "account-details", value: A, children: /* @__PURE__ */ t(Bu, {}) })
|
10149
10149
|
] });
|
10150
10150
|
}, Fu = I(Qu), en = (A) => A.top_level_category_guid === p.INCOME || A.category_guid === p.INCOME, ju = (A) => !en(A) && !ai(A), ri = (A) => fr.includes(A.top_level_category_guid) || fr.includes(A.category_guid), ai = (A) => A.top_level_category_guid === p.TRANSFER || A.category_guid === p.TRANSFER, Uu = (A) => !en(A) && !ri(A) && !ai(A), $n = (A, e) => {
|
10151
10151
|
const n = [];
|
@@ -10183,16 +10183,22 @@ const sn = ({
|
|
10183
10183
|
const n = /* @__PURE__ */ new Set();
|
10184
10184
|
console.log("getStackedLineChartData (input):", { groupedTotals: A, datasetLength: e }), Object.values(A).forEach((i) => {
|
10185
10185
|
Object.values(i).forEach((o) => {
|
10186
|
-
o.forEach((s) =>
|
10186
|
+
o.forEach((s) => {
|
10187
|
+
const c = `${s.date.getFullYear()}-${s.date.getMonth()}`;
|
10188
|
+
n.add(c);
|
10189
|
+
});
|
10187
10190
|
});
|
10188
10191
|
});
|
10189
|
-
const r = Array.from(n).
|
10190
|
-
|
10192
|
+
const r = Array.from(n).map((i) => {
|
10193
|
+
const [o, s] = i.split("-").map(Number);
|
10194
|
+
return new Date(o, s);
|
10195
|
+
}).sort((i, o) => i.getTime() - o.getTime());
|
10196
|
+
console.log("getStackedLineChartData (mid):", { uniqueMonths: n, sortedUniqueMonths: r });
|
10191
10197
|
const a = Object.entries(A).flatMap(
|
10192
10198
|
([i, o]) => Object.entries(o).map(([s, c]) => {
|
10193
10199
|
const h = r.map((l) => {
|
10194
10200
|
const d = c.find(
|
10195
|
-
(C) => C.date.
|
10201
|
+
(C) => C.date.getFullYear() === l.getFullYear() && C.date.getMonth() === l.getMonth()
|
10196
10202
|
);
|
10197
10203
|
return d ? { x: d.date, y: Math.abs(d.total) } : { x: l, y: 0 };
|
10198
10204
|
}).sort((l, d) => l.x.getTime() - d.x.getTime()).slice(0, e);
|
@@ -10237,7 +10243,7 @@ const sn = ({
|
|
10237
10243
|
}
|
10238
10244
|
) });
|
10239
10245
|
}, i1 = I(a1), o1 = ({ sx: A }) => {
|
10240
|
-
const { loadMonthlyCategoryTotals: e } = xA(), { isInitialized: n } =
|
10246
|
+
const { loadMonthlyCategoryTotals: e } = xA(), { isInitialized: n } = Bn(), { selectedAccount: r } = re(), [a, i] = g.useState(!1);
|
10241
10247
|
return g.useEffect(() => {
|
10242
10248
|
n && e([r]).finally(() => {
|
10243
10249
|
i(!0);
|
@@ -11149,7 +11155,7 @@ const w1 = (A, e) => !A && !e ? 0 : !A && e ? 101 : e / A * 100, L1 = (A, e, n)
|
|
11149
11155
|
textColor: i.text,
|
11150
11156
|
totalAmount: a.amount
|
11151
11157
|
};
|
11152
|
-
}), Xe = 75, ii = 50,
|
11158
|
+
}), Xe = 75, ii = 50, Kt = 5, I1 = 100, Yr = 20, b1 = 5e3, D1 = (A, e, n, r, a = !1, i = () => {
|
11153
11159
|
}) => {
|
11154
11160
|
const o = JA.select(e), s = x1(o, A, a, i), c = q1(A, n, r);
|
11155
11161
|
return P1(s), A.forEach((h, l) => {
|
@@ -11203,12 +11209,12 @@ const w1 = (A, e) => !A && !e ? 0 : !A && e ? 101 : e / A * 100, L1 = (A, e, n)
|
|
11203
11209
|
}, H1 = (A) => {
|
11204
11210
|
A.append("path").attr("style", "fill: white; fill-opacity: 0.35;").attr(
|
11205
11211
|
"d",
|
11206
|
-
JA.arc().innerRadius((e) => e.radius -
|
11212
|
+
JA.arc().innerRadius((e) => e.radius - Kt * 2).outerRadius((e) => e.radius - Kt).startAngle(0).endAngle(2 * Math.PI)
|
11207
11213
|
), A.append("path").transition().duration(b1).delay(0).attr("style", (e) => `fill: ${e.progressColor}; fill-opacity: 1;`).attrTween("d", z1);
|
11208
11214
|
}, z1 = (A) => {
|
11209
11215
|
let e = A.currentAmount / A.totalAmount;
|
11210
11216
|
e < 0 ? e = 0 : e > 1 && (e = 1);
|
11211
|
-
const n = e * 2 * Math.PI, r = JA.interpolate(0, n), a = JA.arc().cornerRadius(5).innerRadius(A.radius -
|
11217
|
+
const n = e * 2 * Math.PI, r = JA.interpolate(0, n), a = JA.arc().cornerRadius(5).innerRadius(A.radius - Kt * 2).outerRadius(A.radius - Kt).startAngle(0).endAngle(0);
|
11212
11218
|
return (i) => (a.endAngle(r(i)), a(A) || "");
|
11213
11219
|
}, q1 = (A, e, n) => {
|
11214
11220
|
const r = A.reduce((o, s) => {
|
@@ -11231,7 +11237,7 @@ const w1 = (A, e) => !A && !e ? 0 : !A && e ? 101 : e / A * 100, L1 = (A, e, n)
|
|
11231
11237
|
return s.radius = c || Yr, s.radius + 2;
|
11232
11238
|
}).strength(1).iterations(500)
|
11233
11239
|
).force("charge", JA.forceManyBody().strength(-1));
|
11234
|
-
},
|
11240
|
+
}, K1 = ({
|
11235
11241
|
data: A,
|
11236
11242
|
height: e,
|
11237
11243
|
width: n,
|
@@ -11257,7 +11263,7 @@ const w1 = (A, e) => !A && !e ? 0 : !A && e ? 101 : e / A * 100, L1 = (A, e, n)
|
|
11257
11263
|
i.current && (i.current.innerHTML = "");
|
11258
11264
|
};
|
11259
11265
|
}, [e, n]), /* @__PURE__ */ t("svg", { ref: i, style: { overflow: "visible", height: e, width: n } });
|
11260
|
-
},
|
11266
|
+
}, B1 = () => {
|
11261
11267
|
const { budgets: A } = b();
|
11262
11268
|
return /* @__PURE__ */ u(w, { alignItems: "center", gap: 12, sx: { mx: 24, textAlign: "center" }, children: [
|
11263
11269
|
/* @__PURE__ */ t(P, { name: "bubble_chart", size: 48 }),
|
@@ -11278,8 +11284,8 @@ const w1 = (A, e) => !A && !e ? 0 : !A && e ? 101 : e / A * 100, L1 = (A, e, n)
|
|
11278
11284
|
document.fonts.ready.then(() => {
|
11279
11285
|
d(!0);
|
11280
11286
|
});
|
11281
|
-
}, []), /* @__PURE__ */ t(O, { ml: n ? 0 : 24, children: n || !s || !l ? /* @__PURE__ */ t(
|
11282
|
-
|
11287
|
+
}, []), /* @__PURE__ */ t(O, { ml: n ? 0 : 24, children: n || !s || !l ? /* @__PURE__ */ t(B1, {}) : /* @__PURE__ */ t(
|
11288
|
+
K1,
|
11283
11289
|
{
|
11284
11290
|
data: C,
|
11285
11291
|
height: f,
|
@@ -11347,7 +11353,7 @@ const X1 = () => {
|
|
11347
11353
|
)
|
11348
11354
|
] }) });
|
11349
11355
|
}, Q1 = I(X1), F1 = ({ widgets: A, isLoading: e }) => {
|
11350
|
-
const { isDesktop: n, isMobile: r } = jA(), { copyStore: a } =
|
11356
|
+
const { isDesktop: n, isMobile: r } = jA(), { copyStore: a } = Bn(), { setSelectedAccounts: i } = mA(), { accounts: o } = OA();
|
11351
11357
|
g.useEffect(() => {
|
11352
11358
|
i(o);
|
11353
11359
|
}, [o]);
|
@@ -11919,13 +11925,13 @@ const li = ({
|
|
11919
11925
|
const x = () => {
|
11920
11926
|
C(
|
11921
11927
|
n.length > 1 ? A.insights_unhidden : A.insight_unhidden
|
11922
|
-
), r(n.map((
|
11923
|
-
}, X = (
|
11924
|
-
E(!0), S(
|
11925
|
-
},
|
11928
|
+
), r(n.map((B) => B.name));
|
11929
|
+
}, X = (B, _) => {
|
11930
|
+
E(!0), S(B), D(_);
|
11931
|
+
}, K = () => {
|
11926
11932
|
E(!1), D(""), S("");
|
11927
|
-
}, k = (
|
11928
|
-
r(
|
11933
|
+
}, k = (B, _) => {
|
11934
|
+
r(B), _ && E(!1), C(B.length > 1 ? A.insights_unhidden : A.insight_unhidden);
|
11929
11935
|
};
|
11930
11936
|
return /* @__PURE__ */ u(iA, { children: [
|
11931
11937
|
/* @__PURE__ */ t(
|
@@ -11953,16 +11959,16 @@ const li = ({
|
|
11953
11959
|
children: [
|
11954
11960
|
/* @__PURE__ */ t(Q, {}),
|
11955
11961
|
n.length > 0 ? /* @__PURE__ */ t(cA, { sx: { height: "100%" }, children: o.map(
|
11956
|
-
(
|
11962
|
+
(B) => s[B.key] !== "" && /* @__PURE__ */ t(
|
11957
11963
|
cA,
|
11958
11964
|
{
|
11959
|
-
subheader: /* @__PURE__ */ t(Ar, { children: s[
|
11960
|
-
children:
|
11965
|
+
subheader: /* @__PURE__ */ t(Ar, { children: s[B.key] }),
|
11966
|
+
children: B.subcategories.map(
|
11961
11967
|
(_, G) => _.beats.length > 0 && /* @__PURE__ */ u(O, { children: [
|
11962
11968
|
/* @__PURE__ */ t(Z, { disablePadding: !0, children: /* @__PURE__ */ u(
|
11963
11969
|
hA,
|
11964
11970
|
{
|
11965
|
-
onClick: () => X(
|
11971
|
+
onClick: () => X(B.key, _.key),
|
11966
11972
|
children: [
|
11967
11973
|
/* @__PURE__ */ t(
|
11968
11974
|
uA,
|
@@ -11982,11 +11988,11 @@ const li = ({
|
|
11982
11988
|
]
|
11983
11989
|
}
|
11984
11990
|
) }),
|
11985
|
-
/* @__PURE__ */ t(Q, { sx: { ml: G <
|
11991
|
+
/* @__PURE__ */ t(Q, { sx: { ml: G < B.subcategories.length - 1 ? 24 : 0 } })
|
11986
11992
|
] }, _.key)
|
11987
11993
|
)
|
11988
11994
|
},
|
11989
|
-
|
11995
|
+
B.key
|
11990
11996
|
)
|
11991
11997
|
) }) : /* @__PURE__ */ t(V1, { content: A }),
|
11992
11998
|
/* @__PURE__ */ u(O, { boxSizing: "border-box", pb: 32, pt: 24, px: 24, children: [
|
@@ -12020,11 +12026,11 @@ const li = ({
|
|
12020
12026
|
J1,
|
12021
12027
|
{
|
12022
12028
|
content: A,
|
12023
|
-
disabledBeatTemplates: L !== "" ? o.filter((
|
12029
|
+
disabledBeatTemplates: L !== "" ? o.filter((B) => B.key === T)[0].subcategories.filter((B) => B.key === L)[0].beats : [],
|
12024
12030
|
handleEnableBeatTemplates: k,
|
12025
12031
|
isOpen: m,
|
12026
12032
|
isUpdateLoading: i,
|
12027
|
-
onClose:
|
12033
|
+
onClose: K,
|
12028
12034
|
translatedSubCatetgory: c[L]
|
12029
12035
|
}
|
12030
12036
|
)
|
@@ -13327,7 +13333,7 @@ const pt = g.createContext(null), dh = ({
|
|
13327
13333
|
STANDARD: 154,
|
13328
13334
|
XLARGE: 200,
|
13329
13335
|
XXLARGE: 248
|
13330
|
-
}, Eh = 50, vi = 1,
|
13336
|
+
}, Eh = 50, vi = 1, Be = () => {
|
13331
13337
|
const A = g.useContext(pt);
|
13332
13338
|
if (!A)
|
13333
13339
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
@@ -13366,7 +13372,7 @@ const pt = g.createContext(null), dh = ({
|
|
13366
13372
|
}) => {
|
13367
13373
|
const f = window.app?.config.client_guid, { ref: v, inView: m } = ma({
|
13368
13374
|
threshold: vi
|
13369
|
-
}), { cardsCopy: E } =
|
13375
|
+
}), { cardsCopy: E } = Be(), { onEvent: T } = mt(), { updateBeat: S } = yh();
|
13370
13376
|
se(() => {
|
13371
13377
|
m && (n.has_been_displayed ? T(ui(n.template)) : (S({
|
13372
13378
|
...n,
|
@@ -13425,7 +13431,7 @@ const pt = g.createContext(null), dh = ({
|
|
13425
13431
|
scrollRightBoundary: i,
|
13426
13432
|
scrollX: o
|
13427
13433
|
}) => {
|
13428
|
-
const s = Th(), { carouselCopy: c } =
|
13434
|
+
const s = Th(), { carouselCopy: c } = Be(), h = Math.floor(o) > i || e === 0, l = o < 0 || n - 1 === e, d = "#BBBCBC", C = A?.primary_300 ? A?.primary_300 : "#2D64EF";
|
13429
13435
|
return /* @__PURE__ */ u(O, { className: s, children: [
|
13430
13436
|
/* @__PURE__ */ t(
|
13431
13437
|
RA,
|
@@ -13500,7 +13506,7 @@ const pt = g.createContext(null), dh = ({
|
|
13500
13506
|
variant: h,
|
13501
13507
|
widthOverrides: l
|
13502
13508
|
}) => {
|
13503
|
-
const d = bh(r, c, l), C = g.useRef(null), [f, v] = g.useState(0), [m, E] = g.useState(null), [T, S] = g.useState(null), { carouselCopy: L } =
|
13509
|
+
const d = bh(r, c, l), C = g.useRef(null), [f, v] = g.useState(0), [m, E] = g.useState(null), [T, S] = g.useState(null), { carouselCopy: L } = Be(), { onEvent: D } = mt(), N = () => {
|
13504
13510
|
D($A.ON_CAROUSEL_FORWARD_CLICK), C.current && C.current.scrollTo({
|
13505
13511
|
left: (
|
13506
13512
|
// Adds the flex gap to the carousel ulRef's width
|
@@ -13517,12 +13523,12 @@ const pt = g.createContext(null), dh = ({
|
|
13517
13523
|
});
|
13518
13524
|
}, X = () => {
|
13519
13525
|
C.current && v(C.current.scrollLeft);
|
13520
|
-
},
|
13526
|
+
}, K = () => {
|
13521
13527
|
if (!T || !m) return;
|
13522
13528
|
T - m > Eh ? D($A.ON_CAROUSEL_FORWARD_SWIPE) : D($A.ON_CAROUSEL_BACK_SWIPE);
|
13523
13529
|
}, k = ($) => {
|
13524
13530
|
E($.targetTouches[0].clientX);
|
13525
|
-
},
|
13531
|
+
}, B = ($) => {
|
13526
13532
|
E(null), S($.targetTouches[0].clientX);
|
13527
13533
|
}, _ = {
|
13528
13534
|
clientColorScheme: e,
|
@@ -13538,9 +13544,9 @@ const pt = g.createContext(null), dh = ({
|
|
13538
13544
|
{
|
13539
13545
|
className: "mx-insights-micro-carousel-container",
|
13540
13546
|
onScroll: X,
|
13541
|
-
onTouchEnd:
|
13547
|
+
onTouchEnd: K,
|
13542
13548
|
onTouchMove: k,
|
13543
|
-
onTouchStart:
|
13549
|
+
onTouchStart: B,
|
13544
13550
|
ref: C,
|
13545
13551
|
children: [
|
13546
13552
|
A.map(($, TA) => /* @__PURE__ */ t(
|
@@ -13736,7 +13742,7 @@ const pt = g.createContext(null), dh = ({
|
|
13736
13742
|
posthog: n,
|
13737
13743
|
widthOverrides: r
|
13738
13744
|
}) => {
|
13739
|
-
const { carouselCopy: a } =
|
13745
|
+
const { carouselCopy: a } = Be(), { onEvent: i } = mt(), o = window.app?.config.client_guid, s = () => {
|
13740
13746
|
i && (i($A.ON_VIEW_MORE_CLICKED), n?.capture && o && (e(), n.capture("micro_widget_clicked_insight", {
|
13741
13747
|
insight_template: "view_all",
|
13742
13748
|
$groups: { client: o }
|
@@ -13841,7 +13847,7 @@ const pt = g.createContext(null), dh = ({
|
|
13841
13847
|
variant: S,
|
13842
13848
|
widthOverrides: L
|
13843
13849
|
}) => {
|
13844
|
-
const [D, N] = ae("STANDARD"), [x, X] = ae(!1),
|
13850
|
+
const [D, N] = ae("STANDARD"), [x, X] = ae(!1), K = vs([s], Oe), k = ps([c], Oe);
|
13845
13851
|
g.useEffect(() => {
|
13846
13852
|
Oe.initialize(a, m);
|
13847
13853
|
}, [a, m]), g.useEffect(() => {
|
@@ -13850,7 +13856,7 @@ const pt = g.createContext(null), dh = ({
|
|
13850
13856
|
}, []), g.useEffect(() => {
|
13851
13857
|
X(!A && Oe.isInitialized);
|
13852
13858
|
}, [A, Oe.isInitialized]);
|
13853
|
-
const
|
13859
|
+
const B = {
|
13854
13860
|
showCTAColocatedWithText: r,
|
13855
13861
|
heightOverrides: i,
|
13856
13862
|
onCardClick: o,
|
@@ -13862,13 +13868,13 @@ const pt = g.createContext(null), dh = ({
|
|
13862
13868
|
carouselSize: D,
|
13863
13869
|
posthog: h,
|
13864
13870
|
variant: S,
|
13865
|
-
...
|
13871
|
+
...B
|
13866
13872
|
};
|
13867
13873
|
return (
|
13868
13874
|
// The Theme provider must wrap the component so that the styles don't break when imported into other applications.
|
13869
13875
|
/* @__PURE__ */ u(ia, { theme: ht(E ? "dark" : "light"), children: [
|
13870
13876
|
/* @__PURE__ */ t(Jo, {}),
|
13871
|
-
/* @__PURE__ */ t(dh, { onEvent:
|
13877
|
+
/* @__PURE__ */ t(dh, { onEvent: K, onPageview: k, store: Oe, children: /* @__PURE__ */ u(
|
13872
13878
|
O,
|
13873
13879
|
{
|
13874
13880
|
sx: {
|
@@ -13895,11 +13901,11 @@ const pt = g.createContext(null), dh = ({
|
|
13895
13901
|
clientColorScheme: n,
|
13896
13902
|
showCarouselControls: d,
|
13897
13903
|
variant: l ? S : void 0,
|
13898
|
-
...
|
13904
|
+
...B
|
13899
13905
|
}
|
13900
13906
|
),
|
13901
13907
|
x && !e.length && T && /* @__PURE__ */ t(Rh, { clientColorScheme: n, ..._ }),
|
13902
|
-
x && !e.length && !T && /* @__PURE__ */ t(
|
13908
|
+
x && !e.length && !T && /* @__PURE__ */ t(Kh, { ..._ })
|
13903
13909
|
]
|
13904
13910
|
}
|
13905
13911
|
) })
|
@@ -13917,7 +13923,7 @@ const pt = g.createContext(null), dh = ({
|
|
13917
13923
|
variant: c,
|
13918
13924
|
widthOverrides: h
|
13919
13925
|
}) => {
|
13920
|
-
const { cardsCopy: l } =
|
13926
|
+
const { cardsCopy: l } = Be(), { onEvent: d } = mt(), { onPageview: C } = pi(), f = window.app?.config.client_guid;
|
13921
13927
|
g.useEffect(() => {
|
13922
13928
|
C(ye.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
13923
13929
|
}, []);
|
@@ -13971,7 +13977,7 @@ const pt = g.createContext(null), dh = ({
|
|
13971
13977
|
}) => {
|
13972
13978
|
const h = LA(), l = window.app?.config.client_guid, { ref: d, inView: C } = ma({
|
13973
13979
|
threshold: vi
|
13974
|
-
}), { cardsCopy: f } =
|
13980
|
+
}), { cardsCopy: f } = Be(), { onEvent: v } = mt();
|
13975
13981
|
se(() => {
|
13976
13982
|
C && v(gi.ON_VIEW_MORE_VIEWED);
|
13977
13983
|
}, [C]), se(() => {
|
@@ -14019,7 +14025,7 @@ const pt = g.createContext(null), dh = ({
|
|
14019
14025
|
variant: o,
|
14020
14026
|
widthOverrides: s
|
14021
14027
|
}) => {
|
14022
|
-
const { onPageview: c } = pi(), { zeroStateCopy: h } =
|
14028
|
+
const { onPageview: c } = pi(), { zeroStateCopy: h } = Be();
|
14023
14029
|
return g.useEffect(() => {
|
14024
14030
|
c(ye.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
14025
14031
|
}, []), /* @__PURE__ */ t(
|
@@ -14048,7 +14054,7 @@ const pt = g.createContext(null), dh = ({
|
|
14048
14054
|
widthOverrides: s
|
14049
14055
|
}
|
14050
14056
|
);
|
14051
|
-
},
|
14057
|
+
}, Kh = I(qh), ln = 5, Bh = (A, e) => e.reduce((n, r) => {
|
14052
14058
|
if (r.total > 0) {
|
14053
14059
|
const a = A.find((h) => h.guid === r.category_guid);
|
14054
14060
|
if (!a) return n;
|
@@ -14070,7 +14076,7 @@ const pt = g.createContext(null), dh = ({
|
|
14070
14076
|
}
|
14071
14077
|
return n;
|
14072
14078
|
}, []), mi = (A, e) => {
|
14073
|
-
const n =
|
14079
|
+
const n = Bh(A, e), r = n.filter((c) => c.guid !== p.INCOME && c.guid !== p.TRANSFER).sort((c, h) => h.amount - c.amount), a = r.reduce(
|
14074
14080
|
(c, h) => c + h.amount,
|
14075
14081
|
0
|
14076
14082
|
), i = r.length > ln ? ln : r.length, o = r.slice(0, i), s = o.map((c) => ({
|
@@ -14129,7 +14135,7 @@ const pt = g.createContext(null), dh = ({
|
|
14129
14135
|
donutData: o,
|
14130
14136
|
totalAmount: i
|
14131
14137
|
};
|
14132
|
-
},
|
14138
|
+
}, Bt = ({ amount: A, label: e }) => /* @__PURE__ */ u(w, { direction: "column", children: [
|
14133
14139
|
/* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: e }),
|
14134
14140
|
/* @__PURE__ */ t(y, { variant: "XSmall", children: U(A, "0,0") })
|
14135
14141
|
] }), _h = ({
|
@@ -14148,7 +14154,7 @@ const pt = g.createContext(null), dh = ({
|
|
14148
14154
|
), C = g.useMemo(() => A.donutData.length > 0 ? A.donutData : [{ id: "0", color: h.palette.border.light, value: 100 }], [A, h]), f = () => {
|
14149
14155
|
r?.(a);
|
14150
14156
|
}, v = l ? 32 : 48;
|
14151
|
-
return /* @__PURE__ */ t(
|
14157
|
+
return /* @__PURE__ */ t(Ks, { data: C, onClick: n, selectedId: a, size: i, children: /* @__PURE__ */ t(w, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ u(w, { alignItems: "center", justifyContent: "center", minHeight: i, minWidth: i, children: [
|
14152
14158
|
d && /* @__PURE__ */ u(
|
14153
14159
|
w,
|
14154
14160
|
{
|
@@ -14239,7 +14245,7 @@ const pt = g.createContext(null), dh = ({
|
|
14239
14245
|
ee,
|
14240
14246
|
{
|
14241
14247
|
label: /* @__PURE__ */ t(
|
14242
|
-
|
14248
|
+
Bt,
|
14243
14249
|
{
|
14244
14250
|
amount: d.totalAmount,
|
14245
14251
|
label: e.spend_tab_title
|
@@ -14251,7 +14257,7 @@ const pt = g.createContext(null), dh = ({
|
|
14251
14257
|
ee,
|
14252
14258
|
{
|
14253
14259
|
label: /* @__PURE__ */ t(
|
14254
|
-
|
14260
|
+
Bt,
|
14255
14261
|
{
|
14256
14262
|
amount: C.totalAmount,
|
14257
14263
|
label: e.income_tab_title
|
@@ -14458,33 +14464,33 @@ const pt = g.createContext(null), dh = ({
|
|
14458
14464
|
() => Ei(e, n, Uh(A)),
|
14459
14465
|
[e, n]
|
14460
14466
|
), D = g.useMemo(
|
14461
|
-
() => h.find((
|
14467
|
+
() => h.find((K) => K.guid === v),
|
14462
14468
|
[v]
|
14463
|
-
), N = (
|
14469
|
+
), N = (K, k) => {
|
14464
14470
|
f(k), d("");
|
14465
|
-
}, x = (
|
14466
|
-
d(l ===
|
14467
|
-
}, X = (
|
14471
|
+
}, x = (K) => {
|
14472
|
+
d(l === K || K === "0" ? "" : K);
|
14473
|
+
}, X = (K) => {
|
14468
14474
|
const k = {
|
14469
14475
|
accounts: s,
|
14470
14476
|
dateRange: i
|
14471
14477
|
};
|
14472
14478
|
if (C === 0)
|
14473
|
-
if (
|
14474
|
-
const
|
14479
|
+
if (K === "other") {
|
14480
|
+
const B = S.categoryData.find((_) => _.guid === "other");
|
14475
14481
|
c({
|
14476
14482
|
...k,
|
14477
|
-
custom: (_) => !!
|
14483
|
+
custom: (_) => !!B?.categoryTotals?.find((G) => G.guid === _.top_level_category_guid)
|
14478
14484
|
});
|
14479
14485
|
} else
|
14480
14486
|
c({
|
14481
14487
|
...k,
|
14482
|
-
custom: (
|
14488
|
+
custom: (B) => K ? B.top_level_category_guid === K : B.top_level_category_guid !== p.INCOME
|
14483
14489
|
});
|
14484
14490
|
else
|
14485
14491
|
c({
|
14486
14492
|
...k,
|
14487
|
-
custom: (
|
14493
|
+
custom: (B) => K ? B.category_guid === K : B.top_level_category_guid === p.INCOME
|
14488
14494
|
});
|
14489
14495
|
T(!0);
|
14490
14496
|
};
|
@@ -14494,7 +14500,7 @@ const pt = g.createContext(null), dh = ({
|
|
14494
14500
|
ee,
|
14495
14501
|
{
|
14496
14502
|
label: /* @__PURE__ */ t(
|
14497
|
-
|
14503
|
+
Bt,
|
14498
14504
|
{
|
14499
14505
|
amount: S.totalAmount,
|
14500
14506
|
label: a.spend_tab_title
|
@@ -14506,7 +14512,7 @@ const pt = g.createContext(null), dh = ({
|
|
14506
14512
|
ee,
|
14507
14513
|
{
|
14508
14514
|
label: /* @__PURE__ */ t(
|
14509
|
-
|
14515
|
+
Bt,
|
14510
14516
|
{
|
14511
14517
|
amount: L.totalAmount,
|
14512
14518
|
label: a.income_tab_title
|
@@ -14678,13 +14684,13 @@ const pt = g.createContext(null), dh = ({
|
|
14678
14684
|
T(!0);
|
14679
14685
|
});
|
14680
14686
|
}, [c, d, C, D]);
|
14681
|
-
const
|
14682
|
-
const F = e1(l), sA = t1(F, x),
|
14687
|
+
const K = g.useMemo(() => {
|
14688
|
+
const F = e1(l), sA = t1(F, x), BA = Ju(sA), z = BA.filter(ju), lA = BA.filter(en);
|
14683
14689
|
return console.log({
|
14684
14690
|
monthlyCategoryTotals: l,
|
14685
14691
|
groupedTotals: F,
|
14686
14692
|
stackedLineChartData: sA,
|
14687
|
-
topLevelDatasets:
|
14693
|
+
topLevelDatasets: BA,
|
14688
14694
|
expenseDatasets: z,
|
14689
14695
|
incomeDatasets: lA
|
14690
14696
|
}), {
|
@@ -14700,11 +14706,11 @@ const pt = g.createContext(null), dh = ({
|
|
14700
14706
|
o ? Y.MONTH_SHORT_YEAR : Y.MONTH_YEAR
|
14701
14707
|
);
|
14702
14708
|
return `${F} - ${sA}`;
|
14703
|
-
}, [D, o]),
|
14709
|
+
}, [D, o]), B = (F, sA) => {
|
14704
14710
|
L(sA ?? S), r(j.TRENDS_CLICK_TOGGLE);
|
14705
14711
|
}, _ = (F) => {
|
14706
|
-
const sA = F?.[0],
|
14707
|
-
h(C, sA,
|
14712
|
+
const sA = F?.[0], BA = F?.[1], z = Zo(BA, sA);
|
14713
|
+
h(C, sA, BA), N({ start: sA, end: BA }), r(j.TRENDS_CLICK_DATE, {
|
14708
14714
|
time_period: z + "M"
|
14709
14715
|
}), X(z);
|
14710
14716
|
}, G = () => {
|
@@ -14763,7 +14769,7 @@ const pt = g.createContext(null), dh = ({
|
|
14763
14769
|
sa,
|
14764
14770
|
{
|
14765
14771
|
exclusive: !0,
|
14766
|
-
onChange:
|
14772
|
+
onChange: B,
|
14767
14773
|
orientation: "horizontal",
|
14768
14774
|
value: S,
|
14769
14775
|
children: ["Chart", "Table"].map((F) => /* @__PURE__ */ t(
|
@@ -14808,8 +14814,8 @@ const pt = g.createContext(null), dh = ({
|
|
14808
14814
|
onHoverArea: aA,
|
14809
14815
|
onHoverLegend: $,
|
14810
14816
|
onHoverPoint: TA,
|
14811
|
-
stackedDatasets:
|
14812
|
-
unstackedDatasets:
|
14817
|
+
stackedDatasets: K.stackedDatasets,
|
14818
|
+
unstackedDatasets: K.unstackedDatasets
|
14813
14819
|
}
|
14814
14820
|
),
|
14815
14821
|
S === "Table" && /* @__PURE__ */ t(A3, { monthlyCategoryTotals: l, sx: {} })
|
@@ -14846,7 +14852,7 @@ const pt = g.createContext(null), dh = ({
|
|
14846
14852
|
}
|
14847
14853
|
);
|
14848
14854
|
}, r3 = I(n3), a3 = ({ onPrimaryCtaClick: A, sx: e }) => {
|
14849
|
-
const { loadMonthlyCategoryTotals: n } = xA(), { isInitialized: r } =
|
14855
|
+
const { loadMonthlyCategoryTotals: n } = xA(), { isInitialized: r } = Bn(), { trends: a } = b(), { selectedAccounts: i } = mA(), [o, s] = g.useState(!1);
|
14850
14856
|
return g.useEffect(() => {
|
14851
14857
|
r && n(i).finally(() => {
|
14852
14858
|
s(!0);
|
@@ -14916,7 +14922,7 @@ export {
|
|
14916
14922
|
Rt as DataRow,
|
14917
14923
|
Ir as DateRangeSelector,
|
14918
14924
|
HA as Dialog,
|
14919
|
-
|
14925
|
+
Ks as Donut,
|
14920
14926
|
gA as Drawer,
|
14921
14927
|
wa as ErrorStatuses,
|
14922
14928
|
yc as ExpenseStatus,
|
@@ -15007,7 +15013,7 @@ export {
|
|
15007
15013
|
He as WidgetContainer,
|
15008
15014
|
Pa as WidgetContainerContext,
|
15009
15015
|
Na as WidgetContainerProvider,
|
15010
|
-
|
15016
|
+
Kh as ZeroStateCard,
|
15011
15017
|
Ci as ZeroStateIcon,
|
15012
15018
|
$o as analyticsSession,
|
15013
15019
|
H as buildDynamicCopy,
|
@@ -15024,21 +15030,21 @@ export {
|
|
15024
15030
|
Cn as isValidNumber,
|
15025
15031
|
OA as useAccountStore,
|
15026
15032
|
jt as useBudgetsStore,
|
15027
|
-
|
15033
|
+
Kn as useCashflowStore,
|
15028
15034
|
xA as useCategoryStore,
|
15029
|
-
|
15035
|
+
Ke as useCategoryUiStore,
|
15030
15036
|
vs as useCombineEvents,
|
15031
15037
|
ps as useCombinePageviews,
|
15032
15038
|
V as useEvent,
|
15033
15039
|
Ou as useGetMergeableAccounts,
|
15034
15040
|
b as useGlobalCopyStore,
|
15035
|
-
|
15041
|
+
Bn as useGlobalStore,
|
15036
15042
|
mA as useGlobalUiStore,
|
15037
15043
|
Xs as useMerchantStore,
|
15038
15044
|
Ra as useNotificationStore,
|
15039
15045
|
Z8 as usePageView,
|
15040
15046
|
ba as usePrevious,
|
15041
|
-
|
15047
|
+
KA as useRecurringActivityStore,
|
15042
15048
|
jA as useScreenSize,
|
15043
15049
|
dA as useTransactionStore,
|
15044
15050
|
UA as useTransactionsUiStore,
|