@mx-cartographer/experiences 9.7.194 → 9.7.196
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 +10 -0
- package/dist/common/components/Select.d.ts +1 -1
- package/dist/common/components/Select.es.js +27 -20
- package/dist/common/components/Select.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +16 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js +87 -73
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +54 -37
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.d.ts +23 -0
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js +352 -0
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/QuizMerchantBlock/QuizMerchantBlock.es.js +4 -4
- package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js +4 -4
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.d.ts +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js +12 -7
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.d.ts +4 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js +7 -5
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.d.ts +19 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js +126 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js +10 -10
- package/dist/insights-v2/components/TransactionListCard.es.js +4 -4
- package/package.json +1 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { buildDynamicCopy as
|
|
2
|
-
import { CURRENCY_FORMAT as
|
|
3
|
-
import { asNumber as
|
|
4
|
-
import { variants as
|
|
1
|
+
import { buildDynamicCopy as f } from "../../../core/utils/Localization.es.js";
|
|
2
|
+
import { CURRENCY_FORMAT as c, formatCurrency as m } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import { asNumber as a } from "../../blocks/slotReaders.es.js";
|
|
4
|
+
import { variants as _ } from "../../blocks/ChartBlocks/StepChartBlock/index.es.js";
|
|
5
|
+
import { useOpenedCta as h } from "../useOpenedCta.es.js";
|
|
5
6
|
import { useRequiredCopy as x } from "../useRequiredCopy.es.js";
|
|
6
|
-
import { stepForBalance as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { stepForBalance as y } from "./layout.es.js";
|
|
8
|
+
import { EmergencySavingsV2 as C, hasV2Copy as S } from "./EmergencySavingsV2.es.js";
|
|
9
|
+
import { SavingsCalculator as R } from "./SavingsCalculator.es.js";
|
|
10
|
+
import { observer as k } from "mobx-react-lite";
|
|
9
11
|
import i from "@mui/material/Stack";
|
|
10
|
-
import { Text as
|
|
11
|
-
import { jsx as
|
|
12
|
-
var
|
|
13
|
-
"aria-label":
|
|
12
|
+
import { Text as g } from "@mxenabled/mxui";
|
|
13
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
14
|
+
var d = ({ label: o, value: r }) => /* @__PURE__ */ t(i, {
|
|
15
|
+
"aria-label": o,
|
|
14
16
|
role: "group",
|
|
15
17
|
sx: {
|
|
16
18
|
border: "1px solid",
|
|
@@ -20,58 +22,73 @@ var m = ({ label: r, value: a }) => /* @__PURE__ */ n(i, {
|
|
|
20
22
|
gap: 4,
|
|
21
23
|
p: 12
|
|
22
24
|
},
|
|
23
|
-
children: [/* @__PURE__ */
|
|
25
|
+
children: [/* @__PURE__ */ e(g, {
|
|
24
26
|
color: "text.secondary",
|
|
25
27
|
variant: "caption",
|
|
26
|
-
children:
|
|
27
|
-
}), /* @__PURE__ */
|
|
28
|
+
children: o
|
|
29
|
+
}), /* @__PURE__ */ e(g, {
|
|
28
30
|
bold: !0,
|
|
29
31
|
component: "p",
|
|
30
32
|
variant: "h3",
|
|
31
|
-
children:
|
|
33
|
+
children: r
|
|
32
34
|
})]
|
|
33
|
-
}),
|
|
34
|
-
const
|
|
35
|
-
|
|
35
|
+
}), w = (o) => o.insights_feed?.emergency_savings, E = (o) => {
|
|
36
|
+
const r = a(o?.goal_amount), n = a(o?.savings_account_balance);
|
|
37
|
+
if (!(r === void 0 || r <= 0 || n === void 0))
|
|
38
|
+
return {
|
|
39
|
+
balance: n,
|
|
40
|
+
goal: r,
|
|
41
|
+
remaining: Math.max(0, a(o?.amount_remaining) ?? r - n),
|
|
42
|
+
monthlyContribution: a(o?.monthly_contribution) ?? 0,
|
|
43
|
+
monthContribution: a(o?.month_contribution) ?? 0
|
|
44
|
+
};
|
|
45
|
+
}, W = k(function({ beat: r }) {
|
|
46
|
+
const n = x(w), p = E(h(r)?.drilldown_data);
|
|
47
|
+
if (p && S(n)) return /* @__PURE__ */ e(C, {
|
|
48
|
+
copy: n,
|
|
49
|
+
facts: p
|
|
50
|
+
}, r.guid);
|
|
51
|
+
const l = a(r.insights_payload?.drilldown_data?.savings_account_balance) ?? 0, { goal: s, index: u, labelKey: v } = y(l), { WithText: b } = _;
|
|
52
|
+
return /* @__PURE__ */ t(i, {
|
|
36
53
|
sx: {
|
|
37
54
|
bgcolor: "background.default",
|
|
38
55
|
gap: 24,
|
|
39
56
|
p: 24
|
|
40
57
|
},
|
|
41
|
-
children: [/* @__PURE__ */
|
|
58
|
+
children: [/* @__PURE__ */ t(i, {
|
|
42
59
|
sx: {
|
|
43
60
|
bgcolor: "background.paper",
|
|
44
61
|
borderRadius: "8px",
|
|
45
62
|
gap: 16,
|
|
46
63
|
p: 16
|
|
47
64
|
},
|
|
48
|
-
children: [/* @__PURE__ */
|
|
49
|
-
completed_steps:
|
|
50
|
-
label_1:
|
|
51
|
-
label_2:
|
|
52
|
-
} }), /* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ e(b, { slotData: {
|
|
66
|
+
completed_steps: u,
|
|
67
|
+
label_1: n[v].toUpperCase(),
|
|
68
|
+
label_2: f(n.amount_in_savings, m(s, c.whole))
|
|
69
|
+
} }), /* @__PURE__ */ t(i, {
|
|
53
70
|
sx: {
|
|
54
71
|
flexDirection: "row",
|
|
55
72
|
gap: 12
|
|
56
73
|
},
|
|
57
|
-
children: [/* @__PURE__ */
|
|
58
|
-
label:
|
|
59
|
-
value:
|
|
60
|
-
}), /* @__PURE__ */
|
|
61
|
-
label:
|
|
62
|
-
value:
|
|
74
|
+
children: [/* @__PURE__ */ e(d, {
|
|
75
|
+
label: n.total_savings_balance,
|
|
76
|
+
value: m(l, c.cents)
|
|
77
|
+
}), /* @__PURE__ */ e(d, {
|
|
78
|
+
label: n.savings_goal,
|
|
79
|
+
value: m(s, c.whole)
|
|
63
80
|
})]
|
|
64
81
|
})]
|
|
65
|
-
}), /* @__PURE__ */
|
|
66
|
-
balance:
|
|
67
|
-
copy:
|
|
68
|
-
goal:
|
|
69
|
-
},
|
|
82
|
+
}), /* @__PURE__ */ e(R, {
|
|
83
|
+
balance: l,
|
|
84
|
+
copy: n,
|
|
85
|
+
goal: s
|
|
86
|
+
}, r.guid)]
|
|
70
87
|
});
|
|
71
88
|
});
|
|
72
89
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
90
|
+
W as EmergencySavingsBlock,
|
|
91
|
+
w as selectEmergencySavingsCopy
|
|
75
92
|
};
|
|
76
93
|
|
|
77
94
|
//# sourceMappingURL=EmergencySavingsBlock.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmergencySavingsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport { buildDynamicCopy } from '../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport type { GlobalCopy } from '../../../core'\nimport { variants as stepChartVariants } from '../../blocks/ChartBlocks/StepChartBlock'\nimport { asNumber } from '../../blocks/slotReaders'\nimport type { ActionBlockProps } from '../../mappings/blocks'\nimport { useRequiredCopy } from '../useRequiredCopy'\n\nimport { SavingsCalculator } from './SavingsCalculator'\nimport { stepForBalance } from './layout'\n\nconst AmountBox = ({ label, value }: { label: string; value: string }) => (\n <Stack\n aria-label={label}\n role=\"group\"\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n flex: 1,\n gap: 4,\n p: 12,\n }}\n >\n <Text color=\"text.secondary\" variant=\"caption\">\n {label}\n </Text>\n <Text bold={true} component=\"p\" variant=\"h3\">\n {value}\n </Text>\n </Stack>\n)\n\nexport const selectEmergencySavingsCopy = (copy: GlobalCopy) =>\n copy.insights_feed?.emergency_savings\n\nexport const EmergencySavingsBlock = observer(function EmergencySavingsBlock({\n beat,\n}: ActionBlockProps) {\n const copy = useRequiredCopy(selectEmergencySavingsCopy)\n\n const balance = asNumber(beat.insights_payload?.drilldown_data?.savings_account_balance) ?? 0\n const { goal, index, labelKey } = stepForBalance(balance)\n const { WithText: Stepper } = stepChartVariants\n\n return (\n <Stack sx={{ bgcolor: 'background.default', gap: 24, p: 24 }}>\n <Stack sx={{ bgcolor: 'background.paper', borderRadius: '8px', gap: 16, p: 16 }}>\n <Stepper\n slotData={{\n completed_steps: index,\n label_1: copy[labelKey].toUpperCase(),\n label_2: buildDynamicCopy(\n copy.amount_in_savings,\n formatCurrency(goal, CURRENCY_FORMAT.whole),\n ) as string,\n }}\n />\n <Stack sx={{ flexDirection: 'row', gap: 12 }}>\n <AmountBox\n label={copy.total_savings_balance}\n value={formatCurrency(balance, CURRENCY_FORMAT.cents)}\n />\n <AmountBox\n label={copy.savings_goal}\n value={formatCurrency(goal, CURRENCY_FORMAT.whole)}\n />\n </Stack>\n </Stack>\n <SavingsCalculator balance={balance} copy={copy} goal={goal} key={beat.guid} />\n </Stack>\n )\n})\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmergencySavingsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport { buildDynamicCopy } from '../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport type { GlobalCopy } from '../../../core'\nimport { variants as stepChartVariants } from '../../blocks/ChartBlocks/StepChartBlock'\nimport { asNumber } from '../../blocks/slotReaders'\nimport type { ActionBlockProps } from '../../mappings/blocks'\nimport { useOpenedCta } from '../useOpenedCta'\nimport { useRequiredCopy } from '../useRequiredCopy'\n\nimport { EmergencySavingsV2, hasV2Copy, type EmergencySavingsFacts } from './EmergencySavingsV2'\nimport { SavingsCalculator } from './SavingsCalculator'\nimport { stepForBalance } from './layout'\n\nconst AmountBox = ({ label, value }: { label: string; value: string }) => (\n <Stack\n aria-label={label}\n role=\"group\"\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n flex: 1,\n gap: 4,\n p: 12,\n }}\n >\n <Text color=\"text.secondary\" variant=\"caption\">\n {label}\n </Text>\n <Text bold={true} component=\"p\" variant=\"h3\">\n {value}\n </Text>\n </Stack>\n)\n\nexport const selectEmergencySavingsCopy = (copy: GlobalCopy) =>\n copy.insights_feed?.emergency_savings\n\n/** The V2 drawer's figures from the opening CTA, or undefined for a card without them (the legacy layout). */\nconst v2Facts = (data: Record<string, unknown> | undefined): EmergencySavingsFacts | undefined => {\n const goal = asNumber(data?.goal_amount)\n const balance = asNumber(data?.savings_account_balance)\n if (goal === undefined || goal <= 0 || balance === undefined) return undefined\n\n return {\n balance,\n goal,\n // One \"left to save\" for the card, the bar and the calculator; never negative.\n remaining: Math.max(0, asNumber(data?.amount_remaining) ?? goal - balance),\n monthlyContribution: asNumber(data?.monthly_contribution) ?? 0,\n monthContribution: asNumber(data?.month_contribution) ?? 0,\n }\n}\n\nexport const EmergencySavingsBlock = observer(function EmergencySavingsBlock({\n beat,\n}: ActionBlockProps) {\n const copy = useRequiredCopy(selectEmergencySavingsCopy)\n const facts = v2Facts(useOpenedCta(beat)?.drilldown_data)\n\n if (facts && hasV2Copy(copy))\n return <EmergencySavingsV2 copy={copy} facts={facts} key={beat.guid} />\n\n const balance = asNumber(beat.insights_payload?.drilldown_data?.savings_account_balance) ?? 0\n const { goal, index, labelKey } = stepForBalance(balance)\n const { WithText: Stepper } = stepChartVariants\n\n return (\n <Stack sx={{ bgcolor: 'background.default', gap: 24, p: 24 }}>\n <Stack sx={{ bgcolor: 'background.paper', borderRadius: '8px', gap: 16, p: 16 }}>\n <Stepper\n slotData={{\n completed_steps: index,\n label_1: copy[labelKey].toUpperCase(),\n label_2: buildDynamicCopy(\n copy.amount_in_savings,\n formatCurrency(goal, CURRENCY_FORMAT.whole),\n ) as string,\n }}\n />\n <Stack sx={{ flexDirection: 'row', gap: 12 }}>\n <AmountBox\n label={copy.total_savings_balance}\n value={formatCurrency(balance, CURRENCY_FORMAT.cents)}\n />\n <AmountBox\n label={copy.savings_goal}\n value={formatCurrency(goal, CURRENCY_FORMAT.whole)}\n />\n </Stack>\n </Stack>\n <SavingsCal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YS: readonly ["your_progress", "more_to_go", "saved_amount", "goal_amount", "contributed_this_month", "increase_your_transfer", "next_savings_goal", "per_month", "per_week", "per_two_weeks", "use_the_calculator", "how_often_will_you_contribute", "select_frequency", "add_timeline", "weekly", "monthly"];
|
|
3
|
+
/** The drawer's copy with every V2 key present. */
|
|
4
|
+
export type EmergencySavingsV2Copy = EmergencySavingsCopy & Required<Pick<EmergencySavingsCopy, (typeof V2_COPY_KEYS)[number]>>;
|
|
5
|
+
/** True once mrs_content ships the V2 drawer's words; otherwise the legacy drawer opens. */
|
|
6
|
+
export declare const hasV2Copy: (copy: EmergencySavingsCopy) => copy is EmergencySavingsV2Copy;
|
|
7
|
+
/** The figures the V2 card's CTA carries (ditto monthly_emergency_savings_reminder_v2.yml). */
|
|
8
|
+
export interface EmergencySavingsFacts {
|
|
9
|
+
balance: number;
|
|
10
|
+
goal: number;
|
|
11
|
+
remaining: number;
|
|
12
|
+
monthlyContribution: number;
|
|
13
|
+
monthContribution: number;
|
|
14
|
+
}
|
|
15
|
+
interface Props {
|
|
16
|
+
copy: EmergencySavingsV2Copy;
|
|
17
|
+
facts: EmergencySavingsFacts;
|
|
18
|
+
}
|
|
19
|
+
/** The Build Emergency Savings drawer (Figma 1152:27224): progress, the month banner, the estimate and calculator. */
|
|
20
|
+
export declare const EmergencySavingsV2: (({ copy, facts }: Props) => import("react/jsx-runtime").JSX.Element) & {
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { buildDynamicCopy as W } from "../../../core/utils/Localization.es.js";
|
|
2
|
+
import { CURRENCY_FORMAT as I, formatCurrency as T } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import { Select as S } from "../../../common/components/Select.es.js";
|
|
4
|
+
import { SMALL_CARD_SHADOW as H } from "../../components/shared/elevation.es.js";
|
|
5
|
+
import { CADENCES as V, DEADLINE_UNITS as x, calculateContribution as q } from "./layout.es.js";
|
|
6
|
+
import g from "react";
|
|
7
|
+
import { observer as F } from "mobx-react-lite";
|
|
8
|
+
import o from "@mui/material/Stack";
|
|
9
|
+
import { Text as i } from "@mxenabled/mxui";
|
|
10
|
+
import P from "@mui/material/Button";
|
|
11
|
+
import { Icon as C } from "@mxenabled/mx-icons";
|
|
12
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
13
|
+
import { alpha as U } from "@mui/material/styles";
|
|
14
|
+
import l from "@mui/material/Box";
|
|
15
|
+
import j from "@mui/material/TextField";
|
|
16
|
+
var z = [
|
|
17
|
+
"your_progress",
|
|
18
|
+
"more_to_go",
|
|
19
|
+
"saved_amount",
|
|
20
|
+
"goal_amount",
|
|
21
|
+
"contributed_this_month",
|
|
22
|
+
"increase_your_transfer",
|
|
23
|
+
"next_savings_goal",
|
|
24
|
+
"per_month",
|
|
25
|
+
"per_week",
|
|
26
|
+
"per_two_weeks",
|
|
27
|
+
"use_the_calculator",
|
|
28
|
+
"how_often_will_you_contribute",
|
|
29
|
+
"select_frequency",
|
|
30
|
+
"add_timeline",
|
|
31
|
+
"weekly",
|
|
32
|
+
"monthly"
|
|
33
|
+
], xe = (n) => z.every((e) => typeof n[e] == "string"), [$, Q, Z] = V, f = [
|
|
34
|
+
{
|
|
35
|
+
cadence: $,
|
|
36
|
+
labelKey: "weekly",
|
|
37
|
+
suffixKey: "per_week"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
cadence: Q,
|
|
41
|
+
labelKey: "every_other_week",
|
|
42
|
+
suffixKey: "per_two_weeks"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
cadence: Z,
|
|
46
|
+
labelKey: "monthly",
|
|
47
|
+
suffixKey: "per_month"
|
|
48
|
+
}
|
|
49
|
+
], G = f.findIndex(({ labelKey: n }) => n === "monthly"), J = x.findIndex(({ labelKey: n }) => n === "months"), X = "6", u = (n, ...e) => W(n, ...e), ee = (n) => n.replace(/[^0-9]/g, ""), m = (n) => T(n, I.whole), R = (n) => T(n, I.cents), fe = F(function({ copy: e, facts: k }) {
|
|
50
|
+
const { balance: s, goal: d, monthContribution: _, monthlyContribution: D, remaining: M } = k, v = s <= 0, y = d > 0 ? Math.round(Math.min(100, Math.max(0, s / d * 100))) : 0, [h, N] = g.useState(v ? "" : G), [p, K] = g.useState(v ? "" : X), [b, L] = g.useState(J), [w, O] = g.useState({
|
|
51
|
+
amount: D,
|
|
52
|
+
suffix: e.per_month
|
|
53
|
+
}), A = h !== "" && p !== "" && Number(p) > 0, B = (a) => {
|
|
54
|
+
if (a.preventDefault(), h === "") return;
|
|
55
|
+
const { cadence: c, suffixKey: Y } = f[h], E = q({
|
|
56
|
+
balance: s,
|
|
57
|
+
goal: d,
|
|
58
|
+
cadence: c,
|
|
59
|
+
deadline: x[b],
|
|
60
|
+
deadlineQuantity: Number(p)
|
|
61
|
+
});
|
|
62
|
+
E !== void 0 && O({
|
|
63
|
+
amount: E,
|
|
64
|
+
suffix: e[Y]
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ t(o, {
|
|
68
|
+
sx: { bgcolor: "background.default" },
|
|
69
|
+
children: [/* @__PURE__ */ r(l, {
|
|
70
|
+
sx: { p: 24 },
|
|
71
|
+
children: /* @__PURE__ */ t(o, {
|
|
72
|
+
"aria-label": e.your_progress,
|
|
73
|
+
role: "region",
|
|
74
|
+
sx: {
|
|
75
|
+
bgcolor: "background.paper",
|
|
76
|
+
borderRadius: "8px",
|
|
77
|
+
boxShadow: H,
|
|
78
|
+
gap: 16,
|
|
79
|
+
p: 16
|
|
80
|
+
},
|
|
81
|
+
children: [/* @__PURE__ */ t(o, {
|
|
82
|
+
sx: { gap: 12 },
|
|
83
|
+
children: [/* @__PURE__ */ t(o, {
|
|
84
|
+
sx: {
|
|
85
|
+
alignItems: "center",
|
|
86
|
+
flexDirection: "row",
|
|
87
|
+
gap: 8
|
|
88
|
+
},
|
|
89
|
+
children: [/* @__PURE__ */ r(l, {
|
|
90
|
+
"aria-hidden": !0,
|
|
91
|
+
sx: (a) => ({
|
|
92
|
+
alignItems: "center",
|
|
93
|
+
bgcolor: U(a.palette.primary.main, 0.15),
|
|
94
|
+
borderRadius: "4px",
|
|
95
|
+
display: "flex",
|
|
96
|
+
flexShrink: 0,
|
|
97
|
+
height: 40,
|
|
98
|
+
justifyContent: "center",
|
|
99
|
+
width: 40
|
|
100
|
+
}),
|
|
101
|
+
children: /* @__PURE__ */ r(C, {
|
|
102
|
+
color: "primary",
|
|
103
|
+
name: "savings",
|
|
104
|
+
size: 20
|
|
105
|
+
})
|
|
106
|
+
}), /* @__PURE__ */ t(o, { children: [/* @__PURE__ */ r(i, {
|
|
107
|
+
variant: "caption",
|
|
108
|
+
children: e.your_progress
|
|
109
|
+
}), /* @__PURE__ */ r(i, {
|
|
110
|
+
component: "p",
|
|
111
|
+
variant: "body2",
|
|
112
|
+
children: u(e.more_to_go, /* @__PURE__ */ r(i, {
|
|
113
|
+
component: "span",
|
|
114
|
+
sx: { fontWeight: "fontWeightBold" },
|
|
115
|
+
variant: "h2",
|
|
116
|
+
children: m(M)
|
|
117
|
+
}, "amount"))
|
|
118
|
+
})] })]
|
|
119
|
+
}), /* @__PURE__ */ t(o, {
|
|
120
|
+
sx: { gap: 4 },
|
|
121
|
+
children: [/* @__PURE__ */ r(l, {
|
|
122
|
+
"aria-label": W(e.saved_amount, m(s)),
|
|
123
|
+
"aria-valuemax": 100,
|
|
124
|
+
"aria-valuemin": 0,
|
|
125
|
+
"aria-valuenow": y,
|
|
126
|
+
role: "progressbar",
|
|
127
|
+
sx: {
|
|
128
|
+
bgcolor: "divider",
|
|
129
|
+
borderRadius: "6px",
|
|
130
|
+
height: 8,
|
|
131
|
+
overflow: "hidden"
|
|
132
|
+
},
|
|
133
|
+
children: /* @__PURE__ */ r(l, { sx: {
|
|
134
|
+
bgcolor: "primary.main",
|
|
135
|
+
borderRadius: "6px",
|
|
136
|
+
height: "100%",
|
|
137
|
+
width: `${y}%`
|
|
138
|
+
} })
|
|
139
|
+
}), /* @__PURE__ */ t(o, {
|
|
140
|
+
sx: {
|
|
141
|
+
flexDirection: "row",
|
|
142
|
+
justifyContent: "space-between"
|
|
143
|
+
},
|
|
144
|
+
children: [/* @__PURE__ */ r(i, {
|
|
145
|
+
color: "text.secondary",
|
|
146
|
+
variant: "caption",
|
|
147
|
+
children: u(e.saved_amount, m(s))
|
|
148
|
+
}), /* @__PURE__ */ r(i, {
|
|
149
|
+
color: "text.secondary",
|
|
150
|
+
variant: "caption",
|
|
151
|
+
children: u(e.goal_amount, m(d))
|
|
152
|
+
})]
|
|
153
|
+
})]
|
|
154
|
+
})]
|
|
155
|
+
}), _ > 0 && /* @__PURE__ */ t(o, {
|
|
156
|
+
role: "note",
|
|
157
|
+
sx: {
|
|
158
|
+
alignItems: "flex-start",
|
|
159
|
+
bgcolor: "primary.lighter",
|
|
160
|
+
borderRadius: "8px",
|
|
161
|
+
flexDirection: "row",
|
|
162
|
+
gap: 8,
|
|
163
|
+
p: 12
|
|
164
|
+
},
|
|
165
|
+
children: [/* @__PURE__ */ r(l, {
|
|
166
|
+
sx: {
|
|
167
|
+
pt: 2,
|
|
168
|
+
px: 4
|
|
169
|
+
},
|
|
170
|
+
children: /* @__PURE__ */ r(C, {
|
|
171
|
+
"aria-hidden": !0,
|
|
172
|
+
color: "primary",
|
|
173
|
+
name: "celebration",
|
|
174
|
+
size: 20
|
|
175
|
+
})
|
|
176
|
+
}), /* @__PURE__ */ t(i, {
|
|
177
|
+
color: "primary.dark",
|
|
178
|
+
component: "p",
|
|
179
|
+
sx: { fontWeight: "fontWeightRegular" },
|
|
180
|
+
variant: "subtitle2",
|
|
181
|
+
children: [
|
|
182
|
+
u(e.contributed_this_month, /* @__PURE__ */ r(i, {
|
|
183
|
+
component: "span",
|
|
184
|
+
sx: {
|
|
185
|
+
fontSize: "inherit",
|
|
186
|
+
fontWeight: "fontWeightBold"
|
|
187
|
+
},
|
|
188
|
+
children: R(_)
|
|
189
|
+
}, "amount")),
|
|
190
|
+
" ",
|
|
191
|
+
e.increase_your_transfer
|
|
192
|
+
]
|
|
193
|
+
})]
|
|
194
|
+
})]
|
|
195
|
+
})
|
|
196
|
+
}), /* @__PURE__ */ t(o, {
|
|
197
|
+
component: "form",
|
|
198
|
+
onSubmit: B,
|
|
199
|
+
sx: {
|
|
200
|
+
bgcolor: "background.paper",
|
|
201
|
+
borderColor: "divider",
|
|
202
|
+
borderTop: "1px solid",
|
|
203
|
+
gap: 32,
|
|
204
|
+
p: 24
|
|
205
|
+
},
|
|
206
|
+
children: [/* @__PURE__ */ t(o, {
|
|
207
|
+
sx: { gap: 8 },
|
|
208
|
+
children: [/* @__PURE__ */ t(o, {
|
|
209
|
+
"aria-label": e.estimated_contribution,
|
|
210
|
+
role: "group",
|
|
211
|
+
sx: {
|
|
212
|
+
border: "1px solid",
|
|
213
|
+
borderColor: "divider",
|
|
214
|
+
borderRadius: "4px"
|
|
215
|
+
},
|
|
216
|
+
children: [/* @__PURE__ */ r(l, {
|
|
217
|
+
sx: {
|
|
218
|
+
px: 8,
|
|
219
|
+
py: 4
|
|
220
|
+
},
|
|
221
|
+
children: /* @__PURE__ */ r(i, {
|
|
222
|
+
color: "text.secondary",
|
|
223
|
+
sx: {
|
|
224
|
+
letterSpacing: "0.4px",
|
|
225
|
+
textTransform: "uppercase"
|
|
226
|
+
},
|
|
227
|
+
variant: "caption",
|
|
228
|
+
children: u(e.next_savings_goal, /* @__PURE__ */ r(i, {
|
|
229
|
+
bold: !0,
|
|
230
|
+
component: "span",
|
|
231
|
+
sx: {
|
|
232
|
+
color: "text.primary",
|
|
233
|
+
fontSize: "inherit"
|
|
234
|
+
},
|
|
235
|
+
children: m(d)
|
|
236
|
+
}, "goal"))
|
|
237
|
+
})
|
|
238
|
+
}), /* @__PURE__ */ t(o, {
|
|
239
|
+
sx: {
|
|
240
|
+
alignItems: "center",
|
|
241
|
+
bgcolor: "background.default",
|
|
242
|
+
borderColor: "divider",
|
|
243
|
+
borderTop: "1px solid",
|
|
244
|
+
p: 12
|
|
245
|
+
},
|
|
246
|
+
children: [/* @__PURE__ */ t(o, {
|
|
247
|
+
sx: {
|
|
248
|
+
alignItems: "flex-end",
|
|
249
|
+
flexDirection: "row",
|
|
250
|
+
gap: 4
|
|
251
|
+
},
|
|
252
|
+
children: [/* @__PURE__ */ r(i, {
|
|
253
|
+
component: "p",
|
|
254
|
+
sx: { fontWeight: "fontWeightBold" },
|
|
255
|
+
variant: "h2",
|
|
256
|
+
children: R(w.amount)
|
|
257
|
+
}), /* @__PURE__ */ r(i, {
|
|
258
|
+
sx: { fontWeight: "fontWeightRegular" },
|
|
259
|
+
variant: "subtitle2",
|
|
260
|
+
children: w.suffix
|
|
261
|
+
})]
|
|
262
|
+
}), /* @__PURE__ */ r(i, {
|
|
263
|
+
color: "text.secondary",
|
|
264
|
+
sx: { fontWeight: "fontWeightRegular" },
|
|
265
|
+
variant: "subtitle2",
|
|
266
|
+
children: e.estimated_contribution
|
|
267
|
+
})]
|
|
268
|
+
})]
|
|
269
|
+
}), /* @__PURE__ */ r(i, {
|
|
270
|
+
color: "text.secondary",
|
|
271
|
+
sx: { textAlign: "center" },
|
|
272
|
+
truncate: !1,
|
|
273
|
+
variant: "caption",
|
|
274
|
+
children: e.use_the_calculator
|
|
275
|
+
})]
|
|
276
|
+
}), /* @__PURE__ */ t(o, {
|
|
277
|
+
sx: { gap: 16 },
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ r(S, {
|
|
280
|
+
label: e.how_often_will_you_contribute,
|
|
281
|
+
onChange: N,
|
|
282
|
+
options: f.map(({ labelKey: a }, c) => ({
|
|
283
|
+
id: c,
|
|
284
|
+
label: e[a]
|
|
285
|
+
})),
|
|
286
|
+
required: !0,
|
|
287
|
+
slotProps: {
|
|
288
|
+
inputLabel: { shrink: !0 },
|
|
289
|
+
select: {
|
|
290
|
+
displayEmpty: !0,
|
|
291
|
+
renderValue: (a) => a === "" ? e.select_frequency : e[f[a].labelKey]
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
value: h
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ t(o, {
|
|
297
|
+
"aria-label": e.meet_your_goal_within,
|
|
298
|
+
role: "group",
|
|
299
|
+
sx: { flexDirection: "row" },
|
|
300
|
+
children: [/* @__PURE__ */ r(j, {
|
|
301
|
+
fullWidth: !0,
|
|
302
|
+
label: e.meet_your_goal_within,
|
|
303
|
+
onChange: (a) => K(ee(a.target.value)),
|
|
304
|
+
placeholder: e.add_timeline,
|
|
305
|
+
slotProps: {
|
|
306
|
+
htmlInput: {
|
|
307
|
+
inputMode: "numeric",
|
|
308
|
+
pattern: "[0-9]*"
|
|
309
|
+
},
|
|
310
|
+
inputLabel: { shrink: !0 }
|
|
311
|
+
},
|
|
312
|
+
sx: { "& .MuiOutlinedInput-root": {
|
|
313
|
+
borderBottomRightRadius: 0,
|
|
314
|
+
borderTopRightRadius: 0
|
|
315
|
+
} },
|
|
316
|
+
value: p
|
|
317
|
+
}), /* @__PURE__ */ r(S, {
|
|
318
|
+
label: "",
|
|
319
|
+
onChange: L,
|
|
320
|
+
slotProps: { select: { SelectDisplayProps: { "aria-label": e[x[b].labelKey] } } },
|
|
321
|
+
options: x.map(({ labelKey: a }, c) => ({
|
|
322
|
+
id: c,
|
|
323
|
+
label: e[a]
|
|
324
|
+
})),
|
|
325
|
+
sx: {
|
|
326
|
+
minWidth: 120,
|
|
327
|
+
"& .MuiOutlinedInput-root": {
|
|
328
|
+
borderBottomLeftRadius: 0,
|
|
329
|
+
borderTopLeftRadius: 0
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
value: b
|
|
333
|
+
})]
|
|
334
|
+
}),
|
|
335
|
+
/* @__PURE__ */ r(P, {
|
|
336
|
+
disabled: !A,
|
|
337
|
+
fullWidth: !0,
|
|
338
|
+
type: "submit",
|
|
339
|
+
variant: "contained",
|
|
340
|
+
children: e.calculate
|
|
341
|
+
})
|
|
342
|
+
]
|
|
343
|
+
})]
|
|
344
|
+
})]
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
export {
|
|
348
|
+
fe as EmergencySavingsV2,
|
|
349
|
+
xe as hasV2Copy
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
//# sourceMappingURL=EmergencySavingsV2.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmergencySavingsV2.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.tsx"],"sourcesContent":["import React, { type ReactNode } from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\nimport { alpha } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { Select } from '../../../common'\nimport { buildDynamicCopy } from '../../../core'\nimport type { EmergencySavingsCopy } from '../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { SMALL_CARD_SHADOW } from '../../components/shared/elevation'\n\nimport { CADENCES, calculateContribution, DEADLINE_UNITS } from './layout'\n\nconst V2_COPY_KEYS = [\n 'your_progress',\n 'more_to_go',\n 'saved_amount',\n 'goal_amount',\n 'contributed_this_month',\n 'increase_your_transfer',\n 'next_savings_goal',\n 'per_month',\n 'per_week',\n 'per_two_weeks',\n 'use_the_calculator',\n 'how_often_will_you_contribute',\n 'select_frequency',\n 'add_timeline',\n 'weekly',\n 'monthly',\n] as const\n\n/** The drawer's copy with every V2 key present. */\nexport type EmergencySavingsV2Copy = EmergencySavingsCopy &\n Required<Pick<EmergencySavingsCopy, (typeof V2_COPY_KEYS)[number]>>\n\n/** True once mrs_content ships the V2 drawer's words; otherwise the legacy drawer opens. */\nexport const hasV2Copy = (copy: EmergencySavingsCopy): copy is EmergencySavingsV2Copy =>\n V2_COPY_KEYS.every((key) => typeof copy[key] === 'string')\n\n/** The figures the V2 card's CTA carries (ditto monthly_emergency_savings_reminder_v2.yml). */\nexport interface EmergencySavingsFacts {\n balance: number\n goal: number\n remaining: number\n monthlyContribution: number\n monthContribution: number\n}\n\nconst [WEEKLY, EVERY_OTHER_WEEK, MONTHLY_CADENCE] = CADENCES\n\n// Figma 1152:27224: the frequency select (weekly / every other week / monthly).\nconst FREQUENCIES = [\n { cadence: WEEKLY, labelKey: 'weekly', suffixKey: 'per_week' },\n { cadence: EVERY_OTHER_WEEK, labelKey: 'every_other_week', suffixKey: 'per_two_weeks' },\n { cadence: MONTHLY_CADENCE, labelKey: 'monthly', suffixKey: 'per_month' },\n] as const\nconst MONTHLY = FREQUENCIES.findIndex(({ labelKey }) => labelKey === 'monthly')\nconst MONTHS = DEADLINE_UNITS.findIndex(({ labelKey }) => labelKey === 'months')\n// The card's monthly_contribution spreads what's left over six months, so the form starts there.\nconst DEFAULT_TIMELINE_MONTHS = '6'\n\n/** Rich copy (`_1{amount}` with an element) as a node. */\nconst rich = (copy: string, ...args: Parameters<typeof buildDynamicCopy>[1][]) =>\n buildDynamicCopy(copy, ...args) as ReactNode\n\nconst toDigits = (value: string) => value.replace(/[^0-9]/g, '')\nconst whole = (amount: number) => formatCurrency(amount, CURRENCY_FORMAT.whole)\nconst cents = (amount: number) => formatCurrency(amount, CURRENCY_FORMAT.cents)\n\ninterface Props {\n copy: EmergencySavingsV2Copy\n facts: EmergencySavingsFacts\n}\n\n/** The Build Emergency Savings drawer (Figma 1152:27224): progress, the month banner, the estimate and calculator. */\nexport const EmergencySavingsV2 = observer(function EmergencySavingsV2({ copy, facts }: Props) {\n const { balance, goal, monthContribution, monthlyContribution, remaining } = facts\n const isZeroState = balance <= 0\n const percent = goal > 0 ? Math.round(Math.min(100, Math.max(0, (balance / goal) * 100))) : 0\n\n // The zero state opens empty (Select frequency / Add timeline).\n const [frequency, setFrequency] = React.useState<number | ''>(isZeroState ? '' : MONTHLY)\n const [timeline, setTimeline] = React.useState(isZeroState ? '' : DEFAULT_TIMELINE_MONTHS)\n const [unit, setUnit] = React.useState(MONTHS)\n const [estimate, setEstimate] = React.useState({\n amount: monthlyContribution,\n suffix: copy.per_month,\n })\n\n const canCalculate = frequency !== '' && timeline !== '' && Number(timeline) > 0\n\n const handleSubmit = (event: React.FormEvent) => {\n event.preventDefault()\n if (frequency === '') return\n\n const { cadence, suffixKey } = FREQUENCIES[frequency]\n const amount = calculateContribution({\n balance,\n goal,\n cadence,\n deadline: DEADLINE_UNITS[unit],\n deadlineQuantity: Number(timeline),\n })\n if (amount !== undefined) setEstimate({ amount, suffix: copy[suffixKey] })\n }\n\n return (\n <Stack sx={{ bgcolor: 'background.default' }}>\n <Box sx={{ p: 24 }}>\n <Stack\n aria-label={copy.your_progress}\n role=\"region\"\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: SMALL_CARD_SHADOW,\n gap: 16,\n p: 16,\n }}\n >\n <Stack sx={{ gap: 12 }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8 }}>\n <Box\n aria-hidden={true}\n sx={(theme) => ({\n alignItems: 'center',\n bgcolor: alpha(theme.palette.primary.main, 0.15),\n borderRadius: '4px',\n display: 'flex',\n flexShrink: 0,\n height: 40,\n justifyContent: 'center',\n width: 40,\n })}\n >\n <Icon color=\"primary\" name=\"savings\" size={20} />\n </Box>\n <Stack>\n <Text variant=\"caption\">{copy.your_progress}</Text>\n <Text component=\"p\" variant=\"body2\">\n {rich(\n copy.more_to_go,\n <Text\n component=\"span\"\n key=\"amount\"\n sx={{ fontWeight: 'fontWeightBold' }}\n variant=\"h2\"\n >\n {whole(remaining)}\n </Text>,\n )}\n </Text>\n </Stack>\n </Stack>\n <Stack sx={{ gap: 4 }}>\n <Box\n aria-label={buildDynamicCopy(copy.saved_amount, whole(balance)) as string}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={percent}\n role=\"progressbar\"\n sx={{ bgcolor: 'divider', borderRadius: '6px', height: 8, overflow: 'hidden' }}\n >\n <Box\n sx={{\n bgcolor: 'primary.main',\n borderRadius: '6px',\n height: '100%',\n width: `${percent}%`,\n }}\n />\n </Box>\n <Stack sx={{ flexDirection: 'row', justifyContent: 'space-between' }}>\n <Text color=\"text.secondary\" variant=\"caption\">\n {rich(copy.saved_amount, whole(balance))}\n </Text>\n <Text color=\"text.secondary\" variant=\"caption\">\n {rich(copy.goal_amount, whole(goal))}\n </Text>\n </Stack>\n </Stack>\n </Stack>\n {monthContribution > 0 && (\n <Stack\n role=\"note\"\n sx={{\n alignItems: 'flex-start',\n bgcolor: 'primary.lighter',\n borderRadius: '8px',\n flexDirection: 'row',\n gap: 8,\n p: 12,\n }}\n >\n <Box sx={{ pt: 2, px: 4 }}>\n <Icon aria-hidden={true} color=\"primary\" name=\"celebration\" size={20} />\n </Box>\n <Text\n color=\"primary.dark\"\n component=\"p\"\n sx={{ fontWeight: 'fontWeightRegular' }}\n variant=\"subtitle2\"\n >\n {rich(\n copy.contributed_this_month,\n <Text\n component=\"span\"\n key=\"amount\"\n sx={{ fontSize: 'inherit', fontWeight: 'fontWeightBold' }}\n >\n {cents(monthContribution)}\n </Text>,\n )}{' '}\n {copy.increase_your_transfer}\n </Text>\n </Stack>\n )}\n </Stack>\n </Box>\n <Stack\n component=\"form\"\n onSubmit={handleSubmit}\n sx={{\n bgcolor: 'background.paper',\n borderColor: 'divider',\n borderTop: '1px solid',\n gap: 32,\n p: 24,\n }}\n >\n <Stack sx={{ gap: 8 }}>\n <Stack\n aria-label={copy.estimated_contribution}\n role=\"group\"\n sx={{ border: '1px solid', borderColor: 'divider', borderRadius: '4px' }}\n >\n <Box sx={{ px: 8, py: 4 }}>\n <Text\n color=\"text.secondary\"\n sx={{ letterSpacing: '0.4px', textTransform: 'uppercase' }}\n variant=\"caption\"\n >\n {rich(\n copy.next_savings_goal,\n <Text\n bold={true}\n component=\"span\"\n key=\"goal\"\n sx={{ color: 'text.primary', fontSize: 'inherit' }}\n >\n {whole(goal)}\n </Text>,\n )}\n </Text>\n </Box>\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.default',\n borderColor: 'divider',\n borderTop: '1px solid',\n p: 12,\n }}\n >\n <Stack sx={{ alignItems: 'flex-end', flexDirection: 'row', gap: 4 }}>\n <Text component=\"p\" sx={{ fontWeight: 'fontWeightBold' }} variant=\"h2\">\n {cents(estimate.amount)}\n </Text>\n <Text sx={{ fontWeight: 'fontWeightRegular' }} variant=\"subtitle2\">\n {estimate.suffix}\n </Text>\n </Stack>\n <Text\n color=\"text.secondary\"\n sx={{ fontWeight: 'fontWeightRegular' }}\n variant=\"subtitle2\"\n >\n {copy.estimated_contribution}\n </Text>\n </Stack>\n </Stack>\n <Text\n color=\"text.secondary\"\n sx={{ textAlign: 'center' }}\n truncate={false}\n variant=\"caption\"\n >\n {copy.use_the_calculator}\n </Text>\n </Stack>\n <Stack sx={{ gap: 16 }}>\n <Select\n label={copy.how_often_will_you_contribute}\n onChange={setFrequency}\n options={FREQUENCIES.map(({ labelKey }, id) => ({ id, label: copy[labelKey] }))}\n required={true}\n slotProps={{\n inputLabel: { shrink: true },\n select: {\n displayEmpty: true,\n renderValue: (v: unknown) =>\n v === '' ? copy.select_frequency : copy[FREQUENCIES[v as number].labelKey],\n },\n }}\n value={frequency}\n />\n <Stack aria-label={copy.meet_your_goal_within} role=\"group\" sx={{ flexDirection: 'row' }}>\n <TextField\n fullWidth={true}\n label={copy.meet_your_goal_within}\n onChange={(event) => setTimeline(toDigits(event.target.value))}\n placeholder={copy.add_timeline}\n slotProps={{\n htmlInput: { inputMode: 'numeric', pattern: '[0-9]*' },\n inputLabel: { shrink: true },\n }}\n sx={{\n '& .MuiOutlinedInput-root': { borderBottomRightRadius: 0, borderTopRightRadius: 0 },\n }}\n value={timeline}\n />\n <Select\n label=\"\"\n onChange={setUnit}\n slotProps={{\n select: {\n SelectDisplayProps: { 'aria-label': copy[DEADLINE_UNITS[unit].labelKey] },\n },\n }}\n options={DEADLINE_UNITS.map(({ labelKey }, id) => ({ id, label: copy[labelKey] }))}\n sx={{\n minWidth: 120,\n '& .MuiOutlinedInput-root': { borderBottomLeftRadius: 0, borderTopLeftRadius: 0 },\n }}\n value={unit}\n />\n </Stack>\n <Button disabled={!canCalculate} fullWidth={true} type=\"submit\" variant=\"contained\">\n {copy.calculate}\n </Button>\n </Stack>\n </Stack>\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,IAAM,IAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOa,KAAA,CAAa,MACxB,EAAa,MAAA,CAAO,MAAQ,OAAO,EAAK,CAAA,KAAS,QAAQ,GAWrD,CAAC,GAAQ,GAAkB,CAAA,IAAmB,GAG9C,IAAc;AAAA,EAClB;AAAA,IAAE,SAAS;AAAA,IAAQ,UAAU;AAAA,IAAU,WAAW;AAAA,EAAW;AAAA,EAC7D;AAAA,IAAE,SAAS;AAAA,IAAkB,UAAU;AAAA,IAAoB,WAAW;AAAA,EAAgB;AAAA,EACtF;AAAA,IAAE,SAAS;AAAA,IAAiB,UAAU;AAAA,IAAW,WAAW;AAAA,EAAY;AAC1E,GACM,IAAU,EAAY,UAAA,CAAW,EAAE,UAAA,EAAA,MAAe,MAAa,SAAS,GACxE,IAAS,EAAe,UAAA,CAAW,EAAE,UAAA,EAAA,MAAe,MAAa,QAAQ,GAEzE,IAA0B,KAG1B,IAAA,CAAQ,MAAiB,MAC7B,EAAiB,GAAM,GAAG,CAAI,GAE1B,KAAA,CAAY,MAAkB,EAAM,QAAQ,WAAW,EAAE,GACzD,IAAA,CAAS,MAAmB,EAAe,GAAQ,EAAgB,KAAK,GACxE,IAAA,CAAS,MAAmB,EAAe,G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1E,EACF;AAAA,cACA,SAAS,EAAe,IAAA,CAAK,EAAE,UAAA,EAAA,GAAY,OAAQ;AAAA,gBAAE,IAAA;AAAA,gBAAI,OAAO,EAAK,CAAA;AAAA,cAAU,EAAE;AAAA,cACjF,IAAI;AAAA,gBACF,UAAU;AAAA,gBACV,4BAA4B;AAAA,kBAAE,wBAAwB;AAAA,kBAAG,qBAAqB;AAAA,gBAAE;AAAA,cAClF;AAAA,cACA,OAAO;AAAA,YACR,CAAA,CACI;AAAA;UACP,gBAAA,EAAC,GAAD;AAAA,YAAQ,UAAU,CAAC;AAAA,YAAc,WAAW;AAAA,YAAM,MAAK;AAAA,YAAS,SAAQ;AAAA,YACrE,UAAA,EAAK;AAAA,UACA,CAAA;AAAA,QACH;AAAA,MACF,CAAA,CAAA;AAAA,IACF,CAAA,CAAA;AAAA;AAEX,CAAC"}
|
|
@@ -8,8 +8,8 @@ import z from "../../../common/components/drawer/Drawer.es.js";
|
|
|
8
8
|
import M from "../../../transactions/components/shared/TransactionList.es.js";
|
|
9
9
|
import { selectTransactionsByGuids as B } from "../../CommonUtils.es.js";
|
|
10
10
|
import { merchantTransactions as F, quizMerchantLogo as G } from "../../blocks/ComponentBlocks/QuizBlock/quiz.es.js";
|
|
11
|
-
import N from "../../components/
|
|
12
|
-
import
|
|
11
|
+
import { SMALL_CARD_SHADOW as N } from "../../components/shared/elevation.es.js";
|
|
12
|
+
import q from "../../components/LogoFromGuid.es.js";
|
|
13
13
|
import { calendarDateOf as E } from "../TransactionHistoryBlock/utils.es.js";
|
|
14
14
|
import { TransactionDetailsBlock as W } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
15
15
|
import $ from "react";
|
|
@@ -70,7 +70,7 @@ var V = (a) => a.reduce((r, { amount: e, transaction_type: c }) => c === R.CREDI
|
|
|
70
70
|
sx: {
|
|
71
71
|
bgcolor: "background.paper",
|
|
72
72
|
borderRadius: "8px",
|
|
73
|
-
boxShadow:
|
|
73
|
+
boxShadow: N,
|
|
74
74
|
gap: 12,
|
|
75
75
|
p: 16
|
|
76
76
|
},
|
|
@@ -86,7 +86,7 @@ var V = (a) => a.reduce((r, { amount: e, transaction_type: c }) => c === R.CREDI
|
|
|
86
86
|
display: "flex",
|
|
87
87
|
flexShrink: 0
|
|
88
88
|
},
|
|
89
|
-
children: /* @__PURE__ */ o(
|
|
89
|
+
children: /* @__PURE__ */ o(q, {
|
|
90
90
|
logo: _,
|
|
91
91
|
size: 56
|
|
92
92
|
})
|
|
@@ -5,9 +5,9 @@ import D from "../../common/components/dialog/Dialog.es.js";
|
|
|
5
5
|
import { useBeatActions as Z } from "../beatActions.es.js";
|
|
6
6
|
import { asLogoRef as J } from "../blocks/slotReaders.es.js";
|
|
7
7
|
import { USER_RESPONSE as d, answerSubscription as K, repeatingTransactionOf as Q, reportSubscriptionMarkedIncorrect as tt } from "../ctaActions/subscriptionAnswer.es.js";
|
|
8
|
-
import ot from "../components/
|
|
8
|
+
import { ELEVATION_SHADOW as ot } from "../components/shared/elevation.es.js";
|
|
9
|
+
import rt from "../components/LogoFromGuid.es.js";
|
|
9
10
|
import "../components/celebrationGradients.es.js";
|
|
10
|
-
import { ELEVATION_SHADOW as rt } from "../components/shared/elevation.es.js";
|
|
11
11
|
import et from "../components/TransactionListCard.es.js";
|
|
12
12
|
import { subscriptionFrequency as st } from "../components/SubscriptionStatus/subscriptionFrequency.es.js";
|
|
13
13
|
import nt from "../components/shared/StatusSnackbar.es.js";
|
|
@@ -23,7 +23,7 @@ import dt from "@mui/material/ButtonBase";
|
|
|
23
23
|
var ft = 32, B = {
|
|
24
24
|
backgroundColor: "background.paper",
|
|
25
25
|
borderRadius: 1,
|
|
26
|
-
boxShadow:
|
|
26
|
+
boxShadow: ot[16]
|
|
27
27
|
}, L = {
|
|
28
28
|
"& .MuiDialog-paper": B,
|
|
29
29
|
"& .MuiDialogContent-root": { p: 0 },
|
|
@@ -98,7 +98,7 @@ var ft = 32, B = {
|
|
|
98
98
|
rows: [{
|
|
99
99
|
amount: typeof M == "number" ? Y(M, q.cents) : "",
|
|
100
100
|
amountCaption: st(P, Q(v)),
|
|
101
|
-
leading: I ? /* @__PURE__ */ r(
|
|
101
|
+
leading: I ? /* @__PURE__ */ r(rt, {
|
|
102
102
|
logo: I,
|
|
103
103
|
size: ft
|
|
104
104
|
}) : void 0,
|