@mx-cartographer/experiences 7.4.7 → 7.4.8-alpha.mm0
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 +2 -2
- package/dist/{Account-01wOyrH1.mjs → Account-BrOTlmeK.mjs} +1 -1
- package/dist/{AccountDetailsContent-COMjOzwr.mjs → AccountDetailsContent-B7FqH05C.mjs} +8 -8
- package/dist/{AccountDetailsHeader-Cbi5G6fJ.mjs → AccountDetailsHeader-C8MxsxhN.mjs} +4 -4
- package/dist/{AccountFields-Cd_nOWmf.mjs → AccountFields-BQZ-o6Kj.mjs} +2 -2
- package/dist/{AccountListItem-DxY4cCF1.mjs → AccountListItem-aIE9WWTO.mjs} +4 -4
- package/dist/{AccountStore-C1zMBzHq.mjs → AccountStore-DqO84Aer.mjs} +2 -2
- package/dist/{Accounts-D7QljYas.mjs → Accounts-DC_A4UCa.mjs} +1 -1
- package/dist/{BudgetUtil-Df2nII9u.mjs → BudgetUtil-BmZXkL0C.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DqJK_rrL.mjs → CategorySelectorDrawer-SUgfE5GN.mjs} +1 -1
- package/dist/{ConnectDrawer-CuUj16NH.mjs → ConnectDrawer-KL8t1qSC.mjs} +1 -1
- package/dist/{ConnectionsDrawer-Bz4uwdFE.mjs → ConnectionsDrawer-DaK5uIL5.mjs} +2 -2
- package/dist/{CurrencyInput-BFKcs-_K.mjs → CurrencyInput-itK0R3wV.mjs} +1 -1
- package/dist/{DebtsStore-Bu8rRRSL.mjs → DebtsStore-DVPZbv2C.mjs} +1 -1
- package/dist/{ExportCsvAction-DzTrtPzk.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
- package/dist/{GoalStore-CrNhjvNc.mjs → GoalStore-o4rrjGSJ.mjs} +2 -2
- package/dist/{Help-BnPXM_N2.mjs → Help-BjLMsuMS.mjs} +1 -1
- package/dist/{LineChart-bc1D9xBE.mjs → LineChart-BQRxZF3p.mjs} +1 -1
- package/dist/{ListItemAction-uobBrm_a.mjs → ListItemAction-BxTkF6Tz.mjs} +1 -1
- package/dist/{ManageIncome-A69EUO5u.mjs → ManageIncome-rcnDYsBJ.mjs} +75 -75
- package/dist/{MicroWidgetContainer-DEiRnYVa.mjs → MicroWidgetContainer-B2hO9rOG.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CmXpTylX.mjs → MiniWidgetContainer-98-hKFqm.mjs} +1 -1
- package/dist/{NetWorthStore-CpL_kqvx.mjs → NetWorthStore-DG2X69jG.mjs} +2 -2
- package/dist/{NotificationSettings-CNmJWVeI.mjs → NotificationSettings-C7FYNM7I.mjs} +250 -248
- package/dist/{OriginalBalanceAction-DK8_LkPz.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +3 -3
- package/dist/{RecurringSettings-B0uObPlD.mjs → RecurringSettings-C81H1l38.mjs} +3 -3
- package/dist/{SpendingLegend-Bf-wbJvb.mjs → SpendingLegend-DqZxN_BZ.mjs} +2 -2
- package/dist/{TransactionDetails-COH0OKNG.mjs → TransactionDetails-BA_E5nQ-.mjs} +5 -5
- package/dist/{TransactionStore-Dz-G8Wd0.mjs → TransactionStore-PRlwE-TF.mjs} +2 -2
- package/dist/{User-wXzDI4M8.mjs → User-Cnlegl1N.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-C0832BMe.mjs → ViewMoreMicroCard-DfPXJzbv.mjs} +105 -101
- package/dist/{WidgetContainer-6dsjtOVg.mjs → WidgetContainer-CaPjoWeE.mjs} +2 -2
- package/dist/accounts/index.es.js +148 -140
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +483 -478
- package/dist/cashflow/index.es.js +367 -362
- package/dist/categories/index.es.js +1 -1
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +35 -33
- package/dist/dashboard/index.es.js +90 -88
- package/dist/debts/index.es.js +346 -342
- package/dist/{exportTransactionsToCSV-Cz2t0lmA.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +1 -1
- package/dist/finstrong/index.es.js +352 -350
- package/dist/goals/index.es.js +518 -511
- package/dist/help/index.es.js +13 -9
- package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
- package/dist/investments/index.es.js +395 -393
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +245 -240
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +293 -285
- package/dist/settings/index.es.js +252 -249
- package/dist/spending/index.es.js +136 -124
- package/dist/transactions/index.es.js +77 -73
- package/dist/trends/index.es.js +601 -588
- package/dist/{useAccountDisplayName-CMMlIOXF.mjs → useAccountDisplayName-Cjx8YmKK.mjs} +2 -2
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
- package/dist/useWidgetLoadTimer-C1NBkyLd.mjs +23 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as M } from "react/jsx-runtime";
|
|
2
2
|
import g from "react";
|
|
3
3
|
import { observer as C } from "mobx-react-lite";
|
|
4
4
|
import v from "@mui/material/Divider";
|
|
@@ -6,20 +6,20 @@ import E from "@mui/material/List";
|
|
|
6
6
|
import O from "@mui/material/ListItem";
|
|
7
7
|
import L from "@mui/material/ListItemText";
|
|
8
8
|
import V from "@mui/material/ListItemButton";
|
|
9
|
-
import
|
|
10
|
-
import { ChevronRight as w, ExpandMore as
|
|
11
|
-
import { Text as x, InstitutionLogo as
|
|
12
|
-
import { endOfMonth as
|
|
13
|
-
import { startOfMonth as
|
|
14
|
-
import { DateCalendar as
|
|
15
|
-
import { LocalizationProvider as
|
|
16
|
-
import { AdapterDateFns as
|
|
17
|
-
import { A as
|
|
18
|
-
import { u as D,
|
|
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
19
|
import { b as re } from "./Localization-2MODESHW.mjs";
|
|
20
20
|
import { b as de, f as me } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
21
21
|
import { D as N } from "./Dialog-BPTr3qHE.mjs";
|
|
22
|
-
import { C as he } from "./CurrencyInput-
|
|
22
|
+
import { C as he } from "./CurrencyInput-itK0R3wV.mjs";
|
|
23
23
|
import { u as _e } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
24
24
|
import { D as J } from "./Drawer-BEtCk82g.mjs";
|
|
25
25
|
import ue from "@mui/material/Collapse";
|
|
@@ -30,16 +30,17 @@ import j from "@mui/material/Button";
|
|
|
30
30
|
import U from "@mui/material/TextField";
|
|
31
31
|
import { u as ge } from "./useDimensions-27p2evRx.mjs";
|
|
32
32
|
import X from "@mui/material/styles/useTheme";
|
|
33
|
-
import { u as ye } from "./useInsightsEnabled-
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
import { u as ye } from "./useInsightsEnabled-B7dxpDrX.mjs";
|
|
34
|
+
import { u as be } from "./useWidgetLoadTimer-C1NBkyLd.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 = () => {
|
|
37
38
|
a(!1);
|
|
38
39
|
}, _ = () => {
|
|
39
40
|
a(!0);
|
|
40
41
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ c(g.Fragment, { children: [
|
|
43
|
+
/* @__PURE__ */ c(j, { onClick: _, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
43
44
|
/* @__PURE__ */ e(x, { variant: "Small", children: t.verify_email }),
|
|
44
45
|
/* @__PURE__ */ e(w, {})
|
|
45
46
|
] }),
|
|
@@ -47,10 +48,10 @@ const xe = C(() => {
|
|
|
47
48
|
N,
|
|
48
49
|
{
|
|
49
50
|
copy: { title: "" },
|
|
50
|
-
isOpen:
|
|
51
|
-
onClose:
|
|
52
|
-
onPrimaryAction:
|
|
53
|
-
onSecondaryAction:
|
|
51
|
+
isOpen: r,
|
|
52
|
+
onClose: o,
|
|
53
|
+
onPrimaryAction: s,
|
|
54
|
+
onSecondaryAction: o,
|
|
54
55
|
primaryText: t.send_verification,
|
|
55
56
|
secondaryText: n.back,
|
|
56
57
|
sx: {
|
|
@@ -61,19 +62,19 @@ const xe = C(() => {
|
|
|
61
62
|
justifyContent: "center"
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ c(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
65
66
|
/* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "Body", children: t.confirm_your_email }),
|
|
66
67
|
/* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.confirm_email }),
|
|
67
68
|
/* @__PURE__ */ e(
|
|
68
69
|
x,
|
|
69
70
|
{
|
|
70
71
|
sx: {
|
|
71
|
-
border: `1px solid ${
|
|
72
|
+
border: `1px solid ${i.palette.border.light}`,
|
|
72
73
|
borderRadius: "4px",
|
|
73
74
|
p: "16px 32px"
|
|
74
75
|
},
|
|
75
76
|
variant: "H3",
|
|
76
|
-
children:
|
|
77
|
+
children: l.email
|
|
77
78
|
}
|
|
78
79
|
),
|
|
79
80
|
/* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.verification_notice_email })
|
|
@@ -81,19 +82,19 @@ const xe = C(() => {
|
|
|
81
82
|
}
|
|
82
83
|
)
|
|
83
84
|
] });
|
|
84
|
-
}),
|
|
85
|
-
({ handleClose: n, handleVerify: t, isOpen:
|
|
86
|
-
const { common:
|
|
85
|
+
}), ve = C(
|
|
86
|
+
({ handleClose: n, handleVerify: t, isOpen: s }) => {
|
|
87
|
+
const { common: l, settings: i } = D(), [r, a] = g.useState("");
|
|
87
88
|
return /* @__PURE__ */ e(
|
|
88
89
|
N,
|
|
89
90
|
{
|
|
90
|
-
copy: { title:
|
|
91
|
-
isOpen:
|
|
91
|
+
copy: { title: i.enter_verification_code },
|
|
92
|
+
isOpen: s,
|
|
92
93
|
onClose: n,
|
|
93
|
-
onPrimaryAction: () => t(
|
|
94
|
+
onPrimaryAction: () => t(r),
|
|
94
95
|
onSecondaryAction: n,
|
|
95
|
-
primaryText:
|
|
96
|
-
secondaryText:
|
|
96
|
+
primaryText: i.verify,
|
|
97
|
+
secondaryText: l.cancel_button,
|
|
97
98
|
sx: {
|
|
98
99
|
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
99
100
|
"& .MuiToolbar-root:last-child": {
|
|
@@ -102,26 +103,26 @@ const xe = C(() => {
|
|
|
102
103
|
justifyContent: "flex-end"
|
|
103
104
|
}
|
|
104
105
|
},
|
|
105
|
-
children: /* @__PURE__ */ e(
|
|
106
|
+
children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(U, { onChange: (o) => a(o.target.value), sx: { width: 352 }, value: r }) })
|
|
106
107
|
}
|
|
107
108
|
);
|
|
108
109
|
}
|
|
109
|
-
),
|
|
110
|
-
const { common: n, settings: t } = D(), { sendPhoneVerification:
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
|
|
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);
|
|
114
115
|
}, f = () => {
|
|
115
|
-
|
|
116
|
+
s().finally(() => {
|
|
116
117
|
d(!0);
|
|
117
118
|
});
|
|
118
|
-
},
|
|
119
|
-
|
|
119
|
+
}, u = (b) => {
|
|
120
|
+
l(b).finally(() => {
|
|
120
121
|
d(!1);
|
|
121
122
|
});
|
|
122
123
|
};
|
|
123
|
-
return /* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ c(g.Fragment, { children: [
|
|
125
|
+
/* @__PURE__ */ c(j, { onClick: m, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
125
126
|
/* @__PURE__ */ e(x, { variant: "Small", children: t.verify_phone }),
|
|
126
127
|
/* @__PURE__ */ e(w, {})
|
|
127
128
|
] }),
|
|
@@ -130,9 +131,9 @@ const xe = C(() => {
|
|
|
130
131
|
{
|
|
131
132
|
copy: { title: "" },
|
|
132
133
|
isOpen: a,
|
|
133
|
-
onClose:
|
|
134
|
+
onClose: p,
|
|
134
135
|
onPrimaryAction: f,
|
|
135
|
-
onSecondaryAction:
|
|
136
|
+
onSecondaryAction: p,
|
|
136
137
|
primaryText: t.send_verification,
|
|
137
138
|
secondaryText: n.back,
|
|
138
139
|
sx: {
|
|
@@ -143,19 +144,19 @@ const xe = C(() => {
|
|
|
143
144
|
justifyContent: "center"
|
|
144
145
|
}
|
|
145
146
|
},
|
|
146
|
-
children: /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ c(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
147
148
|
/* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "Body", children: t.confirm_your_phone }),
|
|
148
149
|
/* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.confirm_phone }),
|
|
149
150
|
/* @__PURE__ */ e(
|
|
150
151
|
x,
|
|
151
152
|
{
|
|
152
153
|
sx: {
|
|
153
|
-
border: `1px solid ${
|
|
154
|
+
border: `1px solid ${r.palette.border.light}`,
|
|
154
155
|
borderRadius: "4px",
|
|
155
156
|
p: "16px 32px"
|
|
156
157
|
},
|
|
157
158
|
variant: "H3",
|
|
158
|
-
children:
|
|
159
|
+
children: i.phone
|
|
159
160
|
}
|
|
160
161
|
),
|
|
161
162
|
/* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: t.verification_notice_phone })
|
|
@@ -163,30 +164,30 @@ const xe = C(() => {
|
|
|
163
164
|
}
|
|
164
165
|
),
|
|
165
166
|
/* @__PURE__ */ e(
|
|
166
|
-
|
|
167
|
+
ve,
|
|
167
168
|
{
|
|
168
169
|
handleClose: () => d(!1),
|
|
169
|
-
handleVerify:
|
|
170
|
+
handleVerify: u,
|
|
170
171
|
isOpen: _
|
|
171
172
|
}
|
|
172
173
|
)
|
|
173
174
|
] });
|
|
174
|
-
}),
|
|
175
|
+
}), Pe = C(
|
|
175
176
|
({ onProfileUpdated: n, profile: t }) => {
|
|
176
|
-
const { common:
|
|
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(
|
|
177
178
|
t.account?.day_payment_is_due || 0
|
|
178
|
-
),
|
|
179
|
-
|
|
179
|
+
), u = t.account?.name || t.account?.feed_name || "", b = t.account?.day_payment_is_due ? re(
|
|
180
|
+
i.notification_debt_payment_date,
|
|
180
181
|
de(t.account?.day_payment_is_due)
|
|
181
|
-
) :
|
|
182
|
-
a && t.account ? await
|
|
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 });
|
|
183
184
|
};
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
185
186
|
/* @__PURE__ */ e(
|
|
186
187
|
R,
|
|
187
188
|
{
|
|
188
189
|
avatar: t.account?.institution_guid ? /* @__PURE__ */ e(
|
|
189
|
-
|
|
190
|
+
Z,
|
|
190
191
|
{
|
|
191
192
|
alt: t.label,
|
|
192
193
|
institutionGuid: t.account?.institution_guid
|
|
@@ -201,29 +202,29 @@ const xe = C(() => {
|
|
|
201
202
|
...t,
|
|
202
203
|
is_enabled: !t.is_enabled
|
|
203
204
|
}),
|
|
204
|
-
primaryText:
|
|
205
|
-
secondaryText: t.is_enabled ?
|
|
205
|
+
primaryText: u,
|
|
206
|
+
secondaryText: t.is_enabled ? k : i.notification_disabled
|
|
206
207
|
}
|
|
207
208
|
),
|
|
208
209
|
/* @__PURE__ */ e(
|
|
209
210
|
N,
|
|
210
211
|
{
|
|
211
212
|
copy: {
|
|
212
|
-
title: a ?
|
|
213
|
-
close_aria:
|
|
213
|
+
title: a ? l.day_of_the_month : i.notification_threshold_label,
|
|
214
|
+
close_aria: s.close_aria
|
|
214
215
|
},
|
|
215
|
-
disablePrimaryButton: a &&
|
|
216
|
-
isOpen:
|
|
216
|
+
disablePrimaryButton: a && m === 0,
|
|
217
|
+
isOpen: o,
|
|
217
218
|
onClose: () => _(!1),
|
|
218
|
-
onPrimaryAction:
|
|
219
|
-
primaryText:
|
|
220
|
-
children: a ? /* @__PURE__ */ e(
|
|
221
|
-
|
|
219
|
+
onPrimaryAction: I,
|
|
220
|
+
primaryText: s.save_button,
|
|
221
|
+
children: a ? /* @__PURE__ */ e(ie, { dateAdapter: oe, children: /* @__PURE__ */ e(
|
|
222
|
+
ne,
|
|
222
223
|
{
|
|
223
|
-
maxDate:
|
|
224
|
-
minDate:
|
|
225
|
-
onChange: (
|
|
226
|
-
f(
|
|
224
|
+
maxDate: ee(/* @__PURE__ */ new Date()),
|
|
225
|
+
minDate: te(/* @__PURE__ */ new Date()),
|
|
226
|
+
onChange: (S) => {
|
|
227
|
+
f(S.getDate());
|
|
227
228
|
},
|
|
228
229
|
slots: {
|
|
229
230
|
// Hides the arrows
|
|
@@ -245,7 +246,7 @@ const xe = C(() => {
|
|
|
245
246
|
autoFocus: !0,
|
|
246
247
|
fullWidth: !0,
|
|
247
248
|
minAmount: 0,
|
|
248
|
-
setAmount: (
|
|
249
|
+
setAmount: (S) => p(Number(S) || 0),
|
|
249
250
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
250
251
|
}
|
|
251
252
|
)
|
|
@@ -253,63 +254,63 @@ const xe = C(() => {
|
|
|
253
254
|
)
|
|
254
255
|
] });
|
|
255
256
|
}
|
|
256
|
-
),
|
|
257
|
+
), De = C(
|
|
257
258
|
({ onUpdateProfile: n, profile: t }) => {
|
|
258
|
-
const { settings:
|
|
259
|
+
const { settings: s } = D(), { user: l } = A(), { clientCommunicationProfile: i, userCommunicationsProfile: r } = T(), { isMobile: a } = _e(), o = t.notification_type > 2, {
|
|
259
260
|
opted_out_of_email_notifications: _,
|
|
260
261
|
opted_out_of_push_notifications: d,
|
|
261
|
-
opted_out_of_sms_notifications:
|
|
262
|
-
} =
|
|
263
|
-
email_notifications_enabled:
|
|
262
|
+
opted_out_of_sms_notifications: p
|
|
263
|
+
} = r, {
|
|
264
|
+
email_notifications_enabled: m,
|
|
264
265
|
push_notifications_enabled: f,
|
|
265
|
-
sms_notifications_enabled:
|
|
266
|
-
} =
|
|
267
|
-
return /* @__PURE__ */
|
|
268
|
-
(
|
|
269
|
-
/* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children:
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
|
|
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(
|
|
272
273
|
P,
|
|
273
274
|
{
|
|
274
|
-
isChecked: !_ && t.email_channel && !!
|
|
275
|
-
isDisabled: _ || !
|
|
275
|
+
isChecked: !_ && t.email_channel && !!l.email,
|
|
276
|
+
isDisabled: _ || !l.email,
|
|
276
277
|
onToggle: () => n({ ...t, email_channel: !t.email_channel }),
|
|
277
|
-
primaryText:
|
|
278
|
-
secondaryText: _ || !t.email_channel || !
|
|
278
|
+
primaryText: s.delivery_method_email_label,
|
|
279
|
+
secondaryText: _ || !t.email_channel || !l.email ? s.notification_disabled : s.notification_enabled,
|
|
279
280
|
useExtraPadding: !1
|
|
280
281
|
}
|
|
281
282
|
) }),
|
|
282
|
-
|
|
283
|
-
|
|
283
|
+
m && (u || f) && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
284
|
+
u && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
284
285
|
P,
|
|
285
286
|
{
|
|
286
|
-
isChecked: !
|
|
287
|
-
isDisabled:
|
|
287
|
+
isChecked: !p && t.sms_channel && !!l.phone,
|
|
288
|
+
isDisabled: p || !l.phone,
|
|
288
289
|
onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
|
|
289
|
-
primaryText: `${
|
|
290
|
-
secondaryText:
|
|
290
|
+
primaryText: `${s.delivery_method_sms_label}`,
|
|
291
|
+
secondaryText: p || !t.sms_channel || !l.phone ? s.notification_disabled : s.notification_enabled,
|
|
291
292
|
useExtraPadding: !1
|
|
292
293
|
}
|
|
293
294
|
) }),
|
|
294
|
-
|
|
295
|
-
f && /* @__PURE__ */ e(
|
|
295
|
+
u && f && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
296
|
+
f && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
296
297
|
P,
|
|
297
298
|
{
|
|
298
299
|
isChecked: !d && t.push_channel,
|
|
299
300
|
isDisabled: d,
|
|
300
301
|
onToggle: () => n({ ...t, push_channel: !t.push_channel }),
|
|
301
|
-
primaryText:
|
|
302
|
-
secondaryText:
|
|
302
|
+
primaryText: s.delivery_method_push_label,
|
|
303
|
+
secondaryText: s.delivery_method_push_subtitle,
|
|
303
304
|
useExtraPadding: !1
|
|
304
305
|
}
|
|
305
306
|
) }),
|
|
306
307
|
/* @__PURE__ */ e(v, {})
|
|
307
308
|
] })
|
|
308
309
|
] }),
|
|
309
|
-
|
|
310
|
-
/* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children:
|
|
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 }),
|
|
311
312
|
/* @__PURE__ */ e(E, { sx: { bgcolor: "background.paper" }, children: t.children?.map((b) => /* @__PURE__ */ e(
|
|
312
|
-
|
|
313
|
+
Pe,
|
|
313
314
|
{
|
|
314
315
|
onProfileUpdated: n,
|
|
315
316
|
profile: b
|
|
@@ -320,42 +321,42 @@ const xe = C(() => {
|
|
|
320
321
|
] });
|
|
321
322
|
}
|
|
322
323
|
), H = C(() => {
|
|
323
|
-
const { accountProfiles: n, updateNotificationProfile: t } = T(), [
|
|
324
|
-
() => n.find((
|
|
325
|
-
[n,
|
|
326
|
-
),
|
|
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) => {
|
|
327
328
|
await t({
|
|
328
|
-
...
|
|
329
|
-
is_enabled: !
|
|
329
|
+
...o,
|
|
330
|
+
is_enabled: !o.is_enabled
|
|
330
331
|
});
|
|
331
|
-
}, a = async (
|
|
332
|
-
await t(
|
|
332
|
+
}, a = async (o) => {
|
|
333
|
+
await t(o);
|
|
333
334
|
};
|
|
334
|
-
return /* @__PURE__ */
|
|
335
|
-
n.filter((
|
|
335
|
+
return /* @__PURE__ */ c(h, { sx: { backgroundColor: "background.paper" }, children: [
|
|
336
|
+
n.filter((o) => o.children && o.children.length > 0).map((o) => /* @__PURE__ */ e(
|
|
336
337
|
R,
|
|
337
338
|
{
|
|
338
339
|
endIcon: /* @__PURE__ */ e(w, {}),
|
|
339
|
-
isChecked:
|
|
340
|
-
isDisabled: !
|
|
341
|
-
onClick: () =>
|
|
342
|
-
onToggle: () =>
|
|
343
|
-
primaryText:
|
|
344
|
-
secondaryText:
|
|
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
|
|
345
346
|
},
|
|
346
|
-
|
|
347
|
+
o.guid
|
|
347
348
|
)),
|
|
348
349
|
/* @__PURE__ */ e(
|
|
349
350
|
J,
|
|
350
351
|
{
|
|
351
|
-
isOpen: !!
|
|
352
|
-
onClose: () =>
|
|
353
|
-
title:
|
|
354
|
-
children:
|
|
355
|
-
|
|
352
|
+
isOpen: !!i,
|
|
353
|
+
onClose: () => l(""),
|
|
354
|
+
title: i ? i.label : "",
|
|
355
|
+
children: i && /* @__PURE__ */ e(
|
|
356
|
+
De,
|
|
356
357
|
{
|
|
357
358
|
onUpdateProfile: a,
|
|
358
|
-
profile:
|
|
359
|
+
profile: i
|
|
359
360
|
}
|
|
360
361
|
)
|
|
361
362
|
}
|
|
@@ -364,76 +365,76 @@ const xe = C(() => {
|
|
|
364
365
|
}), q = C(({ profile: n }) => {
|
|
365
366
|
const { settings: t } = D(), {
|
|
366
367
|
clientCommunicationProfile: {
|
|
367
|
-
email_notifications_enabled:
|
|
368
|
-
push_notifications_enabled:
|
|
369
|
-
sms_notifications_enabled:
|
|
368
|
+
email_notifications_enabled: s,
|
|
369
|
+
push_notifications_enabled: l,
|
|
370
|
+
sms_notifications_enabled: i
|
|
370
371
|
},
|
|
371
|
-
updateNotificationProfile:
|
|
372
|
+
updateNotificationProfile: r,
|
|
372
373
|
userCommunicationsProfile: {
|
|
373
374
|
opted_out_of_email_notifications: a,
|
|
374
|
-
opted_out_of_push_notifications:
|
|
375
|
+
opted_out_of_push_notifications: o,
|
|
375
376
|
opted_out_of_sms_notifications: _
|
|
376
377
|
}
|
|
377
|
-
} = T(), { user: d } =
|
|
378
|
-
await
|
|
379
|
-
},
|
|
380
|
-
await
|
|
381
|
-
}, b =
|
|
382
|
-
return /* @__PURE__ */
|
|
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: [
|
|
383
384
|
/* @__PURE__ */ e(
|
|
384
385
|
R,
|
|
385
386
|
{
|
|
386
387
|
endIcon: b ? /* @__PURE__ */ e(
|
|
387
|
-
|
|
388
|
+
Q,
|
|
388
389
|
{
|
|
389
390
|
sx: {
|
|
390
391
|
transition: "transform 0.3s ease-in-out",
|
|
391
|
-
transform:
|
|
392
|
+
transform: p ? "rotate(180deg)" : "rotate(0deg)"
|
|
392
393
|
}
|
|
393
394
|
}
|
|
394
395
|
) : void 0,
|
|
395
396
|
isChecked: n.is_enabled,
|
|
396
397
|
isDisabled: !n.is_enabled,
|
|
397
|
-
onClick: () =>
|
|
398
|
+
onClick: () => m(!p),
|
|
398
399
|
onToggle: () => f(),
|
|
399
400
|
primaryText: n.label,
|
|
400
401
|
secondaryText: n.is_enabled ? n.deliveryMethodsLabel : void 0
|
|
401
402
|
},
|
|
402
403
|
n.guid
|
|
403
404
|
),
|
|
404
|
-
b && /* @__PURE__ */ e(ue, { in:
|
|
405
|
-
|
|
405
|
+
b && /* @__PURE__ */ e(ue, { in: p, children: /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
406
|
+
s && /* @__PURE__ */ e(
|
|
406
407
|
P,
|
|
407
408
|
{
|
|
408
409
|
isChecked: !a && n.email_channel && !!d.email,
|
|
409
410
|
isDisabled: a || !d.email,
|
|
410
|
-
onToggle: () =>
|
|
411
|
+
onToggle: () => u({
|
|
411
412
|
...n,
|
|
412
413
|
email_channel: !n.email_channel
|
|
413
414
|
}),
|
|
414
415
|
primaryText: t.delivery_method_email_label
|
|
415
416
|
}
|
|
416
417
|
),
|
|
417
|
-
|
|
418
|
-
|
|
418
|
+
s && (i || l) && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
419
|
+
i && /* @__PURE__ */ e(
|
|
419
420
|
P,
|
|
420
421
|
{
|
|
421
422
|
isChecked: !_ && n.sms_channel && !!d.phone,
|
|
422
423
|
isDisabled: _ || !d.phone,
|
|
423
|
-
onToggle: () =>
|
|
424
|
+
onToggle: () => u({
|
|
424
425
|
...n,
|
|
425
426
|
sms_channel: !n.sms_channel
|
|
426
427
|
}),
|
|
427
428
|
primaryText: t.delivery_method_sms_label
|
|
428
429
|
}
|
|
429
430
|
),
|
|
430
|
-
|
|
431
|
-
|
|
431
|
+
i && l && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
432
|
+
l && /* @__PURE__ */ e(
|
|
432
433
|
P,
|
|
433
434
|
{
|
|
434
|
-
isChecked: !
|
|
435
|
-
isDisabled:
|
|
436
|
-
onToggle: () =>
|
|
435
|
+
isChecked: !o && n.push_channel,
|
|
436
|
+
isDisabled: o,
|
|
437
|
+
onToggle: () => u({
|
|
437
438
|
...n,
|
|
438
439
|
push_channel: !n.push_channel
|
|
439
440
|
}),
|
|
@@ -443,59 +444,59 @@ const xe = C(() => {
|
|
|
443
444
|
] }) }),
|
|
444
445
|
/* @__PURE__ */ e(v, {})
|
|
445
446
|
] }, n.guid);
|
|
446
|
-
}),
|
|
447
|
+
}), W = C(() => {
|
|
447
448
|
const { budgetProfiles: n } = T();
|
|
448
|
-
return /* @__PURE__ */ e(
|
|
449
|
-
}),
|
|
450
|
-
const { onEvent: n } =
|
|
451
|
-
clientCommunicationProfile:
|
|
452
|
-
updateUserCommunicationProfile:
|
|
453
|
-
userCommunicationsProfile:
|
|
454
|
-
} = T(), { user:
|
|
455
|
-
const d = { ...
|
|
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]: _ };
|
|
456
457
|
if (n) {
|
|
457
|
-
const
|
|
458
|
-
_ === !1 ? n("opt_in_notification_method", { notificationType:
|
|
458
|
+
const m = o.split("_")[3];
|
|
459
|
+
_ === !1 ? n("opt_in_notification_method", { notificationType: m }) : n("opt_out_notification_method", { notificationType: m });
|
|
459
460
|
}
|
|
460
|
-
await
|
|
461
|
+
await l(d);
|
|
461
462
|
};
|
|
462
|
-
return /* @__PURE__ */
|
|
463
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
463
464
|
/* @__PURE__ */ e(F, { sx: { mt: 24 }, children: t.delivery_method_title }),
|
|
464
|
-
|
|
465
|
+
s.email_notifications_enabled && /* @__PURE__ */ c(M, { children: [
|
|
465
466
|
/* @__PURE__ */ e(
|
|
466
467
|
P,
|
|
467
468
|
{
|
|
468
|
-
isChecked: !!
|
|
469
|
-
isDisabled: !
|
|
469
|
+
isChecked: !!r.email && !i.opted_out_of_email_notifications,
|
|
470
|
+
isDisabled: !r.email,
|
|
470
471
|
onToggle: () => a(
|
|
471
472
|
"opted_out_of_email_notifications",
|
|
472
|
-
!
|
|
473
|
+
!i.opted_out_of_email_notifications
|
|
473
474
|
),
|
|
474
475
|
primaryText: t.delivery_method_email_title,
|
|
475
|
-
secondaryText:
|
|
476
|
+
secondaryText: r.email && !i.opted_out_of_email_notifications ? t.notification_enabled : t.notification_disabled,
|
|
476
477
|
useExtraPadding: !1
|
|
477
478
|
}
|
|
478
479
|
),
|
|
479
|
-
(
|
|
480
|
+
(s.sms_notifications_enabled || s.push_notifications_enabled) && /* @__PURE__ */ e(v, {})
|
|
480
481
|
] }),
|
|
481
|
-
|
|
482
|
+
s.sms_notifications_enabled && /* @__PURE__ */ c(M, { children: [
|
|
482
483
|
/* @__PURE__ */ e(
|
|
483
484
|
P,
|
|
484
485
|
{
|
|
485
|
-
isChecked: !!
|
|
486
|
-
isDisabled: !
|
|
487
|
-
onToggle: () => a("opted_out_of_sms_notifications", !
|
|
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),
|
|
488
489
|
primaryText: t.delivery_method_sms_title,
|
|
489
|
-
secondaryText:
|
|
490
|
+
secondaryText: r.phone && !i.opted_out_of_sms_notifications ? t.notification_enabled : t.notification_disabled,
|
|
490
491
|
useExtraPadding: !1
|
|
491
492
|
}
|
|
492
493
|
),
|
|
493
|
-
|
|
494
|
+
s.push_notifications_enabled && /* @__PURE__ */ e(v, {})
|
|
494
495
|
] }),
|
|
495
|
-
|
|
496
|
+
s.push_notifications_enabled && /* @__PURE__ */ e(
|
|
496
497
|
P,
|
|
497
498
|
{
|
|
498
|
-
isChecked: !
|
|
499
|
+
isChecked: !i.opted_out_of_push_notifications,
|
|
499
500
|
isDisabled: !0,
|
|
500
501
|
onToggle: () => {
|
|
501
502
|
},
|
|
@@ -504,41 +505,41 @@ const xe = C(() => {
|
|
|
504
505
|
useExtraPadding: !1
|
|
505
506
|
}
|
|
506
507
|
),
|
|
507
|
-
|
|
508
|
-
/* @__PURE__ */ e(
|
|
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 }),
|
|
509
510
|
/* @__PURE__ */ e(x, { sx: { whiteSpace: "wrap" }, variant: "XSmall", children: t.delivery_method_sms_note_1 })
|
|
510
511
|
] }) }) })
|
|
511
512
|
] });
|
|
512
|
-
}),
|
|
513
|
+
}), z = C(() => {
|
|
513
514
|
const { insightsProfiles: n } = T();
|
|
514
|
-
return /* @__PURE__ */ e(
|
|
515
|
-
}),
|
|
516
|
-
const { config: n } =
|
|
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({
|
|
517
518
|
email: a.email,
|
|
518
519
|
phone: a.phone
|
|
519
|
-
}),
|
|
520
|
-
const { name:
|
|
521
|
-
|
|
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));
|
|
522
523
|
}, b = async () => {
|
|
523
|
-
await
|
|
524
|
+
await r({ ...a, ...d }), _(!1);
|
|
524
525
|
};
|
|
525
|
-
return /* @__PURE__ */
|
|
526
|
+
return /* @__PURE__ */ c(h, { ref: t, children: [
|
|
526
527
|
/* @__PURE__ */ e(v, {}),
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */ e(F, { sx: { lineHeight: "20px", pb: 4, pt: 16 }, children:
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
n.display_email_edit_field_in_settings && /* @__PURE__ */
|
|
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: [
|
|
531
532
|
/* @__PURE__ */ e(
|
|
532
533
|
U,
|
|
533
534
|
{
|
|
534
535
|
defaultValue: a.email,
|
|
535
536
|
fullWidth: !0,
|
|
536
|
-
label:
|
|
537
|
+
label: i.email_address,
|
|
537
538
|
name: "email",
|
|
538
|
-
onChange:
|
|
539
|
+
onChange: u
|
|
539
540
|
}
|
|
540
541
|
),
|
|
541
|
-
|
|
542
|
+
m && /* @__PURE__ */ e(
|
|
542
543
|
G,
|
|
543
544
|
{
|
|
544
545
|
sx: {
|
|
@@ -550,19 +551,19 @@ const xe = C(() => {
|
|
|
550
551
|
}
|
|
551
552
|
}
|
|
552
553
|
},
|
|
553
|
-
children: /* @__PURE__ */ e(
|
|
554
|
+
children: /* @__PURE__ */ e(Ce, {})
|
|
554
555
|
}
|
|
555
556
|
)
|
|
556
557
|
] }),
|
|
557
|
-
n.display_sms_edit_field_in_settings && /* @__PURE__ */
|
|
558
|
+
n.display_sms_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { flex: 1, pb: 14 }, children: [
|
|
558
559
|
/* @__PURE__ */ e(
|
|
559
560
|
U,
|
|
560
561
|
{
|
|
561
562
|
defaultValue: a.phone,
|
|
562
563
|
fullWidth: !0,
|
|
563
|
-
label:
|
|
564
|
+
label: i.mobile_number,
|
|
564
565
|
name: "phone",
|
|
565
|
-
onChange:
|
|
566
|
+
onChange: u
|
|
566
567
|
}
|
|
567
568
|
),
|
|
568
569
|
f && /* @__PURE__ */ e(
|
|
@@ -577,7 +578,7 @@ const xe = C(() => {
|
|
|
577
578
|
}
|
|
578
579
|
}
|
|
579
580
|
},
|
|
580
|
-
children: /* @__PURE__ */ e(
|
|
581
|
+
children: /* @__PURE__ */ e(Te, {})
|
|
581
582
|
}
|
|
582
583
|
)
|
|
583
584
|
] })
|
|
@@ -585,77 +586,78 @@ const xe = C(() => {
|
|
|
585
586
|
/* @__PURE__ */ e(
|
|
586
587
|
j,
|
|
587
588
|
{
|
|
588
|
-
disabled: !
|
|
589
|
+
disabled: !o,
|
|
589
590
|
onClick: b,
|
|
590
591
|
sx: { width: 84 },
|
|
591
592
|
variant: "contained",
|
|
592
|
-
children:
|
|
593
|
+
children: l.save_button
|
|
593
594
|
}
|
|
594
595
|
)
|
|
595
596
|
] })
|
|
596
597
|
] });
|
|
597
|
-
},
|
|
598
|
+
}, we = C(ke), dt = C(
|
|
598
599
|
({
|
|
599
600
|
notificationTypes: n = [y.Accounts, y.Budgets],
|
|
600
601
|
showPersonalDetails: t = !1,
|
|
601
|
-
view:
|
|
602
|
+
view: s
|
|
602
603
|
}) => {
|
|
603
|
-
const {
|
|
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(
|
|
604
605
|
void 0
|
|
605
606
|
);
|
|
606
|
-
if (n.length > 0 &&
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
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);
|
|
614
616
|
const {
|
|
615
|
-
email_notifications_enabled:
|
|
616
|
-
sms_notifications_enabled:
|
|
617
|
-
push_notifications_enabled:
|
|
618
|
-
} =
|
|
619
|
-
if (
|
|
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")
|
|
620
622
|
return /* @__PURE__ */ e(H, {});
|
|
621
|
-
if (
|
|
623
|
+
if (s === "budgets")
|
|
624
|
+
return /* @__PURE__ */ e(W, {});
|
|
625
|
+
if (s === "insights")
|
|
622
626
|
return /* @__PURE__ */ e(z, {});
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
A && /* @__PURE__ */ l(M, { children: [
|
|
629
|
-
/* @__PURE__ */ e(De, {}),
|
|
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, {}),
|
|
630
632
|
/* @__PURE__ */ e(v, { sx: { my: 24 } })
|
|
631
633
|
] }),
|
|
632
|
-
/* @__PURE__ */ e(F, { sx: { mb: 4 }, children:
|
|
634
|
+
/* @__PURE__ */ e(F, { sx: { mb: 4 }, children: i.notification_types_title })
|
|
633
635
|
] }),
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
-
n.includes(y.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */ e(L, { primary:
|
|
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 }),
|
|
637
639
|
/* @__PURE__ */ e(w, {})
|
|
638
640
|
] }) }),
|
|
639
|
-
n.includes(y.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */
|
|
640
|
-
/* @__PURE__ */ e(L, { primary:
|
|
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 }),
|
|
641
643
|
/* @__PURE__ */ e(w, {})
|
|
642
644
|
] }) }),
|
|
643
|
-
n.includes(y.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */
|
|
644
|
-
/* @__PURE__ */ e(L, { primary:
|
|
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 }),
|
|
645
647
|
/* @__PURE__ */ e(w, {})
|
|
646
648
|
] }) })
|
|
647
649
|
] }),
|
|
648
|
-
|
|
650
|
+
K && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(we, {}) }),
|
|
649
651
|
/* @__PURE__ */ e(
|
|
650
652
|
J,
|
|
651
653
|
{
|
|
652
|
-
isOpen: !!
|
|
653
|
-
onClose: () =>
|
|
654
|
-
title:
|
|
655
|
-
children: /* @__PURE__ */
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
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, {})
|
|
659
661
|
] })
|
|
660
662
|
}
|
|
661
663
|
)
|
|
@@ -664,9 +666,9 @@ const xe = C(() => {
|
|
|
664
666
|
);
|
|
665
667
|
export {
|
|
666
668
|
H as A,
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
669
|
+
W as B,
|
|
670
|
+
z as I,
|
|
671
|
+
dt as N,
|
|
672
|
+
Ce as V,
|
|
673
|
+
Te as a
|
|
672
674
|
};
|