@mx-cartographer/experiences 6.0.20 → 6.0.21
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
CHANGED
package/dist/index.es.js
CHANGED
@@ -20813,26 +20813,27 @@ const A3 = ({
|
|
20813
20813
|
kR(Wt, A, t), i && WR(Wt);
|
20814
20814
|
}, [Wt, A, t]), /* @__PURE__ */ e("svg", { height: A, style: { overflow: "visible" }, width: Math.abs(t), children: Wt.nodes().map((o) => /* @__PURE__ */ e($R, { bubble: o, isDraggable: i, onClick: n }, o.guid)) });
|
20815
20815
|
}, e3 = g(A3), t3 = ({
|
20816
|
-
|
20817
|
-
|
20816
|
+
isMiniWidget: A = !1,
|
20817
|
+
onConnectAccountsClick: t,
|
20818
|
+
createBudgetOnClick: i
|
20818
20819
|
}) => {
|
20819
|
-
const { recalculateBudgets:
|
20820
|
-
|
20821
|
-
const { data:
|
20822
|
-
|
20820
|
+
const { recalculateBudgets: n } = te(), { spendCategories: r } = QA(), { budgets: o } = p(), [a, s] = h.useState(!1), [c, E] = h.useState(!1), [d, f] = h.useState(!1), l = h.useMemo(() => [...r.filter((u) => u.totalAverageAmount > 0)], [r]), v = async () => {
|
20821
|
+
f(!0);
|
20822
|
+
const { data: u, isSuccess: H } = await n(l);
|
20823
|
+
f(!1), H ? (u.length === 0 && s(!0), E(!1)) : E(!0);
|
20823
20824
|
};
|
20824
|
-
return
|
20825
|
+
return d ? /* @__PURE__ */ e(IA, {}) : c ? /* @__PURE__ */ e(
|
20825
20826
|
Ai,
|
20826
20827
|
{
|
20827
|
-
header:
|
20828
|
+
header: o.autogenerate_budgets_error_header,
|
20828
20829
|
icon: "error",
|
20829
20830
|
iconColor: "#4D4D4D",
|
20830
|
-
onClick: (
|
20831
|
-
|
20831
|
+
onClick: (u) => {
|
20832
|
+
u === "primary" ? v() : i();
|
20832
20833
|
},
|
20833
|
-
primaryButton:
|
20834
|
+
primaryButton: o.autogenerate_budgets_error_primary_button,
|
20834
20835
|
secondaryButton: "Create My Own Budgets",
|
20835
|
-
subText:
|
20836
|
+
subText: o.autogenerate_budgets_error_subheader,
|
20836
20837
|
sx: {
|
20837
20838
|
width: { sm: 468 },
|
20838
20839
|
".buttons-footer": {
|
@@ -20840,18 +20841,18 @@ const A3 = ({
|
|
20840
20841
|
}
|
20841
20842
|
}
|
20842
20843
|
}
|
20843
|
-
) : /* @__PURE__ */ e(AA, { children:
|
20844
|
+
) : /* @__PURE__ */ e(AA, { children: a ? /* @__PURE__ */ e(
|
20844
20845
|
Ai,
|
20845
20846
|
{
|
20846
|
-
header:
|
20847
|
+
header: o.zero_state_generate_budgets_header,
|
20847
20848
|
icon: "error",
|
20848
20849
|
iconColor: "#4D4D4D",
|
20849
|
-
onClick: (
|
20850
|
-
|
20850
|
+
onClick: (u) => {
|
20851
|
+
u === "primary" ? t() : i();
|
20851
20852
|
},
|
20852
|
-
primaryButton:
|
20853
|
-
secondaryButton:
|
20854
|
-
subText:
|
20853
|
+
primaryButton: o.zero_state_generate_budgets_primary_button,
|
20854
|
+
secondaryButton: o.zero_state_generate_budgets_secondary_button,
|
20855
|
+
subText: o.zero_state_generate_budgets_subheader,
|
20855
20856
|
sx: {
|
20856
20857
|
width: { sm: 500 },
|
20857
20858
|
height: { sm: 468 },
|
@@ -20865,15 +20866,15 @@ const A3 = ({
|
|
20865
20866
|
) : /* @__PURE__ */ e(
|
20866
20867
|
Ai,
|
20867
20868
|
{
|
20868
|
-
header:
|
20869
|
+
header: o.create_budgets_title,
|
20869
20870
|
icon: "bubble_chart",
|
20870
20871
|
iconColor: "#1A1A1A",
|
20871
|
-
onClick: (
|
20872
|
-
|
20872
|
+
onClick: (u) => {
|
20873
|
+
u === "primary" ? v() : i();
|
20873
20874
|
},
|
20874
|
-
primaryButton:
|
20875
|
-
secondaryButton:
|
20876
|
-
subText:
|
20875
|
+
primaryButton: o.empty_state_primary_button,
|
20876
|
+
secondaryButton: A ? void 0 : o.empty_state_secondary_button,
|
20877
|
+
subText: o.empty_state_subheader,
|
20877
20878
|
sx: {
|
20878
20879
|
width: { sm: 432 },
|
20879
20880
|
height: { sm: 468 },
|
@@ -20891,39 +20892,41 @@ const A3 = ({
|
|
20891
20892
|
},
|
20892
20893
|
height: t,
|
20893
20894
|
isDraggable: i = !1,
|
20894
|
-
|
20895
|
-
|
20895
|
+
isMiniWidget: n = !1,
|
20896
|
+
shouldShowZeroState: r,
|
20897
|
+
unavailableWidth: o = 24
|
20896
20898
|
}) => {
|
20897
|
-
const { onEvent:
|
20898
|
-
|
20899
|
-
budget_category:
|
20899
|
+
const { onEvent: a } = J(), { setSelectedBudget: s } = te(), { isLoadingCategoryTotals: c } = QA(), { isInitialized: E } = cA(), { accounts: d } = p(), { availableWidth: f } = wt(), { isMobile: l } = HA(), [v, u] = h.useState(!1), H = h.useMemo(() => f - o, [f]), P = (y) => {
|
20900
|
+
s(y), a(Y.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
20901
|
+
budget_category: y.category.name,
|
20900
20902
|
click_type: "bubble"
|
20901
20903
|
});
|
20902
|
-
},
|
20903
|
-
|
20904
|
+
}, C = () => {
|
20905
|
+
u(!0), a(Y.ACCOUNTS_CLICK_CONNECT);
|
20904
20906
|
};
|
20905
|
-
return
|
20906
|
-
|
20907
|
+
return c ? /* @__PURE__ */ e(b, { alignItems: "center", height: t, justifyContent: "center", width: Math.abs(H), children: /* @__PURE__ */ e(IA, {}) }) : /* @__PURE__ */ I(L, { ml: r || l ? 0 : 24, sx: { alignSelf: "center" }, children: [
|
20908
|
+
r || !E ? /* @__PURE__ */ e(
|
20907
20909
|
t3,
|
20908
20910
|
{
|
20909
20911
|
createBudgetOnClick: A,
|
20910
|
-
|
20912
|
+
isMiniWidget: n,
|
20913
|
+
onConnectAccountsClick: C
|
20911
20914
|
}
|
20912
20915
|
) : /* @__PURE__ */ e(
|
20913
20916
|
e3,
|
20914
20917
|
{
|
20915
20918
|
height: t,
|
20916
20919
|
isDraggable: i,
|
20917
|
-
onClick:
|
20918
|
-
width:
|
20920
|
+
onClick: P,
|
20921
|
+
width: H
|
20919
20922
|
}
|
20920
20923
|
),
|
20921
20924
|
/* @__PURE__ */ e(
|
20922
20925
|
or,
|
20923
20926
|
{
|
20924
|
-
onClose: () =>
|
20925
|
-
showConnectionsWidget:
|
20926
|
-
title:
|
20927
|
+
onClose: () => u(!1),
|
20928
|
+
showConnectionsWidget: v,
|
20929
|
+
title: d.manage_connections
|
20927
20930
|
}
|
20928
20931
|
)
|
20929
20932
|
] });
|
@@ -20943,7 +20946,14 @@ const A3 = ({
|
|
20943
20946
|
title: s.budgets_title,
|
20944
20947
|
...A,
|
20945
20948
|
children: r ? /* @__PURE__ */ I(b, { height: 450, mt: 32, children: [
|
20946
|
-
/* @__PURE__ */ e(
|
20949
|
+
/* @__PURE__ */ e(
|
20950
|
+
$a,
|
20951
|
+
{
|
20952
|
+
height: 370,
|
20953
|
+
isMiniWidget: !0,
|
20954
|
+
shouldShowZeroState: l
|
20955
|
+
}
|
20956
|
+
),
|
20947
20957
|
!l && /* @__PURE__ */ I(L, { ml: 16, children: [
|
20948
20958
|
/* @__PURE__ */ e(R, { bold: !0, color: f < 0 ? "error.main" : "success.main", children: N(Math.abs(f), "0,0") }),
|
20949
20959
|
/* @__PURE__ */ e(R, { children: f < 0 ? s.overspent_in_budgets : s.left_in_budgets })
|