@mx-cartographer/experiences 6.27.1-alpha.sms1 → 6.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/index.es.js +383 -393
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -1422,8 +1422,8 @@ const Fa = (e, n) => e.reduce((i, a) => (i[a.guid] = n?.includes(a.guid), i), {}
|
|
1422
1422
|
disableRipple: !0,
|
1423
1423
|
onChange: () => {
|
1424
1424
|
const E = {};
|
1425
|
-
Object.keys(l).forEach((
|
1426
|
-
E[
|
1425
|
+
Object.keys(l).forEach((v) => {
|
1426
|
+
E[v] = !y;
|
1427
1427
|
}), u(E);
|
1428
1428
|
},
|
1429
1429
|
size: "small",
|
@@ -1439,7 +1439,7 @@ const Fa = (e, n) => e.reduce((i, a) => (i[a.guid] = n?.includes(a.guid), i), {}
|
|
1439
1439
|
}
|
1440
1440
|
) }),
|
1441
1441
|
Object.keys(p).map((E) => {
|
1442
|
-
const
|
1442
|
+
const v = p[E], w = v.every(
|
1443
1443
|
(I) => l[I.guid]
|
1444
1444
|
);
|
1445
1445
|
return /* @__PURE__ */ t(j, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ t(
|
@@ -1452,12 +1452,12 @@ const Fa = (e, n) => e.reduce((i, a) => (i[a.guid] = n?.includes(a.guid), i), {}
|
|
1452
1452
|
pe,
|
1453
1453
|
{
|
1454
1454
|
"aria-label": T(i.toggleAccountTypeAccounts, E),
|
1455
|
-
"aria-pressed":
|
1455
|
+
"aria-pressed": w,
|
1456
1456
|
disableGutters: !0,
|
1457
1457
|
onClick: () => o(
|
1458
1458
|
E,
|
1459
1459
|
p,
|
1460
|
-
|
1460
|
+
w
|
1461
1461
|
),
|
1462
1462
|
sx: {
|
1463
1463
|
paddingLeft: 12,
|
@@ -1474,7 +1474,7 @@ const Fa = (e, n) => e.reduce((i, a) => (i[a.guid] = n?.includes(a.guid), i), {}
|
|
1474
1474
|
}
|
1475
1475
|
) }),
|
1476
1476
|
sx: { overflow: "auto", width: "100%" },
|
1477
|
-
children:
|
1477
|
+
children: v.map((I) => {
|
1478
1478
|
const N = l[I.guid], L = `${I.name}${h && I.accountNumber ? ` *${I.accountNumber.slice(-4)}` : ""}`;
|
1479
1479
|
return /* @__PURE__ */ t(
|
1480
1480
|
j,
|
@@ -1648,10 +1648,10 @@ const _u = (e, n) => {
|
|
1648
1648
|
m({ ...h, [S.guid]: !h[S.guid] });
|
1649
1649
|
},
|
1650
1650
|
onAccountGroupClick: (S, y, E) => {
|
1651
|
-
const
|
1652
|
-
y[S].forEach((
|
1653
|
-
w
|
1654
|
-
}), m(
|
1651
|
+
const v = { ...h };
|
1652
|
+
y[S].forEach((w) => {
|
1653
|
+
v[w.guid] = !E;
|
1654
|
+
}), m(v);
|
1655
1655
|
},
|
1656
1656
|
onCancelClick: () => {
|
1657
1657
|
m(Fa(e, o)), C();
|
@@ -1871,14 +1871,14 @@ const _u = (e, n) => {
|
|
1871
1871
|
selectedIndex: l,
|
1872
1872
|
valueFormatter: u = (_) => `${_}`
|
1873
1873
|
}) => {
|
1874
|
-
const _ = xt(), h = Eu(_), m = a.reduce(yu, []), p = e !== void 0 ? e : m.reduce(fu, 0) / m.length, C = Math.max(...m), S = Math.min(...m), y = m.reduce(bu, 0), E = C >= 0,
|
1874
|
+
const _ = xt(), h = Eu(_), m = a.reduce(yu, []), p = e !== void 0 ? e : m.reduce(fu, 0) / m.length, C = Math.max(...m), S = Math.min(...m), y = m.reduce(bu, 0), E = C >= 0, v = S < 0, w = vr(E, v, o), I = vr(v, E, o), N = Su(p, C, S, w || I), L = (M) => l === void 0 || M === l ? i : `${i}80`, O = () => /* @__PURE__ */ t(
|
1875
1875
|
Ir,
|
1876
1876
|
{
|
1877
1877
|
averageLineHeight: N,
|
1878
1878
|
bottomHeight: I,
|
1879
1879
|
color: "",
|
1880
1880
|
range: y,
|
1881
|
-
topHeight:
|
1881
|
+
topHeight: w,
|
1882
1882
|
value: 0,
|
1883
1883
|
width: void 0
|
1884
1884
|
}
|
@@ -1898,7 +1898,7 @@ const _u = (e, n) => {
|
|
1898
1898
|
onClick: c,
|
1899
1899
|
range: y,
|
1900
1900
|
selectedIndex: l,
|
1901
|
-
topHeight:
|
1901
|
+
topHeight: w,
|
1902
1902
|
value: M.value,
|
1903
1903
|
valueLabel: u(M.value),
|
1904
1904
|
width: n,
|
@@ -2038,28 +2038,28 @@ const wu = ({
|
|
2038
2038
|
h(n), p(i), n && u(n);
|
2039
2039
|
}, [n, i]);
|
2040
2040
|
const C = g.useMemo(() => {
|
2041
|
-
const
|
2042
|
-
for (let N = 0; N <
|
2043
|
-
const L =
|
2041
|
+
const w = id({ start: Ke(l), end: je(l) }), I = [];
|
2042
|
+
for (let N = 0; N < w.length; N++) {
|
2043
|
+
const L = w[N], O = nd({ start: L, end: Xn(L, 6) }), M = [];
|
2044
2044
|
for (let G = 0; G < O.length; G++)
|
2045
2045
|
M.push(O[G]);
|
2046
2046
|
I.push(M);
|
2047
2047
|
}
|
2048
2048
|
return I;
|
2049
|
-
}, [l]), S = (
|
2049
|
+
}, [l]), S = (w) => {
|
2050
2050
|
if (r !== "None") {
|
2051
2051
|
if (r === "Single") {
|
2052
|
-
h(
|
2052
|
+
h(w), a?.(w);
|
2053
2053
|
return;
|
2054
2054
|
}
|
2055
|
-
!_ || m ? (h(
|
2055
|
+
!_ || m ? (h(w), p(void 0)) : ot(w, _) ? (p(_), h(w), o?.(w, _)) : (p(w), o?.(_, w));
|
2056
2056
|
}
|
2057
2057
|
}, y = () => {
|
2058
|
-
const
|
2059
|
-
u(
|
2058
|
+
const w = Ae();
|
2059
|
+
u(w), r !== "None" && (h(w), r === "Single" ? a?.(w) : (p(w), o?.(w, w)));
|
2060
2060
|
}, E = () => {
|
2061
2061
|
u(rn(l, 1));
|
2062
|
-
},
|
2062
|
+
}, v = () => {
|
2063
2063
|
u(Pt(l, 1));
|
2064
2064
|
};
|
2065
2065
|
return /* @__PURE__ */ t("div", { className: `mx-cmn-calendar ${c}`, children: /* @__PURE__ */ d(wt, { sx: { boxShadow: "none" }, children: [
|
@@ -2069,11 +2069,11 @@ const wu = ({
|
|
2069
2069
|
copy: e,
|
2070
2070
|
date: l,
|
2071
2071
|
onNextClick: E,
|
2072
|
-
onPreviousClick:
|
2072
|
+
onPreviousClick: v
|
2073
2073
|
}
|
2074
2074
|
),
|
2075
|
-
/* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-row", children: C[0].map((
|
2076
|
-
C.map((
|
2075
|
+
/* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-row", children: C[0].map((w, I) => /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ t(f, { bold: !0, variant: "Small", children: Mn(w, "EEEEE") }) }, I)) }),
|
2076
|
+
C.map((w, I) => /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-week", children: w.map((N, L) => /* @__PURE__ */ t(
|
2077
2077
|
xu,
|
2078
2078
|
{
|
2079
2079
|
beginDate: _,
|
@@ -2177,7 +2177,7 @@ const wu = ({
|
|
2177
2177
|
)
|
2178
2178
|
] });
|
2179
2179
|
}, Lu = (e) => {
|
2180
|
-
const n = Ze(), i = e.showLabel, a = e.style, o = Number(e.x), r = Number(e.y), s = e.handlers?.onMarkClick, c = e.handlers?.onMouseEnter, l = e.handlers?.onMouseLeave, u = gn(n.breakpoints.up("sm")), _ = e.valueFormatterString ? P(e.yData[e.dataIndex], e.valueFormatterString) : String(e.yData[e.dataIndex]), h = u ? n.typography.Small?.fontSize : n.typography.XSmall?.fontSize, m = h ? parseFloat(h.toString()) * 0.6 : 8, y = _.length * m + 8 + 8, E = 24,
|
2180
|
+
const n = Ze(), i = e.showLabel, a = e.style, o = Number(e.x), r = Number(e.y), s = e.handlers?.onMarkClick, c = e.handlers?.onMouseEnter, l = e.handlers?.onMouseLeave, u = gn(n.breakpoints.up("sm")), _ = e.valueFormatterString ? P(e.yData[e.dataIndex], e.valueFormatterString) : String(e.yData[e.dataIndex]), h = u ? n.typography.Small?.fontSize : n.typography.XSmall?.fontSize, m = h ? parseFloat(h.toString()) * 0.6 : 8, y = _.length * m + 8 + 8, E = 24, v = o - y / 2, w = r - 30;
|
2181
2181
|
return /* @__PURE__ */ d(J, { children: [
|
2182
2182
|
i && /* @__PURE__ */ d(J, { children: [
|
2183
2183
|
e.labelBackgroundColor && /* @__PURE__ */ t(
|
@@ -2187,8 +2187,8 @@ const wu = ({
|
|
2187
2187
|
height: E,
|
2188
2188
|
rx: "3",
|
2189
2189
|
width: y,
|
2190
|
-
x:
|
2191
|
-
y:
|
2190
|
+
x: v,
|
2191
|
+
y: w
|
2192
2192
|
}
|
2193
2193
|
),
|
2194
2194
|
/* @__PURE__ */ t(
|
@@ -2476,8 +2476,8 @@ const ii = ({
|
|
2476
2476
|
markStyles: S,
|
2477
2477
|
onItemClick: y,
|
2478
2478
|
showArea: E = !1,
|
2479
|
-
showAverage:
|
2480
|
-
showAxisHighlight:
|
2479
|
+
showAverage: v = !1,
|
2480
|
+
showAxisHighlight: w = !1,
|
2481
2481
|
showBars: I = !1,
|
2482
2482
|
showLegend: N = !1,
|
2483
2483
|
showMarkLabel: L = !1,
|
@@ -2545,7 +2545,7 @@ const ii = ({
|
|
2545
2545
|
}
|
2546
2546
|
],
|
2547
2547
|
children: [
|
2548
|
-
|
2548
|
+
v && /* @__PURE__ */ t(
|
2549
2549
|
Ad,
|
2550
2550
|
{
|
2551
2551
|
lineStyle: {
|
@@ -2639,7 +2639,7 @@ const ii = ({
|
|
2639
2639
|
} : {}
|
2640
2640
|
}
|
2641
2641
|
),
|
2642
|
-
|
2642
|
+
w && /* @__PURE__ */ t(Rd, { x: "line" }),
|
2643
2643
|
O && /* @__PURE__ */ t(
|
2644
2644
|
Hu,
|
2645
2645
|
{
|
@@ -2654,7 +2654,7 @@ const ii = ({
|
|
2654
2654
|
N && /* @__PURE__ */ t(
|
2655
2655
|
Bu,
|
2656
2656
|
{
|
2657
|
-
average:
|
2657
|
+
average: v ? ye : void 0,
|
2658
2658
|
customLegendVariant: o,
|
2659
2659
|
labels: u,
|
2660
2660
|
series: q,
|
@@ -2861,12 +2861,12 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2861
2861
|
const Y = Math.max(s - h, c);
|
2862
2862
|
C(Y);
|
2863
2863
|
}, [s, h]);
|
2864
|
-
const [S, y] = g.useState(null), [E,
|
2864
|
+
const [S, y] = g.useState(null), [E, v] = g.useState({
|
2865
2865
|
hoveredSeriesId: null,
|
2866
2866
|
hoveredAreaData: null,
|
2867
2867
|
isAreaHovered: !1,
|
2868
2868
|
cursorPos: { x: 0, y: 0 }
|
2869
|
-
}), { hoveredSeriesId:
|
2869
|
+
}), { hoveredSeriesId: w, hoveredAreaData: I, isAreaHovered: N, cursorPos: L } = E, O = N && w && I, M = !O, G = [...o, ...r], k = G[0]?.dataset.length ?? 0, U = G.flatMap((Y) => Y.dataset.map((ve) => ve.x)), V = G.flatMap((Y) => Y.dataset.map((ve) => ve.y)), ae = o[0]?.dataset?.map(
|
2870
2870
|
(Y, ve) => o.reduce((st, Tn) => st + Tn.dataset[ve]?.y || 0, 0)
|
2871
2871
|
) ?? [0], ne = Math.max(...ae), he = Math.max(
|
2872
2872
|
...r.flatMap((Y) => Y.dataset.map((ve) => ve.y))
|
@@ -2912,12 +2912,12 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2912
2912
|
}, Me = (Y) => {
|
2913
2913
|
a?.(Y ?? "");
|
2914
2914
|
}, me = () => {
|
2915
|
-
const Y = q(String(
|
2915
|
+
const Y = q(String(w)).guid;
|
2916
2916
|
Y && a?.(Y);
|
2917
2917
|
}, ht = (Y) => {
|
2918
2918
|
const ve = String(Y?.seriesId), st = q(ve).guid, Tn = Be.find((Ai) => Ai.id === ve), Ma = Tn && Y?.dataIndex !== void 0, ka = Tn && Y?.dataIndex === void 0;
|
2919
2919
|
if (Ma)
|
2920
|
-
|
2920
|
+
v({
|
2921
2921
|
hoveredSeriesId: ve,
|
2922
2922
|
hoveredAreaData: null,
|
2923
2923
|
isAreaHovered: !1,
|
@@ -2928,14 +2928,14 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2928
2928
|
x: U[Ba],
|
2929
2929
|
y: Ga
|
2930
2930
|
})) ?? [];
|
2931
|
-
|
2931
|
+
v({
|
2932
2932
|
hoveredSeriesId: ve,
|
2933
2933
|
hoveredAreaData: Ai,
|
2934
2934
|
isAreaHovered: !0,
|
2935
2935
|
cursorPos: L
|
2936
2936
|
}), e?.(st);
|
2937
2937
|
} else
|
2938
|
-
|
2938
|
+
v({
|
2939
2939
|
hoveredSeriesId: null,
|
2940
2940
|
hoveredAreaData: null,
|
2941
2941
|
isAreaHovered: !1,
|
@@ -2943,7 +2943,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2943
2943
|
});
|
2944
2944
|
}, Pe = (Y) => {
|
2945
2945
|
const ve = Y.currentTarget.getBoundingClientRect();
|
2946
|
-
|
2946
|
+
v((st) => ({
|
2947
2947
|
...st,
|
2948
2948
|
cursorPos: {
|
2949
2949
|
x: Y.clientX - ve.left,
|
@@ -2995,10 +2995,10 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
2995
2995
|
}
|
2996
2996
|
},
|
2997
2997
|
slots: {
|
2998
|
-
itemContent: (Y) => M &&
|
2998
|
+
itemContent: (Y) => M && w ? /* @__PURE__ */ t(
|
2999
2999
|
$u,
|
3000
3000
|
{
|
3001
|
-
categoryGuids: q(
|
3001
|
+
categoryGuids: q(w),
|
3002
3002
|
xData: U,
|
3003
3003
|
...Y
|
3004
3004
|
}
|
@@ -3039,7 +3039,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3039
3039
|
O && /* @__PURE__ */ t(
|
3040
3040
|
Wu,
|
3041
3041
|
{
|
3042
|
-
categoryGuids: q(
|
3042
|
+
categoryGuids: q(w),
|
3043
3043
|
chartContainerRef: m,
|
3044
3044
|
cursorPosition: L,
|
3045
3045
|
hoveredAreaData: I.map((Y) => ({
|
@@ -3238,7 +3238,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3238
3238
|
shouldShrinkToIcon: o = !0,
|
3239
3239
|
variant: r = "outlined"
|
3240
3240
|
}) => {
|
3241
|
-
const s = Te(), { isMobile: c } = Ce(), [l, u] = g.useState(a), [_, h] = g.useState(i.dateRangePickerCopy.dateRangeThisMonth), [m, p] = g.useState(l), [C, S] = g.useState(!1), [y, E] = g.useState(!0), [
|
3241
|
+
const s = Te(), { isMobile: c } = Ce(), [l, u] = g.useState(a), [_, h] = g.useState(i.dateRangePickerCopy.dateRangeThisMonth), [m, p] = g.useState(l), [C, S] = g.useState(!1), [y, E] = g.useState(!0), [v, w] = g.useState(6), I = {
|
3242
3242
|
buttons: [
|
3243
3243
|
{ label: "3M", value: 3 },
|
3244
3244
|
{ label: "6M", value: 6 },
|
@@ -3256,10 +3256,10 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3256
3256
|
u(a), p(a);
|
3257
3257
|
}, [a]), g.useEffect(() => {
|
3258
3258
|
(r === "timeframebuttons" || r === "timeframetabs") && e.onRangeChanged(N());
|
3259
|
-
}, [
|
3259
|
+
}, [v]);
|
3260
3260
|
const N = () => {
|
3261
3261
|
const G = je(Cn());
|
3262
|
-
return [je(Pt(G,
|
3262
|
+
return [je(Pt(G, v)), G];
|
3263
3263
|
}, L = (G) => {
|
3264
3264
|
const [k, U] = l, V = G === "previous";
|
3265
3265
|
let ae;
|
@@ -3284,7 +3284,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3284
3284
|
_ === i.dateRangePickerCopy.dateRangeThisMonth || _ === i.dateRangePickerCopy.dateRangeLastMonth
|
3285
3285
|
), e.onRangeChanged(m);
|
3286
3286
|
}, M = (G) => {
|
3287
|
-
|
3287
|
+
w(G);
|
3288
3288
|
};
|
3289
3289
|
return /* @__PURE__ */ d(R, { className: "mx-cmn-date-range-selector", m: 4, children: [
|
3290
3290
|
/* @__PURE__ */ d(
|
@@ -3366,7 +3366,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3366
3366
|
color: n,
|
3367
3367
|
exclusive: !0,
|
3368
3368
|
orientation: "horizontal",
|
3369
|
-
value:
|
3369
|
+
value: v,
|
3370
3370
|
children: I.buttons.map((G) => /* @__PURE__ */ t(
|
3371
3371
|
gi,
|
3372
3372
|
{
|
@@ -3385,7 +3385,7 @@ const Ic = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
|
3385
3385
|
indicatorColor: "primary",
|
3386
3386
|
onChange: (G, k) => M(k),
|
3387
3387
|
textColor: "primary",
|
3388
|
-
value:
|
3388
|
+
value: v,
|
3389
3389
|
variant: "fullWidth",
|
3390
3390
|
children: I.tabs.map((G) => /* @__PURE__ */ t(
|
3391
3391
|
tt,
|
@@ -3666,8 +3666,8 @@ const Aa = ({
|
|
3666
3666
|
sx: h = {},
|
3667
3667
|
title: m = ""
|
3668
3668
|
}) => {
|
3669
|
-
const [p, C] = g.useState(!1), [S, { height: y, width: E }] = ai(), { onEvent:
|
3670
|
-
l && (l(),
|
3669
|
+
const [p, C] = g.useState(!1), [S, { height: y, width: E }] = ai(), { onEvent: v } = z(), { isDesktop: w, isMobile: I, isTablet: N } = Ce(E), { displayedDateRange: L, isCopyLoaded: O, selectedAccountGuids: M, setSelectedAccountGuids: G } = le(), { common: k, connect: U } = A(), V = () => {
|
3670
|
+
l && (l(), v(H.WIDGET_BACK_CLICK));
|
3671
3671
|
};
|
3672
3672
|
if (!O)
|
3673
3673
|
return /* @__PURE__ */ t(de, {});
|
@@ -3720,7 +3720,7 @@ const Aa = ({
|
|
3720
3720
|
un,
|
3721
3721
|
{
|
3722
3722
|
action: /* @__PURE__ */ d(b, { alignItems: "center", flexDirection: "row", children: [
|
3723
|
-
|
3723
|
+
w && i && /* @__PURE__ */ t(R, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ t(
|
3724
3724
|
wr,
|
3725
3725
|
{
|
3726
3726
|
calendarActions: i,
|
@@ -3747,7 +3747,7 @@ const Aa = ({
|
|
3747
3747
|
n?.map((ge) => {
|
3748
3748
|
if (g.isValidElement(ge)) return ge;
|
3749
3749
|
const { iconName: ye, onClick: Be, label: Z } = ge;
|
3750
|
-
return Ge ?
|
3750
|
+
return Ge ? w || N ? /* @__PURE__ */ t(
|
3751
3751
|
te,
|
3752
3752
|
{
|
3753
3753
|
onClick: Be,
|
@@ -3756,7 +3756,7 @@ const Aa = ({
|
|
3756
3756
|
children: Z
|
3757
3757
|
},
|
3758
3758
|
ye
|
3759
|
-
) : /* @__PURE__ */ t(Ue, { "aria-label": Z, color: "primary", onClick: Be, children: /* @__PURE__ */ t($, { name: ye, size: 24 }) }, ye) :
|
3759
|
+
) : /* @__PURE__ */ t(Ue, { "aria-label": Z, color: "primary", onClick: Be, children: /* @__PURE__ */ t($, { name: ye, size: 24 }) }, ye) : w || N ? /* @__PURE__ */ t(
|
3760
3760
|
te,
|
3761
3761
|
{
|
3762
3762
|
onClick: Be,
|
@@ -3769,18 +3769,18 @@ const Aa = ({
|
|
3769
3769
|
})
|
3770
3770
|
] }),
|
3771
3771
|
sx: {
|
3772
|
-
p:
|
3772
|
+
p: w ? 48 : 24,
|
3773
3773
|
pb: 0,
|
3774
3774
|
"& .MuiCardHeader-action": {
|
3775
3775
|
mr: 0,
|
3776
|
-
...i &&
|
3776
|
+
...i && w && { flexGrow: 1 },
|
3777
3777
|
...(I || N) && { alignSelf: "center" }
|
3778
3778
|
},
|
3779
3779
|
"& .MuiCardHeader-content": {
|
3780
3780
|
overflow: "hidden"
|
3781
3781
|
}
|
3782
3782
|
},
|
3783
|
-
title:
|
3783
|
+
title: w || N ? /* @__PURE__ */ t(Jt, { children: m }) : /* @__PURE__ */ d(b, { alignItems: "center", flexDirection: "row", sx: { overflow: "hidden" }, children: [
|
3784
3784
|
I && l && /* @__PURE__ */ t(
|
3785
3785
|
Ue,
|
3786
3786
|
{
|
@@ -3795,7 +3795,7 @@ const Aa = ({
|
|
3795
3795
|
] })
|
3796
3796
|
}
|
3797
3797
|
),
|
3798
|
-
c && /* @__PURE__ */ t(F, { sx: { mt:
|
3798
|
+
c && /* @__PURE__ */ t(F, { sx: { mt: w ? 48 : 24 } }),
|
3799
3799
|
i && (I || N) && /* @__PURE__ */ d(b, { gap: 24, justifyContent: "center", sx: { mt: I ? 0 : 16 }, children: [
|
3800
3800
|
_ && /* @__PURE__ */ t(F, {}),
|
3801
3801
|
/* @__PURE__ */ t(
|
@@ -3906,20 +3906,20 @@ const Dr = "connect_widget", Nr = "connections_widget", qu = ({
|
|
3906
3906
|
setHasValidInput: _,
|
3907
3907
|
...h
|
3908
3908
|
}) => {
|
3909
|
-
const [m, p] = g.useState(""), { common: C } = A(), S = o || C.currency_input, y = xt(), E = Qu(y),
|
3909
|
+
const [m, p] = g.useState(""), { common: C } = A(), S = o || C.currency_input, y = xt(), E = Qu(y), v = /^[0-9]*$/, w = /^(\d)*(\,)?([0-9]{1,2})?$/, I = /^(\d)*(\.)?([0-9]{1,2})?$/;
|
3910
3910
|
let N;
|
3911
3911
|
const L = g.useRef(Wd());
|
3912
3912
|
if (e)
|
3913
3913
|
switch (au()) {
|
3914
3914
|
case ca.CAD:
|
3915
|
-
N =
|
3915
|
+
N = w;
|
3916
3916
|
break;
|
3917
3917
|
default:
|
3918
3918
|
N = I;
|
3919
3919
|
break;
|
3920
3920
|
}
|
3921
3921
|
else
|
3922
|
-
N =
|
3922
|
+
N = v;
|
3923
3923
|
g.useEffect(() => {
|
3924
3924
|
O(i);
|
3925
3925
|
}, [i]);
|
@@ -4873,15 +4873,15 @@ const Ei = () => {
|
|
4873
4873
|
}, [o, s]), g.useEffect(() => {
|
4874
4874
|
y && m(y), C(E);
|
4875
4875
|
}, [y, E]);
|
4876
|
-
const
|
4876
|
+
const v = g.useMemo(
|
4877
4877
|
() => o.filter((L) => s.includes(L.guid)).reduce((L, O) => L + (O?.balance || 0), 0),
|
4878
4878
|
[s, E]
|
4879
|
-
),
|
4879
|
+
), w = g.useMemo(
|
4880
4880
|
() => _.filter((L) => s.includes(L.accountGuid || "")).reduce((L, O) => L + O.amount, 0),
|
4881
4881
|
[s, _]
|
4882
4882
|
), I = g.useMemo(
|
4883
|
-
() =>
|
4884
|
-
[
|
4883
|
+
() => v - w,
|
4884
|
+
[v, w]
|
4885
4885
|
), N = l?.has_completed_cash_flow_onboarding && !!e;
|
4886
4886
|
return S ? /* @__PURE__ */ t(R, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: i > 610 ? /* @__PURE__ */ d(
|
4887
4887
|
b,
|
@@ -4893,7 +4893,7 @@ const Ei = () => {
|
|
4893
4893
|
px: 24,
|
4894
4894
|
children: [
|
4895
4895
|
/* @__PURE__ */ d(b, { pb: 14, pt: 12, children: [
|
4896
|
-
/* @__PURE__ */ t(qe, { amount:
|
4896
|
+
/* @__PURE__ */ t(qe, { amount: v, variant: "H2" }),
|
4897
4897
|
/* @__PURE__ */ t(X, { variant: "XSmall", whiteSpace: "nowrap", children: T(
|
4898
4898
|
c.total_cash_accounts,
|
4899
4899
|
h.length
|
@@ -4901,7 +4901,7 @@ const Ei = () => {
|
|
4901
4901
|
] }),
|
4902
4902
|
/* @__PURE__ */ t(b, { pt: 18, children: /* @__PURE__ */ t($, { name: "remove" }) }),
|
4903
4903
|
/* @__PURE__ */ d(b, { pb: 14, pt: 12, children: [
|
4904
|
-
/* @__PURE__ */ t(qe, { amount:
|
4904
|
+
/* @__PURE__ */ t(qe, { amount: w, variant: "H2" }),
|
4905
4905
|
/* @__PURE__ */ t(X, { variant: "XSmall", whiteSpace: "nowrap", children: T(c.expenses_due, _.length) })
|
4906
4906
|
] }),
|
4907
4907
|
/* @__PURE__ */ t(b, { pt: 18, children: /* @__PURE__ */ t($, { name: "equal" }) }),
|
@@ -4937,7 +4937,7 @@ const Ei = () => {
|
|
4937
4937
|
/* @__PURE__ */ t(F, {}),
|
4938
4938
|
/* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
4939
4939
|
/* @__PURE__ */ t(f, { variant: "Small", children: T(c.expenses_due, _.length) }),
|
4940
|
-
/* @__PURE__ */ t(qe, { amount:
|
4940
|
+
/* @__PURE__ */ t(qe, { amount: w, bold: !0, symbol: "-", variant: "XSmall" })
|
4941
4941
|
] }),
|
4942
4942
|
/* @__PURE__ */ t(F, {}),
|
4943
4943
|
/* @__PURE__ */ t(
|
@@ -6105,9 +6105,7 @@ const Qh = ({ transaction: e, onClick: n }) => {
|
|
6105
6105
|
width: l = "100%",
|
6106
6106
|
zeroState: u = /* @__PURE__ */ t(eg, {})
|
6107
6107
|
}) => {
|
6108
|
-
const { isLoading: _, sortedTransactions: h } = Le()
|
6109
|
-
console.log("isLoading", _);
|
6110
|
-
const m = g.useMemo(() => {
|
6108
|
+
const { isLoading: _, sortedTransactions: h } = Le(), m = g.useMemo(() => {
|
6111
6109
|
const I = n ? h.filter(n) : h;
|
6112
6110
|
return c ? I : I.filter((N) => !N.is_hidden);
|
6113
6111
|
}, [h, c]), { clearExpandedSplits: p, setShowInsights: C, toggleSplit: S } = Dt(), { onEvent: y } = z(), E = (I) => {
|
@@ -6120,25 +6118,25 @@ const Qh = ({ transaction: e, onClick: n }) => {
|
|
6120
6118
|
account_guid: N?.account_guid,
|
6121
6119
|
transaction_guid: I
|
6122
6120
|
}), o?.(I);
|
6123
|
-
},
|
6121
|
+
}, v = g.useRef(null), w = ec({
|
6124
6122
|
count: m.length,
|
6125
|
-
getScrollElement: () =>
|
6123
|
+
getScrollElement: () => v.current,
|
6126
6124
|
estimateSize: (I) => Hr + (Br(I, m) ? Pr : 0),
|
6127
6125
|
overscan: 5
|
6128
6126
|
});
|
6129
|
-
return g.useEffect(() =>
|
6127
|
+
return g.useEffect(() => w.measure(), [m]), g.useEffect(() => C(r), [r]), g.useEffect(() => () => p(), []), /* @__PURE__ */ t(ce, { sx: { width: l }, children: /* @__PURE__ */ t(R, { height: i, overflow: "auto", ref: v, width: l, children: /* @__PURE__ */ d(
|
6130
6128
|
R,
|
6131
6129
|
{
|
6132
6130
|
height: (
|
6133
6131
|
// set the height to auto when there are no transactions so the zero state isn't set to 0
|
6134
|
-
|
6132
|
+
w.getVirtualItems().length === 0 ? "auto" : w.getTotalSize()
|
6135
6133
|
),
|
6136
6134
|
position: "relative",
|
6137
6135
|
width: "100%",
|
6138
6136
|
children: [
|
6139
6137
|
(_ || s) && a,
|
6140
|
-
!_ && !s &&
|
6141
|
-
!_ && !s &&
|
6138
|
+
!_ && !s && w.getVirtualItems().length === 0 && u,
|
6139
|
+
!_ && !s && w.getVirtualItems().length > 0 && w.getVirtualItems().map((I) => {
|
6142
6140
|
const N = m[I.index], L = Br(I.index, m), O = tg(I.index, m), M = Hr + (L ? Pr : 0);
|
6143
6141
|
return /* @__PURE__ */ d(
|
6144
6142
|
R,
|
@@ -6465,7 +6463,7 @@ const hg = ({
|
|
6465
6463
|
showSelected: s,
|
6466
6464
|
unselectable: c,
|
6467
6465
|
unselectableText: l
|
6468
|
-
} = Sn(), { categories: u } = A(), { onEvent: _ } = z(), [h, m] = g.useState(!1), [p, C] = g.useState(!1), S = !!n.revision, y = n.guid === a, E = !c.some((
|
6466
|
+
} = Sn(), { categories: u } = A(), { onEvent: _ } = z(), [h, m] = g.useState(!1), [p, C] = g.useState(!1), S = !!n.revision, y = n.guid === a, E = !c.some((w) => w === n.guid);
|
6469
6467
|
return /* @__PURE__ */ d(
|
6470
6468
|
j,
|
6471
6469
|
{
|
@@ -6904,7 +6902,7 @@ const Lc = ({ transaction: e }) => {
|
|
6904
6902
|
});
|
6905
6903
|
}, p = (y) => {
|
6906
6904
|
if (e.is_manual && !e.guid) {
|
6907
|
-
const E = a.find((
|
6905
|
+
const E = a.find((v) => v.guid === y);
|
6908
6906
|
s({
|
6909
6907
|
...e,
|
6910
6908
|
category: E?.name,
|
@@ -7459,13 +7457,13 @@ const Lc = ({ transaction: e }) => {
|
|
7459
7457
|
const k = C[G], U = [...C];
|
7460
7458
|
U.splice(G, 1), U[0].amount += k.amount, S(U);
|
7461
7459
|
}
|
7462
|
-
},
|
7460
|
+
}, v = (G, k) => {
|
7463
7461
|
const U = [...C];
|
7464
7462
|
U[G].amount = k, U[0].amount = e.amount - U.reduce(
|
7465
7463
|
(V, ae, ne) => V + (ne !== 0 ? ae.amount : 0),
|
7466
7464
|
0
|
7467
7465
|
), S(U);
|
7468
|
-
},
|
7466
|
+
}, w = (G, k) => {
|
7469
7467
|
const U = [...C], V = c.find((ae) => ae.guid === k);
|
7470
7468
|
V && (U[G] = {
|
7471
7469
|
...U[G],
|
@@ -7524,9 +7522,9 @@ const Lc = ({ transaction: e }) => {
|
|
7524
7522
|
Kg,
|
7525
7523
|
{
|
7526
7524
|
onAddSplit: y,
|
7527
|
-
onCategoryChanged:
|
7525
|
+
onCategoryChanged: w,
|
7528
7526
|
onDeleteSplit: E,
|
7529
|
-
onUpdateAmount:
|
7527
|
+
onUpdateAmount: v,
|
7530
7528
|
splits: C,
|
7531
7529
|
transaction: e
|
7532
7530
|
}
|
@@ -7651,9 +7649,9 @@ const Lc = ({ transaction: e }) => {
|
|
7651
7649
|
g.useEffect(() => {
|
7652
7650
|
S(m.length > 40 ? c.tags_error_name_must_be_40_chars : "");
|
7653
7651
|
}, [m]);
|
7654
|
-
const
|
7652
|
+
const v = () => {
|
7655
7653
|
a(Q.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), p(i.name), u(!0);
|
7656
|
-
},
|
7654
|
+
}, w = () => {
|
7657
7655
|
a(Q.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), h(!0);
|
7658
7656
|
};
|
7659
7657
|
return /* @__PURE__ */ d(
|
@@ -7668,7 +7666,7 @@ const Lc = ({ transaction: e }) => {
|
|
7668
7666
|
{
|
7669
7667
|
"aria-label": `Edit ${i.name} tag`,
|
7670
7668
|
color: "secondary",
|
7671
|
-
onClick:
|
7669
|
+
onClick: v,
|
7672
7670
|
children: /* @__PURE__ */ t(m_, { color: "secondary" })
|
7673
7671
|
}
|
7674
7672
|
),
|
@@ -7677,7 +7675,7 @@ const Lc = ({ transaction: e }) => {
|
|
7677
7675
|
{
|
7678
7676
|
"aria-label": `Delete ${i.name} tag`,
|
7679
7677
|
color: "secondary",
|
7680
|
-
onClick:
|
7678
|
+
onClick: w,
|
7681
7679
|
children: /* @__PURE__ */ t(sa, { color: "secondary" })
|
7682
7680
|
}
|
7683
7681
|
)
|
@@ -7770,7 +7768,7 @@ const Lc = ({ transaction: e }) => {
|
|
7770
7768
|
await a(_, e.guid), await o({ ...e, tags: _ }), n(H.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: e.guid }), u(!1);
|
7771
7769
|
}, C = g.useMemo(
|
7772
7770
|
() => e.tags.map(
|
7773
|
-
(S, y, E) => `${i.find((
|
7771
|
+
(S, y, E) => `${i.find((v) => v.guid === S)?.name}${y < E.length - 1 ? " / " : ""}`
|
7774
7772
|
),
|
7775
7773
|
[i, e]
|
7776
7774
|
);
|
@@ -8118,7 +8116,7 @@ const Lc = ({ transaction: e }) => {
|
|
8118
8116
|
selectedAccountGuids: C,
|
8119
8117
|
setDisplayedDate: S,
|
8120
8118
|
setSelectedAccounts: y
|
8121
|
-
} = le(), { isDesktop: E, isTablet:
|
8119
|
+
} = le(), { isDesktop: E, isTablet: v } = Ce(), w = Te(), {
|
8122
8120
|
addTransaction: I,
|
8123
8121
|
filter: N,
|
8124
8122
|
loadAssociatedBeats: L,
|
@@ -8184,7 +8182,7 @@ const Lc = ({ transaction: e }) => {
|
|
8184
8182
|
if (!m || !p || !Pe)
|
8185
8183
|
return /* @__PURE__ */ t(de, {});
|
8186
8184
|
const Ha = [];
|
8187
|
-
return !s && (E ||
|
8185
|
+
return !s && (E || v) && Ha.push({
|
8188
8186
|
iconName: "open_in_new",
|
8189
8187
|
label: _.export_csv_btn,
|
8190
8188
|
onClick: ka
|
@@ -8217,8 +8215,8 @@ const Lc = ({ transaction: e }) => {
|
|
8217
8215
|
R,
|
8218
8216
|
{
|
8219
8217
|
sx: {
|
8220
|
-
[
|
8221
|
-
[
|
8218
|
+
[w.breakpoints.down("md")]: { display: "none" },
|
8219
|
+
[w.breakpoints.up("md")]: { display: "block" }
|
8222
8220
|
},
|
8223
8221
|
children: /* @__PURE__ */ t(
|
8224
8222
|
ug,
|
@@ -8244,8 +8242,8 @@ const Lc = ({ transaction: e }) => {
|
|
8244
8242
|
R,
|
8245
8243
|
{
|
8246
8244
|
sx: {
|
8247
|
-
[
|
8248
|
-
[
|
8245
|
+
[w.breakpoints.down("md")]: { display: "block" },
|
8246
|
+
[w.breakpoints.up("md")]: { display: "none" }
|
8249
8247
|
},
|
8250
8248
|
children: /* @__PURE__ */ t(
|
8251
8249
|
Gn,
|
@@ -8449,15 +8447,15 @@ const Lc = ({ transaction: e }) => {
|
|
8449
8447
|
s({
|
8450
8448
|
accounts: a,
|
8451
8449
|
dateRange: { start: Ft(Ae(), 90), end: je(Ae()) },
|
8452
|
-
custom: (
|
8450
|
+
custom: (w) => w.repeating_transaction_guid === n.guid
|
8453
8451
|
});
|
8454
8452
|
}, [n]);
|
8455
8453
|
const S = g.useMemo(
|
8456
|
-
() => c.find((
|
8454
|
+
() => c.find((w) => w.guid === p),
|
8457
8455
|
[p, c]
|
8458
8456
|
), y = n.repeating_transaction_type === cn.Income, E = async () => {
|
8459
8457
|
await r(n.guid), e();
|
8460
|
-
},
|
8458
|
+
}, v = () => {
|
8461
8459
|
m(!0), o(H.RECURRING_TRANSACTIONS_DETAILS_CLICK_DELETE);
|
8462
8460
|
};
|
8463
8461
|
return /* @__PURE__ */ d(b, { bgcolor: "background.default", direction: "column", height: "100%", children: [
|
@@ -8511,7 +8509,7 @@ const Lc = ({ transaction: e }) => {
|
|
8511
8509
|
te,
|
8512
8510
|
{
|
8513
8511
|
color: "error",
|
8514
|
-
onClick:
|
8512
|
+
onClick: v,
|
8515
8513
|
startIcon: /* @__PURE__ */ t($s, {}),
|
8516
8514
|
sx: { mx: 24, my: 16 },
|
8517
8515
|
variant: "text",
|
@@ -8563,58 +8561,50 @@ const Lc = ({ transaction: e }) => {
|
|
8563
8561
|
merchantGuid: n.merchant_guid
|
8564
8562
|
}
|
8565
8563
|
) }),
|
8566
|
-
/* @__PURE__ */ t(se, { children: /* @__PURE__ */ d(
|
8567
|
-
b,
|
8568
|
-
|
8569
|
-
direction: "row",
|
8570
|
-
|
8571
|
-
|
8572
|
-
|
8573
|
-
|
8574
|
-
|
8575
|
-
|
8576
|
-
|
8577
|
-
|
8578
|
-
|
8579
|
-
|
8580
|
-
|
8581
|
-
|
8582
|
-
|
8583
|
-
|
8584
|
-
|
8585
|
-
|
8586
|
-
|
8587
|
-
|
8588
|
-
|
8589
|
-
|
8590
|
-
|
8591
|
-
|
8592
|
-
|
8593
|
-
|
8594
|
-
|
8595
|
-
|
8596
|
-
|
8597
|
-
|
8598
|
-
|
8599
|
-
|
8600
|
-
|
8601
|
-
|
8602
|
-
|
8603
|
-
|
8604
|
-
|
8605
|
-
|
8606
|
-
|
8607
|
-
|
8608
|
-
|
8609
|
-
|
8610
|
-
},
|
8611
|
-
children: /* @__PURE__ */ t(f, { bold: !0, color: "text.secondary", variant: "caption", children: l })
|
8612
|
-
}
|
8613
|
-
)
|
8614
|
-
] })
|
8615
|
-
]
|
8616
|
-
}
|
8617
|
-
) })
|
8564
|
+
/* @__PURE__ */ t(se, { children: /* @__PURE__ */ d(b, { direction: "row", gap: 4, sx: { justifyContent: "space-between" }, children: [
|
8565
|
+
/* @__PURE__ */ d(b, { direction: "column", sx: { width: "50%" }, children: [
|
8566
|
+
/* @__PURE__ */ t(f, { bold: !0, variant: "body1", children: n.description }),
|
8567
|
+
/* @__PURE__ */ d(b, { alignItems: "center", direction: "row", gap: 6, children: [
|
8568
|
+
n.account?.institution_guid && /* @__PURE__ */ t(
|
8569
|
+
At,
|
8570
|
+
{
|
8571
|
+
alt: s,
|
8572
|
+
institutionGuid: n.account?.institution_guid,
|
8573
|
+
size: 12
|
8574
|
+
}
|
8575
|
+
),
|
8576
|
+
/* @__PURE__ */ t(f, { variant: "caption", children: s })
|
8577
|
+
] })
|
8578
|
+
] }),
|
8579
|
+
/* @__PURE__ */ d(b, { alignItems: "flex-end", sx: { width: "50%" }, children: [
|
8580
|
+
/* @__PURE__ */ d(
|
8581
|
+
f,
|
8582
|
+
{
|
8583
|
+
bold: !0,
|
8584
|
+
color: c ? "success.main" : "text.primary",
|
8585
|
+
variant: "body1",
|
8586
|
+
children: [
|
8587
|
+
c ? "+" : "",
|
8588
|
+
P(n.amount, "0,0.00")
|
8589
|
+
]
|
8590
|
+
}
|
8591
|
+
),
|
8592
|
+
/* @__PURE__ */ t(
|
8593
|
+
b,
|
8594
|
+
{
|
8595
|
+
direction: "row",
|
8596
|
+
sx: {
|
8597
|
+
alignItems: "center",
|
8598
|
+
gap: 6,
|
8599
|
+
justifyContent: "flex-end",
|
8600
|
+
textTransform: "uppercase",
|
8601
|
+
width: "100%"
|
8602
|
+
},
|
8603
|
+
children: /* @__PURE__ */ t(f, { bold: !0, color: "text.secondary", variant: "caption", children: l })
|
8604
|
+
}
|
8605
|
+
)
|
8606
|
+
] })
|
8607
|
+
] }) })
|
8618
8608
|
] }),
|
8619
8609
|
/* @__PURE__ */ t(
|
8620
8610
|
re,
|
@@ -8696,33 +8686,33 @@ const Lc = ({ transaction: e }) => {
|
|
8696
8686
|
label: n,
|
8697
8687
|
onAddRecurringTransaction: i = () => null
|
8698
8688
|
}) => {
|
8699
|
-
const { recurring: a } = A(), { filter: o, setFilter: r, transactions: s } = Le(), { addRepeatingTransaction: c } = rt(), { user: l } = ft(), [u, _] = g.useState(!1), [h, m] = g.useState(""), [p, C] = g.useState(Ee.EveryMonth), [S, y] = g.useState(1), [E,
|
8689
|
+
const { recurring: a } = A(), { filter: o, setFilter: r, transactions: s } = Le(), { addRepeatingTransaction: c } = rt(), { user: l } = ft(), [u, _] = g.useState(!1), [h, m] = g.useState(""), [p, C] = g.useState(Ee.EveryMonth), [S, y] = g.useState(1), [E, v] = g.useState(15), w = g.useMemo(
|
8700
8690
|
() => s.find((O) => O.guid === h),
|
8701
8691
|
[h, s]
|
8702
8692
|
), I = () => {
|
8703
8693
|
_(!0), r(e ? { ...o, custom: Gi } : { ...o, custom: ro });
|
8704
8694
|
}, N = async () => {
|
8705
|
-
if (!
|
8695
|
+
if (!w) {
|
8706
8696
|
L();
|
8707
8697
|
return;
|
8708
8698
|
}
|
8709
8699
|
i();
|
8710
|
-
const O = io(p, ze(
|
8711
|
-
account_guid:
|
8712
|
-
amount:
|
8700
|
+
const O = io(p, ze(w.date)), M = {
|
8701
|
+
account_guid: w.account_guid,
|
8702
|
+
amount: w.amount,
|
8713
8703
|
created_by: 0,
|
8714
8704
|
// User
|
8715
|
-
merchant_guid:
|
8716
|
-
description:
|
8705
|
+
merchant_guid: w.merchant_guid,
|
8706
|
+
description: w.payee || w.description || w.feed_description,
|
8717
8707
|
predicted_occurs_on: ya(O, { representation: "date" }),
|
8718
8708
|
recurrence_day: S,
|
8719
8709
|
recurrence_type: p,
|
8720
8710
|
repeating_transaction_type: e ? cn.Income : cn.Bill,
|
8721
8711
|
second_recurrence_day: E,
|
8722
|
-
transaction_type:
|
8712
|
+
transaction_type: w.transaction_type,
|
8723
8713
|
user_guid: l.guid
|
8724
8714
|
};
|
8725
|
-
await c(M,
|
8715
|
+
await c(M, w), L();
|
8726
8716
|
}, L = () => {
|
8727
8717
|
m(""), _(!1);
|
8728
8718
|
};
|
@@ -8765,16 +8755,16 @@ const Lc = ({ transaction: e }) => {
|
|
8765
8755
|
onClose: () => m(""),
|
8766
8756
|
onPrimaryAction: N,
|
8767
8757
|
title: e ? a.income_details : a.expense_details,
|
8768
|
-
children:
|
8758
|
+
children: w && /* @__PURE__ */ t(
|
8769
8759
|
$c,
|
8770
8760
|
{
|
8771
8761
|
firstDay: S,
|
8772
8762
|
frequency: p,
|
8773
8763
|
onFirstDayChange: y,
|
8774
8764
|
onFrequencyChange: C,
|
8775
|
-
onSecondDayChange:
|
8765
|
+
onSecondDayChange: v,
|
8776
8766
|
secondDay: E,
|
8777
|
-
transaction:
|
8767
|
+
transaction: w
|
8778
8768
|
}
|
8779
8769
|
)
|
8780
8770
|
}
|
@@ -8782,37 +8772,37 @@ const Lc = ({ transaction: e }) => {
|
|
8782
8772
|
] });
|
8783
8773
|
}
|
8784
8774
|
), Cm = x(() => {
|
8785
|
-
const { recurring: e } = A(), { repeatingTransactions: n } = rt(), { onEvent: i } = z(), a = (
|
8775
|
+
const { recurring: e } = A(), { repeatingTransactions: n } = rt(), { onEvent: i } = z(), a = (s) => {
|
8786
8776
|
i(H.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
8787
|
-
repeating_transaction_guid:
|
8777
|
+
repeating_transaction_guid: s.guid
|
8788
8778
|
});
|
8789
8779
|
}, o = () => {
|
8790
8780
|
i(H.RECURRING_TRANSACTIONS_CLICK_ADD_EXPENSE);
|
8791
|
-
}
|
8781
|
+
}, r = n.filter(
|
8782
|
+
(s) => s.repeating_transaction_type !== cn.Income && (s.transactions.length > 0 || s.recurrence_type === Ee.EveryYear)
|
8783
|
+
);
|
8792
8784
|
return /* @__PURE__ */ d(ce, { sx: { bgcolor: "background.paper" }, children: [
|
8793
|
-
|
8794
|
-
|
8795
|
-
|
8796
|
-
|
8797
|
-
/* @__PURE__ */ t(F, { variant: s < n.length - 1 ? "inset" : "fullWidth" })
|
8798
|
-
] }, r.guid)),
|
8785
|
+
r.map((s, c) => /* @__PURE__ */ d(g.Fragment, { children: [
|
8786
|
+
/* @__PURE__ */ t(Fc, { onClick: a, repeatingTransaction: s }),
|
8787
|
+
/* @__PURE__ */ t(F, { variant: c < r.length - 1 ? "inset" : "fullWidth" })
|
8788
|
+
] }, s.guid)),
|
8799
8789
|
/* @__PURE__ */ t(Vc, { label: e.add_expense, onAddRecurringTransaction: o })
|
8800
8790
|
] });
|
8801
8791
|
}), Po = x(() => {
|
8802
|
-
const { recurring: e } = A(), { repeatingTransactions: n } = rt(), { onEvent: i } = z(), a = (
|
8792
|
+
const { recurring: e } = A(), { repeatingTransactions: n } = rt(), { onEvent: i } = z(), a = (s) => {
|
8803
8793
|
i(H.RECURRING_TRANSACTIONS_CLICK_INCOME, {
|
8804
|
-
repeating_transaction_guid:
|
8794
|
+
repeating_transaction_guid: s.guid
|
8805
8795
|
});
|
8806
8796
|
}, o = () => {
|
8807
8797
|
i(H.RECURRING_TRANSACTIONS_CLICK_ADD_INCOME);
|
8808
|
-
}
|
8798
|
+
}, r = n.filter(
|
8799
|
+
(s) => s.repeating_transaction_type === cn.Income && (s.transactions.length > 0 || s.recurrence_type === Ee.EveryYear)
|
8800
|
+
);
|
8809
8801
|
return /* @__PURE__ */ d(ce, { sx: { bgcolor: "background.paper" }, children: [
|
8810
|
-
|
8811
|
-
|
8812
|
-
|
8813
|
-
|
8814
|
-
/* @__PURE__ */ t(F, { variant: s < n.length - 1 ? "inset" : "fullWidth" })
|
8815
|
-
] }, r.guid)),
|
8802
|
+
r.map((s, c) => /* @__PURE__ */ d(g.Fragment, { children: [
|
8803
|
+
/* @__PURE__ */ t(Fc, { onClick: a, repeatingTransaction: s }),
|
8804
|
+
/* @__PURE__ */ t(F, { variant: c < r.length - 1 ? "inset" : "fullWidth" })
|
8805
|
+
] }, s.guid)),
|
8816
8806
|
/* @__PURE__ */ t(
|
8817
8807
|
Vc,
|
8818
8808
|
{
|
@@ -9217,8 +9207,8 @@ const Lc = ({ transaction: e }) => {
|
|
9217
9207
|
setDateRange: S,
|
9218
9208
|
upcomingExpenseTotal: y,
|
9219
9209
|
upcomingIncomeTotal: E,
|
9220
|
-
upcomingRecurrences:
|
9221
|
-
} = rt(), [
|
9210
|
+
upcomingRecurrences: v
|
9211
|
+
} = rt(), [w, I] = g.useState(0), N = ot(s.start, /* @__PURE__ */ new Date()), L = (U, V) => {
|
9222
9212
|
I(V);
|
9223
9213
|
}, O = (U) => {
|
9224
9214
|
a(H.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
@@ -9287,12 +9277,12 @@ const Lc = ({ transaction: e }) => {
|
|
9287
9277
|
Di,
|
9288
9278
|
{
|
9289
9279
|
onRecurrenceClick: O,
|
9290
|
-
recurrences:
|
9280
|
+
recurrences: v,
|
9291
9281
|
title: e.upcoming_activity
|
9292
9282
|
}
|
9293
9283
|
),
|
9294
9284
|
!n && /* @__PURE__ */ d(b, { children: [
|
9295
|
-
/* @__PURE__ */ d(Vt, { onChange: L, value:
|
9285
|
+
/* @__PURE__ */ d(Vt, { onChange: L, value: w, variant: "fullWidth", children: [
|
9296
9286
|
/* @__PURE__ */ t(
|
9297
9287
|
tt,
|
9298
9288
|
{
|
@@ -9306,14 +9296,14 @@ const Lc = ({ transaction: e }) => {
|
|
9306
9296
|
}
|
9307
9297
|
)
|
9308
9298
|
] }),
|
9309
|
-
|
9299
|
+
w === 0 && /* @__PURE__ */ t(
|
9310
9300
|
Di,
|
9311
9301
|
{
|
9312
9302
|
onRecurrenceClick: O,
|
9313
|
-
recurrences:
|
9303
|
+
recurrences: v
|
9314
9304
|
}
|
9315
9305
|
),
|
9316
|
-
|
9306
|
+
w === 1 && /* @__PURE__ */ t(
|
9317
9307
|
Di,
|
9318
9308
|
{
|
9319
9309
|
onRecurrenceClick: M,
|
@@ -9512,8 +9502,8 @@ const Lc = ({ transaction: e }) => {
|
|
9512
9502
|
missedExpenseTotal: S,
|
9513
9503
|
paidExpenseTotal: y,
|
9514
9504
|
repeatingTransactions: E,
|
9515
|
-
setDateRange:
|
9516
|
-
upcomingExpenseTotal:
|
9505
|
+
setDateRange: v,
|
9506
|
+
upcomingExpenseTotal: w,
|
9517
9507
|
isDataLoaded: I
|
9518
9508
|
} = rt(), { setFilter: N } = Le(), { recurring: L, budgets: O } = A();
|
9519
9509
|
g.useEffect(() => {
|
@@ -9522,7 +9512,7 @@ const Lc = ({ transaction: e }) => {
|
|
9522
9512
|
u && (N({
|
9523
9513
|
dateRange: { start: Ft(Ae(), 90), end: Cn() },
|
9524
9514
|
accounts: _
|
9525
|
-
}),
|
9515
|
+
}), v({ start: Ke(/* @__PURE__ */ new Date()), end: je(/* @__PURE__ */ new Date()) }), m().finally(), i(!0));
|
9526
9516
|
}, [u]), g.useEffect(() => {
|
9527
9517
|
n && a(H.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
9528
9518
|
state: p.length > 0 ? "default" : "zeroState"
|
@@ -9567,7 +9557,7 @@ const Lc = ({ transaction: e }) => {
|
|
9567
9557
|
label: L.missed
|
9568
9558
|
},
|
9569
9559
|
{
|
9570
|
-
amount:
|
9560
|
+
amount: w,
|
9571
9561
|
bgColor: "border.light",
|
9572
9562
|
label: L.upcoming
|
9573
9563
|
}
|
@@ -10536,9 +10526,9 @@ const Hm = ({ recurrence: e }) => /* @__PURE__ */ d(J, { children: [
|
|
10536
10526
|
() => a.filter(qr(o, r)),
|
10537
10527
|
[r, o, a]
|
10538
10528
|
), m = g.useMemo(
|
10539
|
-
() => s.reduce((E,
|
10529
|
+
() => s.reduce((E, v) => E + (v?.balance || 0), 0),
|
10540
10530
|
[s]
|
10541
|
-
), p = _.reduce((E,
|
10531
|
+
), p = _.reduce((E, v) => E + v.amount, 0), C = h.reduce((E, v) => E + v.amount, 0), S = m - p + C, y = e < 725;
|
10542
10532
|
return /* @__PURE__ */ d(b, { sx: { mx: y ? 16 : 0, my: y ? 24 : 42 }, children: [
|
10543
10533
|
/* @__PURE__ */ d(
|
10544
10534
|
b,
|
@@ -10709,7 +10699,7 @@ const Hm = ({ recurrence: e }) => /* @__PURE__ */ d(J, { children: [
|
|
10709
10699
|
transform: rotate(360deg);
|
10710
10700
|
}
|
10711
10701
|
`, Jm = () => {
|
10712
|
-
const { addRepeatingTransaction: e, repeatingTransactions: n } = rt(), { cashflow: i, common: a } = A(), { completeOnboarding: o } = wo(), { isDirty: r } = Ei(), { isMobile: s } = Ce(), { isCopyLoaded: c, setDisplayedDate: l } = le(), { filter: u, setFilter: _, transactions: h } = Le(), m = Te(), [p, C] = It(!0), [S, y] = g.useState(Ee.EveryMonth), [E,
|
10702
|
+
const { addRepeatingTransaction: e, repeatingTransactions: n } = rt(), { cashflow: i, common: a } = A(), { completeOnboarding: o } = wo(), { isDirty: r } = Ei(), { isMobile: s } = Ce(), { isCopyLoaded: c, setDisplayedDate: l } = le(), { filter: u, setFilter: _, transactions: h } = Le(), m = Te(), [p, C] = It(!0), [S, y] = g.useState(Ee.EveryMonth), [E, v] = g.useState(1), [w, I] = g.useState(15), [N, L] = It(!1), [O, M] = It(1), [G, k] = It([]), [U, V] = It(""), ae = g.useMemo(
|
10713
10703
|
() => h.find((ge) => ge.guid === U),
|
10714
10704
|
[U, h]
|
10715
10705
|
), ne = !!n.filter(
|
@@ -10822,10 +10812,10 @@ const Hm = ({ recurrence: e }) => /* @__PURE__ */ d(J, { children: [
|
|
10822
10812
|
bgcolor: "background.paper",
|
10823
10813
|
firstDay: E,
|
10824
10814
|
frequency: S,
|
10825
|
-
onFirstDayChange:
|
10815
|
+
onFirstDayChange: v,
|
10826
10816
|
onFrequencyChange: y,
|
10827
10817
|
onSecondDayChange: I,
|
10828
|
-
secondDay:
|
10818
|
+
secondDay: w,
|
10829
10819
|
transaction: ae
|
10830
10820
|
}
|
10831
10821
|
),
|
@@ -10892,7 +10882,7 @@ const Hm = ({ recurrence: e }) => /* @__PURE__ */ d(J, { children: [
|
|
10892
10882
|
setSelectedAccounts: o,
|
10893
10883
|
shouldDisableNextDate: r,
|
10894
10884
|
shouldDisablePrevDate: s
|
10895
|
-
} = le(), { onEvent: c } = z(), { visibleCashAccounts: l } = Se(), { setFilter: u } = Le(), { userProfile: _ } = ft(), { dateRange: h, setSelectedCashAccounts: m } = Ei(), { loadRepeatingTransactions: p, setDateRange: C } = rt(), { cashflow: S } = A(), { isCopyLoaded: y, isInitialized: E } = le(), [
|
10885
|
+
} = le(), { onEvent: c } = z(), { visibleCashAccounts: l } = Se(), { setFilter: u } = Le(), { userProfile: _ } = ft(), { dateRange: h, setSelectedCashAccounts: m } = Ei(), { loadRepeatingTransactions: p, setDateRange: C } = rt(), { cashflow: S } = A(), { isCopyLoaded: y, isInitialized: E } = le(), [v, w] = g.useState(!1);
|
10896
10886
|
return g.useEffect(() => {
|
10897
10887
|
E && (C(h), p().finally());
|
10898
10888
|
}, [E]), g.useEffect(() => {
|
@@ -10914,7 +10904,7 @@ const Hm = ({ recurrence: e }) => /* @__PURE__ */ d(J, { children: [
|
|
10914
10904
|
label: S.cashflow_settings,
|
10915
10905
|
iconName: "settings",
|
10916
10906
|
onClick: () => {
|
10917
|
-
|
10907
|
+
w(!0), c(H.CASH_FLOW_CLICK_SETTINGS);
|
10918
10908
|
}
|
10919
10909
|
}
|
10920
10910
|
],
|
@@ -10938,8 +10928,8 @@ const Hm = ({ recurrence: e }) => /* @__PURE__ */ d(J, { children: [
|
|
10938
10928
|
re,
|
10939
10929
|
{
|
10940
10930
|
ariaLabelClose: S.close_settings_aria,
|
10941
|
-
isOpen:
|
10942
|
-
onClose: () =>
|
10931
|
+
isOpen: v,
|
10932
|
+
onClose: () => w(!1),
|
10943
10933
|
shouldShowHeaderBorders: !1,
|
10944
10934
|
title: S.cashflow_settings,
|
10945
10935
|
children: /* @__PURE__ */ t(Fo, {})
|
@@ -12376,7 +12366,7 @@ const Yt = (e) => /* @__PURE__ */ t(f, { fontWeight: 600, variant: "Small", chil
|
|
12376
12366
|
id: E,
|
12377
12367
|
priority: $p(y)
|
12378
12368
|
})), [n]), C = (y) => {
|
12379
|
-
const
|
12369
|
+
const w = y.target.closest("[data-id]")?.getAttribute("data-id"), I = n[Number(w)];
|
12380
12370
|
a?.(I?.guid ?? "");
|
12381
12371
|
}, S = (y) => p.find((E) => E.guid === y)?.id;
|
12382
12372
|
return /* @__PURE__ */ t(
|
@@ -12574,10 +12564,10 @@ const Yt = (e) => /* @__PURE__ */ t(f, { fontWeight: 600, variant: "Small", chil
|
|
12574
12564
|
}
|
12575
12565
|
);
|
12576
12566
|
}), Qp = ({ onBackClick: e, sx: n }) => {
|
12577
|
-
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState(!1), [l, u] = g.useState(""), { isDesktop: _, isMobile: h } = Ce(), { debts: m } = A(), { onEvent: p } = z(), { isCopyLoaded: C, isInitialized: S, setSelectedAccounts: y } = le(), { setSelectedAccount: E } = Kt(), { selectedDebtPriority:
|
12567
|
+
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState(!1), [l, u] = g.useState(""), { isDesktop: _, isMobile: h } = Ce(), { debts: m } = A(), { onEvent: p } = z(), { isCopyLoaded: C, isInitialized: S, setSelectedAccounts: y } = le(), { setSelectedAccount: E } = Kt(), { selectedDebtPriority: v, setSelectedDebtChartData: w } = En(), { visibleDebtAccounts: I } = Se(), { goalsLoaded: N, loadGoals: L, monthlyCashFlowProfile: O } = dt(), { debts: M } = Ta(), G = g.useMemo(() => {
|
12578
12568
|
const he = O?.extra_payment ?? 0;
|
12579
|
-
return Zp(M,
|
12580
|
-
}, [M,
|
12569
|
+
return Zp(M, v, he);
|
12570
|
+
}, [M, v, O]);
|
12581
12571
|
g.useEffect(() => {
|
12582
12572
|
y(I), p(H.DEBTS_VIEW);
|
12583
12573
|
}, []), g.useEffect(() => {
|
@@ -12587,7 +12577,7 @@ const Yt = (e) => /* @__PURE__ */ t(f, { fontWeight: 600, variant: "Small", chil
|
|
12587
12577
|
}, [S]);
|
12588
12578
|
const k = (he) => u(he), U = () => {
|
12589
12579
|
const he = I.find((Ge) => Ge.guid === l), xe = G.find((Ge) => Ge.guid === l);
|
12590
|
-
he && E(he), xe &&
|
12580
|
+
he && E(he), xe && w(xe), a(!0);
|
12591
12581
|
}, V = () => p(H.DEBTS_CLICK_FILTER), ae = () => {
|
12592
12582
|
c(!0), p(H.DEBTS_CLICK_SNOWBALL_CTA);
|
12593
12583
|
}, ne = () => {
|
@@ -12866,18 +12856,18 @@ const i1 = ({ list: e, onClickItem: n }) => /* @__PURE__ */ t(R, { sx: { bgcolor
|
|
12866
12856
|
o,
|
12867
12857
|
a,
|
12868
12858
|
n
|
12869
|
-
), [E,
|
12859
|
+
), [E, v] = r1(
|
12870
12860
|
S,
|
12871
12861
|
y,
|
12872
12862
|
n,
|
12873
12863
|
h,
|
12874
12864
|
_
|
12875
|
-
),
|
12865
|
+
), w = Ot.arc().innerRadius(l).outerRadius(u).startAngle(S).endAngle(y).padAngle(0.02).cornerRadius(8), I = Ot.arc().innerRadius(l).outerRadius(u).startAngle(E).endAngle(v).padAngle(0.02).cornerRadius(8);
|
12876
12866
|
return /* @__PURE__ */ d(J, { children: [
|
12877
12867
|
/* @__PURE__ */ t(
|
12878
12868
|
"path",
|
12879
12869
|
{
|
12880
|
-
d:
|
12870
|
+
d: w({}),
|
12881
12871
|
fill: m ? p.palette.divider : i
|
12882
12872
|
}
|
12883
12873
|
),
|
@@ -12910,7 +12900,7 @@ const i1 = ({ list: e, onClickItem: n }) => /* @__PURE__ */ t(R, { sx: { bgcolor
|
|
12910
12900
|
footerRightContent: _,
|
12911
12901
|
isFinacialStrengthGraph: h = !1
|
12912
12902
|
}) => {
|
12913
|
-
const m = Ze(), p = -Math.PI / 1.35, C = Math.PI / 1.35, S = C - p, y = S / (r - o), E = (n - o) * y,
|
12903
|
+
const m = Ze(), p = -Math.PI / 1.35, C = Math.PI / 1.35, S = C - p, y = S / (r - o), E = (n - o) * y, v = p + E + 0.02, w = i !== "SM" ? 0.1 : 0.12, I = e, N = e * (1 - w), L = I * 2.5, O = L / 2, M = L / 2, G = (N + I) / 2, k = n !== 25 && n !== 50 && n !== 75 && n !== 100 ? 0 : 0.12, [U, V] = s1(G, v, k), ae = n / 25, ne = {
|
12914
12904
|
L: { markerSize: 12, healthScoreFontSize: 64 },
|
12915
12905
|
M: { markerSize: 10, healthScoreFontSize: 48 },
|
12916
12906
|
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
@@ -12959,7 +12949,7 @@ const i1 = ({ list: e, onClickItem: n }) => /* @__PURE__ */ t(R, { sx: { bgcolor
|
|
12959
12949
|
innerArcRadius: N,
|
12960
12950
|
isFinacialStrengthGraph: h,
|
12961
12951
|
outterArcRadius: I,
|
12962
|
-
progressEndAngle:
|
12952
|
+
progressEndAngle: v,
|
12963
12953
|
totalAngularSpan: S,
|
12964
12954
|
unitsPerSegment: ae
|
12965
12955
|
}
|
@@ -14122,10 +14112,10 @@ const Ra = ({
|
|
14122
14112
|
) })
|
14123
14113
|
] }) : /* @__PURE__ */ t(de, {});
|
14124
14114
|
}, L1 = x(O1), M1 = ({ onBackClick: e, sx: n }) => {
|
14125
|
-
const i = Ze(), { visibleAccounts: a } = Se(), { dateRange: o, isDataLoaded: r, loadBudgetData: s, setTheme: c } = ut(), { reloadCategoryTotals: l } = Ve(), { augmentedChartData: u, calculateHealthScore: _, healthScore: h, loadAugmentedChartData: m } = yi(), { finstrong: p, connect: C } = A(), { isCopyLoaded: S, isInitialized: y, selectedAccounts: E, setSelectedAccounts:
|
14115
|
+
const i = Ze(), { visibleAccounts: a } = Se(), { dateRange: o, isDataLoaded: r, loadBudgetData: s, setTheme: c } = ut(), { reloadCategoryTotals: l } = Ve(), { augmentedChartData: u, calculateHealthScore: _, healthScore: h, loadAugmentedChartData: m } = yi(), { finstrong: p, connect: C } = A(), { isCopyLoaded: S, isInitialized: y, selectedAccounts: E, setSelectedAccounts: v } = le(), { isMobile: w } = Ce(), [I, N] = g.useState(!1);
|
14126
14116
|
g.useEffect(() => {
|
14127
14117
|
c(i);
|
14128
|
-
}, []), g.useEffect(() =>
|
14118
|
+
}, []), g.useEffect(() => v(a), [a]), g.useEffect(() => {
|
14129
14119
|
y && (_().finally(), m().finally());
|
14130
14120
|
}, [y]), g.useEffect(() => {
|
14131
14121
|
y && (l(E, o.start, o.end), r || s());
|
@@ -14158,7 +14148,7 @@ const Ra = ({
|
|
14158
14148
|
flexDirection: { md: "row" },
|
14159
14149
|
gap: 24,
|
14160
14150
|
justifyContent: "center",
|
14161
|
-
pt:
|
14151
|
+
pt: w ? 24 : 16,
|
14162
14152
|
px: 24
|
14163
14153
|
},
|
14164
14154
|
children: [
|
@@ -15057,18 +15047,18 @@ const G1 = (e, n) => {
|
|
15057
15047
|
), C = i.filter(
|
15058
15048
|
(y) => !r.find((E) => E.account_guid === y.guid)
|
15059
15049
|
), S = async (y) => {
|
15060
|
-
const E = y.map((
|
15061
|
-
account_guid:
|
15050
|
+
const E = y.map((v) => ({
|
15051
|
+
account_guid: v.guid,
|
15062
15052
|
retirement_goal_guid: e.guid
|
15063
15053
|
}));
|
15064
15054
|
if (m)
|
15065
15055
|
l(E);
|
15066
15056
|
else
|
15067
|
-
for (const
|
15068
|
-
await a(
|
15057
|
+
for (const v of E)
|
15058
|
+
await a(v), c(n.alert_account_added);
|
15069
15059
|
u({
|
15070
15060
|
...s,
|
15071
|
-
current_amount: y.reduce((
|
15061
|
+
current_amount: y.reduce((v, w) => v + (w.balance || 0), 0)
|
15072
15062
|
}), h(!1);
|
15073
15063
|
};
|
15074
15064
|
return /* @__PURE__ */ d(b, { children: [
|
@@ -15151,16 +15141,16 @@ const G1 = (e, n) => {
|
|
15151
15141
|
setAlert: h,
|
15152
15142
|
setSelectedGoal: m,
|
15153
15143
|
updateGoal: p
|
15154
|
-
} = dt(), { user: C } = ft(), [S, y] = g.useState(!1), E = !_?.guid,
|
15144
|
+
} = dt(), { user: C } = ft(), [S, y] = g.useState(!1), E = !_?.guid, v = _?.track_type === K.SAVINGS_TRACK && _.is_complete && !_.has_been_spent, w = g.useMemo(() => {
|
15155
15145
|
const k = E ? l : u;
|
15156
15146
|
return n.filter((U) => k.some((V) => V.account_guid === U.guid));
|
15157
15147
|
}, [E, n, l, u]), I = g.useMemo(() => {
|
15158
15148
|
if (!_) return !1;
|
15159
15149
|
const { account_guid: k, track_type: U, name: V, amount: ae, retirement_age: ne } = _;
|
15160
|
-
return U === K.SAVINGS_TRACK ? k ? !!V && !!ae : !1 : U === K.RETIREMENT_TRACK ?
|
15161
|
-
}, [_,
|
15150
|
+
return U === K.SAVINGS_TRACK ? k ? !!V && !!ae : !1 : U === K.RETIREMENT_TRACK ? w.length ? !!V && !!ae && !!ne && !!C.birthday : !1 : !0;
|
15151
|
+
}, [_, w, C.birthday]);
|
15162
15152
|
let N = a.delete_button, L = () => y(!0);
|
15163
|
-
E ? (L = () => O(), N = a.save_button) :
|
15153
|
+
E ? (L = () => O(), N = a.save_button) : v && (L = () => G(), N = i.mark_as_complete_button);
|
15164
15154
|
const O = async () => {
|
15165
15155
|
if (_) {
|
15166
15156
|
const k = _.track_type;
|
@@ -15185,7 +15175,7 @@ const G1 = (e, n) => {
|
|
15185
15175
|
isPrimaryDisabled: !I,
|
15186
15176
|
onClose: () => m(void 0),
|
15187
15177
|
onPrimaryAction: L,
|
15188
|
-
primaryColor: E ||
|
15178
|
+
primaryColor: E || v ? "primary" : "error",
|
15189
15179
|
primaryText: N,
|
15190
15180
|
secondaryColor: "primary",
|
15191
15181
|
title: i.goal_details,
|
@@ -15207,7 +15197,7 @@ const G1 = (e, n) => {
|
|
15207
15197
|
)
|
15208
15198
|
] });
|
15209
15199
|
}), D2 = x(({ onBackClick: e, sx: n }) => {
|
15210
|
-
const { onEvent: i } = z(), { isMobile: a } = Ce(), { visibleAccounts: o } = Se(), { isCopyLoaded: r, isInitialized: s, setSelectedAccounts: c } = le(), { goals: l, common: u } = A(), { alert: _, goals: h, goalsLoaded: m, loadGoals: p, monthlyCashFlowProfile: C, setAlert: S, retirmentGoals: y } = dt(), [E,
|
15200
|
+
const { onEvent: i } = z(), { isMobile: a } = Ce(), { visibleAccounts: o } = Se(), { isCopyLoaded: r, isInitialized: s, setSelectedAccounts: c } = le(), { goals: l, common: u } = A(), { alert: _, goals: h, goalsLoaded: m, loadGoals: p, monthlyCashFlowProfile: C, setAlert: S, retirmentGoals: y } = dt(), [E, v] = g.useState(0), [w, I] = g.useState(!1), N = C?.amount_allocated_for_savings_goals || 0, L = C?.amount_allocated_for_debt_goals || 0, O = C?.amount_allocated_for_retirement_goals || 0, M = r ? T(
|
15211
15201
|
a ? l.tab_subtitle_mobile : l.tab_subtitle,
|
15212
15202
|
P(N, "0,0")
|
15213
15203
|
) : "", G = r ? T(
|
@@ -15227,7 +15217,7 @@ const G1 = (e, n) => {
|
|
15227
15217
|
}, V = () => {
|
15228
15218
|
I(!0), i(H.GOALS_CLICK_ADD);
|
15229
15219
|
}, ae = (he) => {
|
15230
|
-
I(!1), he === K.SAVINGS_TRACK ?
|
15220
|
+
I(!1), he === K.SAVINGS_TRACK ? v(0) : he === K.DEBT_TRACK ? v(1) : he === K.RETIREMENT_TRACK && v(2);
|
15231
15221
|
}, ne = g.useMemo(
|
15232
15222
|
() => m && (h.length === 0 || h.every(({ track_type: he }) => !he) && y.length === 0),
|
15233
15223
|
[h, m, y]
|
@@ -15252,7 +15242,7 @@ const G1 = (e, n) => {
|
|
15252
15242
|
/* @__PURE__ */ d(
|
15253
15243
|
Vt,
|
15254
15244
|
{
|
15255
|
-
onChange: (he, xe) =>
|
15245
|
+
onChange: (he, xe) => v(xe),
|
15256
15246
|
sx: { bgcolor: "background.paper" },
|
15257
15247
|
textColor: "primary",
|
15258
15248
|
value: ne ? !1 : E,
|
@@ -15308,7 +15298,7 @@ const G1 = (e, n) => {
|
|
15308
15298
|
re,
|
15309
15299
|
{
|
15310
15300
|
ariaLabelClose: u.close_aria,
|
15311
|
-
isOpen:
|
15301
|
+
isOpen: w,
|
15312
15302
|
onClose: () => I(!1),
|
15313
15303
|
title: l.add_goal_title,
|
15314
15304
|
children: /* @__PURE__ */ t(V1, { onClose: ae })
|
@@ -16767,17 +16757,17 @@ const WC = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16767
16757
|
selectedData: C,
|
16768
16758
|
setHoveredData: S,
|
16769
16759
|
setSelectedData: y
|
16770
|
-
} = yc(), { isMobile: E } = Ce(), { onEvent:
|
16760
|
+
} = yc(), { isMobile: E } = Ce(), { onEvent: v } = z(), [w, I] = g.useState(!1), [N, L] = g.useState(6), [O, M] = g.useState(!1), [G, k] = g.useState(!1), [U, V] = g.useState(!1), ae = async () => {
|
16771
16761
|
await m(a), await h(N), I(!0);
|
16772
16762
|
};
|
16773
16763
|
g.useEffect(() => {
|
16774
|
-
|
16764
|
+
v(H.NET_WORTH_VIEW);
|
16775
16765
|
}, []), g.useEffect(() => {
|
16776
16766
|
o(c);
|
16777
16767
|
}, [c]), g.useEffect(() => {
|
16778
16768
|
i && ae().finally();
|
16779
16769
|
}, [i, a]), g.useEffect(() => {
|
16780
|
-
|
16770
|
+
v(H.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: N + "M" }), h(N).finally();
|
16781
16771
|
}, [N]);
|
16782
16772
|
const ne = (Z, q) => {
|
16783
16773
|
y(q), Z.currentTarget instanceof HTMLDivElement && M(!0);
|
@@ -16786,7 +16776,7 @@ const WC = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16786
16776
|
}, xe = () => {
|
16787
16777
|
S(null);
|
16788
16778
|
}, Ge = () => {
|
16789
|
-
|
16779
|
+
v(H.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES), k(!0);
|
16790
16780
|
}, ge = async (Z) => {
|
16791
16781
|
const q = Z[0], fe = Z[1];
|
16792
16782
|
q && fe && L(Zd(fe, q));
|
@@ -16799,7 +16789,7 @@ const WC = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16799
16789
|
onMouseLeave: xe,
|
16800
16790
|
selectedData: C
|
16801
16791
|
}, Be = () => {
|
16802
|
-
V(!0),
|
16792
|
+
V(!0), v(H.ACCOUNTS_CLICK_CONNECT);
|
16803
16793
|
};
|
16804
16794
|
return n ? /* @__PURE__ */ t(
|
16805
16795
|
yt,
|
@@ -16809,7 +16799,7 @@ const WC = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16809
16799
|
onRangeChanged: ge
|
16810
16800
|
},
|
16811
16801
|
dateRangeVariant: E ? "timeframetabs" : "timeframebuttons",
|
16812
|
-
onAccountsFilterClick: () =>
|
16802
|
+
onAccountsFilterClick: () => v(H.NET_WORTH_WIDGET_CLICK_FILTER),
|
16813
16803
|
onBackClick: e,
|
16814
16804
|
showDividerAboveDateSelector: !1,
|
16815
16805
|
sx: {
|
@@ -16826,7 +16816,7 @@ const WC = ({ amount: e, copy: n, trendValue: i }) => {
|
|
16826
16816
|
}
|
16827
16817
|
},
|
16828
16818
|
title: s.net_worth,
|
16829
|
-
children:
|
16819
|
+
children: w ? /* @__PURE__ */ d(J, { children: [
|
16830
16820
|
p.length ? /* @__PURE__ */ d(J, { children: [
|
16831
16821
|
C && /* @__PURE__ */ t(OC, { hoveredData: _, selectedData: C }),
|
16832
16822
|
/* @__PURE__ */ d(
|
@@ -17108,13 +17098,13 @@ const ms = "PARENT-ENTITY", of = (e, n) => ({
|
|
17108
17098
|
} = o;
|
17109
17099
|
for (const p of a.filter((C) => C.entity_guid === ms)) {
|
17110
17100
|
const C = of(p.notification_type, i), S = a.filter(
|
17111
|
-
(E) => E.entity_guid !== ms && E.notification_type === p.notification_type && e.some((
|
17101
|
+
(E) => E.entity_guid !== ms && E.notification_type === p.notification_type && e.some((v) => v.guid === E.entity_guid)
|
17112
17102
|
), y = [];
|
17113
17103
|
c && !_ && p.email_channel && r.email && y.push(i.delivery_method_email_label), l && !h && p.sms_channel && r.phone && y.push(i.delivery_method_sms_label), u && !m && p.push_channel && y.push(i.delivery_method_push_label), s.push({
|
17114
17104
|
...p,
|
17115
17105
|
children: S.map((E) => ({
|
17116
17106
|
...E,
|
17117
|
-
account: e.find((
|
17107
|
+
account: e.find((v) => v.guid === E.entity_guid),
|
17118
17108
|
label: C
|
17119
17109
|
})),
|
17120
17110
|
deliveryMethodsLabel: y.join(", "),
|
@@ -17450,11 +17440,11 @@ const gl = x(() => {
|
|
17450
17440
|
birthday: h.birthday,
|
17451
17441
|
postal_code: h.postal_code,
|
17452
17442
|
credit_score: h.credit_score
|
17453
|
-
}), [C, S] = g.useState(!1), [y, E] = g.useState(!1),
|
17443
|
+
}), [C, S] = g.useState(!1), [y, E] = g.useState(!1), v = g.useRef(null), w = m.email && !h.email_is_verified && !C, I = m.phone && !h.phone_is_verified && !C;
|
17454
17444
|
g.useEffect(() => {
|
17455
17445
|
if (n) {
|
17456
17446
|
const k = (U) => {
|
17457
|
-
|
17447
|
+
v.current && !v.current.contains(U.target) && C && E(!0);
|
17458
17448
|
};
|
17459
17449
|
return document.addEventListener("mousedown", k), () => {
|
17460
17450
|
document.removeEventListener("mousedown", k);
|
@@ -17484,7 +17474,7 @@ const gl = x(() => {
|
|
17484
17474
|
R,
|
17485
17475
|
{
|
17486
17476
|
component: "form",
|
17487
|
-
ref:
|
17477
|
+
ref: v,
|
17488
17478
|
sx: {
|
17489
17479
|
backgroundColor: "background.paper",
|
17490
17480
|
p: 24,
|
@@ -17523,7 +17513,7 @@ const gl = x(() => {
|
|
17523
17513
|
}
|
17524
17514
|
),
|
17525
17515
|
/* @__PURE__ */ d(b, { direction: s ? "column" : "row", children: [
|
17526
|
-
u.display_email_edit_field_in_settings && /* @__PURE__ */ d(b, { sx: { mb:
|
17516
|
+
u.display_email_edit_field_in_settings && /* @__PURE__ */ d(b, { sx: { mb: w ? 20 : 44, mr: s ? 0 : 24 }, children: [
|
17527
17517
|
/* @__PURE__ */ t(
|
17528
17518
|
it,
|
17529
17519
|
{
|
@@ -17532,7 +17522,7 @@ const gl = x(() => {
|
|
17532
17522
|
onChange: (k) => G({ email: k.target.value })
|
17533
17523
|
}
|
17534
17524
|
),
|
17535
|
-
|
17525
|
+
w && /* @__PURE__ */ t(gl, {})
|
17536
17526
|
] }),
|
17537
17527
|
u.display_sms_edit_field_in_settings && /* @__PURE__ */ d(b, { sx: { mb: I ? 20 : 44 }, children: [
|
17538
17528
|
/* @__PURE__ */ t(
|
@@ -17871,14 +17861,14 @@ const _f = ({
|
|
17871
17861
|
return "";
|
17872
17862
|
}
|
17873
17863
|
}, y = () => {
|
17874
|
-
const
|
17864
|
+
const v = {
|
17875
17865
|
"& .MuiDialogContent-root": {
|
17876
17866
|
width: 400,
|
17877
17867
|
pt: 0
|
17878
17868
|
}
|
17879
17869
|
};
|
17880
17870
|
return e === pt.Token ? {
|
17881
|
-
...
|
17871
|
+
...v,
|
17882
17872
|
"& .MuiToolbar-root:last-child": {
|
17883
17873
|
padding: "32px 60px 48px",
|
17884
17874
|
justifyContent: "center"
|
@@ -17890,7 +17880,7 @@ const _f = ({
|
|
17890
17880
|
flex: 1
|
17891
17881
|
}
|
17892
17882
|
} : {
|
17893
|
-
...
|
17883
|
+
...v,
|
17894
17884
|
"& .MuiToolbar-root:last-child": {
|
17895
17885
|
gap: 8,
|
17896
17886
|
padding: 24,
|
@@ -17904,8 +17894,8 @@ const _f = ({
|
|
17904
17894
|
};
|
17905
17895
|
}, E = async () => {
|
17906
17896
|
if (e === pt.Token && i(), e === pt.Edit && a) {
|
17907
|
-
const
|
17908
|
-
(await l(
|
17897
|
+
const v = { ...a, name: m };
|
17898
|
+
(await l(v)).success ? (_(c.mobile_devices_edit_success, "success"), h()) : _(
|
17909
17899
|
T(c.mobile_devices_edit_error, a.name),
|
17910
17900
|
"error"
|
17911
17901
|
), i();
|
@@ -17948,7 +17938,7 @@ const _f = ({
|
|
17948
17938
|
),
|
17949
17939
|
/* @__PURE__ */ t(f, { truncate: !1, variant: "Small", children: c.mobile_devices_access_info_2 })
|
17950
17940
|
] }),
|
17951
|
-
e === pt.Edit && /* @__PURE__ */ t(b, { children: /* @__PURE__ */ t(it, { onChange: (
|
17941
|
+
e === pt.Edit && /* @__PURE__ */ t(b, { children: /* @__PURE__ */ t(it, { onChange: (v) => p(v.target.value), value: m }) }),
|
17952
17942
|
e === pt.Delete && /* @__PURE__ */ t(X, { children: c.mobile_devices_delete_info })
|
17953
17943
|
]
|
17954
17944
|
}
|
@@ -17959,12 +17949,12 @@ const _f = ({
|
|
17959
17949
|
a && s();
|
17960
17950
|
}, [a]);
|
17961
17951
|
const C = async () => {
|
17962
|
-
const
|
17963
|
-
|
17964
|
-
}, S = (
|
17965
|
-
h(
|
17966
|
-
}, y = (
|
17967
|
-
h(
|
17952
|
+
const v = await c();
|
17953
|
+
v ? (p(v), u({ open: !0, type: pt.Token })) : o(n.mobile_devices_access_error, "error");
|
17954
|
+
}, S = (v) => {
|
17955
|
+
h(v), u({ open: !0, type: pt.Edit });
|
17956
|
+
}, y = (v) => {
|
17957
|
+
h(v), u({ open: !0, type: pt.Delete });
|
17968
17958
|
}, E = () => {
|
17969
17959
|
u({ open: !1, type: "" }), h(void 0);
|
17970
17960
|
};
|
@@ -18526,8 +18516,8 @@ const _f = ({
|
|
18526
18516
|
email: s.email,
|
18527
18517
|
phone: s.phone
|
18528
18518
|
}), h = u.email && !s.email_is_verified && !c, m = u.phone && !s.phone_is_verified && !c, p = (S) => {
|
18529
|
-
const { name: y, value: E } = S.target,
|
18530
|
-
_(
|
18519
|
+
const { name: y, value: E } = S.target, v = { ...u, [y]: E };
|
18520
|
+
_(v), l(JSON.stringify({ ...s, ...v }) !== JSON.stringify(s));
|
18531
18521
|
}, C = async () => {
|
18532
18522
|
await r({ ...s, ...u }), l(!1);
|
18533
18523
|
};
|
@@ -18710,14 +18700,14 @@ const _f = ({
|
|
18710
18700
|
),
|
18711
18701
|
/* @__PURE__ */ t(b, { sx: { flexDirection: { xs: "column", md: "row" }, gap: 12 }, children: [0, 1].map((_) => {
|
18712
18702
|
const h = _ === 0 ? 0 : u, m = _ === 0 ? u : i.length, p = i.slice(h, m);
|
18713
|
-
return /* @__PURE__ */ t(b, { sx: { flex: 1, gap: 12, maxWidth: { md: "calc(50% - 6px)" } }, children: p.map(({ guid: C, icon: S, topics: y, title: E },
|
18714
|
-
const
|
18703
|
+
return /* @__PURE__ */ t(b, { sx: { flex: 1, gap: 12, maxWidth: { md: "calc(50% - 6px)" } }, children: p.map(({ guid: C, icon: S, topics: y, title: E }, v) => {
|
18704
|
+
const w = v + h;
|
18715
18705
|
return /* @__PURE__ */ d(
|
18716
18706
|
pi,
|
18717
18707
|
{
|
18718
18708
|
disableGutters: !0,
|
18719
|
-
expanded:
|
18720
|
-
onChange: (I, N) => l(N ?
|
18709
|
+
expanded: w === c,
|
18710
|
+
onChange: (I, N) => l(N ? w : null),
|
18721
18711
|
sx: (I) => ({
|
18722
18712
|
border: `1px solid ${I.palette.border?.light}`,
|
18723
18713
|
borderRadius: "8px !important",
|
@@ -21391,8 +21381,8 @@ const _f = ({
|
|
21391
21381
|
const {
|
21392
21382
|
target: { name: y, value: E }
|
21393
21383
|
} = S;
|
21394
|
-
_((
|
21395
|
-
...
|
21384
|
+
_((v) => ({
|
21385
|
+
...v,
|
21396
21386
|
[y]: E
|
21397
21387
|
}));
|
21398
21388
|
};
|
@@ -21404,9 +21394,9 @@ const _f = ({
|
|
21404
21394
|
onPrimaryAction: () => {
|
21405
21395
|
const S = {};
|
21406
21396
|
let y = !0;
|
21407
|
-
h.forEach(({ label: E, name:
|
21408
|
-
const I = u[
|
21409
|
-
|
21397
|
+
h.forEach(({ label: E, name: v, required: w }) => {
|
21398
|
+
const I = u[v];
|
21399
|
+
w && !I && (S[v] = `${E} ${e.request_support_required_message}`, y = !1), (v === "institutionWebsite" || v === "institutionLoginPage") && I && !/(.+)\.(.{2,})/g.test(I) && (S[v] = e.request_support_valid_url_message, y = !1);
|
21410
21400
|
}), l(S), y && (a(u), _(Va));
|
21411
21401
|
},
|
21412
21402
|
secondaryColor: "primary",
|
@@ -21628,10 +21618,10 @@ const _f = ({
|
|
21628
21618
|
type: G,
|
21629
21619
|
label: e.help_by_category_list[M.guid].topics[k]
|
21630
21620
|
}))
|
21631
|
-
})),
|
21621
|
+
})), v = Object.keys(e.popular_topics_list).map((M, G) => ({
|
21632
21622
|
name: e.popular_topics_list[M],
|
21633
21623
|
type: aC[G].type
|
21634
|
-
})),
|
21624
|
+
})), w = () => {
|
21635
21625
|
_(""), y({ isOpen: !1, topic: "", type: void 0 });
|
21636
21626
|
}, I = (M) => {
|
21637
21627
|
c.email && o({
|
@@ -21642,7 +21632,7 @@ const _f = ({
|
|
21642
21632
|
}, N = (M, G) => {
|
21643
21633
|
G === "other" ? C(!0) : y({ isOpen: !0, topic: M, type: G });
|
21644
21634
|
}, L = () => {
|
21645
|
-
s(""), m(!1), C(!1),
|
21635
|
+
s(""), m(!1), C(!1), w();
|
21646
21636
|
}, O = (M) => {
|
21647
21637
|
if (!c.email) {
|
21648
21638
|
s(e.request_support_email_not_exists_message, "error");
|
@@ -21677,7 +21667,7 @@ const _f = ({
|
|
21677
21667
|
/* @__PURE__ */ t(
|
21678
21668
|
fl,
|
21679
21669
|
{
|
21680
|
-
list:
|
21670
|
+
list: v,
|
21681
21671
|
onClick: N,
|
21682
21672
|
sx: { fontWeight: 400 }
|
21683
21673
|
}
|
@@ -21742,7 +21732,7 @@ const _f = ({
|
|
21742
21732
|
onClick: (M) => {
|
21743
21733
|
_(M), S.type === "internal" && m(!0);
|
21744
21734
|
},
|
21745
|
-
onClose:
|
21735
|
+
onClose: w,
|
21746
21736
|
topic: S.topic
|
21747
21737
|
}
|
21748
21738
|
),
|
@@ -21765,7 +21755,7 @@ const _f = ({
|
|
21765
21755
|
institution: u,
|
21766
21756
|
isOpen: !!u && S.type === "external",
|
21767
21757
|
onClose: () => _(""),
|
21768
|
-
popularTopicsDrawerOnClose:
|
21758
|
+
popularTopicsDrawerOnClose: w,
|
21769
21759
|
title: S.topic
|
21770
21760
|
}
|
21771
21761
|
)
|
@@ -22208,12 +22198,12 @@ const r0 = (e) => e.reduce((i, a) => {
|
|
22208
22198
|
(y) => y.category_guid === i || y.top_level_category_guid === i
|
22209
22199
|
) : p).reduce(
|
22210
22200
|
(y, E) => {
|
22211
|
-
const { category_guid:
|
22201
|
+
const { category_guid: v, top_level_category_guid: w, month: I, total: N, year: L } = E, O = i ? v : w;
|
22212
22202
|
y[O] || (y[O] = {
|
22213
22203
|
id: O,
|
22214
22204
|
category: O,
|
22215
|
-
category_guid:
|
22216
|
-
top_level_category_guid:
|
22205
|
+
category_guid: v,
|
22206
|
+
top_level_category_guid: w
|
22217
22207
|
});
|
22218
22208
|
const M = ue(new Date(L, I - 1), oe.MONTH_SHORT);
|
22219
22209
|
return y[O][M] || (y[O][M] = 0), y[O][M] = y[O][M] + N, y;
|
@@ -22282,7 +22272,7 @@ const r0 = (e) => e.reduce((i, a) => {
|
|
22282
22272
|
}
|
22283
22273
|
);
|
22284
22274
|
}, f0 = x(C0), b0 = ({ onBackClick: e, sx: n }) => {
|
22285
|
-
const { onEvent: i } = z(), { isDesktop: a, isTablet: o, isMobile: r } = Ce(), { visibleAccounts: s } = Se(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: l, getCategoryName: u } = Ve(), { sortedTransactions: _ } = Le(), { selectedDateRange: h, setSelectedDateRange: m } = Ui(), { isCopyLoaded: p, isInitialized: C, selectedAccounts: S, setSelectedAccounts: y } = le(), { trends: E } = A(), [
|
22275
|
+
const { onEvent: i } = z(), { isDesktop: a, isTablet: o, isMobile: r } = Ce(), { visibleAccounts: s } = Se(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: l, getCategoryName: u } = Ve(), { sortedTransactions: _ } = Le(), { selectedDateRange: h, setSelectedDateRange: m } = Ui(), { isCopyLoaded: p, isInitialized: C, selectedAccounts: S, setSelectedAccounts: y } = le(), { trends: E } = A(), [v, w] = g.useState(!1), [I, N] = g.useState(!1), [L, O] = g.useState("Chart"), [M, G] = g.useState(""), [k, U] = g.useState(window.innerHeight), ae = k - (r ? 315 : 345);
|
22286
22276
|
g.useEffect(() => {
|
22287
22277
|
const fe = () => U(window.innerHeight);
|
22288
22278
|
return window.addEventListener("resize", fe), () => window.removeEventListener("resize", fe);
|
@@ -22294,11 +22284,11 @@ const r0 = (e) => e.reduce((i, a) => {
|
|
22294
22284
|
h.start,
|
22295
22285
|
h.end
|
22296
22286
|
).finally(() => {
|
22297
|
-
|
22287
|
+
w(!0);
|
22298
22288
|
});
|
22299
22289
|
}, [C, S, h]);
|
22300
22290
|
const ne = g.useMemo(() => {
|
22301
|
-
if (!
|
22291
|
+
if (!v) return { stackedDatasets: [], unstackedDatasets: [] };
|
22302
22292
|
const fe = s0(
|
22303
22293
|
l,
|
22304
22294
|
h.start,
|
@@ -22330,7 +22320,7 @@ const r0 = (e) => e.reduce((i, a) => {
|
|
22330
22320
|
}, q = (fe) => {
|
22331
22321
|
i(H.TRENDS_HOVER_POINT, { category: fe });
|
22332
22322
|
};
|
22333
|
-
return !p || !C || !
|
22323
|
+
return !p || !C || !v ? /* @__PURE__ */ t(de, {}) : /* @__PURE__ */ d(
|
22334
22324
|
yt,
|
22335
22325
|
{
|
22336
22326
|
accountOptions: s,
|
@@ -22561,9 +22551,9 @@ const r0 = (e) => e.reduce((i, a) => {
|
|
22561
22551
|
incomeData: Xo(a, s)
|
22562
22552
|
}),
|
22563
22553
|
[a, s]
|
22564
|
-
), [p, C] = h, [S, y] = m, E = Jr(C.y, p.y),
|
22554
|
+
), [p, C] = h, [S, y] = m, E = Jr(C.y, p.y), v = Jr(y.y, S.y), w = _ && !n?.length, I = () => {
|
22565
22555
|
i(
|
22566
|
-
|
22556
|
+
w ? H.TRENDS_CLICK_GET_STARTED : H.TRENDS_CLICK_VIEW_MORE
|
22567
22557
|
), e();
|
22568
22558
|
};
|
22569
22559
|
return !r || !_ ? /* @__PURE__ */ t(de, {}) : /* @__PURE__ */ t(
|
@@ -22572,9 +22562,9 @@ const r0 = (e) => e.reduce((i, a) => {
|
|
22572
22562
|
className: "mx-trends-microwidget",
|
22573
22563
|
ctaLabel: c.micro_primary_cta_label,
|
22574
22564
|
onCTAClick: I,
|
22575
|
-
subHeader:
|
22565
|
+
subHeader: w ? void 0 : c.micro_subheader,
|
22576
22566
|
title: c.title,
|
22577
|
-
children:
|
22567
|
+
children: w ? /* @__PURE__ */ t(A0, {}) : /* @__PURE__ */ d(
|
22578
22568
|
b,
|
22579
22569
|
{
|
22580
22570
|
sx: {
|
@@ -22597,7 +22587,7 @@ const r0 = (e) => e.reduce((i, a) => {
|
|
22597
22587
|
/* @__PURE__ */ t(
|
22598
22588
|
Ss,
|
22599
22589
|
{
|
22600
|
-
percentage:
|
22590
|
+
percentage: v,
|
22601
22591
|
secondaryLabel: c.micro_secondary_label,
|
22602
22592
|
shouldDisplayPercentage: y.y !== 0 && S.y !== 0,
|
22603
22593
|
title: c.income_label,
|
@@ -22954,7 +22944,7 @@ const Ki = g.createContext(null), L0 = ({
|
|
22954
22944
|
variant: C,
|
22955
22945
|
widthOverrides: S
|
22956
22946
|
}, y) {
|
22957
|
-
const [E,
|
22947
|
+
const [E, v] = g.useState(!1), { cardStyle: w, linkTextStyle: I } = h, N = C ? w : { border: "none", boxShadow: "none", ...w }, L = /* @__PURE__ */ t(
|
22958
22948
|
X,
|
22959
22949
|
{
|
22960
22950
|
className: "mx-micro-card-description",
|
@@ -22994,8 +22984,8 @@ const Ki = g.createContext(null), L0 = ({
|
|
22994
22984
|
"aria-label": i,
|
22995
22985
|
id: "divButton",
|
22996
22986
|
onClick: () => u(),
|
22997
|
-
onKeyDown: () =>
|
22998
|
-
onKeyUp: () =>
|
22987
|
+
onKeyDown: () => v(!1),
|
22988
|
+
onKeyUp: () => v(!0),
|
22999
22989
|
ref: y,
|
23000
22990
|
role: "button",
|
23001
22991
|
sx: {
|
@@ -23969,9 +23959,9 @@ const Ki = g.createContext(null), L0 = ({
|
|
23969
23959
|
}) => {
|
23970
23960
|
const { ref: p, inView: C } = ic({
|
23971
23961
|
threshold: Nl
|
23972
|
-
}), { cardsCopy: S } = Kn(), { onEvent: y } = zi(), { updateBeat: E, updateOffer:
|
23962
|
+
}), { cardsCopy: S } = Kn(), { onEvent: y } = zi(), { updateBeat: E, updateOffer: v } = $0();
|
23973
23963
|
Wn(() => {
|
23974
|
-
C && (i.has_been_displayed ? y(Al(i.template)) : (i.guid.startsWith("OFR") ?
|
23964
|
+
C && (i.has_been_displayed ? y(Al(i.template)) : (i.guid.startsWith("OFR") ? v({
|
23975
23965
|
...i,
|
23976
23966
|
has_been_displayed: !0
|
23977
23967
|
}) : E({
|
@@ -23994,7 +23984,7 @@ const Ki = g.createContext(null), L0 = ({
|
|
23994
23984
|
position: s
|
23995
23985
|
});
|
23996
23986
|
}, [i, s, C]);
|
23997
|
-
const
|
23987
|
+
const w = () => {
|
23998
23988
|
if (l && l(i), y(Tl(i.template)), i.template === "MarketingOffer") {
|
23999
23989
|
const I = i;
|
24000
23990
|
u?.capture("clicked_messaging_insight", {
|
@@ -24028,7 +24018,7 @@ const Ki = g.createContext(null), L0 = ({
|
|
24028
24018
|
}
|
24029
24019
|
),
|
24030
24020
|
isActiveCard: c,
|
24031
|
-
onCardClick:
|
24021
|
+
onCardClick: w,
|
24032
24022
|
posthog: u,
|
24033
24023
|
ref: p,
|
24034
24024
|
showCTAColocatedWithText: o,
|
@@ -24146,7 +24136,7 @@ const Ki = g.createContext(null), L0 = ({
|
|
24146
24136
|
visibleCardsCount: C = 1
|
24147
24137
|
// Default to 1 card visible
|
24148
24138
|
}) => {
|
24149
|
-
const S = g.useRef(null), y = g.useRef(null), [E,
|
24139
|
+
const S = g.useRef(null), y = g.useRef(null), [E, v] = g.useState(0), [w, I] = g.useState(null), [N, L] = g.useState(null), [O, M] = g.useState(null), [G, k] = g.useState(l), { carouselCopy: U } = Kn(), { onEvent: V } = zi();
|
24150
24140
|
g.useEffect(() => {
|
24151
24141
|
if (S.current && !n) {
|
24152
24142
|
const q = S.current.offsetWidth, fe = 8;
|
@@ -24195,10 +24185,10 @@ const Ki = g.createContext(null), L0 = ({
|
|
24195
24185
|
behavior: "smooth"
|
24196
24186
|
});
|
24197
24187
|
}, he = () => {
|
24198
|
-
S.current &&
|
24188
|
+
S.current && v(S.current.scrollLeft);
|
24199
24189
|
}, xe = () => {
|
24200
|
-
if (!N || !
|
24201
|
-
N -
|
24190
|
+
if (!N || !w) return;
|
24191
|
+
N - w > U0 ? V(Xt.ON_CAROUSEL_FORWARD_SWIPE, e) : V(Xt.ON_CAROUSEL_BACK_SWIPE, e);
|
24202
24192
|
}, Ge = (q) => {
|
24203
24193
|
I(q.targetTouches[0].clientX);
|
24204
24194
|
}, ge = (q) => {
|
@@ -24524,8 +24514,8 @@ const Ki = g.createContext(null), L0 = ({
|
|
24524
24514
|
showHeader: S,
|
24525
24515
|
showIcon: y,
|
24526
24516
|
showWithMargin: E = !0,
|
24527
|
-
token:
|
24528
|
-
useDarkMode:
|
24517
|
+
token: v = "",
|
24518
|
+
useDarkMode: w,
|
24529
24519
|
userHasFullInsightFeedBeats: I,
|
24530
24520
|
variant: N,
|
24531
24521
|
visibleCardsCount: L = 1,
|
@@ -24533,8 +24523,8 @@ const Ki = g.createContext(null), L0 = ({
|
|
24533
24523
|
}) => {
|
24534
24524
|
const M = Ze(), [G, k] = It("STANDARD"), [U, V] = It(!1), ae = _u([u], An), ne = uu([_], An);
|
24535
24525
|
g.useEffect(() => {
|
24536
|
-
An.isInitialized || An.initialize(r,
|
24537
|
-
}, [r,
|
24526
|
+
An.isInitialized || An.initialize(r, v, c);
|
24527
|
+
}, [r, v, c, An.isInitialized]), g.useEffect(() => {
|
24538
24528
|
const Ge = window.innerHeight;
|
24539
24529
|
Ge < 180 ? k("STANDARD") : Ge >= 180 && Ge < 200 ? k("LARGE") : Ge >= 200 && Ge < 248 ? k("XLARGE") : Ge >= 248 && k("XXLARGE");
|
24540
24530
|
}, [window.innerHeight]), g.useEffect(() => {
|
@@ -24547,7 +24537,7 @@ const Ki = g.createContext(null), L0 = ({
|
|
24547
24537
|
posthog: h,
|
24548
24538
|
showIcon: y,
|
24549
24539
|
showWithMargin: E,
|
24550
|
-
useDarkMode:
|
24540
|
+
useDarkMode: w,
|
24551
24541
|
widthOverrides: O
|
24552
24542
|
}, xe = {
|
24553
24543
|
carouselSize: G,
|
@@ -24673,7 +24663,7 @@ const Ki = g.createContext(null), L0 = ({
|
|
24673
24663
|
}, [u]);
|
24674
24664
|
const S = g.useMemo(() => _ ? s.getFilteredBeats({ templates: nb }) : [], [_]), y = () => null, E = (N) => {
|
24675
24665
|
e?.(N), i(H.TRENDS_CLICK_INSIGHT, Rt);
|
24676
|
-
},
|
24666
|
+
}, v = p ? 200 : 170, w = p ? 170 : 124, I = S.length > 0 ? v : w;
|
24677
24667
|
return /* @__PURE__ */ t(be, { sx: { height: I }, children: /* @__PURE__ */ t(
|
24678
24668
|
J0,
|
24679
24669
|
{
|
@@ -24732,10 +24722,10 @@ const Ki = g.createContext(null), L0 = ({
|
|
24732
24722
|
const n = Te(), { onEvent: i } = z(), { common: a, trends: o } = A(), { selectedCategoryData: r, selectedDateRangeMonthRange: s } = Ui(), { sortedTransactions: c } = Le(), [l, u] = g.useState(null);
|
24733
24723
|
if (!r)
|
24734
24724
|
return null;
|
24735
|
-
const { guid: _, name: h, is_income: m, totalAmount: p } = r, C = m ? o.category_income : o.category_spending, S = ua(_, n), y = m ? o.income_label : o.spending_label, E = ` ${r.transactions.length === 1 ? o.transaction : o.transactions} (${r.transactions.length})`,
|
24725
|
+
const { guid: _, name: h, is_income: m, totalAmount: p } = r, C = m ? o.category_income : o.category_spending, S = ua(_, n), y = m ? o.income_label : o.spending_label, E = ` ${r.transactions.length === 1 ? o.transaction : o.transactions} (${r.transactions.length})`, v = g.useMemo(
|
24736
24726
|
() => c.find((N) => N.guid === l),
|
24737
24727
|
[l, c]
|
24738
|
-
),
|
24728
|
+
), w = (N) => N.category_guid === _ || N.top_level_category_guid === _, I = () => {
|
24739
24729
|
e?.(), i(H.TRENDS_CLICK_BACK, Rt);
|
24740
24730
|
};
|
24741
24731
|
return /* @__PURE__ */ d(
|
@@ -24761,13 +24751,13 @@ const Ki = g.createContext(null), L0 = ({
|
|
24761
24751
|
/* @__PURE__ */ t(ob, { chartColor: S, chartLabel: y }),
|
24762
24752
|
/* @__PURE__ */ d(b, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
|
24763
24753
|
/* @__PURE__ */ t(f, { bold: !0, variant: "body1", children: E }),
|
24764
|
-
/* @__PURE__ */ t(jh, { filter:
|
24754
|
+
/* @__PURE__ */ t(jh, { filter: w })
|
24765
24755
|
] })
|
24766
24756
|
] }),
|
24767
24757
|
/* @__PURE__ */ t(
|
24768
24758
|
Gn,
|
24769
24759
|
{
|
24770
|
-
filter:
|
24760
|
+
filter: w,
|
24771
24761
|
height: "calc(100vh - 475px)",
|
24772
24762
|
onClick: u
|
24773
24763
|
}
|
@@ -24777,10 +24767,10 @@ const Ki = g.createContext(null), L0 = ({
|
|
24777
24767
|
re,
|
24778
24768
|
{
|
24779
24769
|
ariaLabelClose: a.close_aria,
|
24780
|
-
isOpen: !!
|
24770
|
+
isOpen: !!v,
|
24781
24771
|
onClose: () => u(""),
|
24782
24772
|
title: o.transaction,
|
24783
|
-
children:
|
24773
|
+
children: v && /* @__PURE__ */ t(oi, { transaction: v })
|
24784
24774
|
}
|
24785
24775
|
)
|
24786
24776
|
]
|
@@ -24806,9 +24796,9 @@ const Ki = g.createContext(null), L0 = ({
|
|
24806
24796
|
selectedDateRange: i,
|
24807
24797
|
totals: a
|
24808
24798
|
}) => {
|
24809
|
-
const o = Ze(), { onEvent: r } = z(), { trends: s } = A(), { isSmallMobile: c, isMobile: l, isSmallTablet: u, isTablet: _ } = Ce(), h = [o.palette.chart?.chart1, o.palette.chart?.chart2], m = sb(a, i), p = cb(m, s), [C, S] = g.useState(0), y = 458, E = 195,
|
24799
|
+
const o = Ze(), { onEvent: r } = z(), { trends: s } = A(), { isSmallMobile: c, isMobile: l, isSmallTablet: u, isTablet: _ } = Ce(), h = [o.palette.chart?.chart1, o.palette.chart?.chart2], m = sb(a, i), p = cb(m, s), [C, S] = g.useState(0), y = 458, E = 195, v = 56, w = l || c ? E : u || _ ? y : C;
|
24810
24800
|
return g.useEffect(() => {
|
24811
|
-
const N = Math.max(e -
|
24801
|
+
const N = Math.max(e - v, n);
|
24812
24802
|
S(N);
|
24813
24803
|
}, [e]), /* @__PURE__ */ t(
|
24814
24804
|
ii,
|
@@ -24817,7 +24807,7 @@ const Ki = g.createContext(null), L0 = ({
|
|
24817
24807
|
colors: h,
|
24818
24808
|
curveType: "bump",
|
24819
24809
|
datasets: m,
|
24820
|
-
height:
|
24810
|
+
height: w,
|
24821
24811
|
labels: p,
|
24822
24812
|
onItemClick: () => {
|
24823
24813
|
r(H.TRENDS_CLICK_CHART, Rt);
|
@@ -24842,8 +24832,8 @@ const Ki = g.createContext(null), L0 = ({
|
|
24842
24832
|
} = Ve(), { setFilter: m } = Le(), { selectedDateRange: p, setSelectedCategoryData: C, setSelectedDateRange: S } = Ui(), {
|
24843
24833
|
isCopyLoaded: y,
|
24844
24834
|
isInitialized: E,
|
24845
|
-
selectedAccounts:
|
24846
|
-
selectedAccountGuids:
|
24835
|
+
selectedAccounts: v,
|
24836
|
+
selectedAccountGuids: w,
|
24847
24837
|
setSelectedAccounts: I
|
24848
24838
|
} = le(), { trends: N } = A(), L = hu(), O = r || o, [M, G] = g.useState(!1), [k, U] = g.useState("Chart"), [V, ae] = g.useState(""), [ne, he] = g.useState(!1), [xe, Ge] = g.useState(window.innerHeight), ge = xe - 208, ye = xe - (L ? 494 : 266);
|
24849
24839
|
g.useEffect(() => {
|
@@ -24852,9 +24842,9 @@ const Ki = g.createContext(null), L0 = ({
|
|
24852
24842
|
}, []), g.useEffect(() => {
|
24853
24843
|
I(c);
|
24854
24844
|
}, [c]), g.useEffect(() => {
|
24855
|
-
E && l(
|
24845
|
+
E && l(v, p.start, p.end).then(() => {
|
24856
24846
|
u(
|
24857
|
-
|
24847
|
+
v,
|
24858
24848
|
p.start,
|
24859
24849
|
p.end
|
24860
24850
|
);
|
@@ -24864,10 +24854,10 @@ const Ki = g.createContext(null), L0 = ({
|
|
24864
24854
|
time_period: `${ra(p.end, p.start)}M`
|
24865
24855
|
});
|
24866
24856
|
});
|
24867
|
-
}, [E,
|
24857
|
+
}, [E, v, p]), g.useEffect(() => {
|
24868
24858
|
if (_.length !== 0) {
|
24869
24859
|
const Pe = {
|
24870
|
-
accounts:
|
24860
|
+
accounts: w,
|
24871
24861
|
dateRange: { start: p.start, end: p.end }
|
24872
24862
|
};
|
24873
24863
|
m({
|
@@ -25355,7 +25345,7 @@ const Ka = ({
|
|
25355
25345
|
onClose: () => a(!1),
|
25356
25346
|
title: h.mark_as_duplicate,
|
25357
25347
|
children: /* @__PURE__ */ t(ce, { children: m.map((E) => {
|
25358
|
-
const
|
25348
|
+
const v = m.indexOf(E) === m.length - 1;
|
25359
25349
|
return /* @__PURE__ */ d(g.Fragment, { children: [
|
25360
25350
|
/* @__PURE__ */ t(
|
25361
25351
|
Bi,
|
@@ -25366,7 +25356,7 @@ const Ka = ({
|
|
25366
25356
|
}
|
25367
25357
|
}
|
25368
25358
|
),
|
25369
|
-
/* @__PURE__ */ t(ce, { sx: { ml:
|
25359
|
+
/* @__PURE__ */ t(ce, { sx: { ml: v ? 0 : 24 } })
|
25370
25360
|
] }, E.guid);
|
25371
25361
|
}) })
|
25372
25362
|
}
|
@@ -25910,11 +25900,11 @@ const Ka = ({
|
|
25910
25900
|
account_type: y.account_type
|
25911
25901
|
});
|
25912
25902
|
}, S = (y) => {
|
25913
|
-
const E = y === "hidden" ? _ : h,
|
25903
|
+
const E = y === "hidden" ? _ : h, v = y === "hidden" ? m : p, w = y === "hidden" ? i.account_hidden : i.account_closed;
|
25914
25904
|
return /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
|
25915
25905
|
ce,
|
25916
25906
|
{
|
25917
|
-
"aria-label":
|
25907
|
+
"aria-label": w,
|
25918
25908
|
subheader: /* @__PURE__ */ t(Ut, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ d(
|
25919
25909
|
ke,
|
25920
25910
|
{
|
@@ -25922,8 +25912,8 @@ const Ka = ({
|
|
25922
25912
|
direction: "row",
|
25923
25913
|
sx: { justifyContent: "space-between", color: "grey.700" },
|
25924
25914
|
children: [
|
25925
|
-
/* @__PURE__ */ t(f, { bold: !0, variant: "Body", children:
|
25926
|
-
/* @__PURE__ */ t(f, { bold: !0, variant: "Body", children: P(
|
25915
|
+
/* @__PURE__ */ t(f, { bold: !0, variant: "Body", children: w }),
|
25916
|
+
/* @__PURE__ */ t(f, { bold: !0, variant: "Body", children: P(v, "0,0.00") })
|
25927
25917
|
]
|
25928
25918
|
}
|
25929
25919
|
) }),
|
@@ -25963,9 +25953,9 @@ const Ka = ({
|
|
25963
25953
|
return /* @__PURE__ */ d(R, { sx: { pt: 24 }, children: [
|
25964
25954
|
l.map((y) => {
|
25965
25955
|
const E = a.filter(
|
25966
|
-
(
|
25967
|
-
),
|
25968
|
-
(
|
25956
|
+
(w) => w.account_type === y && !w.is_closed && !w.is_hidden
|
25957
|
+
), v = E.reduce(
|
25958
|
+
(w, I) => (I.balance || 0) + w,
|
25969
25959
|
0
|
25970
25960
|
);
|
25971
25961
|
return E.length === 0 ? null : /* @__PURE__ */ t(
|
@@ -25980,18 +25970,18 @@ const Ka = ({
|
|
25980
25970
|
sx: { display: "flex", justifyContent: "space-between" },
|
25981
25971
|
children: [
|
25982
25972
|
/* @__PURE__ */ t(f, { bold: !0, variant: "Body", children: i.account_types[y] }),
|
25983
|
-
/* @__PURE__ */ t(f, { bold: !0, variant: "Body", children: P(
|
25973
|
+
/* @__PURE__ */ t(f, { bold: !0, variant: "Body", children: P(v, "0,0.00") })
|
25984
25974
|
]
|
25985
25975
|
}
|
25986
25976
|
) }),
|
25987
|
-
children: /* @__PURE__ */ t(ke, { children: E.map((
|
25988
|
-
const I = a.indexOf(
|
25977
|
+
children: /* @__PURE__ */ t(ke, { children: E.map((w) => {
|
25978
|
+
const I = a.indexOf(w) === a.length - 1, N = E.indexOf(w) === E.length - 1;
|
25989
25979
|
return /* @__PURE__ */ d(g.Fragment, { children: [
|
25990
25980
|
/* @__PURE__ */ t(
|
25991
25981
|
Bi,
|
25992
25982
|
{
|
25993
|
-
account:
|
25994
|
-
onRowClick: () => C(
|
25983
|
+
account: w,
|
25984
|
+
onRowClick: () => C(w),
|
25995
25985
|
shouldShowConnectionStatus: !0
|
25996
25986
|
}
|
25997
25987
|
),
|
@@ -26004,7 +25994,7 @@ const Ka = ({
|
|
26004
25994
|
}
|
26005
25995
|
}
|
26006
25996
|
)
|
26007
|
-
] },
|
25997
|
+
] }, w.guid);
|
26008
25998
|
}) })
|
26009
25999
|
},
|
26010
26000
|
y
|
@@ -26906,11 +26896,11 @@ const Ub = () => {
|
|
26906
26896
|
$survey_id: i
|
26907
26897
|
});
|
26908
26898
|
}, [h]);
|
26909
|
-
const
|
26899
|
+
const v = () => {
|
26910
26900
|
e("survey dismissed", {
|
26911
26901
|
$survey_id: i
|
26912
26902
|
}), _(), E(!1);
|
26913
|
-
},
|
26903
|
+
}, w = () => {
|
26914
26904
|
r();
|
26915
26905
|
}, I = () => {
|
26916
26906
|
e("survey sent", u), _(), E(!0);
|
@@ -26919,7 +26909,7 @@ const Ub = () => {
|
|
26919
26909
|
Vn,
|
26920
26910
|
{
|
26921
26911
|
closeLabel: p.close_aria,
|
26922
|
-
onClose:
|
26912
|
+
onClose: v,
|
26923
26913
|
sx: {
|
26924
26914
|
"& .MuiCardHeader-root": {
|
26925
26915
|
px: 24,
|
@@ -26948,7 +26938,7 @@ const Ub = () => {
|
|
26948
26938
|
te,
|
26949
26939
|
{
|
26950
26940
|
disabled: !o && !l,
|
26951
|
-
onClick: o ? I :
|
26941
|
+
onClick: o ? I : w,
|
26952
26942
|
sx: {
|
26953
26943
|
borderColor: n.palette.border.light,
|
26954
26944
|
"&:hover": {
|
@@ -27216,9 +27206,9 @@ const oy = ({
|
|
27216
27206
|
shouldShowZeroState: o,
|
27217
27207
|
unavailableWidth: r = 24
|
27218
27208
|
}) => {
|
27219
|
-
const { onEvent: s } = z(), { setSelectedBudget: c } = ut(), { isLoadingCategoryTotals: l } = Ve(), { isInitialized: u } = le(), { accounts: _ } = A(), { availableWidth: h } = Un(), { isMobile: m } = Ce(), [p, C] = g.useState(!1), S = g.useMemo(() => h - r, [h]), y = (
|
27220
|
-
c(
|
27221
|
-
budget_category:
|
27209
|
+
const { onEvent: s } = z(), { setSelectedBudget: c } = ut(), { isLoadingCategoryTotals: l } = Ve(), { isInitialized: u } = le(), { accounts: _ } = A(), { availableWidth: h } = Un(), { isMobile: m } = Ce(), [p, C] = g.useState(!1), S = g.useMemo(() => h - r, [h]), y = (v) => {
|
27210
|
+
c(v), s(H.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
27211
|
+
budget_category: v.category.name,
|
27222
27212
|
click_type: "bubble"
|
27223
27213
|
});
|
27224
27214
|
}, E = () => {
|
@@ -27382,7 +27372,7 @@ const oy = ({
|
|
27382
27372
|
}), uy = (e) => {
|
27383
27373
|
const n = Te(), { onEvent: i } = z(), { detailedBudgets: a, isDataLoaded: o, loadBudgetData: r, setTheme: s } = ut(), { budgets: c, common: l } = A(), { isCopyLoaded: u, isInitialized: _, selectedAccounts: h } = le(), { reloadCategoryTotals: m } = Ve(), p = sh(), C = a.length === 0, [S, y] = g.useState(!1), E = () => {
|
27384
27374
|
y(!0), i(H.BUDGETS_CLICK_ADD);
|
27385
|
-
},
|
27375
|
+
}, v = () => {
|
27386
27376
|
y(!1);
|
27387
27377
|
};
|
27388
27378
|
return g.useEffect(() => {
|
@@ -27422,7 +27412,7 @@ const oy = ({
|
|
27422
27412
|
isOpen: S,
|
27423
27413
|
onClose: () => y(!1),
|
27424
27414
|
title: c.add_new_title,
|
27425
|
-
children: /* @__PURE__ */ t(Gl, { onRecalculateBudgets:
|
27415
|
+
children: /* @__PURE__ */ t(Gl, { onRecalculateBudgets: v })
|
27426
27416
|
}
|
27427
27417
|
)
|
27428
27418
|
]
|
@@ -27480,8 +27470,8 @@ const oy = ({
|
|
27480
27470
|
const { budgets: i, common: a } = A(), { setExpandedGuid: o, setOnSelect: r } = Sn(), { addBudget: s } = ut(), [c, l] = g.useState(!1), [u, _] = g.useState(!1), [h, m] = g.useState(""), [p, C] = g.useState(void 0);
|
27481
27471
|
g.useEffect(() => {
|
27482
27472
|
r((E) => {
|
27483
|
-
const
|
27484
|
-
|
27473
|
+
const v = e.subCategories.find((w) => w.guid === E);
|
27474
|
+
v && (C(v), m(`${v.currentAmount === 0 ? "" : v.currentAmount}`), _(!0));
|
27485
27475
|
});
|
27486
27476
|
}, []);
|
27487
27477
|
const S = () => {
|
@@ -27541,9 +27531,9 @@ const oy = ({
|
|
27541
27531
|
...s,
|
27542
27532
|
amount: Number(S)
|
27543
27533
|
});
|
27544
|
-
},
|
27545
|
-
s && await r(s.guid), C(!1),
|
27546
|
-
},
|
27534
|
+
}, v = async () => {
|
27535
|
+
s && await r(s.guid), C(!1), w();
|
27536
|
+
}, w = () => {
|
27547
27537
|
_({
|
27548
27538
|
...u,
|
27549
27539
|
custom: (I) => I.category_guid === e.category_guid || I.top_level_category_guid === e.category_guid
|
@@ -27562,7 +27552,7 @@ const oy = ({
|
|
27562
27552
|
{
|
27563
27553
|
ariaLabelClose: o.close_aria,
|
27564
27554
|
isOpen: !!s,
|
27565
|
-
onClose:
|
27555
|
+
onClose: w,
|
27566
27556
|
onPrimaryAction: () => m(!0),
|
27567
27557
|
onSecondaryAction: () => C(!0),
|
27568
27558
|
primaryText: a.details_edit_button,
|
@@ -27600,7 +27590,7 @@ const oy = ({
|
|
27600
27590
|
copy: { close_aria: o.close_aria, title: a.delete_title },
|
27601
27591
|
isOpen: p,
|
27602
27592
|
onClose: () => C(!1),
|
27603
|
-
onPrimaryAction:
|
27593
|
+
onPrimaryAction: v,
|
27604
27594
|
primaryColor: "error",
|
27605
27595
|
primaryText: "Delete",
|
27606
27596
|
secondaryColor: "secondary",
|
@@ -27615,10 +27605,10 @@ const oy = ({
|
|
27615
27605
|
sortedTransactionsWithSplits: l,
|
27616
27606
|
tags: u
|
27617
27607
|
} = Le(), [_, h] = g.useState(0), [m, p] = g.useState(""), C = g.useMemo(
|
27618
|
-
() => c.find((
|
27608
|
+
() => c.find((v) => v.guid === m),
|
27619
27609
|
[m, c]
|
27620
|
-
), S = (
|
27621
|
-
h(
|
27610
|
+
), S = (v, w) => {
|
27611
|
+
h(w);
|
27622
27612
|
}, y = () => {
|
27623
27613
|
Mo(l, u), i(a.alert_csv_downloaded);
|
27624
27614
|
}, E = c.length > 0 && !n && s;
|
@@ -27673,16 +27663,16 @@ const oy = ({
|
|
27673
27663
|
setAlert: c,
|
27674
27664
|
setSelectedBudget: l,
|
27675
27665
|
updateBudget: u
|
27676
|
-
} = ut(), { setFilter: _ } = Le(), [h, m] = g.useState(!1), [p, C] = g.useState(!1), [S, y] = g.useState(!1), [E,
|
27666
|
+
} = ut(), { setFilter: _ } = Le(), [h, m] = g.useState(!1), [p, C] = g.useState(!1), [S, y] = g.useState(!1), [E, v] = g.useState("");
|
27677
27667
|
g.useEffect(() => {
|
27678
|
-
r && !s && (
|
27668
|
+
r && !s && (v(`${r.amount}`), m(!0), _({
|
27679
27669
|
accounts: e,
|
27680
27670
|
dateRange: a,
|
27681
27671
|
custom: (L) => L.category_guid === r.category_guid || L.top_level_category_guid === r.category_guid,
|
27682
27672
|
showSplits: !0
|
27683
27673
|
}));
|
27684
27674
|
}, [r]);
|
27685
|
-
const
|
27675
|
+
const w = async () => {
|
27686
27676
|
r && (await u({
|
27687
27677
|
...r,
|
27688
27678
|
amount: Number(E),
|
@@ -27719,14 +27709,14 @@ const oy = ({
|
|
27719
27709
|
disablePrimaryButton: Number(E) <= 0,
|
27720
27710
|
isOpen: p,
|
27721
27711
|
onClose: () => C(!1),
|
27722
|
-
onPrimaryAction:
|
27712
|
+
onPrimaryAction: w,
|
27723
27713
|
primaryText: n.edit_save_button,
|
27724
27714
|
children: /* @__PURE__ */ t(
|
27725
27715
|
La,
|
27726
27716
|
{
|
27727
27717
|
amount: E,
|
27728
27718
|
categoryName: r.category.name,
|
27729
|
-
onAmountChanged:
|
27719
|
+
onAmountChanged: v
|
27730
27720
|
}
|
27731
27721
|
)
|
27732
27722
|
}
|
@@ -27790,8 +27780,8 @@ const oy = ({
|
|
27790
27780
|
] });
|
27791
27781
|
}), Sy = x(() => {
|
27792
27782
|
const e = Te(), { onEvent: n } = z(), { visibleAccounts: i } = Se(), { budgets: a, common: o, recurring: r } = A(), { incomeCategories: s, spendCategories: c } = Ve(), { detailedBudgets: l, totalBudgeted: u } = ut(), { incomeTotal: _ } = rt(), { setFilter: h } = Le(), [m, p] = g.useState(!1), [C, S] = g.useMemo(() => {
|
27793
|
-
const
|
27794
|
-
let I =
|
27783
|
+
const w = c.reduce((O, M) => O + M.totalAmount, 0);
|
27784
|
+
let I = w / u;
|
27795
27785
|
I > 1 && (I = 1);
|
27796
27786
|
let N = e.palette.success.main;
|
27797
27787
|
I > 0.8 && I < 1 ? N = e.palette.warning.main : I >= 1 && (N = e.palette.error.main);
|
@@ -27801,12 +27791,12 @@ const oy = ({
|
|
27801
27791
|
percentage: `${I}`
|
27802
27792
|
}
|
27803
27793
|
];
|
27804
|
-
return [
|
27794
|
+
return [w, L];
|
27805
27795
|
}, [l, c]), [y, E] = g.useMemo(() => {
|
27806
|
-
const
|
27796
|
+
const w = Math.abs(
|
27807
27797
|
s.reduce((L, O) => L + O.totalAmount, 0)
|
27808
27798
|
);
|
27809
|
-
let I =
|
27799
|
+
let I = w / _;
|
27810
27800
|
I > 1 && (I = 1);
|
27811
27801
|
const N = [
|
27812
27802
|
{
|
@@ -27814,10 +27804,10 @@ const oy = ({
|
|
27814
27804
|
percentage: `${I}`
|
27815
27805
|
}
|
27816
27806
|
];
|
27817
|
-
return [
|
27818
|
-
}, [s, _]),
|
27807
|
+
return [w, N];
|
27808
|
+
}, [s, _]), v = () => {
|
27819
27809
|
h({
|
27820
|
-
accounts: i.map((
|
27810
|
+
accounts: i.map((w) => w.guid),
|
27821
27811
|
dateRange: {
|
27822
27812
|
start: Ft(/* @__PURE__ */ new Date(), 90),
|
27823
27813
|
end: /* @__PURE__ */ new Date()
|
@@ -27843,7 +27833,7 @@ const oy = ({
|
|
27843
27833
|
Ue,
|
27844
27834
|
{
|
27845
27835
|
"aria-label": r.manage_income,
|
27846
|
-
onClick:
|
27836
|
+
onClick: v,
|
27847
27837
|
sx: { p: 0 },
|
27848
27838
|
children: /* @__PURE__ */ t($, { color: "primary", name: "edit" })
|
27849
27839
|
}
|
@@ -27879,10 +27869,10 @@ const oy = ({
|
|
27879
27869
|
loadBudgetData: S,
|
27880
27870
|
setDateRange: y,
|
27881
27871
|
setAlert: E,
|
27882
|
-
setTheme:
|
27883
|
-
detailedBudgets:
|
27872
|
+
setTheme: v,
|
27873
|
+
detailedBudgets: w
|
27884
27874
|
} = ut(), { loadRepeatingTransactions: I, setDateRange: N } = rt(), { reloadCategoryTotals: L } = Ve(), { isSmallTablet: O, isMobile: M, isSmallMobile: G } = Ce(), k = O || M || G, [U, V] = g.useState(!1);
|
27885
|
-
g.useEffect(() => (
|
27875
|
+
g.useEffect(() => (v(i), h(o), y({ start: Ke(Ae()), end: je(Ae()) }), a(H.BUDGETS_VIEW), () => {
|
27886
27876
|
y({ start: Ke(Ae()), end: je(Ae()) });
|
27887
27877
|
}), []), g.useEffect(() => {
|
27888
27878
|
h(o);
|
@@ -27934,11 +27924,11 @@ const oy = ({
|
|
27934
27924
|
createBudgetOnClick: he,
|
27935
27925
|
height: k ? 450 : 800,
|
27936
27926
|
isDraggable: !0,
|
27937
|
-
shouldShowZeroState:
|
27927
|
+
shouldShowZeroState: w.length === 0,
|
27938
27928
|
unavailableWidth: k ? 0 : Ls
|
27939
27929
|
}
|
27940
27930
|
) }),
|
27941
|
-
|
27931
|
+
w.length !== 0 && /* @__PURE__ */ d(
|
27942
27932
|
b,
|
27943
27933
|
{
|
27944
27934
|
gap: 24,
|
@@ -28270,32 +28260,32 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
28270
28260
|
), m = _ + l;
|
28271
28261
|
Dy.forEach((C, S) => {
|
28272
28262
|
const y = c.filter(
|
28273
|
-
(
|
28263
|
+
(w) => !!w[C.name]
|
28274
28264
|
);
|
28275
28265
|
let E = y.reduce(
|
28276
|
-
(
|
28266
|
+
(w, I) => w + ea(I) * I[C.name] / 100,
|
28277
28267
|
0
|
28278
28268
|
);
|
28279
|
-
const
|
28269
|
+
const v = Ry(
|
28280
28270
|
y,
|
28281
28271
|
C.name,
|
28282
28272
|
E
|
28283
28273
|
);
|
28284
28274
|
if (C.name === "allocations_cash" && l > 0) {
|
28285
28275
|
E += l;
|
28286
|
-
const
|
28276
|
+
const w = {
|
28287
28277
|
displayName: n.cash_balance_display_name,
|
28288
28278
|
name: "allocations_name",
|
28289
28279
|
value: l,
|
28290
28280
|
percentage: l / m
|
28291
28281
|
};
|
28292
|
-
|
28282
|
+
v.push(w);
|
28293
28283
|
}
|
28294
28284
|
E > 0 && (o.push({
|
28295
28285
|
name: C.name,
|
28296
28286
|
displayName: a[S],
|
28297
28287
|
guid: `${C.name}-${S}`,
|
28298
|
-
holdings:
|
28288
|
+
holdings: v,
|
28299
28289
|
percentage: E / m,
|
28300
28290
|
value: E,
|
28301
28291
|
color: wy[C.name]
|
@@ -28435,7 +28425,7 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
28435
28425
|
totalLabel: l
|
28436
28426
|
}) => {
|
28437
28427
|
const u = Te(), _ = u.palette.mode === "dark", h = g.useMemo(
|
28438
|
-
() => s ? e.investmentsData.find(({ guid:
|
28428
|
+
() => s ? e.investmentsData.find(({ guid: v }) => v === s) : void 0,
|
28439
28429
|
[s]
|
28440
28430
|
), {
|
28441
28431
|
investments: { allocation: m }
|
@@ -28697,17 +28687,17 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
28697
28687
|
}
|
28698
28688
|
),
|
28699
28689
|
n.map((p, C, S) => /* @__PURE__ */ t(b, { sx: { flexDirection: "row", gap: 4 }, children: p.map((y, E) => {
|
28700
|
-
const
|
28690
|
+
const v = C === 0, w = C === S.length - 1, I = E === 0, N = E === p.length - 1, L = Number(y.replace("%", "")) >= 25;
|
28701
28691
|
let O = "grey.200", M = "grey.900";
|
28702
28692
|
return l ? (O = L ? "grey.200" : "grey.700", M = L ? "grey.900" : "common.white") : (O = L ? "grey.700" : "grey.200", M = L ? "common.white" : "grey.900"), /* @__PURE__ */ t(
|
28703
28693
|
b,
|
28704
28694
|
{
|
28705
28695
|
sx: {
|
28706
28696
|
...{
|
28707
|
-
borderBottomLeftRadius:
|
28708
|
-
borderBottomRightRadius:
|
28709
|
-
borderTopLeftRadius:
|
28710
|
-
borderTopRightRadius:
|
28697
|
+
borderBottomLeftRadius: w && I ? 4 : 0,
|
28698
|
+
borderBottomRightRadius: w && N ? 4 : 0,
|
28699
|
+
borderTopLeftRadius: v && I ? 4 : 0,
|
28700
|
+
borderTopRightRadius: v && N ? 4 : 0
|
28711
28701
|
},
|
28712
28702
|
alignItems: "center",
|
28713
28703
|
bgcolor: O,
|
@@ -29240,11 +29230,11 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
29240
29230
|
const { isMobile: e } = Ce(), [n, i] = It({}), [a, o] = It(!1), { selectedAccountGuids: r } = le(), { visibleHoldings: s, updateHoldings: c } = Zn(), [l, u] = g.useState(!1), [_, h] = It({
|
29241
29231
|
accounts: [],
|
29242
29232
|
holdings: []
|
29243
|
-
}), { accounts: m, investments: p } = A(), { isCopyLoaded: C } = le(), [S, y] = It(null), [E,
|
29244
|
-
y(Z),
|
29233
|
+
}), { accounts: m, investments: p } = A(), { isCopyLoaded: C } = le(), [S, y] = It(null), [E, v] = It(""), I = Te().palette.mode === "dark", N = I ? "#0AC295" : "#09A57F", L = I ? "grey.300" : "grey.700", O = (Z, q = "lesserThan") => q === "greaterThan" ? Z >= 0 ? N : L : Z <= 0 ? L : N, M = (Z, q) => {
|
29234
|
+
y(Z), v(q.toFixed(2));
|
29245
29235
|
}, G = (Z) => {
|
29246
29236
|
const q = Z.target.value;
|
29247
|
-
/^\d*\.?\d*$/.test(q) &&
|
29237
|
+
/^\d*\.?\d*$/.test(q) && v(q);
|
29248
29238
|
}, k = (Z, q) => {
|
29249
29239
|
Z.key === "Enter" ? U(q) : Z.key === "Escape" && y(null);
|
29250
29240
|
}, U = (Z) => {
|
@@ -29674,7 +29664,7 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
29674
29664
|
H.INVESTMENT_WIDGET_DETAILS_CLICK,
|
29675
29665
|
H.INVESTMENT_WIDGET_ALLOCATION_CLICK,
|
29676
29666
|
H.INVESTMENT_WIDGET_ANALYSIS_CLICK
|
29677
|
-
],
|
29667
|
+
], v = o.length === 0 && r.length === 0, w = [
|
29678
29668
|
l.tab_overview_title,
|
29679
29669
|
l.tab_allocation_title,
|
29680
29670
|
l.tab_analysis_title
|
@@ -29697,12 +29687,12 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
29697
29687
|
},
|
29698
29688
|
sx: { bgcolor: "background.paper" },
|
29699
29689
|
textColor: "primary",
|
29700
|
-
value:
|
29690
|
+
value: v ? -1 : p,
|
29701
29691
|
variant: "fullWidth",
|
29702
|
-
children:
|
29692
|
+
children: w.map((I) => /* @__PURE__ */ t(tt, { disabled: v, label: /* @__PURE__ */ t(Yy, { title: I }) }, I))
|
29703
29693
|
}
|
29704
29694
|
),
|
29705
|
-
|
29695
|
+
v ? /* @__PURE__ */ t(
|
29706
29696
|
jn,
|
29707
29697
|
{
|
29708
29698
|
header: l.empty_state_header,
|
@@ -29923,8 +29913,8 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
29923
29913
|
), C = g.useMemo(
|
29924
29914
|
() => Pl(o, r, l),
|
29925
29915
|
[o, r, l]
|
29926
|
-
), S = (E,
|
29927
|
-
m(
|
29916
|
+
), S = (E, v) => {
|
29917
|
+
m(v), _("");
|
29928
29918
|
}, y = (E) => {
|
29929
29919
|
_(u === E ? "" : E);
|
29930
29920
|
};
|
@@ -30140,7 +30130,7 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
30140
30130
|
e.palette.chartMono.chartMono1,
|
30141
30131
|
e.palette.chartMono.chartMono6
|
30142
30132
|
], iS = () => {
|
30143
|
-
const e = _n(), { clientConfig: n } = Mt(), { categories: i, dateRangeCategoryTotals: a, loadDateRangeCategoryTotals: o } = Ve(), { goals: r, spending: s } = A(), { displayedDateRange: c, selectedAccounts: l, selectedAccountGuids: u } = le(), { setFilter: _, sortedTransactions: h } = Le(), m = n?.master?.deep_link_params?.account_guids, p = n?.master?.deep_link_params?.view, [C, S] = g.useState(""), [y, E] = g.useState(p === "income" ? 1 : 0), [
|
30133
|
+
const e = _n(), { clientConfig: n } = Mt(), { categories: i, dateRangeCategoryTotals: a, loadDateRangeCategoryTotals: o } = Ve(), { goals: r, spending: s } = A(), { displayedDateRange: c, selectedAccounts: l, selectedAccountGuids: u } = le(), { setFilter: _, sortedTransactions: h } = Le(), m = n?.master?.deep_link_params?.account_guids, p = n?.master?.deep_link_params?.view, [C, S] = g.useState(""), [y, E] = g.useState(p === "income" ? 1 : 0), [v, w] = g.useState(""), [I, N] = g.useState(!1);
|
30144
30134
|
g.useEffect(() => {
|
30145
30135
|
o(
|
30146
30136
|
l,
|
@@ -30155,8 +30145,8 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
30155
30145
|
() => Pl(i, a, nS(e)),
|
30156
30146
|
[i, a]
|
30157
30147
|
), M = g.useMemo(
|
30158
|
-
() => h.find((V) => V.guid ===
|
30159
|
-
[
|
30148
|
+
() => h.find((V) => V.guid === v),
|
30149
|
+
[v, h]
|
30160
30150
|
), G = (V, ae) => {
|
30161
30151
|
E(ae), S("");
|
30162
30152
|
}, k = (V) => {
|
@@ -30240,7 +30230,7 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
30240
30230
|
isOpen: I,
|
30241
30231
|
onClose: () => N(!1),
|
30242
30232
|
title: s.transactions_drawer_title,
|
30243
|
-
children: /* @__PURE__ */ t(Gn, { onClick:
|
30233
|
+
children: /* @__PURE__ */ t(Gn, { onClick: w })
|
30244
30234
|
}
|
30245
30235
|
),
|
30246
30236
|
/* @__PURE__ */ t(
|
@@ -30248,7 +30238,7 @@ const vy = ({ widgets: e, isLoading: n }) => {
|
|
30248
30238
|
{
|
30249
30239
|
ariaLabelClose: s.close_drawer_aria,
|
30250
30240
|
isOpen: !!M,
|
30251
|
-
onClose: () =>
|
30241
|
+
onClose: () => w(""),
|
30252
30242
|
title: s.transaction_details_drawer_title,
|
30253
30243
|
children: M && /* @__PURE__ */ t(oi, { transaction: M })
|
30254
30244
|
}
|