@mx-cartographer/experiences 7.0.27-alpha.sms3 → 7.0.27-alpha.sms5
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as M } from "react/jsx-runtime";
|
|
2
2
|
import f from "react";
|
|
3
3
|
import { observer as x } from "mobx-react-lite";
|
|
4
4
|
import v from "@mui/material/Divider";
|
|
@@ -6,7 +6,7 @@ import E from "@mui/material/List";
|
|
|
6
6
|
import O from "@mui/material/ListItem";
|
|
7
7
|
import N from "@mui/material/ListItemText";
|
|
8
8
|
import V from "@mui/material/ListItemButton";
|
|
9
|
-
import
|
|
9
|
+
import h from "@mui/material/Stack";
|
|
10
10
|
import { ChevronRight as k, ExpandMore as K, Star as Q } from "@mxenabled/mx-icons";
|
|
11
11
|
import { Text as b, InstitutionLogo as Y, H3 as U } from "@mxenabled/mxui";
|
|
12
12
|
import { endOfMonth as Z } from "date-fns/endOfMonth";
|
|
@@ -15,14 +15,14 @@ import { DateCalendar as te } from "@mui/x-date-pickers/DateCalendar";
|
|
|
15
15
|
import { LocalizationProvider as ne } from "@mui/x-date-pickers/LocalizationProvider";
|
|
16
16
|
import { AdapterDateFns as ie } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
17
17
|
import { A as oe, T as F, a as P, N as C } from "./Notification-ByMBpJ5u.mjs";
|
|
18
|
-
import { u as D, r as T, o as w, c as se, e as ae, m as W, a as
|
|
19
|
-
import { b as
|
|
18
|
+
import { u as D, r as T, o as w, c as se, e as ae, m as W, a as le } from "./hooks-DkUqN6JE.mjs";
|
|
19
|
+
import { b as ce } from "./Localization-2MODESHW.mjs";
|
|
20
20
|
import { b as re, f as de } from "./NumberFormatting-CtWHhyBX.mjs";
|
|
21
21
|
import { a as B } from "./Dialog-CWW597AF.mjs";
|
|
22
22
|
import { C as me } from "./CurrencyInput-bEx2Mbd0.mjs";
|
|
23
|
-
import { u as
|
|
23
|
+
import { u as he } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
24
24
|
import { D as J } from "./Drawer-kEE73B87.mjs";
|
|
25
|
-
import
|
|
25
|
+
import _e from "@mui/material/Collapse";
|
|
26
26
|
import ue from "@mui/material/Card";
|
|
27
27
|
import pe from "@mui/material/CardContent";
|
|
28
28
|
import G from "@mui/material/Box";
|
|
@@ -32,13 +32,13 @@ import { u as fe } from "./useDimensions-27p2evRx.mjs";
|
|
|
32
32
|
import X from "@mui/material/styles/useTheme";
|
|
33
33
|
import { L as ge } from "./Loader-DUaFpDGv.mjs";
|
|
34
34
|
const ye = x(() => {
|
|
35
|
-
const { common: n, settings: t } = D(), { sendEmailVerification: s } = T(), { user:
|
|
35
|
+
const { common: n, settings: t } = D(), { sendEmailVerification: s } = T(), { user: c } = w(), i = X(), [r, a] = f.useState(!1), o = () => {
|
|
36
36
|
a(!1);
|
|
37
37
|
}, d = () => {
|
|
38
38
|
a(!0);
|
|
39
39
|
};
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ l(f.Fragment, { children: [
|
|
41
|
+
/* @__PURE__ */ l(R, { onClick: d, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
42
42
|
/* @__PURE__ */ e(b, { variant: "Small", children: t.verify_email }),
|
|
43
43
|
/* @__PURE__ */ e(k, {})
|
|
44
44
|
] }),
|
|
@@ -60,7 +60,7 @@ const ye = x(() => {
|
|
|
60
60
|
justifyContent: "center"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ l(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
64
64
|
/* @__PURE__ */ e(b, { bold: !0, truncate: !1, variant: "Body", children: t.confirm_your_email }),
|
|
65
65
|
/* @__PURE__ */ e(b, { truncate: !1, variant: "Small", children: t.confirm_email }),
|
|
66
66
|
/* @__PURE__ */ e(
|
|
@@ -72,7 +72,7 @@ const ye = x(() => {
|
|
|
72
72
|
p: "16px 32px"
|
|
73
73
|
},
|
|
74
74
|
variant: "H3",
|
|
75
|
-
children:
|
|
75
|
+
children: c.email
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
78
|
/* @__PURE__ */ e(b, { truncate: !1, variant: "Small", children: t.verification_notice_email })
|
|
@@ -82,7 +82,7 @@ const ye = x(() => {
|
|
|
82
82
|
] });
|
|
83
83
|
}), be = x(
|
|
84
84
|
({ handleClose: n, handleVerify: t, isOpen: s }) => {
|
|
85
|
-
const { common:
|
|
85
|
+
const { common: c, settings: i } = D(), [r, a] = f.useState("");
|
|
86
86
|
return /* @__PURE__ */ e(
|
|
87
87
|
B,
|
|
88
88
|
{
|
|
@@ -92,7 +92,7 @@ const ye = x(() => {
|
|
|
92
92
|
onPrimaryAction: () => t(r),
|
|
93
93
|
onSecondaryAction: n,
|
|
94
94
|
primaryText: i.verify,
|
|
95
|
-
secondaryText:
|
|
95
|
+
secondaryText: c.cancel_button,
|
|
96
96
|
sx: {
|
|
97
97
|
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
98
98
|
"& .MuiToolbar-root:last-child": {
|
|
@@ -101,12 +101,12 @@ const ye = x(() => {
|
|
|
101
101
|
justifyContent: "flex-end"
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
|
-
children: /* @__PURE__ */ e(
|
|
104
|
+
children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(L, { onChange: (o) => a(o.target.value), sx: { width: 352 }, value: r }) })
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
108
|
), xe = x(() => {
|
|
109
|
-
const { common: n, settings: t } = D(), { sendPhoneVerification: s, verifyPhoneToken:
|
|
109
|
+
const { common: n, settings: t } = D(), { sendPhoneVerification: s, verifyPhoneToken: c } = T(), { user: i } = w(), r = X(), [a, o] = f.useState(!1), [d, m] = f.useState(!1), _ = () => {
|
|
110
110
|
o(!1);
|
|
111
111
|
}, u = () => {
|
|
112
112
|
o(!0);
|
|
@@ -115,12 +115,12 @@ const ye = x(() => {
|
|
|
115
115
|
m(!0);
|
|
116
116
|
});
|
|
117
117
|
}, p = (y) => {
|
|
118
|
-
|
|
118
|
+
c(y).finally(() => {
|
|
119
119
|
m(!1);
|
|
120
120
|
});
|
|
121
121
|
};
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
122
|
+
return /* @__PURE__ */ l(f.Fragment, { children: [
|
|
123
|
+
/* @__PURE__ */ l(R, { onClick: u, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
|
|
124
124
|
/* @__PURE__ */ e(b, { variant: "Small", children: t.verify_phone }),
|
|
125
125
|
/* @__PURE__ */ e(k, {})
|
|
126
126
|
] }),
|
|
@@ -129,9 +129,9 @@ const ye = x(() => {
|
|
|
129
129
|
{
|
|
130
130
|
copy: { title: "" },
|
|
131
131
|
isOpen: a,
|
|
132
|
-
onClose:
|
|
132
|
+
onClose: _,
|
|
133
133
|
onPrimaryAction: g,
|
|
134
|
-
onSecondaryAction:
|
|
134
|
+
onSecondaryAction: _,
|
|
135
135
|
primaryText: t.send_verification,
|
|
136
136
|
secondaryText: n.back,
|
|
137
137
|
sx: {
|
|
@@ -142,7 +142,7 @@ const ye = x(() => {
|
|
|
142
142
|
justifyContent: "center"
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ l(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
146
146
|
/* @__PURE__ */ e(b, { bold: !0, truncate: !1, variant: "Body", children: t.confirm_your_phone }),
|
|
147
147
|
/* @__PURE__ */ e(b, { truncate: !1, variant: "Small", children: t.confirm_phone }),
|
|
148
148
|
/* @__PURE__ */ e(
|
|
@@ -172,15 +172,15 @@ const ye = x(() => {
|
|
|
172
172
|
] });
|
|
173
173
|
}), Ce = x(
|
|
174
174
|
({ onProfileUpdated: n, profile: t }) => {
|
|
175
|
-
const { common: s, recurring:
|
|
175
|
+
const { common: s, recurring: c, settings: i } = D(), { updateAccount: r } = se(), a = t.notification_type === oe.DebtPaymentReminder, [o, d] = f.useState(!1), [m, _] = f.useState(t.threshold || 0), [u, g] = f.useState(
|
|
176
176
|
t.account?.day_payment_is_due || 0
|
|
177
|
-
), p = t.account?.name || t.account?.feed_name || "", y = t.account?.day_payment_is_due ?
|
|
177
|
+
), p = t.account?.name || t.account?.feed_name || "", y = t.account?.day_payment_is_due ? ce(
|
|
178
178
|
i.notification_debt_payment_date,
|
|
179
179
|
re(t.account?.day_payment_is_due)
|
|
180
180
|
) : i.notification_debt_payment_zero_state, S = a ? y : de(t.threshold ?? 0, "0,0"), A = async () => {
|
|
181
181
|
a && t.account ? await r({ ...t.account, day_payment_is_due: u }) : n({ ...t, threshold: m });
|
|
182
182
|
};
|
|
183
|
-
return /* @__PURE__ */
|
|
183
|
+
return /* @__PURE__ */ l(h, { children: [
|
|
184
184
|
/* @__PURE__ */ e(
|
|
185
185
|
F,
|
|
186
186
|
{
|
|
@@ -207,7 +207,7 @@ const ye = x(() => {
|
|
|
207
207
|
B,
|
|
208
208
|
{
|
|
209
209
|
copy: {
|
|
210
|
-
title: a ?
|
|
210
|
+
title: a ? c.day_of_the_month : i.notification_threshold_label,
|
|
211
211
|
close_aria: s.close_aria
|
|
212
212
|
},
|
|
213
213
|
disablePrimaryButton: a && u === 0,
|
|
@@ -243,7 +243,7 @@ const ye = x(() => {
|
|
|
243
243
|
autoFocus: !0,
|
|
244
244
|
fullWidth: !0,
|
|
245
245
|
minAmount: 0,
|
|
246
|
-
setAmount: (I) =>
|
|
246
|
+
setAmount: (I) => _(Number(I) || 0),
|
|
247
247
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
248
248
|
}
|
|
249
249
|
)
|
|
@@ -253,44 +253,44 @@ const ye = x(() => {
|
|
|
253
253
|
}
|
|
254
254
|
), ve = x(
|
|
255
255
|
({ onUpdateProfile: n, profile: t }) => {
|
|
256
|
-
const { settings: s } = D(), { user:
|
|
256
|
+
const { settings: s } = D(), { user: c } = w(), { clientCommunicationProfile: i, userCommunicationsProfile: r } = T(), { isMobile: a } = he(), o = t.notification_type > 2, {
|
|
257
257
|
opted_out_of_email_notifications: d,
|
|
258
258
|
opted_out_of_push_notifications: m,
|
|
259
|
-
opted_out_of_sms_notifications:
|
|
259
|
+
opted_out_of_sms_notifications: _
|
|
260
260
|
} = r, {
|
|
261
261
|
email_notifications_enabled: u,
|
|
262
262
|
push_notifications_enabled: g,
|
|
263
263
|
sms_notifications_enabled: p
|
|
264
264
|
} = i;
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
-
(u || p || g) && /* @__PURE__ */
|
|
265
|
+
return /* @__PURE__ */ l(h, { children: [
|
|
266
|
+
(u || p || g) && /* @__PURE__ */ l(M, { children: [
|
|
267
267
|
/* @__PURE__ */ e(b, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.delivery_method_title }),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
u && /* @__PURE__ */ e(
|
|
268
|
+
/* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
269
|
+
u && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
270
270
|
P,
|
|
271
271
|
{
|
|
272
|
-
isChecked: !d && t.email_channel && !!
|
|
273
|
-
isDisabled: d || !
|
|
272
|
+
isChecked: !d && t.email_channel && !!c.email,
|
|
273
|
+
isDisabled: d || !c.email,
|
|
274
274
|
onToggle: () => n({ ...t, email_channel: !t.email_channel }),
|
|
275
275
|
primaryText: s.delivery_method_email_label,
|
|
276
|
-
secondaryText: d || !t.email_channel || !
|
|
276
|
+
secondaryText: d || !t.email_channel || !c.email ? s.notification_disabled : s.notification_enabled,
|
|
277
277
|
useExtraPadding: !1
|
|
278
278
|
}
|
|
279
279
|
) }),
|
|
280
280
|
u && (p || g) && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
281
|
-
p && /* @__PURE__ */ e(
|
|
281
|
+
p && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
282
282
|
P,
|
|
283
283
|
{
|
|
284
|
-
isChecked: !
|
|
285
|
-
isDisabled:
|
|
284
|
+
isChecked: !_ && t.sms_channel && !!c.phone,
|
|
285
|
+
isDisabled: _ || !c.phone,
|
|
286
286
|
onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
|
|
287
287
|
primaryText: `${s.delivery_method_sms_label}`,
|
|
288
|
-
secondaryText:
|
|
288
|
+
secondaryText: _ || !t.sms_channel || !c.phone ? s.notification_disabled : s.notification_enabled,
|
|
289
289
|
useExtraPadding: !1
|
|
290
290
|
}
|
|
291
291
|
) }),
|
|
292
292
|
p && g && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
|
|
293
|
-
g && /* @__PURE__ */ e(
|
|
293
|
+
g && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
294
294
|
P,
|
|
295
295
|
{
|
|
296
296
|
isChecked: !m && t.push_channel,
|
|
@@ -304,7 +304,7 @@ const ye = x(() => {
|
|
|
304
304
|
/* @__PURE__ */ e(v, {})
|
|
305
305
|
] })
|
|
306
306
|
] }),
|
|
307
|
-
o && !!t.children?.length && /* @__PURE__ */
|
|
307
|
+
o && !!t.children?.length && /* @__PURE__ */ l(h, { children: [
|
|
308
308
|
/* @__PURE__ */ e(b, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.accounts_threshold_title }),
|
|
309
309
|
/* @__PURE__ */ e(E, { sx: { bgcolor: "background.paper" }, children: t.children?.map((y) => /* @__PURE__ */ e(
|
|
310
310
|
Ce,
|
|
@@ -318,7 +318,7 @@ const ye = x(() => {
|
|
|
318
318
|
] });
|
|
319
319
|
}
|
|
320
320
|
), H = x(() => {
|
|
321
|
-
const { accountProfiles: n, updateNotificationProfile: t } = T(), [s,
|
|
321
|
+
const { accountProfiles: n, updateNotificationProfile: t } = T(), [s, c] = f.useState(""), i = f.useMemo(
|
|
322
322
|
() => n.find((o) => o.guid === s),
|
|
323
323
|
[n, s]
|
|
324
324
|
), r = async (o) => {
|
|
@@ -329,14 +329,14 @@ const ye = x(() => {
|
|
|
329
329
|
}, a = async (o) => {
|
|
330
330
|
await t(o);
|
|
331
331
|
};
|
|
332
|
-
return /* @__PURE__ */
|
|
332
|
+
return /* @__PURE__ */ l(h, { sx: { backgroundColor: "background.paper" }, children: [
|
|
333
333
|
n.filter((o) => o.children && o.children.length > 0).map((o) => /* @__PURE__ */ e(
|
|
334
334
|
F,
|
|
335
335
|
{
|
|
336
336
|
endIcon: /* @__PURE__ */ e(k, {}),
|
|
337
337
|
isChecked: o.is_enabled,
|
|
338
338
|
isDisabled: !o.is_enabled,
|
|
339
|
-
onClick: () =>
|
|
339
|
+
onClick: () => c(o.guid),
|
|
340
340
|
onToggle: () => r(o),
|
|
341
341
|
primaryText: o.label,
|
|
342
342
|
secondaryText: o.is_enabled ? o.deliveryMethodsLabel : void 0
|
|
@@ -347,7 +347,7 @@ const ye = x(() => {
|
|
|
347
347
|
J,
|
|
348
348
|
{
|
|
349
349
|
isOpen: !!i,
|
|
350
|
-
onClose: () =>
|
|
350
|
+
onClose: () => c(""),
|
|
351
351
|
title: i ? i.label : "",
|
|
352
352
|
children: i && /* @__PURE__ */ e(
|
|
353
353
|
ve,
|
|
@@ -363,7 +363,7 @@ const ye = x(() => {
|
|
|
363
363
|
const { settings: t } = D(), {
|
|
364
364
|
clientCommunicationProfile: {
|
|
365
365
|
email_notifications_enabled: s,
|
|
366
|
-
push_notifications_enabled:
|
|
366
|
+
push_notifications_enabled: c,
|
|
367
367
|
sms_notifications_enabled: i
|
|
368
368
|
},
|
|
369
369
|
updateNotificationProfile: r,
|
|
@@ -372,12 +372,14 @@ const ye = x(() => {
|
|
|
372
372
|
opted_out_of_push_notifications: o,
|
|
373
373
|
opted_out_of_sms_notifications: d
|
|
374
374
|
}
|
|
375
|
-
} = T()
|
|
375
|
+
} = T();
|
|
376
|
+
console.log("in profile?");
|
|
377
|
+
const { user: m } = w(), [_, u] = f.useState(!1), g = async () => {
|
|
376
378
|
await p({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && u(!1);
|
|
377
379
|
}, p = async (S) => {
|
|
378
380
|
await r(S);
|
|
379
|
-
}, y = s || i ||
|
|
380
|
-
return /* @__PURE__ */
|
|
381
|
+
}, y = s || i || c;
|
|
382
|
+
return /* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
381
383
|
/* @__PURE__ */ e(
|
|
382
384
|
F,
|
|
383
385
|
{
|
|
@@ -386,20 +388,20 @@ const ye = x(() => {
|
|
|
386
388
|
{
|
|
387
389
|
sx: {
|
|
388
390
|
transition: "transform 0.3s ease-in-out",
|
|
389
|
-
transform:
|
|
391
|
+
transform: _ ? "rotate(180deg)" : "rotate(0deg)"
|
|
390
392
|
}
|
|
391
393
|
}
|
|
392
394
|
) : void 0,
|
|
393
395
|
isChecked: n.is_enabled,
|
|
394
396
|
isDisabled: !n.is_enabled,
|
|
395
|
-
onClick: () => u(!
|
|
397
|
+
onClick: () => u(!_),
|
|
396
398
|
onToggle: () => g(),
|
|
397
399
|
primaryText: n.label,
|
|
398
400
|
secondaryText: n.is_enabled ? n.deliveryMethodsLabel : void 0
|
|
399
401
|
},
|
|
400
402
|
n.guid
|
|
401
403
|
),
|
|
402
|
-
y && /* @__PURE__ */ e(
|
|
404
|
+
y && /* @__PURE__ */ e(_e, { in: _, children: /* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
403
405
|
s && /* @__PURE__ */ e(
|
|
404
406
|
P,
|
|
405
407
|
{
|
|
@@ -412,7 +414,7 @@ const ye = x(() => {
|
|
|
412
414
|
primaryText: t.delivery_method_email_label
|
|
413
415
|
}
|
|
414
416
|
),
|
|
415
|
-
s && (i ||
|
|
417
|
+
s && (i || c) && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
416
418
|
i && /* @__PURE__ */ e(
|
|
417
419
|
P,
|
|
418
420
|
{
|
|
@@ -425,8 +427,8 @@ const ye = x(() => {
|
|
|
425
427
|
primaryText: t.delivery_method_sms_label
|
|
426
428
|
}
|
|
427
429
|
),
|
|
428
|
-
i &&
|
|
429
|
-
|
|
430
|
+
i && c && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
431
|
+
c && /* @__PURE__ */ e(
|
|
430
432
|
P,
|
|
431
433
|
{
|
|
432
434
|
isChecked: !o && n.push_channel,
|
|
@@ -443,11 +445,11 @@ const ye = x(() => {
|
|
|
443
445
|
] }, n.guid);
|
|
444
446
|
}), z = x(() => {
|
|
445
447
|
const { budgetProfiles: n } = T();
|
|
446
|
-
return /* @__PURE__ */ e(
|
|
448
|
+
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
|
|
447
449
|
}), Te = x(() => {
|
|
448
450
|
const { onEvent: n } = ae(), { settings: t } = D(), {
|
|
449
451
|
clientCommunicationProfile: s,
|
|
450
|
-
updateUserCommunicationProfile:
|
|
452
|
+
updateUserCommunicationProfile: c,
|
|
451
453
|
userCommunicationsProfile: i
|
|
452
454
|
} = T(), { user: r } = w(), a = async (o, d) => {
|
|
453
455
|
const m = { ...i, [o]: d };
|
|
@@ -455,11 +457,11 @@ const ye = x(() => {
|
|
|
455
457
|
const u = o.split("_")[3];
|
|
456
458
|
d === !1 ? n("opt_in_notification_method", { notificationType: u }) : n("opt_out_notification_method", { notificationType: u });
|
|
457
459
|
}
|
|
458
|
-
await
|
|
460
|
+
await c(m);
|
|
459
461
|
};
|
|
460
|
-
return /* @__PURE__ */
|
|
462
|
+
return /* @__PURE__ */ l(h, { children: [
|
|
461
463
|
/* @__PURE__ */ e(U, { sx: { mt: 24 }, children: t.delivery_method_title }),
|
|
462
|
-
s.email_notifications_enabled && /* @__PURE__ */
|
|
464
|
+
s.email_notifications_enabled && /* @__PURE__ */ l(M, { children: [
|
|
463
465
|
/* @__PURE__ */ e(
|
|
464
466
|
P,
|
|
465
467
|
{
|
|
@@ -476,7 +478,7 @@ const ye = x(() => {
|
|
|
476
478
|
),
|
|
477
479
|
(s.sms_notifications_enabled || s.push_notifications_enabled) && /* @__PURE__ */ e(v, {})
|
|
478
480
|
] }),
|
|
479
|
-
s.sms_notifications_enabled && /* @__PURE__ */
|
|
481
|
+
s.sms_notifications_enabled && /* @__PURE__ */ l(M, { children: [
|
|
480
482
|
/* @__PURE__ */ e(
|
|
481
483
|
P,
|
|
482
484
|
{
|
|
@@ -502,30 +504,30 @@ const ye = x(() => {
|
|
|
502
504
|
useExtraPadding: !1
|
|
503
505
|
}
|
|
504
506
|
),
|
|
505
|
-
s.sms_notifications_enabled && /* @__PURE__ */ e(ue, { sx: { backgroundColor: "background.default", mt: 12 }, variant: "outlined", children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */
|
|
507
|
+
s.sms_notifications_enabled && /* @__PURE__ */ e(ue, { sx: { backgroundColor: "background.default", mt: 12 }, variant: "outlined", children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ l(h, { alignItems: "flex-start", direction: "row", gap: 6, children: [
|
|
506
508
|
/* @__PURE__ */ e(Q, { color: "primary", filled: !0 }),
|
|
507
509
|
/* @__PURE__ */ e(b, { sx: { whiteSpace: "wrap" }, variant: "XSmall", children: t.delivery_method_sms_note_1 })
|
|
508
510
|
] }) }) })
|
|
509
511
|
] });
|
|
510
512
|
}), $ = x(() => {
|
|
511
513
|
const { insightsProfiles: n } = T();
|
|
512
|
-
return /* @__PURE__ */ e(
|
|
514
|
+
return console.log("insightsProfiles", n), /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
|
|
513
515
|
}), Pe = () => {
|
|
514
|
-
const { config: n } = W(), [t, { width: s }] = fe(), { common:
|
|
516
|
+
const { config: n } = W(), [t, { width: s }] = fe(), { common: c, settings: i } = D(), { updateUser: r } = T(), { user: a } = w(), [o, d] = f.useState(!1), [m, _] = f.useState({
|
|
515
517
|
email: a.email,
|
|
516
518
|
phone: a.phone
|
|
517
519
|
}), u = m.email && !a.email_is_verified && !o, g = m.phone && !a.phone_is_verified && !o, p = (S) => {
|
|
518
520
|
const { name: A, value: I } = S.target, j = { ...m, [A]: I };
|
|
519
|
-
|
|
521
|
+
_(j), d(JSON.stringify({ ...a, ...j }) !== JSON.stringify(a));
|
|
520
522
|
}, y = async () => {
|
|
521
523
|
await r({ ...a, ...m }), d(!1);
|
|
522
524
|
};
|
|
523
|
-
return /* @__PURE__ */
|
|
525
|
+
return /* @__PURE__ */ l(h, { ref: t, children: [
|
|
524
526
|
/* @__PURE__ */ e(v, {}),
|
|
525
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ l(h, { sx: { pt: 12 }, children: [
|
|
526
528
|
/* @__PURE__ */ e(U, { sx: { lineHeight: "20px", pb: 4, pt: 16 }, children: i.personal_details }),
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
n.display_email_edit_field_in_settings && /* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ l(h, { sx: { flexDirection: s <= 768 ? "column" : "row", gap: 24, py: 16 }, children: [
|
|
530
|
+
n.display_email_edit_field_in_settings && /* @__PURE__ */ l(h, { sx: { flex: 1, pb: 14 }, children: [
|
|
529
531
|
/* @__PURE__ */ e(
|
|
530
532
|
L,
|
|
531
533
|
{
|
|
@@ -552,7 +554,7 @@ const ye = x(() => {
|
|
|
552
554
|
}
|
|
553
555
|
)
|
|
554
556
|
] }),
|
|
555
|
-
n.display_sms_edit_field_in_settings && /* @__PURE__ */
|
|
557
|
+
n.display_sms_edit_field_in_settings && /* @__PURE__ */ l(h, { sx: { flex: 1, pb: 14 }, children: [
|
|
556
558
|
/* @__PURE__ */ e(
|
|
557
559
|
L,
|
|
558
560
|
{
|
|
@@ -587,22 +589,22 @@ const ye = x(() => {
|
|
|
587
589
|
onClick: y,
|
|
588
590
|
sx: { width: 84 },
|
|
589
591
|
variant: "contained",
|
|
590
|
-
children:
|
|
592
|
+
children: c.save_button
|
|
591
593
|
}
|
|
592
594
|
)
|
|
593
595
|
] })
|
|
594
596
|
] });
|
|
595
597
|
}, De = x(Pe), st = x(
|
|
596
598
|
({ notificationTypes: n = [], showPersonalDetails: t = !1, view: s }) => {
|
|
597
|
-
const { config:
|
|
599
|
+
const { config: c } = W(), { settings: i } = D(), { isInitialized: r } = le(), { clientCommunicationProfile: a, loadNotificationProfiles: o } = T(), [d, m] = f.useState(
|
|
598
600
|
void 0
|
|
599
601
|
);
|
|
600
602
|
if (f.useEffect(() => {
|
|
601
603
|
r && o().finally();
|
|
602
604
|
}, [r]), !r)
|
|
603
605
|
return /* @__PURE__ */ e(ge, {});
|
|
604
|
-
let
|
|
605
|
-
d === C.Budgets ?
|
|
606
|
+
let _ = i.manage_account_notifications;
|
|
607
|
+
d === C.Budgets ? _ = i.manage_budget_notifications : d === C.Insights && (_ = i.manage_insights_notifications);
|
|
606
608
|
const {
|
|
607
609
|
email_notifications_enabled: u,
|
|
608
610
|
sms_notifications_enabled: g,
|
|
@@ -613,38 +615,38 @@ const ye = x(() => {
|
|
|
613
615
|
if (s === "budgets")
|
|
614
616
|
return /* @__PURE__ */ e(z, {});
|
|
615
617
|
if (s === "insights")
|
|
616
|
-
return /* @__PURE__ */ e($, {});
|
|
617
|
-
const S =
|
|
618
|
-
return /* @__PURE__ */
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
y && /* @__PURE__ */
|
|
618
|
+
return console.log("view is insights"), /* @__PURE__ */ e($, {});
|
|
619
|
+
const S = c.display_email_edit_field_in_settings || c.display_sms_edit_field_in_settings, A = t && a.can_edit_contact_info && S;
|
|
620
|
+
return /* @__PURE__ */ l(h, { sx: { pt: y ? 0 : 24 }, children: [
|
|
621
|
+
/* @__PURE__ */ l(h, { sx: { px: 24 }, children: [
|
|
622
|
+
y && /* @__PURE__ */ l(M, { children: [
|
|
621
623
|
/* @__PURE__ */ e(Te, {}),
|
|
622
624
|
/* @__PURE__ */ e(v, { sx: { my: 24 } })
|
|
623
625
|
] }),
|
|
624
626
|
/* @__PURE__ */ e(U, { sx: { mb: 4 }, children: i.notification_types_title })
|
|
625
627
|
] }),
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
n.includes(C.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ l(E, { children: [
|
|
629
|
+
n.includes(C.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => m(C.Accounts), children: [
|
|
628
630
|
/* @__PURE__ */ e(N, { primary: i.accounts_title, secondary: i.accounts_subtitle }),
|
|
629
631
|
/* @__PURE__ */ e(k, {})
|
|
630
632
|
] }) }),
|
|
631
|
-
n.includes(C.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */
|
|
633
|
+
n.includes(C.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => m(C.Budgets), children: [
|
|
632
634
|
/* @__PURE__ */ e(N, { primary: i.budgets_title, secondary: i.budgets_subtitle }),
|
|
633
635
|
/* @__PURE__ */ e(k, {})
|
|
634
636
|
] }) }),
|
|
635
|
-
n.includes(C.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */
|
|
637
|
+
n.includes(C.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => m(C.Insights), children: [
|
|
636
638
|
/* @__PURE__ */ e(N, { primary: i.insights_title, secondary: i.insights_subtitle }),
|
|
637
639
|
/* @__PURE__ */ e(k, {})
|
|
638
640
|
] }) })
|
|
639
641
|
] }),
|
|
640
|
-
A && /* @__PURE__ */ e(
|
|
642
|
+
A && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(De, {}) }),
|
|
641
643
|
/* @__PURE__ */ e(
|
|
642
644
|
J,
|
|
643
645
|
{
|
|
644
646
|
isOpen: !!d,
|
|
645
647
|
onClose: () => m(void 0),
|
|
646
|
-
title:
|
|
647
|
-
children: /* @__PURE__ */
|
|
648
|
+
title: _,
|
|
649
|
+
children: /* @__PURE__ */ l(h, { children: [
|
|
648
650
|
d === C.Accounts && /* @__PURE__ */ e(H, {}),
|
|
649
651
|
d === C.Budgets && /* @__PURE__ */ e(z, {}),
|
|
650
652
|
d === C.Insights && /* @__PURE__ */ e($, {})
|
|
@@ -17,7 +17,7 @@ import P from "@mui/material/Button";
|
|
|
17
17
|
import W from "@mui/material/Stack";
|
|
18
18
|
import { L as w } from "../Loader-DUaFpDGv.mjs";
|
|
19
19
|
import $ from "@mui/material/IconButton";
|
|
20
|
-
import { N as H } from "../NotificationSettings-
|
|
20
|
+
import { N as H } from "../NotificationSettings-D9eiZJk9.mjs";
|
|
21
21
|
import { D as b } from "../Drawer-kEE73B87.mjs";
|
|
22
22
|
const yt = (e) => {
|
|
23
23
|
switch (e) {
|
|
@@ -16,8 +16,8 @@ import F from "@mui/material/Box";
|
|
|
16
16
|
import Q from "@mui/material/Button";
|
|
17
17
|
import I from "@mui/material/TextField";
|
|
18
18
|
import { H3 as J, P as H, Text as x, Icon as M, ChevronRightIcon as xe } from "@mxenabled/mxui";
|
|
19
|
-
import { V as ve, a as Ce, N as G } from "../NotificationSettings-
|
|
20
|
-
import { A as Yt, B as qt, I as Qt } from "../NotificationSettings-
|
|
19
|
+
import { V as ve, a as Ce, N as G } from "../NotificationSettings-D9eiZJk9.mjs";
|
|
20
|
+
import { A as Yt, B as qt, I as Qt } from "../NotificationSettings-D9eiZJk9.mjs";
|
|
21
21
|
import { u as k, m as $, r as A, o as De, a as Z, k as ee } from "../hooks-DkUqN6JE.mjs";
|
|
22
22
|
import { u as L } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
23
23
|
import { a as W } from "../Dialog-CWW597AF.mjs";
|
|
@@ -856,7 +856,7 @@ const $t = D(({ onBackClick: t, sx: a }) => {
|
|
|
856
856
|
);
|
|
857
857
|
}), Wt = D((t) => {
|
|
858
858
|
const { clientConfig: a } = $(), o = a?.master?.deep_link_params?.view;
|
|
859
|
-
return
|
|
859
|
+
return o ? /* @__PURE__ */ e(G, { view: o }) : /* @__PURE__ */ e(K, { ...t, children: /* @__PURE__ */ e(p, { my: 24, children: /* @__PURE__ */ e(G, {}) }) });
|
|
860
860
|
}), zt = (t) => {
|
|
861
861
|
const { isMobile: a } = L();
|
|
862
862
|
return /* @__PURE__ */ e(K, { ...t, children: /* @__PURE__ */ e(p, { sx: { mx: a ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(re, {}) }) });
|