@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.mega2
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 +50 -0
- package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
- package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
- package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
- package/dist/Accounts-Bzy1_REQ.mjs +9 -0
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
- package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
- package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
- package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
- package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
- package/dist/Drawer-By9V-B5L.mjs +178 -0
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
- package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
- package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
- package/dist/LineChart-BF4QA-Lx.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
- package/dist/Loader-DUaFpDGv.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
- package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
- package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
- package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
- package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
- package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
- package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
- package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
- package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
- package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
- package/dist/TrendsStore-yO7qYv97.mjs +186 -0
- package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
- package/dist/accounts/index.es.js +200 -197
- package/dist/accounts/stores/AccountStore.d.ts +22 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +703 -669
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +420 -404
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +3 -6
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +2 -1
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/barchart/Bar.d.ts +25 -0
- package/dist/common/components/barchart/BarChart.d.ts +34 -0
- package/dist/common/components/barchart/BarColumn.d.ts +37 -0
- package/dist/common/components/barchart/Legend.d.ts +8 -0
- package/dist/common/components/barchart/Util.d.ts +42 -0
- package/dist/common/components/barchart/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/hooks/index.d.ts +2 -0
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/hooks/usePrevious.d.ts +2 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +712 -436
- package/dist/common/stores/AppDataStore.d.ts +1 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
- package/dist/common/stores/GlobalStore.d.ts +3 -3
- package/dist/common/stores/GlobalUiStore.d.ts +2 -3
- package/dist/common/stores/UserStore.d.ts +2 -3
- package/dist/common/types/Account.d.ts +6 -9
- package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
- package/dist/common/utils/Theme.d.ts +3 -1
- package/dist/dashboard/index.es.js +93 -91
- package/dist/debts/components/DebtsChart.d.ts +2 -1
- package/dist/debts/index.es.js +529 -527
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +876 -867
- package/dist/goals/index.es.js +526 -525
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +13 -9
- package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
- package/dist/investments/index.es.js +534 -531
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +8 -8
- package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
- package/dist/microinsights/index.d.ts +1 -0
- package/dist/microinsights/index.es.js +101 -14
- package/dist/networth/components/NetWorthChange.d.ts +1 -3
- package/dist/networth/index.es.js +284 -285
- package/dist/notifications/index.es.js +95 -94
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +582 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
- package/dist/settings/index.es.js +340 -337
- package/dist/spending/index.es.js +281 -268
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +253 -255
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/transactions/stores/UiStore.d.ts +2 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +838 -793
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
- package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
- package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
- package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
- package/package.json +57 -52
- package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
- package/dist/AccountListItem-wgmlex-_.mjs +0 -90
- package/dist/Accounts-CRUehOiy.mjs +0 -27
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
- package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
- package/dist/Drawer-BF40nbsH.mjs +0 -163
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/LineChart-C1PxNf7P.mjs +0 -581
- package/dist/Loader-Ckqi9Rx6.mjs +0 -21
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
- package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
- package/dist/SearchBox-B7km148n.mjs +0 -39
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
- package/dist/TransactionStore-DbwAutwC.mjs +0 -671
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/common/components/SkeletonLoader.d.ts +0 -7
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
|
@@ -0,0 +1,674 @@
|
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import g 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 w, ExpandMore as Q, Star as Y } from "@mxenabled/mx-icons";
|
|
11
|
+
import { Text as x, InstitutionLogo as Z, H3 as F } from "@mxenabled/mxui";
|
|
12
|
+
import { endOfMonth as ee } from "date-fns/endOfMonth";
|
|
13
|
+
import { startOfMonth as te } from "date-fns/startOfMonth";
|
|
14
|
+
import { DateCalendar as ne } from "@mui/x-date-pickers/DateCalendar";
|
|
15
|
+
import { LocalizationProvider as ie } from "@mui/x-date-pickers/LocalizationProvider";
|
|
16
|
+
import { AdapterDateFns as oe } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
17
|
+
import { A as se, T as R, a as P, N as y } from "./ToggleListItem-ciFTiqRS.mjs";
|
|
18
|
+
import { u as D, r as T, o as A, d as ae, g as ce, a as $, b as le } from "./hooks-ZMp65DFz.mjs";
|
|
19
|
+
import { b as re } from "./Localization-2MODESHW.mjs";
|
|
20
|
+
import { b as de, f as me } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
21
|
+
import { D as N } from "./Dialog-BPTr3qHE.mjs";
|
|
22
|
+
import { C as he } from "./CurrencyInput-itK0R3wV.mjs";
|
|
23
|
+
import { u as _e } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
24
|
+
import { D as J } from "./Drawer-By9V-B5L.mjs";
|
|
25
|
+
import ue from "@mui/material/Collapse";
|
|
26
|
+
import pe from "@mui/material/Card";
|
|
27
|
+
import fe from "@mui/material/CardContent";
|
|
28
|
+
import G from "@mui/material/Box";
|
|
29
|
+
import j from "@mui/material/Button";
|
|
30
|
+
import U from "@mui/material/TextField";
|
|
31
|
+
import { u as ge } from "./useDimensions-27p2evRx.mjs";
|
|
32
|
+
import X from "@mui/material/styles/useTheme";
|
|
33
|
+
import { u as ye } from "./useInsightsEnabled-B7dxpDrX.mjs";
|
|
34
|
+
import { u as be } from "./useWidgetLoadTimer-hIOioiKx.mjs";
|
|
35
|
+
import { L as xe } from "./Loader-DUaFpDGv.mjs";
|
|
36
|
+
const Ce = C(() => {
|
|
37
|
+
const { common: n, settings: t } = D(), { sendEmailVerification: s } = T(), { user: l } = A(), i = X(), [r, a] = g.useState(!1), o = () => {
|
|
38
|
+
a(!1);
|
|
39
|
+
}, _ = () => {
|
|
40
|
+
a(!0);
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ c(g.Fragment, { children: [
|
|
43
|
+
/* @__PURE__ */ c(j, { onClick: _, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
44
|
+
/* @__PURE__ */ e(x, { variant: "Small", children: t.verify_email }),
|
|
45
|
+
/* @__PURE__ */ e(w, {})
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
N,
|
|
49
|
+
{
|
|
50
|
+
copy: { title: "" },
|
|
51
|
+
isOpen: r,
|
|
52
|
+
onClose: o,
|
|
53
|
+
onPrimaryAction: s,
|
|
54
|
+
onSecondaryAction: o,
|
|
55
|
+
primaryText: t.send_verification,
|
|
56
|
+
secondaryText: n.back,
|
|
57
|
+
sx: {
|
|
58
|
+
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
59
|
+
"& .MuiToolbar-root:last-child": {
|
|
60
|
+
gap: 16,
|
|
61
|
+
padding: "32px 60px 48px",
|
|
62
|
+
justifyContent: "center"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
children: /* @__PURE__ */ c(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
66
|
+
/* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "Body", children: t.confirm_your_email }),
|
|
67
|
+
/* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.confirm_email }),
|
|
68
|
+
/* @__PURE__ */ e(
|
|
69
|
+
x,
|
|
70
|
+
{
|
|
71
|
+
sx: {
|
|
72
|
+
border: `1px solid ${i.palette.border.light}`,
|
|
73
|
+
borderRadius: "4px",
|
|
74
|
+
p: "16px 32px"
|
|
75
|
+
},
|
|
76
|
+
variant: "H3",
|
|
77
|
+
children: l.email
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.verification_notice_email })
|
|
81
|
+
] })
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
] });
|
|
85
|
+
}), ve = C(
|
|
86
|
+
({ handleClose: n, handleVerify: t, isOpen: s }) => {
|
|
87
|
+
const { common: l, settings: i } = D(), [r, a] = g.useState("");
|
|
88
|
+
return /* @__PURE__ */ e(
|
|
89
|
+
N,
|
|
90
|
+
{
|
|
91
|
+
copy: { title: i.enter_verification_code },
|
|
92
|
+
isOpen: s,
|
|
93
|
+
onClose: n,
|
|
94
|
+
onPrimaryAction: () => t(r),
|
|
95
|
+
onSecondaryAction: n,
|
|
96
|
+
primaryText: i.verify,
|
|
97
|
+
secondaryText: l.cancel_button,
|
|
98
|
+
sx: {
|
|
99
|
+
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
100
|
+
"& .MuiToolbar-root:last-child": {
|
|
101
|
+
gap: 8,
|
|
102
|
+
padding: 24,
|
|
103
|
+
justifyContent: "flex-end"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(U, { onChange: (o) => a(o.target.value), sx: { width: 352 }, value: r }) })
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
), Te = C(() => {
|
|
111
|
+
const { common: n, settings: t } = D(), { sendPhoneVerification: s, verifyPhoneToken: l } = T(), { user: i } = A(), r = X(), [a, o] = g.useState(!1), [_, d] = g.useState(!1), p = () => {
|
|
112
|
+
o(!1);
|
|
113
|
+
}, m = () => {
|
|
114
|
+
o(!0);
|
|
115
|
+
}, f = () => {
|
|
116
|
+
s().finally(() => {
|
|
117
|
+
d(!0);
|
|
118
|
+
});
|
|
119
|
+
}, u = (b) => {
|
|
120
|
+
l(b).finally(() => {
|
|
121
|
+
d(!1);
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
return /* @__PURE__ */ c(g.Fragment, { children: [
|
|
125
|
+
/* @__PURE__ */ c(j, { onClick: m, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
126
|
+
/* @__PURE__ */ e(x, { variant: "Small", children: t.verify_phone }),
|
|
127
|
+
/* @__PURE__ */ e(w, {})
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ e(
|
|
130
|
+
N,
|
|
131
|
+
{
|
|
132
|
+
copy: { title: "" },
|
|
133
|
+
isOpen: a,
|
|
134
|
+
onClose: p,
|
|
135
|
+
onPrimaryAction: f,
|
|
136
|
+
onSecondaryAction: p,
|
|
137
|
+
primaryText: t.send_verification,
|
|
138
|
+
secondaryText: n.back,
|
|
139
|
+
sx: {
|
|
140
|
+
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
141
|
+
"& .MuiToolbar-root:last-child": {
|
|
142
|
+
gap: 16,
|
|
143
|
+
padding: "32px 60px 48px",
|
|
144
|
+
justifyContent: "center"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
children: /* @__PURE__ */ c(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
148
|
+
/* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "Body", children: t.confirm_your_phone }),
|
|
149
|
+
/* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.confirm_phone }),
|
|
150
|
+
/* @__PURE__ */ e(
|
|
151
|
+
x,
|
|
152
|
+
{
|
|
153
|
+
sx: {
|
|
154
|
+
border: `1px solid ${r.palette.border.light}`,
|
|
155
|
+
borderRadius: "4px",
|
|
156
|
+
p: "16px 32px"
|
|
157
|
+
},
|
|
158
|
+
variant: "H3",
|
|
159
|
+
children: i.phone
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.verification_notice_phone })
|
|
163
|
+
] })
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
/* @__PURE__ */ e(
|
|
167
|
+
ve,
|
|
168
|
+
{
|
|
169
|
+
handleClose: () => d(!1),
|
|
170
|
+
handleVerify: u,
|
|
171
|
+
isOpen: _
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] });
|
|
175
|
+
}), Pe = C(
|
|
176
|
+
({ onProfileUpdated: n, profile: t }) => {
|
|
177
|
+
const { common: s, recurring: l, settings: i } = D(), { updateAccount: r } = ae(), a = t.notification_type === se.DebtPaymentReminder, [o, _] = g.useState(!1), [d, p] = g.useState(t.threshold || 0), [m, f] = g.useState(
|
|
178
|
+
t.account?.day_payment_is_due || 0
|
|
179
|
+
), u = t.account?.name || t.account?.feed_name || "", b = t.account?.day_payment_is_due ? re(
|
|
180
|
+
i.notification_debt_payment_date,
|
|
181
|
+
de(t.account?.day_payment_is_due)
|
|
182
|
+
) : i.notification_debt_payment_zero_state, k = a ? b : me(t.threshold ?? 0, "0,0"), I = async () => {
|
|
183
|
+
a && t.account ? await r({ ...t.account, day_payment_is_due: m }) : n({ ...t, threshold: d });
|
|
184
|
+
};
|
|
185
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
186
|
+
/* @__PURE__ */ e(
|
|
187
|
+
R,
|
|
188
|
+
{
|
|
189
|
+
avatar: t.account?.institution_guid ? /* @__PURE__ */ e(
|
|
190
|
+
Z,
|
|
191
|
+
{
|
|
192
|
+
alt: t.label,
|
|
193
|
+
institutionGuid: t.account?.institution_guid
|
|
194
|
+
}
|
|
195
|
+
) : void 0,
|
|
196
|
+
endIcon: /* @__PURE__ */ e(w, {}),
|
|
197
|
+
isChecked: t.is_enabled,
|
|
198
|
+
isDisabled: !t.is_enabled,
|
|
199
|
+
isPrimaryTextBold: !0,
|
|
200
|
+
onClick: () => _(!0),
|
|
201
|
+
onToggle: () => n({
|
|
202
|
+
...t,
|
|
203
|
+
is_enabled: !t.is_enabled
|
|
204
|
+
}),
|
|
205
|
+
primaryText: u,
|
|
206
|
+
secondaryText: t.is_enabled ? k : i.notification_disabled
|
|
207
|
+
}
|
|
208
|
+
),
|
|
209
|
+
/* @__PURE__ */ e(
|
|
210
|
+
N,
|
|
211
|
+
{
|
|
212
|
+
copy: {
|
|
213
|
+
title: a ? l.day_of_the_month : i.notification_threshold_label,
|
|
214
|
+
close_aria: s.close_aria
|
|
215
|
+
},
|
|
216
|
+
disablePrimaryButton: a && m === 0,
|
|
217
|
+
isOpen: o,
|
|
218
|
+
onClose: () => _(!1),
|
|
219
|
+
onPrimaryAction: I,
|
|
220
|
+
primaryText: s.save_button,
|
|
221
|
+
children: a ? /* @__PURE__ */ e(ie, { dateAdapter: oe, children: /* @__PURE__ */ e(
|
|
222
|
+
ne,
|
|
223
|
+
{
|
|
224
|
+
maxDate: ee(/* @__PURE__ */ new Date()),
|
|
225
|
+
minDate: te(/* @__PURE__ */ new Date()),
|
|
226
|
+
onChange: (S) => {
|
|
227
|
+
f(S.getDate());
|
|
228
|
+
},
|
|
229
|
+
slots: {
|
|
230
|
+
// Hides the arrows
|
|
231
|
+
leftArrowIcon: () => null,
|
|
232
|
+
rightArrowIcon: () => null
|
|
233
|
+
},
|
|
234
|
+
sx: {
|
|
235
|
+
// TODO: Needs to be updated in MXUI
|
|
236
|
+
"& .MuiPickersDay-today": {
|
|
237
|
+
color: "primary.main"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
views: ["day"]
|
|
241
|
+
}
|
|
242
|
+
) }) : /* @__PURE__ */ e(
|
|
243
|
+
he,
|
|
244
|
+
{
|
|
245
|
+
amount: d,
|
|
246
|
+
autoFocus: !0,
|
|
247
|
+
fullWidth: !0,
|
|
248
|
+
minAmount: 0,
|
|
249
|
+
setAmount: (S) => p(Number(S) || 0),
|
|
250
|
+
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
251
|
+
}
|
|
252
|
+
)
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
] });
|
|
256
|
+
}
|
|
257
|
+
), De = C(
|
|
258
|
+
({ onUpdateProfile: n, profile: t }) => {
|
|
259
|
+
const { settings: s } = D(), { user: l } = A(), { clientCommunicationProfile: i, userCommunicationsProfile: r } = T(), { isMobile: a } = _e(), o = t.notification_type > 2, {
|
|
260
|
+
opted_out_of_email_notifications: _,
|
|
261
|
+
opted_out_of_push_notifications: d,
|
|
262
|
+
opted_out_of_sms_notifications: p
|
|
263
|
+
} = r, {
|
|
264
|
+
email_notifications_enabled: m,
|
|
265
|
+
push_notifications_enabled: f,
|
|
266
|
+
sms_notifications_enabled: u
|
|
267
|
+
} = i;
|
|
268
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
269
|
+
(m || u || f) && /* @__PURE__ */ c(M, { children: [
|
|
270
|
+
/* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.delivery_method_title }),
|
|
271
|
+
/* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
272
|
+
m && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
273
|
+
P,
|
|
274
|
+
{
|
|
275
|
+
isChecked: !_ && t.email_channel && !!l.email,
|
|
276
|
+
isDisabled: _ || !l.email,
|
|
277
|
+
onToggle: () => n({ ...t, email_channel: !t.email_channel }),
|
|
278
|
+
primaryText: s.delivery_method_email_label,
|
|
279
|
+
secondaryText: _ || !t.email_channel || !l.email ? s.notification_disabled : s.notification_enabled,
|
|
280
|
+
useExtraPadding: !1
|
|
281
|
+
}
|
|
282
|
+
) }),
|
|
283
|
+
m && (u || f) && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
284
|
+
u && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
285
|
+
P,
|
|
286
|
+
{
|
|
287
|
+
isChecked: !p && t.sms_channel && !!l.phone,
|
|
288
|
+
isDisabled: p || !l.phone,
|
|
289
|
+
onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
|
|
290
|
+
primaryText: `${s.delivery_method_sms_label}`,
|
|
291
|
+
secondaryText: p || !t.sms_channel || !l.phone ? s.notification_disabled : s.notification_enabled,
|
|
292
|
+
useExtraPadding: !1
|
|
293
|
+
}
|
|
294
|
+
) }),
|
|
295
|
+
u && f && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
296
|
+
f && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
297
|
+
P,
|
|
298
|
+
{
|
|
299
|
+
isChecked: !d && t.push_channel,
|
|
300
|
+
isDisabled: d,
|
|
301
|
+
onToggle: () => n({ ...t, push_channel: !t.push_channel }),
|
|
302
|
+
primaryText: s.delivery_method_push_label,
|
|
303
|
+
secondaryText: s.delivery_method_push_subtitle,
|
|
304
|
+
useExtraPadding: !1
|
|
305
|
+
}
|
|
306
|
+
) }),
|
|
307
|
+
/* @__PURE__ */ e(v, {})
|
|
308
|
+
] })
|
|
309
|
+
] }),
|
|
310
|
+
o && !!t.children?.length && /* @__PURE__ */ c(h, { children: [
|
|
311
|
+
/* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.accounts_threshold_title }),
|
|
312
|
+
/* @__PURE__ */ e(E, { sx: { bgcolor: "background.paper" }, children: t.children?.map((b) => /* @__PURE__ */ e(
|
|
313
|
+
Pe,
|
|
314
|
+
{
|
|
315
|
+
onProfileUpdated: n,
|
|
316
|
+
profile: b
|
|
317
|
+
},
|
|
318
|
+
b.guid
|
|
319
|
+
)) })
|
|
320
|
+
] })
|
|
321
|
+
] });
|
|
322
|
+
}
|
|
323
|
+
), H = C(() => {
|
|
324
|
+
const { accountProfiles: n, updateNotificationProfile: t } = T(), [s, l] = g.useState(""), i = g.useMemo(
|
|
325
|
+
() => n.find((o) => o.guid === s),
|
|
326
|
+
[n, s]
|
|
327
|
+
), r = async (o) => {
|
|
328
|
+
await t({
|
|
329
|
+
...o,
|
|
330
|
+
is_enabled: !o.is_enabled
|
|
331
|
+
});
|
|
332
|
+
}, a = async (o) => {
|
|
333
|
+
await t(o);
|
|
334
|
+
};
|
|
335
|
+
return /* @__PURE__ */ c(h, { sx: { backgroundColor: "background.paper" }, children: [
|
|
336
|
+
n.filter((o) => o.children && o.children.length > 0).map((o) => /* @__PURE__ */ e(
|
|
337
|
+
R,
|
|
338
|
+
{
|
|
339
|
+
endIcon: /* @__PURE__ */ e(w, {}),
|
|
340
|
+
isChecked: o.is_enabled,
|
|
341
|
+
isDisabled: !o.is_enabled,
|
|
342
|
+
onClick: () => l(o.guid),
|
|
343
|
+
onToggle: () => r(o),
|
|
344
|
+
primaryText: o.label,
|
|
345
|
+
secondaryText: o.is_enabled ? o.deliveryMethodsLabel : void 0
|
|
346
|
+
},
|
|
347
|
+
o.guid
|
|
348
|
+
)),
|
|
349
|
+
/* @__PURE__ */ e(
|
|
350
|
+
J,
|
|
351
|
+
{
|
|
352
|
+
isOpen: !!i,
|
|
353
|
+
onClose: () => l(""),
|
|
354
|
+
title: i ? i.label : "",
|
|
355
|
+
children: i && /* @__PURE__ */ e(
|
|
356
|
+
De,
|
|
357
|
+
{
|
|
358
|
+
onUpdateProfile: a,
|
|
359
|
+
profile: i
|
|
360
|
+
}
|
|
361
|
+
)
|
|
362
|
+
}
|
|
363
|
+
)
|
|
364
|
+
] });
|
|
365
|
+
}), q = C(({ profile: n }) => {
|
|
366
|
+
const { settings: t } = D(), {
|
|
367
|
+
clientCommunicationProfile: {
|
|
368
|
+
email_notifications_enabled: s,
|
|
369
|
+
push_notifications_enabled: l,
|
|
370
|
+
sms_notifications_enabled: i
|
|
371
|
+
},
|
|
372
|
+
updateNotificationProfile: r,
|
|
373
|
+
userCommunicationsProfile: {
|
|
374
|
+
opted_out_of_email_notifications: a,
|
|
375
|
+
opted_out_of_push_notifications: o,
|
|
376
|
+
opted_out_of_sms_notifications: _
|
|
377
|
+
}
|
|
378
|
+
} = T(), { user: d } = A(), [p, m] = g.useState(!1), f = async () => {
|
|
379
|
+
await u({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && m(!1);
|
|
380
|
+
}, u = async (k) => {
|
|
381
|
+
await r(k);
|
|
382
|
+
}, b = s || i || l;
|
|
383
|
+
return /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
384
|
+
/* @__PURE__ */ e(
|
|
385
|
+
R,
|
|
386
|
+
{
|
|
387
|
+
endIcon: b ? /* @__PURE__ */ e(
|
|
388
|
+
Q,
|
|
389
|
+
{
|
|
390
|
+
sx: {
|
|
391
|
+
transition: "transform 0.3s ease-in-out",
|
|
392
|
+
transform: p ? "rotate(180deg)" : "rotate(0deg)"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
) : void 0,
|
|
396
|
+
isChecked: n.is_enabled,
|
|
397
|
+
isDisabled: !n.is_enabled,
|
|
398
|
+
onClick: () => m(!p),
|
|
399
|
+
onToggle: () => f(),
|
|
400
|
+
primaryText: n.label,
|
|
401
|
+
secondaryText: n.is_enabled ? n.deliveryMethodsLabel : void 0
|
|
402
|
+
},
|
|
403
|
+
n.guid
|
|
404
|
+
),
|
|
405
|
+
b && /* @__PURE__ */ e(ue, { in: p, children: /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
406
|
+
s && /* @__PURE__ */ e(
|
|
407
|
+
P,
|
|
408
|
+
{
|
|
409
|
+
isChecked: !a && n.email_channel && !!d.email,
|
|
410
|
+
isDisabled: a || !d.email,
|
|
411
|
+
onToggle: () => u({
|
|
412
|
+
...n,
|
|
413
|
+
email_channel: !n.email_channel
|
|
414
|
+
}),
|
|
415
|
+
primaryText: t.delivery_method_email_label
|
|
416
|
+
}
|
|
417
|
+
),
|
|
418
|
+
s && (i || l) && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
419
|
+
i && /* @__PURE__ */ e(
|
|
420
|
+
P,
|
|
421
|
+
{
|
|
422
|
+
isChecked: !_ && n.sms_channel && !!d.phone,
|
|
423
|
+
isDisabled: _ || !d.phone,
|
|
424
|
+
onToggle: () => u({
|
|
425
|
+
...n,
|
|
426
|
+
sms_channel: !n.sms_channel
|
|
427
|
+
}),
|
|
428
|
+
primaryText: t.delivery_method_sms_label
|
|
429
|
+
}
|
|
430
|
+
),
|
|
431
|
+
i && l && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
432
|
+
l && /* @__PURE__ */ e(
|
|
433
|
+
P,
|
|
434
|
+
{
|
|
435
|
+
isChecked: !o && n.push_channel,
|
|
436
|
+
isDisabled: o,
|
|
437
|
+
onToggle: () => u({
|
|
438
|
+
...n,
|
|
439
|
+
push_channel: !n.push_channel
|
|
440
|
+
}),
|
|
441
|
+
primaryText: t.delivery_method_push_label
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
] }) }),
|
|
445
|
+
/* @__PURE__ */ e(v, {})
|
|
446
|
+
] }, n.guid);
|
|
447
|
+
}), W = C(() => {
|
|
448
|
+
const { budgetProfiles: n } = T();
|
|
449
|
+
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
|
|
450
|
+
}), Se = C(() => {
|
|
451
|
+
const { onEvent: n } = ce(), { settings: t } = D(), {
|
|
452
|
+
clientCommunicationProfile: s,
|
|
453
|
+
updateUserCommunicationProfile: l,
|
|
454
|
+
userCommunicationsProfile: i
|
|
455
|
+
} = T(), { user: r } = A(), a = async (o, _) => {
|
|
456
|
+
const d = { ...i, [o]: _ };
|
|
457
|
+
if (n) {
|
|
458
|
+
const m = o.split("_")[3];
|
|
459
|
+
_ === !1 ? n("opt_in_notification_method", { notificationType: m }) : n("opt_out_notification_method", { notificationType: m });
|
|
460
|
+
}
|
|
461
|
+
await l(d);
|
|
462
|
+
};
|
|
463
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
464
|
+
/* @__PURE__ */ e(F, { sx: { mt: 24 }, children: t.delivery_method_title }),
|
|
465
|
+
s.email_notifications_enabled && /* @__PURE__ */ c(M, { children: [
|
|
466
|
+
/* @__PURE__ */ e(
|
|
467
|
+
P,
|
|
468
|
+
{
|
|
469
|
+
isChecked: !!r.email && !i.opted_out_of_email_notifications,
|
|
470
|
+
isDisabled: !r.email,
|
|
471
|
+
onToggle: () => a(
|
|
472
|
+
"opted_out_of_email_notifications",
|
|
473
|
+
!i.opted_out_of_email_notifications
|
|
474
|
+
),
|
|
475
|
+
primaryText: t.delivery_method_email_title,
|
|
476
|
+
secondaryText: r.email && !i.opted_out_of_email_notifications ? t.notification_enabled : t.notification_disabled,
|
|
477
|
+
useExtraPadding: !1
|
|
478
|
+
}
|
|
479
|
+
),
|
|
480
|
+
(s.sms_notifications_enabled || s.push_notifications_enabled) && /* @__PURE__ */ e(v, {})
|
|
481
|
+
] }),
|
|
482
|
+
s.sms_notifications_enabled && /* @__PURE__ */ c(M, { children: [
|
|
483
|
+
/* @__PURE__ */ e(
|
|
484
|
+
P,
|
|
485
|
+
{
|
|
486
|
+
isChecked: !!r.phone && !i.opted_out_of_sms_notifications,
|
|
487
|
+
isDisabled: !r.phone,
|
|
488
|
+
onToggle: () => a("opted_out_of_sms_notifications", !i.opted_out_of_sms_notifications),
|
|
489
|
+
primaryText: t.delivery_method_sms_title,
|
|
490
|
+
secondaryText: r.phone && !i.opted_out_of_sms_notifications ? t.notification_enabled : t.notification_disabled,
|
|
491
|
+
useExtraPadding: !1
|
|
492
|
+
}
|
|
493
|
+
),
|
|
494
|
+
s.push_notifications_enabled && /* @__PURE__ */ e(v, {})
|
|
495
|
+
] }),
|
|
496
|
+
s.push_notifications_enabled && /* @__PURE__ */ e(
|
|
497
|
+
P,
|
|
498
|
+
{
|
|
499
|
+
isChecked: !i.opted_out_of_push_notifications,
|
|
500
|
+
isDisabled: !0,
|
|
501
|
+
onToggle: () => {
|
|
502
|
+
},
|
|
503
|
+
primaryText: t.delivery_method_push_title,
|
|
504
|
+
secondaryText: t.delivery_method_push_subtitle,
|
|
505
|
+
useExtraPadding: !1
|
|
506
|
+
}
|
|
507
|
+
),
|
|
508
|
+
s.sms_notifications_enabled && /* @__PURE__ */ e(pe, { sx: { backgroundColor: "background.default", mt: 12 }, variant: "outlined", children: /* @__PURE__ */ e(fe, { children: /* @__PURE__ */ c(h, { alignItems: "flex-start", direction: "row", gap: 6, children: [
|
|
509
|
+
/* @__PURE__ */ e(Y, { color: "primary", filled: !0 }),
|
|
510
|
+
/* @__PURE__ */ e(x, { sx: { whiteSpace: "wrap" }, variant: "XSmall", children: t.delivery_method_sms_note_1 })
|
|
511
|
+
] }) }) })
|
|
512
|
+
] });
|
|
513
|
+
}), z = C(() => {
|
|
514
|
+
const { insightsProfiles: n } = T();
|
|
515
|
+
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
|
|
516
|
+
}), ke = () => {
|
|
517
|
+
const { config: n } = $(), [t, { width: s }] = ge(), { common: l, settings: i } = D(), { updateUser: r } = T(), { user: a } = A(), [o, _] = g.useState(!1), [d, p] = g.useState({
|
|
518
|
+
email: a.email,
|
|
519
|
+
phone: a.phone
|
|
520
|
+
}), m = d.email && !a.email_is_verified && !o, f = d.phone && !a.phone_is_verified && !o, u = (k) => {
|
|
521
|
+
const { name: I, value: S } = k.target, B = { ...d, [I]: S };
|
|
522
|
+
p(B), _(JSON.stringify({ ...a, ...B }) !== JSON.stringify(a));
|
|
523
|
+
}, b = async () => {
|
|
524
|
+
await r({ ...a, ...d }), _(!1);
|
|
525
|
+
};
|
|
526
|
+
return /* @__PURE__ */ c(h, { ref: t, children: [
|
|
527
|
+
/* @__PURE__ */ e(v, {}),
|
|
528
|
+
/* @__PURE__ */ c(h, { sx: { pt: 12 }, children: [
|
|
529
|
+
/* @__PURE__ */ e(F, { sx: { lineHeight: "20px", pb: 4, pt: 16 }, children: i.personal_details }),
|
|
530
|
+
/* @__PURE__ */ c(h, { sx: { flexDirection: s <= 768 ? "column" : "row", gap: 24, py: 16 }, children: [
|
|
531
|
+
n.display_email_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { flex: 1, pb: 14 }, children: [
|
|
532
|
+
/* @__PURE__ */ e(
|
|
533
|
+
U,
|
|
534
|
+
{
|
|
535
|
+
defaultValue: a.email,
|
|
536
|
+
fullWidth: !0,
|
|
537
|
+
label: i.email_address,
|
|
538
|
+
name: "email",
|
|
539
|
+
onChange: u
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
m && /* @__PURE__ */ e(
|
|
543
|
+
G,
|
|
544
|
+
{
|
|
545
|
+
sx: {
|
|
546
|
+
height: 20,
|
|
547
|
+
".MuiButton-root": {
|
|
548
|
+
px: 0,
|
|
549
|
+
":hover": {
|
|
550
|
+
bgcolor: "transparent"
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
children: /* @__PURE__ */ e(Ce, {})
|
|
555
|
+
}
|
|
556
|
+
)
|
|
557
|
+
] }),
|
|
558
|
+
n.display_sms_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { flex: 1, pb: 14 }, children: [
|
|
559
|
+
/* @__PURE__ */ e(
|
|
560
|
+
U,
|
|
561
|
+
{
|
|
562
|
+
defaultValue: a.phone,
|
|
563
|
+
fullWidth: !0,
|
|
564
|
+
label: i.mobile_number,
|
|
565
|
+
name: "phone",
|
|
566
|
+
onChange: u
|
|
567
|
+
}
|
|
568
|
+
),
|
|
569
|
+
f && /* @__PURE__ */ e(
|
|
570
|
+
G,
|
|
571
|
+
{
|
|
572
|
+
sx: {
|
|
573
|
+
height: 20,
|
|
574
|
+
".MuiButton-root": {
|
|
575
|
+
px: 0,
|
|
576
|
+
":hover": {
|
|
577
|
+
bgcolor: "transparent"
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
children: /* @__PURE__ */ e(Te, {})
|
|
582
|
+
}
|
|
583
|
+
)
|
|
584
|
+
] })
|
|
585
|
+
] }),
|
|
586
|
+
/* @__PURE__ */ e(
|
|
587
|
+
j,
|
|
588
|
+
{
|
|
589
|
+
disabled: !o,
|
|
590
|
+
onClick: b,
|
|
591
|
+
sx: { width: 84 },
|
|
592
|
+
variant: "contained",
|
|
593
|
+
children: l.save_button
|
|
594
|
+
}
|
|
595
|
+
)
|
|
596
|
+
] })
|
|
597
|
+
] });
|
|
598
|
+
}, we = C(ke), dt = C(
|
|
599
|
+
({
|
|
600
|
+
notificationTypes: n = [y.Accounts, y.Budgets],
|
|
601
|
+
showPersonalDetails: t = !1,
|
|
602
|
+
view: s
|
|
603
|
+
}) => {
|
|
604
|
+
const { config: l } = $(), { settings: i } = D(), { isInitialized: r } = le(), { clientCommunicationProfile: a, loadNotificationProfiles: o } = T(), _ = ye(), [d, p] = g.useState(!1), [m, f] = g.useState(
|
|
605
|
+
void 0
|
|
606
|
+
);
|
|
607
|
+
if (n.length > 0 && _ && n.push(y.Insights), be({
|
|
608
|
+
widgetName: "NotificationSettingsWidget",
|
|
609
|
+
isLoaded: d
|
|
610
|
+
}), g.useEffect(() => {
|
|
611
|
+
r && o().finally(() => p(!0));
|
|
612
|
+
}, [r]), !r)
|
|
613
|
+
return /* @__PURE__ */ e(xe, {});
|
|
614
|
+
let u = i.manage_account_notifications;
|
|
615
|
+
m === y.Budgets ? u = i.manage_budget_notifications : m === y.Insights && (u = i.manage_insights_notifications);
|
|
616
|
+
const {
|
|
617
|
+
email_notifications_enabled: b,
|
|
618
|
+
sms_notifications_enabled: k,
|
|
619
|
+
push_notifications_enabled: I
|
|
620
|
+
} = a, S = b || k || I;
|
|
621
|
+
if (s === "accounts")
|
|
622
|
+
return /* @__PURE__ */ e(H, {});
|
|
623
|
+
if (s === "budgets")
|
|
624
|
+
return /* @__PURE__ */ e(W, {});
|
|
625
|
+
if (s === "insights")
|
|
626
|
+
return /* @__PURE__ */ e(z, {});
|
|
627
|
+
const B = l.display_email_edit_field_in_settings || l.display_sms_edit_field_in_settings, K = t && a.can_edit_contact_info && B;
|
|
628
|
+
return /* @__PURE__ */ c(h, { sx: { pt: S ? 0 : 24 }, children: [
|
|
629
|
+
/* @__PURE__ */ c(h, { sx: { px: 24 }, children: [
|
|
630
|
+
S && /* @__PURE__ */ c(M, { children: [
|
|
631
|
+
/* @__PURE__ */ e(Se, {}),
|
|
632
|
+
/* @__PURE__ */ e(v, { sx: { my: 24 } })
|
|
633
|
+
] }),
|
|
634
|
+
/* @__PURE__ */ e(F, { sx: { mb: 4 }, children: i.notification_types_title })
|
|
635
|
+
] }),
|
|
636
|
+
/* @__PURE__ */ c(E, { children: [
|
|
637
|
+
n.includes(y.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => f(y.Accounts), children: [
|
|
638
|
+
/* @__PURE__ */ e(L, { primary: i.accounts_title, secondary: i.accounts_subtitle }),
|
|
639
|
+
/* @__PURE__ */ e(w, {})
|
|
640
|
+
] }) }),
|
|
641
|
+
n.includes(y.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => f(y.Budgets), children: [
|
|
642
|
+
/* @__PURE__ */ e(L, { primary: i.budgets_title, secondary: i.budgets_subtitle }),
|
|
643
|
+
/* @__PURE__ */ e(w, {})
|
|
644
|
+
] }) }),
|
|
645
|
+
n.includes(y.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => f(y.Insights), children: [
|
|
646
|
+
/* @__PURE__ */ e(L, { primary: i.insights_title, secondary: i.insights_subtitle }),
|
|
647
|
+
/* @__PURE__ */ e(w, {})
|
|
648
|
+
] }) })
|
|
649
|
+
] }),
|
|
650
|
+
K && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(we, {}) }),
|
|
651
|
+
/* @__PURE__ */ e(
|
|
652
|
+
J,
|
|
653
|
+
{
|
|
654
|
+
isOpen: !!m,
|
|
655
|
+
onClose: () => f(void 0),
|
|
656
|
+
title: u,
|
|
657
|
+
children: /* @__PURE__ */ c(h, { children: [
|
|
658
|
+
m === y.Accounts && /* @__PURE__ */ e(H, {}),
|
|
659
|
+
m === y.Budgets && /* @__PURE__ */ e(W, {}),
|
|
660
|
+
m === y.Insights && /* @__PURE__ */ e(z, {})
|
|
661
|
+
] })
|
|
662
|
+
}
|
|
663
|
+
)
|
|
664
|
+
] });
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
export {
|
|
668
|
+
H as A,
|
|
669
|
+
W as B,
|
|
670
|
+
z as I,
|
|
671
|
+
dt as N,
|
|
672
|
+
Ce as V,
|
|
673
|
+
Te as a
|
|
674
|
+
};
|