@mx-cartographer/experiences 9.1.0-alpha.bb1 → 9.1.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 +80 -0
- package/README.md +10 -10
- package/dist/Account-DR7Plrqy.mjs +119 -0
- package/dist/Account-DR7Plrqy.mjs.map +1 -0
- package/dist/AccountDetailsDrawer-C1hhmlmI.mjs +922 -0
- package/dist/AccountDetailsDrawer-C1hhmlmI.mjs.map +1 -0
- package/dist/AccountDetailsHeader-BliEZhz7.mjs +230 -0
- package/dist/AccountDetailsHeader-BliEZhz7.mjs.map +1 -0
- package/dist/AccountUtils-Cbh8r9cP.mjs +29 -0
- package/dist/AccountUtils-Cbh8r9cP.mjs.map +1 -0
- package/dist/Analytics-CkYXKvco.mjs +54 -0
- package/dist/Analytics-CkYXKvco.mjs.map +1 -0
- package/dist/Analytics-WeZYytR0.mjs +140 -0
- package/dist/Analytics-WeZYytR0.mjs.map +1 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs +50 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs +27 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs.map +1 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +75 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs.map +1 -0
- package/dist/Category-DEKZGLYe.mjs +302 -0
- package/dist/Category-DEKZGLYe.mjs.map +1 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs +431 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs.map +1 -0
- package/dist/Connect-BH0Pt6zc.mjs +43 -0
- package/dist/Connect-BH0Pt6zc.mjs.map +1 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs +55 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs.map +1 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs +58 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs.map +1 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs +54 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs.map +1 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs +374 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs.map +1 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs +88 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs.map +1 -0
- package/dist/CurrencyText-CCbE6MmF.mjs +21 -0
- package/dist/CurrencyText-CCbE6MmF.mjs.map +1 -0
- package/dist/DateFormats-HudZ3Bjs.mjs +65 -0
- package/dist/DateFormats-HudZ3Bjs.mjs.map +1 -0
- package/dist/DateUtil-CzBmbjmA.mjs +75 -0
- package/dist/DateUtil-CzBmbjmA.mjs.map +1 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs +154 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs.map +1 -0
- package/dist/Dialog-Bvd2n8hz.mjs +67 -0
- package/dist/Dialog-Bvd2n8hz.mjs.map +1 -0
- package/dist/Donut-SzzfZDHF.mjs +89 -0
- package/dist/Donut-SzzfZDHF.mjs.map +1 -0
- package/dist/Drawer-DsnW2o0v.mjs +175 -0
- package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs +859 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs.map +1 -0
- package/dist/EmptyState-CJUDc3kD.mjs +85 -0
- package/dist/EmptyState-CJUDc3kD.mjs.map +1 -0
- package/dist/Error-Dtw6yxkf.mjs +85 -0
- package/dist/Error-Dtw6yxkf.mjs.map +1 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +24 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs.map +1 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs +25 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs.map +1 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +230 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +1 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +129 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs.map +1 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs +108 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs.map +1 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +7 -0
- package/dist/HeaderCell-P8w6CmfO.mjs.map +1 -0
- package/dist/Help-CkQTjORd.mjs +300 -0
- package/dist/Help-CkQTjORd.mjs.map +1 -0
- package/dist/Help-aERwhajy.mjs +3210 -0
- package/dist/Help-aERwhajy.mjs.map +1 -0
- package/dist/IconBacking-DgT8DCeh.mjs +40 -0
- package/dist/IconBacking-DgT8DCeh.mjs.map +1 -0
- package/dist/InformationTooltip-4su8bn1e.mjs +42 -0
- package/dist/InformationTooltip-4su8bn1e.mjs.map +1 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs +135 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs.map +1 -0
- package/dist/LineChart-CUfiH86G.mjs +613 -0
- package/dist/LineChart-CUfiH86G.mjs.map +1 -0
- package/dist/ListItemAction-BqUCLj_w.mjs +70 -0
- package/dist/ListItemAction-BqUCLj_w.mjs.map +1 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs +68 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs.map +1 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs +44 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs.map +1 -0
- package/dist/Loader-CxeBwuPG.mjs +22 -0
- package/dist/Loader-CxeBwuPG.mjs.map +1 -0
- package/dist/Localization-DnoVyBNK.mjs +39 -0
- package/dist/Localization-DnoVyBNK.mjs.map +1 -0
- package/dist/ManageIncome-Be9WHv-s.mjs +906 -0
- package/dist/ManageIncome-Be9WHv-s.mjs.map +1 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs +46 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs.map +1 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs +67 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs.map +1 -0
- package/dist/NetWorthUtils-Dj7CgAg2.mjs +96 -0
- package/dist/NetWorthUtils-Dj7CgAg2.mjs.map +1 -0
- package/dist/Notification-DTNYSd8P.mjs +8 -0
- package/dist/Notification-DTNYSd8P.mjs.map +1 -0
- package/dist/NotificationSettings-CW7okUrk.mjs +678 -0
- package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
- package/dist/NotificationUtils-BRGFTePr.mjs +24 -0
- package/dist/NotificationUtils-BRGFTePr.mjs.map +1 -0
- package/dist/NumberFormatting--XMeeBfr.mjs +50 -0
- package/dist/NumberFormatting--XMeeBfr.mjs.map +1 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs +115 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs.map +1 -0
- package/dist/RecurringSettings-kRqAViNn.mjs +89 -0
- package/dist/RecurringSettings-kRqAViNn.mjs.map +1 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs +299 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs.map +1 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +46 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs.map +1 -0
- package/dist/SearchBox-Cpgu_gdO.mjs +51 -0
- package/dist/SearchBox-Cpgu_gdO.mjs.map +1 -0
- package/dist/Select-CSpkK5cR.mjs +62 -0
- package/dist/Select-CSpkK5cR.mjs.map +1 -0
- package/dist/SelectionBox-B4xELRgp.mjs +49 -0
- package/dist/SelectionBox-B4xELRgp.mjs.map +1 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +70 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs.map +1 -0
- package/dist/Sizes-DISGrlUg.mjs +7 -0
- package/dist/Sizes-DISGrlUg.mjs.map +1 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs +39 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs.map +1 -0
- package/dist/SpendingData-Fii_xATx.mjs +54 -0
- package/dist/SpendingData-Fii_xATx.mjs.map +1 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs +204 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs.map +1 -0
- package/dist/StatusBar-CPfSXe80.mjs +31 -0
- package/dist/StatusBar-CPfSXe80.mjs.map +1 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs +49 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs.map +1 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs +92 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs.map +1 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs +1708 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs.map +1 -0
- package/dist/TransactionUtils-BphBJBbU.mjs +235 -0
- package/dist/TransactionUtils-BphBJBbU.mjs.map +1 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +70 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs.map +1 -0
- package/dist/UserStore-BjnNCO5a.mjs +3121 -0
- package/dist/UserStore-BjnNCO5a.mjs.map +1 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs +1280 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs.map +1 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs +483 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs.map +1 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.d.ts +6 -0
- package/dist/accounts/index.d.ts +1 -0
- package/dist/accounts/index.es.js +784 -12
- package/dist/accounts/index.es.js.map +1 -0
- package/dist/analytics/index.es.js +140 -155
- package/dist/analytics/index.es.js.map +1 -0
- package/dist/budgets/index.es.js +1267 -1317
- package/dist/budgets/index.es.js.map +1 -0
- package/dist/cashflow/context/hooks.d.ts +7 -6
- package/dist/cashflow/index.es.js +944 -1076
- package/dist/cashflow/index.es.js.map +1 -0
- package/dist/categories/index.es.js +5 -4
- package/dist/categories/index.es.js.map +1 -0
- package/dist/common/components/DataRow.d.ts +1 -0
- package/dist/common/components/ListItemWrapper.d.ts +2 -1
- package/dist/common/constants/Analytics.d.ts +3 -0
- package/dist/common/index.es.js +310 -101
- package/dist/common/index.es.js.map +1 -0
- package/dist/core/index.es.js +105 -80
- package/dist/core/index.es.js.map +1 -0
- package/dist/core/stores/CashflowStore.d.ts +8 -7
- package/dist/core/stores/RecurringTransactionsStore.d.ts +53 -1
- package/dist/core/stores/TransactionStore.d.ts +1 -0
- package/dist/core/types/localization/RecurringCopy.d.ts +14 -1
- package/dist/core/types/localization/SpendingCopy.d.ts +1 -0
- package/dist/core/utils/AccountUtils.d.ts +8 -0
- package/dist/core/utils/DateUtil.d.ts +2 -0
- package/dist/core/utils/RecurringTransactionsUtil.d.ts +2 -1
- package/dist/dashboard/index.es.js +142 -185
- package/dist/dashboard/index.es.js.map +1 -0
- package/dist/debts/index.es.js +1273 -1384
- package/dist/debts/index.es.js.map +1 -0
- package/dist/finstrong/index.es.js +3473 -3367
- package/dist/finstrong/index.es.js.map +1 -0
- package/dist/goals/index.es.js +984 -1103
- package/dist/goals/index.es.js.map +1 -0
- package/dist/help/index.es.js +26 -3
- package/dist/help/index.es.js.map +1 -0
- package/dist/hooks-97sNJ_lf.mjs +78 -0
- package/dist/hooks-97sNJ_lf.mjs.map +1 -0
- package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +4 -1
- package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +4 -2
- package/dist/insights/index.es.js +4871 -93
- package/dist/insights/index.es.js.map +1 -0
- package/dist/investments/index.es.js +1523 -1533
- package/dist/investments/index.es.js.map +1 -0
- package/dist/merchants/index.es.js +65 -75
- package/dist/merchants/index.es.js.map +1 -0
- package/dist/microinsights/index.es.js +826 -15
- package/dist/microinsights/index.es.js.map +1 -0
- package/dist/networth/index.es.js +504 -550
- package/dist/networth/index.es.js.map +1 -0
- package/dist/notifications/index.es.js +162 -169
- package/dist/notifications/index.es.js.map +1 -0
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -2
- package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.d.ts +3 -0
- package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +11 -0
- package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +8 -0
- package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.d.ts +10 -0
- package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/index.es.js +1012 -10
- package/dist/recurringtransactions/index.es.js.map +1 -0
- package/dist/settings/index.es.js +892 -13
- package/dist/settings/index.es.js.map +1 -0
- package/dist/spending/index.es.js +457 -400
- package/dist/spending/index.es.js.map +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
- package/dist/transactions/index.es.js +604 -10
- package/dist/transactions/index.es.js.map +1 -0
- package/dist/trends/index.es.js +1408 -1268
- package/dist/trends/index.es.js.map +1 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs +24 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs.map +1 -0
- package/dist/useAriaLive-MkYebyUR.mjs +36 -0
- package/dist/useAriaLive-MkYebyUR.mjs.map +1 -0
- package/dist/useDimensions-CeDR9V8N.mjs +37 -0
- package/dist/useDimensions-CeDR9V8N.mjs.map +1 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs +12 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs.map +1 -0
- package/dist/useScreenSize-mWpmnh5w.mjs +37 -0
- package/dist/useScreenSize-mWpmnh5w.mjs.map +1 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs +20 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs.map +1 -0
- package/package.json +30 -30
- package/dist/Analytics-BKzTPees.mjs +0 -61
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +0 -487
- package/dist/HeaderCell-EhCUSjvj.mjs +0 -10
- package/dist/Loader-BlVzRtUd.mjs +0 -73
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +0 -110
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +0 -110
- package/dist/SpendingLegend-D15ixlQ1.mjs +0 -222
- package/dist/accounts-DkyAiLpg.mjs +0 -15632
- package/dist/core-BexP5oiV.mjs +0 -4047
- package/dist/help-CctDYrAH.mjs +0 -2308
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
- package/dist/microinsights-CRf3ChsJ.mjs +0 -1814
- package/dist/recurringtransactions-gbJ_NA8u.mjs +0 -1564
- package/dist/settings-ZMHe439l.mjs +0 -1526
|
@@ -0,0 +1,678 @@
|
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
|
+
import { observer as C } from "mobx-react-lite";
|
|
4
|
+
import v from "@mui/material/Divider";
|
|
5
|
+
import E from "@mui/material/List";
|
|
6
|
+
import O from "@mui/material/ListItem";
|
|
7
|
+
import L from "@mui/material/ListItemText";
|
|
8
|
+
import V from "@mui/material/ListItemButton";
|
|
9
|
+
import h from "@mui/material/Stack";
|
|
10
|
+
import { ChevronRight as A, ExpandMore as ee, Star as te } from "@mxenabled/mx-icons";
|
|
11
|
+
import { Text as x, InstitutionLogo as ne, H3 as F } from "@mxenabled/mxui";
|
|
12
|
+
import { endOfMonth as ie } from "date-fns/endOfMonth";
|
|
13
|
+
import { startOfMonth as oe } from "date-fns/startOfMonth";
|
|
14
|
+
import { DateCalendar as se } from "@mui/x-date-pickers/DateCalendar";
|
|
15
|
+
import { LocalizationProvider as ae } from "@mui/x-date-pickers/LocalizationProvider";
|
|
16
|
+
import { AdapterDateFns as ce } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
17
|
+
import { b as le } from "./Localization-DnoVyBNK.mjs";
|
|
18
|
+
import { b as re, f as de } from "./NumberFormatting--XMeeBfr.mjs";
|
|
19
|
+
import { u as k, A as T, C as S, c as J, f as me, i as q, a as he } from "./hooks-97sNJ_lf.mjs";
|
|
20
|
+
import { A as ue, N as b } from "./Notification-DTNYSd8P.mjs";
|
|
21
|
+
import { T as R, a as D } from "./ToggleListItem-Dl1lXNwj.mjs";
|
|
22
|
+
import { D as B } from "./Dialog-Bvd2n8hz.mjs";
|
|
23
|
+
import { C as _e } from "./CurrencyInput-DaGEQaLW.mjs";
|
|
24
|
+
import { u as fe } from "./useScreenSize-mWpmnh5w.mjs";
|
|
25
|
+
import { D as K } from "./Drawer-DsnW2o0v.mjs";
|
|
26
|
+
import pe from "@mui/material/Collapse";
|
|
27
|
+
import ge from "@mui/material/Card";
|
|
28
|
+
import ye from "@mui/material/CardContent";
|
|
29
|
+
import W from "@mui/material/Box";
|
|
30
|
+
import j from "@mui/material/Button";
|
|
31
|
+
import U from "@mui/material/TextField";
|
|
32
|
+
import { u as be } from "./useDimensions-CeDR9V8N.mjs";
|
|
33
|
+
import { useTheme as Q } from "@mui/material/styles";
|
|
34
|
+
import { u as xe } from "./useInsightsEnabled-D5Sdm0TJ.mjs";
|
|
35
|
+
import { u as Ce } from "./useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
36
|
+
import { L as ve } from "./Loader-CxeBwuPG.mjs";
|
|
37
|
+
const Te = C(() => {
|
|
38
|
+
const { common: n, settings: t } = k(), { sendEmailVerification: s } = T(), { user: l } = S(), i = Q(), [r, a] = f.useState(!1), o = () => {
|
|
39
|
+
a(!1);
|
|
40
|
+
}, u = () => {
|
|
41
|
+
a(!0);
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ c(f.Fragment, { children: [
|
|
44
|
+
/* @__PURE__ */ c(j, { onClick: u, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
45
|
+
/* @__PURE__ */ e(x, { variant: "body2", children: t.verify_email }),
|
|
46
|
+
/* @__PURE__ */ e(A, {})
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
B,
|
|
50
|
+
{
|
|
51
|
+
copy: { title: "" },
|
|
52
|
+
isOpen: r,
|
|
53
|
+
onClose: o,
|
|
54
|
+
onPrimaryAction: s,
|
|
55
|
+
onSecondaryAction: o,
|
|
56
|
+
primaryText: t.send_verification,
|
|
57
|
+
secondaryText: n.back,
|
|
58
|
+
sx: {
|
|
59
|
+
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
60
|
+
"& .MuiToolbar-root:last-child": {
|
|
61
|
+
gap: 16,
|
|
62
|
+
padding: "32px 60px 48px",
|
|
63
|
+
justifyContent: "center"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
children: /* @__PURE__ */ c(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
67
|
+
/* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "body1", children: t.confirm_your_email }),
|
|
68
|
+
/* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: t.confirm_email }),
|
|
69
|
+
/* @__PURE__ */ e(
|
|
70
|
+
x,
|
|
71
|
+
{
|
|
72
|
+
sx: {
|
|
73
|
+
border: `1px solid ${i.palette.neutral.light}`,
|
|
74
|
+
borderRadius: "4px",
|
|
75
|
+
p: "16px 32px"
|
|
76
|
+
},
|
|
77
|
+
variant: "h3",
|
|
78
|
+
children: l.email
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: t.verification_notice_email })
|
|
82
|
+
] })
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] });
|
|
86
|
+
}), Pe = C(
|
|
87
|
+
({ handleClose: n, handleVerify: t, isOpen: s }) => {
|
|
88
|
+
const { common: l, settings: i } = k(), [r, a] = f.useState("");
|
|
89
|
+
return /* @__PURE__ */ e(
|
|
90
|
+
B,
|
|
91
|
+
{
|
|
92
|
+
copy: { title: i.enter_verification_code },
|
|
93
|
+
isOpen: s,
|
|
94
|
+
onClose: n,
|
|
95
|
+
onPrimaryAction: () => t(r),
|
|
96
|
+
onSecondaryAction: n,
|
|
97
|
+
primaryText: i.verify,
|
|
98
|
+
secondaryText: l.cancel_button,
|
|
99
|
+
sx: {
|
|
100
|
+
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
101
|
+
"& .MuiToolbar-root:last-child": {
|
|
102
|
+
gap: 8,
|
|
103
|
+
padding: 24,
|
|
104
|
+
justifyContent: "flex-end"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(U, { onChange: (o) => a(o.target.value), sx: { width: 352 }, value: r }) })
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
), De = C(() => {
|
|
112
|
+
const { common: n, settings: t } = k(), { sendPhoneVerification: s, verifyPhoneToken: l } = T(), { user: i } = S(), r = Q(), [a, o] = f.useState(!1), [u, d] = f.useState(!1), p = () => {
|
|
113
|
+
o(!1);
|
|
114
|
+
}, _ = () => {
|
|
115
|
+
o(!0);
|
|
116
|
+
}, y = () => {
|
|
117
|
+
s().finally(() => {
|
|
118
|
+
d(!0);
|
|
119
|
+
});
|
|
120
|
+
}, m = (g) => {
|
|
121
|
+
l(g).finally(() => {
|
|
122
|
+
d(!1);
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
return /* @__PURE__ */ c(f.Fragment, { children: [
|
|
126
|
+
/* @__PURE__ */ c(j, { onClick: _, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
127
|
+
/* @__PURE__ */ e(x, { variant: "body2", children: t.verify_phone }),
|
|
128
|
+
/* @__PURE__ */ e(A, {})
|
|
129
|
+
] }),
|
|
130
|
+
/* @__PURE__ */ e(
|
|
131
|
+
B,
|
|
132
|
+
{
|
|
133
|
+
copy: { title: "" },
|
|
134
|
+
isOpen: a,
|
|
135
|
+
onClose: p,
|
|
136
|
+
onPrimaryAction: y,
|
|
137
|
+
onSecondaryAction: p,
|
|
138
|
+
primaryText: t.send_verification,
|
|
139
|
+
secondaryText: n.back,
|
|
140
|
+
sx: {
|
|
141
|
+
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
142
|
+
"& .MuiToolbar-root:last-child": {
|
|
143
|
+
gap: 16,
|
|
144
|
+
padding: "32px 60px 48px",
|
|
145
|
+
justifyContent: "center"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
children: /* @__PURE__ */ c(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
149
|
+
/* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "body1", children: t.confirm_your_phone }),
|
|
150
|
+
/* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: t.confirm_phone }),
|
|
151
|
+
/* @__PURE__ */ e(
|
|
152
|
+
x,
|
|
153
|
+
{
|
|
154
|
+
sx: {
|
|
155
|
+
border: `1px solid ${r.palette.neutral.light}`,
|
|
156
|
+
borderRadius: "4px",
|
|
157
|
+
p: "16px 32px"
|
|
158
|
+
},
|
|
159
|
+
variant: "h3",
|
|
160
|
+
children: i.phone
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
/* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: t.verification_notice_phone })
|
|
164
|
+
] })
|
|
165
|
+
}
|
|
166
|
+
),
|
|
167
|
+
/* @__PURE__ */ e(
|
|
168
|
+
Pe,
|
|
169
|
+
{
|
|
170
|
+
handleClose: () => d(!1),
|
|
171
|
+
handleVerify: m,
|
|
172
|
+
isOpen: u
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
] });
|
|
176
|
+
}), ke = C(
|
|
177
|
+
({ onProfileUpdated: n, profile: t }) => {
|
|
178
|
+
const { common: s, recurring: l, settings: i } = k(), { updateAccount: r } = J(), a = t.notification_type === ue.DebtPaymentReminder, [o, u] = f.useState(!1), [d, p] = f.useState(t.threshold || 0), [_, y] = f.useState(
|
|
179
|
+
t.account?.day_payment_is_due || 0
|
|
180
|
+
), m = t.account?.name || t.account?.feed_name || "", g = t.account?.day_payment_is_due ? le(
|
|
181
|
+
i.notification_debt_payment_date,
|
|
182
|
+
re(t.account?.day_payment_is_due)
|
|
183
|
+
) : i.notification_debt_payment_zero_state, P = a ? g : de(t.threshold ?? 0, "0,0"), I = async () => {
|
|
184
|
+
a && t.account ? await r({ ...t.account, day_payment_is_due: _ }) : n({ ...t, threshold: d });
|
|
185
|
+
};
|
|
186
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
187
|
+
/* @__PURE__ */ e(
|
|
188
|
+
R,
|
|
189
|
+
{
|
|
190
|
+
avatar: t.account?.institution_guid ? /* @__PURE__ */ e(
|
|
191
|
+
ne,
|
|
192
|
+
{
|
|
193
|
+
alt: t.label,
|
|
194
|
+
institutionGuid: t.account?.institution_guid
|
|
195
|
+
}
|
|
196
|
+
) : void 0,
|
|
197
|
+
endIcon: /* @__PURE__ */ e(A, {}),
|
|
198
|
+
isChecked: t.is_enabled,
|
|
199
|
+
isDisabled: !t.is_enabled,
|
|
200
|
+
isPrimaryTextBold: !0,
|
|
201
|
+
onClick: () => u(!0),
|
|
202
|
+
onToggle: () => n({
|
|
203
|
+
...t,
|
|
204
|
+
is_enabled: !t.is_enabled
|
|
205
|
+
}),
|
|
206
|
+
primaryText: m,
|
|
207
|
+
secondaryText: t.is_enabled ? P : i.notification_disabled
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
/* @__PURE__ */ e(
|
|
211
|
+
B,
|
|
212
|
+
{
|
|
213
|
+
copy: {
|
|
214
|
+
title: a ? l.day_of_the_month : i.notification_threshold_label,
|
|
215
|
+
close_aria: s.close_aria
|
|
216
|
+
},
|
|
217
|
+
disablePrimaryButton: a && _ === 0,
|
|
218
|
+
isOpen: o,
|
|
219
|
+
onClose: () => u(!1),
|
|
220
|
+
onPrimaryAction: I,
|
|
221
|
+
primaryText: s.save_button,
|
|
222
|
+
children: a ? /* @__PURE__ */ e(ae, { dateAdapter: ce, children: /* @__PURE__ */ e(
|
|
223
|
+
se,
|
|
224
|
+
{
|
|
225
|
+
maxDate: ie(/* @__PURE__ */ new Date()),
|
|
226
|
+
minDate: oe(/* @__PURE__ */ new Date()),
|
|
227
|
+
onChange: (w) => {
|
|
228
|
+
y(w.getDate());
|
|
229
|
+
},
|
|
230
|
+
slots: {
|
|
231
|
+
// Hides the arrows
|
|
232
|
+
leftArrowIcon: () => null,
|
|
233
|
+
rightArrowIcon: () => null
|
|
234
|
+
},
|
|
235
|
+
sx: {
|
|
236
|
+
// TODO: Needs to be updated in MXUI
|
|
237
|
+
"& .MuiPickersDay-today": {
|
|
238
|
+
color: "primary.main"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
views: ["day"]
|
|
242
|
+
}
|
|
243
|
+
) }) : /* @__PURE__ */ e(
|
|
244
|
+
_e,
|
|
245
|
+
{
|
|
246
|
+
amount: d,
|
|
247
|
+
autoFocus: !0,
|
|
248
|
+
fullWidth: !0,
|
|
249
|
+
minAmount: 0,
|
|
250
|
+
setAmount: (w) => p(Number(w) || 0),
|
|
251
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
] });
|
|
257
|
+
}
|
|
258
|
+
), we = C(
|
|
259
|
+
({ onUpdateProfile: n, profile: t }) => {
|
|
260
|
+
const { settings: s } = k(), { user: l } = S(), { clientCommunicationProfile: i, userCommunicationsProfile: r } = T(), { isMobile: a } = fe(), o = t.notification_type > 2, {
|
|
261
|
+
opted_out_of_email_notifications: u,
|
|
262
|
+
opted_out_of_push_notifications: d,
|
|
263
|
+
opted_out_of_sms_notifications: p
|
|
264
|
+
} = r, {
|
|
265
|
+
email_notifications_enabled: _,
|
|
266
|
+
push_notifications_enabled: y,
|
|
267
|
+
sms_notifications_enabled: m
|
|
268
|
+
} = i;
|
|
269
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
270
|
+
(_ || m || y) && /* @__PURE__ */ c(N, { children: [
|
|
271
|
+
/* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.delivery_method_title }),
|
|
272
|
+
/* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
273
|
+
_ && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
274
|
+
D,
|
|
275
|
+
{
|
|
276
|
+
isChecked: !u && t.email_channel && !!l.email,
|
|
277
|
+
isDisabled: u || !l.email,
|
|
278
|
+
onToggle: () => n({ ...t, email_channel: !t.email_channel }),
|
|
279
|
+
primaryText: s.delivery_method_email_label,
|
|
280
|
+
secondaryText: u || !t.email_channel || !l.email ? s.notification_disabled : s.notification_enabled,
|
|
281
|
+
useExtraPadding: !1
|
|
282
|
+
}
|
|
283
|
+
) }),
|
|
284
|
+
_ && (m || y) && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
285
|
+
m && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
286
|
+
D,
|
|
287
|
+
{
|
|
288
|
+
isChecked: !p && t.sms_channel && !!l.phone,
|
|
289
|
+
isDisabled: p || !l.phone,
|
|
290
|
+
onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
|
|
291
|
+
primaryText: `${s.delivery_method_sms_label}`,
|
|
292
|
+
secondaryText: p || !t.sms_channel || !l.phone ? s.notification_disabled : s.notification_enabled,
|
|
293
|
+
useExtraPadding: !1
|
|
294
|
+
}
|
|
295
|
+
) }),
|
|
296
|
+
m && y && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
297
|
+
y && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
298
|
+
D,
|
|
299
|
+
{
|
|
300
|
+
isChecked: !d && t.push_channel,
|
|
301
|
+
isDisabled: d,
|
|
302
|
+
onToggle: () => n({ ...t, push_channel: !t.push_channel }),
|
|
303
|
+
primaryText: s.delivery_method_push_label,
|
|
304
|
+
secondaryText: s.delivery_method_push_subtitle,
|
|
305
|
+
useExtraPadding: !1
|
|
306
|
+
}
|
|
307
|
+
) }),
|
|
308
|
+
/* @__PURE__ */ e(v, {})
|
|
309
|
+
] })
|
|
310
|
+
] }),
|
|
311
|
+
o && !!t.children?.length && /* @__PURE__ */ c(h, { children: [
|
|
312
|
+
/* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.accounts_threshold_title }),
|
|
313
|
+
/* @__PURE__ */ e(E, { sx: { bgcolor: "background.paper" }, children: t.children?.map((g) => /* @__PURE__ */ e(
|
|
314
|
+
ke,
|
|
315
|
+
{
|
|
316
|
+
onProfileUpdated: n,
|
|
317
|
+
profile: g
|
|
318
|
+
},
|
|
319
|
+
g.guid
|
|
320
|
+
)) })
|
|
321
|
+
] })
|
|
322
|
+
] });
|
|
323
|
+
}
|
|
324
|
+
), z = C(() => {
|
|
325
|
+
const { accountProfiles: n, updateNotificationProfile: t } = T(), [s, l] = f.useState(""), i = f.useMemo(
|
|
326
|
+
() => n.find((o) => o.guid === s),
|
|
327
|
+
[n, s]
|
|
328
|
+
), r = async (o) => {
|
|
329
|
+
await t({
|
|
330
|
+
...o,
|
|
331
|
+
is_enabled: !o.is_enabled
|
|
332
|
+
});
|
|
333
|
+
}, a = async (o) => {
|
|
334
|
+
await t(o);
|
|
335
|
+
};
|
|
336
|
+
return /* @__PURE__ */ c(h, { sx: { backgroundColor: "background.paper" }, children: [
|
|
337
|
+
n.filter((o) => o.children && o.children.length > 0).map((o) => /* @__PURE__ */ e(
|
|
338
|
+
R,
|
|
339
|
+
{
|
|
340
|
+
endIcon: /* @__PURE__ */ e(A, {}),
|
|
341
|
+
isChecked: o.is_enabled,
|
|
342
|
+
isDisabled: !o.is_enabled,
|
|
343
|
+
onClick: () => l(o.guid),
|
|
344
|
+
onToggle: () => r(o),
|
|
345
|
+
primaryText: o.label,
|
|
346
|
+
secondaryText: o.is_enabled ? o.deliveryMethodsLabel : void 0
|
|
347
|
+
},
|
|
348
|
+
o.guid
|
|
349
|
+
)),
|
|
350
|
+
/* @__PURE__ */ e(
|
|
351
|
+
K,
|
|
352
|
+
{
|
|
353
|
+
isOpen: !!i,
|
|
354
|
+
onClose: () => l(""),
|
|
355
|
+
title: i ? i.label : "",
|
|
356
|
+
children: i && /* @__PURE__ */ e(
|
|
357
|
+
we,
|
|
358
|
+
{
|
|
359
|
+
onUpdateProfile: a,
|
|
360
|
+
profile: i
|
|
361
|
+
}
|
|
362
|
+
)
|
|
363
|
+
}
|
|
364
|
+
)
|
|
365
|
+
] });
|
|
366
|
+
}), X = C(({ profile: n }) => {
|
|
367
|
+
const { settings: t } = k(), {
|
|
368
|
+
clientCommunicationProfile: {
|
|
369
|
+
email_notifications_enabled: s,
|
|
370
|
+
push_notifications_enabled: l,
|
|
371
|
+
sms_notifications_enabled: i
|
|
372
|
+
},
|
|
373
|
+
updateNotificationProfile: r,
|
|
374
|
+
userCommunicationsProfile: {
|
|
375
|
+
opted_out_of_email_notifications: a,
|
|
376
|
+
opted_out_of_push_notifications: o,
|
|
377
|
+
opted_out_of_sms_notifications: u
|
|
378
|
+
}
|
|
379
|
+
} = T(), { user: d } = S(), [p, _] = f.useState(!1), y = async () => {
|
|
380
|
+
await m({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && _(!1);
|
|
381
|
+
}, m = async (P) => {
|
|
382
|
+
await r(P);
|
|
383
|
+
}, g = s || i || l;
|
|
384
|
+
return /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
385
|
+
/* @__PURE__ */ e(
|
|
386
|
+
R,
|
|
387
|
+
{
|
|
388
|
+
endIcon: g ? /* @__PURE__ */ e(
|
|
389
|
+
ee,
|
|
390
|
+
{
|
|
391
|
+
sx: {
|
|
392
|
+
transition: "transform 0.3s ease-in-out",
|
|
393
|
+
transform: p ? "rotate(180deg)" : "rotate(0deg)"
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
) : void 0,
|
|
397
|
+
isChecked: n.is_enabled,
|
|
398
|
+
isDisabled: !n.is_enabled,
|
|
399
|
+
onClick: () => _(!p),
|
|
400
|
+
onToggle: () => y(),
|
|
401
|
+
primaryText: n.label,
|
|
402
|
+
secondaryText: n.is_enabled ? n.deliveryMethodsLabel : void 0
|
|
403
|
+
},
|
|
404
|
+
n.guid
|
|
405
|
+
),
|
|
406
|
+
g && /* @__PURE__ */ e(pe, { in: p, children: /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
407
|
+
s && /* @__PURE__ */ e(
|
|
408
|
+
D,
|
|
409
|
+
{
|
|
410
|
+
isChecked: !a && n.email_channel && !!d.email,
|
|
411
|
+
isDisabled: a || !d.email,
|
|
412
|
+
onToggle: () => m({
|
|
413
|
+
...n,
|
|
414
|
+
email_channel: !n.email_channel
|
|
415
|
+
}),
|
|
416
|
+
primaryText: t.delivery_method_email_label
|
|
417
|
+
}
|
|
418
|
+
),
|
|
419
|
+
s && (i || l) && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
420
|
+
i && /* @__PURE__ */ e(
|
|
421
|
+
D,
|
|
422
|
+
{
|
|
423
|
+
isChecked: !u && n.sms_channel && !!d.phone,
|
|
424
|
+
isDisabled: u || !d.phone,
|
|
425
|
+
onToggle: () => m({
|
|
426
|
+
...n,
|
|
427
|
+
sms_channel: !n.sms_channel
|
|
428
|
+
}),
|
|
429
|
+
primaryText: t.delivery_method_sms_label
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
i && l && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
433
|
+
l && /* @__PURE__ */ e(
|
|
434
|
+
D,
|
|
435
|
+
{
|
|
436
|
+
isChecked: !o && n.push_channel,
|
|
437
|
+
isDisabled: o,
|
|
438
|
+
onToggle: () => m({
|
|
439
|
+
...n,
|
|
440
|
+
push_channel: !n.push_channel
|
|
441
|
+
}),
|
|
442
|
+
primaryText: t.delivery_method_push_label
|
|
443
|
+
}
|
|
444
|
+
)
|
|
445
|
+
] }) }),
|
|
446
|
+
/* @__PURE__ */ e(v, {})
|
|
447
|
+
] }, n.guid);
|
|
448
|
+
}), $ = C(() => {
|
|
449
|
+
const { budgetProfiles: n } = T();
|
|
450
|
+
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(X, { profile: t }, t.guid)) });
|
|
451
|
+
}), Ae = C(() => {
|
|
452
|
+
const { onEvent: n } = me(), { settings: t } = k(), {
|
|
453
|
+
clientCommunicationProfile: s,
|
|
454
|
+
updateUserCommunicationProfile: l,
|
|
455
|
+
userCommunicationsProfile: i
|
|
456
|
+
} = T(), { user: r } = S(), a = async (o, u) => {
|
|
457
|
+
const d = { ...i, [o]: u };
|
|
458
|
+
if (n) {
|
|
459
|
+
const _ = o.split("_")[3];
|
|
460
|
+
u === !1 ? n("opt_in_notification_method", { notificationType: _ }) : n("opt_out_notification_method", { notificationType: _ });
|
|
461
|
+
}
|
|
462
|
+
await l(d);
|
|
463
|
+
};
|
|
464
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
465
|
+
/* @__PURE__ */ e(F, { sx: { mt: 24 }, children: t.delivery_method_title }),
|
|
466
|
+
s.email_notifications_enabled && /* @__PURE__ */ c(N, { children: [
|
|
467
|
+
/* @__PURE__ */ e(
|
|
468
|
+
D,
|
|
469
|
+
{
|
|
470
|
+
isChecked: !!r.email && !i.opted_out_of_email_notifications,
|
|
471
|
+
isDisabled: !r.email,
|
|
472
|
+
onToggle: () => a(
|
|
473
|
+
"opted_out_of_email_notifications",
|
|
474
|
+
!i.opted_out_of_email_notifications
|
|
475
|
+
),
|
|
476
|
+
primaryText: t.delivery_method_email_title,
|
|
477
|
+
secondaryText: r.email && !i.opted_out_of_email_notifications ? t.notification_enabled : t.notification_disabled,
|
|
478
|
+
useExtraPadding: !1
|
|
479
|
+
}
|
|
480
|
+
),
|
|
481
|
+
(s.sms_notifications_enabled || s.push_notifications_enabled) && /* @__PURE__ */ e(v, {})
|
|
482
|
+
] }),
|
|
483
|
+
s.sms_notifications_enabled && /* @__PURE__ */ c(N, { children: [
|
|
484
|
+
/* @__PURE__ */ e(
|
|
485
|
+
D,
|
|
486
|
+
{
|
|
487
|
+
isChecked: !!r.phone && !i.opted_out_of_sms_notifications,
|
|
488
|
+
isDisabled: !r.phone,
|
|
489
|
+
onToggle: () => a("opted_out_of_sms_notifications", !i.opted_out_of_sms_notifications),
|
|
490
|
+
primaryText: t.delivery_method_sms_title,
|
|
491
|
+
secondaryText: r.phone && !i.opted_out_of_sms_notifications ? t.notification_enabled : t.notification_disabled,
|
|
492
|
+
useExtraPadding: !1
|
|
493
|
+
}
|
|
494
|
+
),
|
|
495
|
+
s.push_notifications_enabled && /* @__PURE__ */ e(v, {})
|
|
496
|
+
] }),
|
|
497
|
+
s.push_notifications_enabled && /* @__PURE__ */ e(
|
|
498
|
+
D,
|
|
499
|
+
{
|
|
500
|
+
isChecked: !i.opted_out_of_push_notifications,
|
|
501
|
+
isDisabled: !0,
|
|
502
|
+
onToggle: () => {
|
|
503
|
+
},
|
|
504
|
+
primaryText: t.delivery_method_push_title,
|
|
505
|
+
secondaryText: t.delivery_method_push_subtitle,
|
|
506
|
+
useExtraPadding: !1
|
|
507
|
+
}
|
|
508
|
+
),
|
|
509
|
+
s.sms_notifications_enabled && /* @__PURE__ */ e(ge, { sx: { backgroundColor: "background.default", mt: 12 }, variant: "outlined", children: /* @__PURE__ */ e(ye, { children: /* @__PURE__ */ c(h, { alignItems: "flex-start", direction: "row", gap: 6, children: [
|
|
510
|
+
/* @__PURE__ */ e(te, { color: "primary", filled: !0 }),
|
|
511
|
+
/* @__PURE__ */ e(x, { variant: "caption", children: t.delivery_method_sms_note_1 })
|
|
512
|
+
] }) }) })
|
|
513
|
+
] });
|
|
514
|
+
}), H = C(() => {
|
|
515
|
+
const { insightsProfiles: n } = T();
|
|
516
|
+
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(X, { profile: t }, t.guid)) });
|
|
517
|
+
}), Se = () => {
|
|
518
|
+
const { config: n } = q(), [t, { width: s }] = be(), { common: l, settings: i } = k(), { updateUser: r } = T(), { user: a } = S(), [o, u] = f.useState(!1), [d, p] = f.useState({
|
|
519
|
+
email: a.email,
|
|
520
|
+
phone: a.phone
|
|
521
|
+
}), _ = d.email && !a.email_is_verified && !o, y = d.phone && !a.phone_is_verified && !o, m = (P) => {
|
|
522
|
+
const { name: I, value: w } = P.target, M = { ...d, [I]: w };
|
|
523
|
+
p(M), u(JSON.stringify({ ...a, ...M }) !== JSON.stringify(a));
|
|
524
|
+
}, g = async () => {
|
|
525
|
+
await r({ ...a, ...d }), u(!1);
|
|
526
|
+
};
|
|
527
|
+
return /* @__PURE__ */ c(h, { ref: t, children: [
|
|
528
|
+
/* @__PURE__ */ e(v, {}),
|
|
529
|
+
/* @__PURE__ */ c(h, { sx: { pt: 12 }, children: [
|
|
530
|
+
/* @__PURE__ */ e(F, { sx: { lineHeight: "20px", pb: 4, pt: 16 }, children: i.personal_details }),
|
|
531
|
+
/* @__PURE__ */ c(h, { sx: { flexDirection: s <= 768 ? "column" : "row", gap: 24, py: 16 }, children: [
|
|
532
|
+
n.display_email_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { flex: 1, pb: 14 }, children: [
|
|
533
|
+
/* @__PURE__ */ e(
|
|
534
|
+
U,
|
|
535
|
+
{
|
|
536
|
+
defaultValue: a.email,
|
|
537
|
+
fullWidth: !0,
|
|
538
|
+
label: i.email_address,
|
|
539
|
+
name: "email",
|
|
540
|
+
onChange: m
|
|
541
|
+
}
|
|
542
|
+
),
|
|
543
|
+
_ && /* @__PURE__ */ e(
|
|
544
|
+
W,
|
|
545
|
+
{
|
|
546
|
+
sx: {
|
|
547
|
+
height: 20,
|
|
548
|
+
".MuiButton-root": {
|
|
549
|
+
px: 0,
|
|
550
|
+
":hover": {
|
|
551
|
+
bgcolor: "transparent"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
children: /* @__PURE__ */ e(Te, {})
|
|
556
|
+
}
|
|
557
|
+
)
|
|
558
|
+
] }),
|
|
559
|
+
n.display_sms_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { flex: 1, pb: 14 }, children: [
|
|
560
|
+
/* @__PURE__ */ e(
|
|
561
|
+
U,
|
|
562
|
+
{
|
|
563
|
+
defaultValue: a.phone,
|
|
564
|
+
fullWidth: !0,
|
|
565
|
+
label: i.mobile_number,
|
|
566
|
+
name: "phone",
|
|
567
|
+
onChange: m
|
|
568
|
+
}
|
|
569
|
+
),
|
|
570
|
+
y && /* @__PURE__ */ e(
|
|
571
|
+
W,
|
|
572
|
+
{
|
|
573
|
+
sx: {
|
|
574
|
+
height: 20,
|
|
575
|
+
".MuiButton-root": {
|
|
576
|
+
px: 0,
|
|
577
|
+
":hover": {
|
|
578
|
+
bgcolor: "transparent"
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
children: /* @__PURE__ */ e(De, {})
|
|
583
|
+
}
|
|
584
|
+
)
|
|
585
|
+
] })
|
|
586
|
+
] }),
|
|
587
|
+
/* @__PURE__ */ e(
|
|
588
|
+
j,
|
|
589
|
+
{
|
|
590
|
+
disabled: !o,
|
|
591
|
+
onClick: g,
|
|
592
|
+
sx: { width: 84 },
|
|
593
|
+
variant: "contained",
|
|
594
|
+
children: l.save_button
|
|
595
|
+
}
|
|
596
|
+
)
|
|
597
|
+
] })
|
|
598
|
+
] });
|
|
599
|
+
}, Ie = C(Se), ut = C(
|
|
600
|
+
({
|
|
601
|
+
notificationTypes: n = [b.Accounts, b.Budgets],
|
|
602
|
+
showPersonalDetails: t = !1,
|
|
603
|
+
view: s
|
|
604
|
+
}) => {
|
|
605
|
+
const { config: l } = q(), { settings: i } = k(), { isInitialized: r } = he(), { isAccountDataLoaded: a, loadAccountData: o } = J(), { clientCommunicationProfile: u, loadNotificationProfiles: d } = T(), p = xe(), [_, y] = f.useState(!1), [m, g] = f.useState(
|
|
606
|
+
void 0
|
|
607
|
+
);
|
|
608
|
+
if (n.length > 0 && p && n.push(b.Insights), Ce({
|
|
609
|
+
widgetName: "NotificationSettingsWidget",
|
|
610
|
+
isLoaded: _
|
|
611
|
+
}), f.useEffect(() => {
|
|
612
|
+
a || o().finally();
|
|
613
|
+
}, []), f.useEffect(() => {
|
|
614
|
+
r && d().finally(() => y(!0));
|
|
615
|
+
}, [r]), !r)
|
|
616
|
+
return /* @__PURE__ */ e(ve, {});
|
|
617
|
+
let P = i.manage_account_notifications;
|
|
618
|
+
m === b.Budgets ? P = i.manage_budget_notifications : m === b.Insights && (P = i.manage_insights_notifications);
|
|
619
|
+
const {
|
|
620
|
+
email_notifications_enabled: I,
|
|
621
|
+
sms_notifications_enabled: w,
|
|
622
|
+
push_notifications_enabled: M
|
|
623
|
+
} = u, G = I || w || M;
|
|
624
|
+
if (s === "accounts")
|
|
625
|
+
return /* @__PURE__ */ e(z, {});
|
|
626
|
+
if (s === "budgets")
|
|
627
|
+
return /* @__PURE__ */ e($, {});
|
|
628
|
+
if (s === "insights")
|
|
629
|
+
return /* @__PURE__ */ e(H, {});
|
|
630
|
+
const Y = l.display_email_edit_field_in_settings || l.display_sms_edit_field_in_settings, Z = t && u.can_edit_contact_info && Y;
|
|
631
|
+
return /* @__PURE__ */ c(h, { sx: { pt: G ? 0 : 24 }, children: [
|
|
632
|
+
/* @__PURE__ */ c(h, { sx: { px: 24 }, children: [
|
|
633
|
+
G && /* @__PURE__ */ c(N, { children: [
|
|
634
|
+
/* @__PURE__ */ e(Ae, {}),
|
|
635
|
+
/* @__PURE__ */ e(v, { sx: { my: 24 } })
|
|
636
|
+
] }),
|
|
637
|
+
/* @__PURE__ */ e(F, { sx: { mb: 4 }, children: i.notification_types_title })
|
|
638
|
+
] }),
|
|
639
|
+
/* @__PURE__ */ c(E, { children: [
|
|
640
|
+
n.includes(b.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => g(b.Accounts), children: [
|
|
641
|
+
/* @__PURE__ */ e(L, { primary: i.accounts_title, secondary: i.accounts_subtitle }),
|
|
642
|
+
/* @__PURE__ */ e(A, {})
|
|
643
|
+
] }) }),
|
|
644
|
+
n.includes(b.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => g(b.Budgets), children: [
|
|
645
|
+
/* @__PURE__ */ e(L, { primary: i.budgets_title, secondary: i.budgets_subtitle }),
|
|
646
|
+
/* @__PURE__ */ e(A, {})
|
|
647
|
+
] }) }),
|
|
648
|
+
n.includes(b.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => g(b.Insights), children: [
|
|
649
|
+
/* @__PURE__ */ e(L, { primary: i.insights_title, secondary: i.insights_subtitle }),
|
|
650
|
+
/* @__PURE__ */ e(A, {})
|
|
651
|
+
] }) })
|
|
652
|
+
] }),
|
|
653
|
+
Z && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(Ie, {}) }),
|
|
654
|
+
/* @__PURE__ */ e(
|
|
655
|
+
K,
|
|
656
|
+
{
|
|
657
|
+
isOpen: !!m,
|
|
658
|
+
onClose: () => g(void 0),
|
|
659
|
+
title: P,
|
|
660
|
+
children: /* @__PURE__ */ c(h, { children: [
|
|
661
|
+
m === b.Accounts && /* @__PURE__ */ e(z, {}),
|
|
662
|
+
m === b.Budgets && /* @__PURE__ */ e($, {}),
|
|
663
|
+
m === b.Insights && /* @__PURE__ */ e(H, {})
|
|
664
|
+
] })
|
|
665
|
+
}
|
|
666
|
+
)
|
|
667
|
+
] });
|
|
668
|
+
}
|
|
669
|
+
);
|
|
670
|
+
export {
|
|
671
|
+
z as A,
|
|
672
|
+
$ as B,
|
|
673
|
+
H as I,
|
|
674
|
+
ut as N,
|
|
675
|
+
Te as V,
|
|
676
|
+
De as a
|
|
677
|
+
};
|
|
678
|
+
//# sourceMappingURL=NotificationSettings-CW7okUrk.mjs.map
|