@mx-cartographer/experiences 6.0.17-alpha-ram3-budgets-empty-state → 6.0.17-alpha-ram4-error-budgets-empty-state
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.
|
@@ -2,8 +2,6 @@ import { default as React } from 'react';
|
|
|
2
2
|
interface BudgetsEmptyStateProps {
|
|
3
3
|
onConnectAccountsClick: () => void;
|
|
4
4
|
createBudgetOnClick: () => void;
|
|
5
|
-
height?: number;
|
|
6
|
-
width?: number;
|
|
7
5
|
}
|
|
8
6
|
export declare const BudgetsEmptyState: React.FC<BudgetsEmptyStateProps>;
|
|
9
7
|
export {};
|
package/dist/index.es.js
CHANGED
|
@@ -4002,7 +4002,7 @@ class Mr {
|
|
|
4002
4002
|
throw i;
|
|
4003
4003
|
});
|
|
4004
4004
|
getBudgets = async () => this.fetchInstance.get(Q.BUDGETS).then((t) => t.budgets).catch((t) => t);
|
|
4005
|
-
updateBudget = async (t) => this.fetchInstance.put(`${Q.BUDGETS}/${t.guid}`, t).then((i) => i.budget).catch((i) => {
|
|
4005
|
+
updateBudget = async (t) => this.fetchInstance.put(`${Q.BUDGETS}/${t.guid}/hell`, t).then((i) => i.budget).catch((i) => {
|
|
4006
4006
|
throw i;
|
|
4007
4007
|
});
|
|
4008
4008
|
}
|
|
@@ -20603,27 +20603,30 @@ const WR = ({
|
|
|
20603
20603
|
}, [Ft, A, t]), /* @__PURE__ */ e("svg", { height: A, style: { overflow: "visible" }, width: Math.abs(t), children: Ft.nodes().map((o) => /* @__PURE__ */ e(FR, { bubble: o, isDraggable: i, onClick: n }, o.guid)) });
|
|
20604
20604
|
}, kR = g(WR), KR = ({
|
|
20605
20605
|
onConnectAccountsClick: A,
|
|
20606
|
-
createBudgetOnClick: t
|
|
20607
|
-
height
|
|
20608
|
-
width
|
|
20606
|
+
createBudgetOnClick: t
|
|
20607
|
+
// height,
|
|
20608
|
+
// width,
|
|
20609
20609
|
}) => {
|
|
20610
|
-
const { recalculateBudgets:
|
|
20611
|
-
|
|
20612
|
-
const { data:
|
|
20613
|
-
|
|
20614
|
-
};
|
|
20615
|
-
return
|
|
20610
|
+
const { recalculateBudgets: i } = ee(), { isMobile: n } = HA(), { spendCategories: r } = QA(), { budgets: o } = p(), [a, s] = h.useState(!1), [c, f] = h.useState(!1), [d, E] = h.useState(!1), l = h.useMemo(() => [...r.filter((u) => u.totalAverageAmount > 0)], [r]), v = async () => {
|
|
20611
|
+
E(!0);
|
|
20612
|
+
const { data: u, isSuccess: H } = await i(l);
|
|
20613
|
+
E(!1), H ? (u.length === 0 && s(!0), f(!1)) : f(!0);
|
|
20614
|
+
};
|
|
20615
|
+
return d ? (
|
|
20616
|
+
// <Stack alignItems="center" height={height} width={Math.abs(width!)}>
|
|
20617
|
+
/* @__PURE__ */ e(IA, {})
|
|
20618
|
+
) : c ? /* @__PURE__ */ e(
|
|
20616
20619
|
$t,
|
|
20617
20620
|
{
|
|
20618
|
-
header:
|
|
20621
|
+
header: o.autogenerate_budgets_error_header,
|
|
20619
20622
|
icon: "error",
|
|
20620
20623
|
iconColor: "#4D4D4D",
|
|
20621
|
-
onClick: (
|
|
20622
|
-
|
|
20624
|
+
onClick: (u) => {
|
|
20625
|
+
u === "primary" ? v() : t();
|
|
20623
20626
|
},
|
|
20624
|
-
primaryButton:
|
|
20627
|
+
primaryButton: o.autogenerate_budgets_error_primary_button,
|
|
20625
20628
|
secondaryButton: "Create My Own Budgets",
|
|
20626
|
-
subText:
|
|
20629
|
+
subText: o.autogenerate_budgets_error_subheader,
|
|
20627
20630
|
sx: {
|
|
20628
20631
|
width: { sm: 468 },
|
|
20629
20632
|
".buttons-footer": {
|
|
@@ -20631,37 +20634,37 @@ const WR = ({
|
|
|
20631
20634
|
}
|
|
20632
20635
|
}
|
|
20633
20636
|
}
|
|
20634
|
-
) : /* @__PURE__ */ e(AA, { children:
|
|
20637
|
+
) : /* @__PURE__ */ e(AA, { children: a ? /* @__PURE__ */ e(
|
|
20635
20638
|
$t,
|
|
20636
20639
|
{
|
|
20637
|
-
header:
|
|
20640
|
+
header: o.zero_state_generate_budgets_header,
|
|
20638
20641
|
icon: "error",
|
|
20639
20642
|
iconColor: "#4D4D4D",
|
|
20640
|
-
onClick: (
|
|
20641
|
-
|
|
20643
|
+
onClick: (u) => {
|
|
20644
|
+
u === "primary" ? A() : t();
|
|
20642
20645
|
},
|
|
20643
|
-
primaryButton:
|
|
20644
|
-
secondaryButton:
|
|
20645
|
-
subText:
|
|
20646
|
+
primaryButton: o.zero_state_generate_budgets_primary_button,
|
|
20647
|
+
secondaryButton: o.zero_state_generate_budgets_secondary_button,
|
|
20648
|
+
subText: o.zero_state_generate_budgets_subheader,
|
|
20646
20649
|
sx: {
|
|
20647
|
-
width:
|
|
20650
|
+
width: n ? 320 : 500,
|
|
20648
20651
|
mt: 86
|
|
20649
20652
|
}
|
|
20650
20653
|
}
|
|
20651
20654
|
) : /* @__PURE__ */ e(
|
|
20652
20655
|
$t,
|
|
20653
20656
|
{
|
|
20654
|
-
header:
|
|
20657
|
+
header: o.create_budgets_title,
|
|
20655
20658
|
icon: "bubble_chart",
|
|
20656
20659
|
iconColor: "#1A1A1A",
|
|
20657
|
-
onClick: (
|
|
20658
|
-
|
|
20660
|
+
onClick: (u) => {
|
|
20661
|
+
u === "primary" ? v() : t();
|
|
20659
20662
|
},
|
|
20660
|
-
primaryButton:
|
|
20661
|
-
secondaryButton:
|
|
20662
|
-
subText:
|
|
20663
|
+
primaryButton: o.empty_state_primary_button,
|
|
20664
|
+
secondaryButton: o.empty_state_secondary_button,
|
|
20665
|
+
subText: o.empty_state_subheader,
|
|
20663
20666
|
sx: {
|
|
20664
|
-
width:
|
|
20667
|
+
width: n ? 320 : 432,
|
|
20665
20668
|
mt: 86
|
|
20666
20669
|
}
|
|
20667
20670
|
}
|
|
@@ -20688,9 +20691,7 @@ const WR = ({
|
|
|
20688
20691
|
KR,
|
|
20689
20692
|
{
|
|
20690
20693
|
createBudgetOnClick: A,
|
|
20691
|
-
|
|
20692
|
-
onConnectAccountsClick: P,
|
|
20693
|
-
width: u
|
|
20694
|
+
onConnectAccountsClick: P
|
|
20694
20695
|
}
|
|
20695
20696
|
) : /* @__PURE__ */ e(
|
|
20696
20697
|
kR,
|