@mx-cartographer/experiences 7.0.27-alpha.sms3 → 7.0.27-alpha.sms4
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.
|
@@ -3,10 +3,10 @@ import f from "react";
|
|
|
3
3
|
import { observer as x } from "mobx-react-lite";
|
|
4
4
|
import v from "@mui/material/Divider";
|
|
5
5
|
import E from "@mui/material/List";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import N from "@mui/material/ListItem";
|
|
7
|
+
import O 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";
|
|
@@ -20,9 +20,9 @@ import { b as le } 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,7 +32,7 @@ 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:
|
|
35
|
+
const { common: n, settings: t } = D(), { sendEmailVerification: o } = T(), { user: l } = w(), i = X(), [r, a] = f.useState(!1), s = () => {
|
|
36
36
|
a(!1);
|
|
37
37
|
}, d = () => {
|
|
38
38
|
a(!0);
|
|
@@ -47,9 +47,9 @@ const ye = x(() => {
|
|
|
47
47
|
{
|
|
48
48
|
copy: { title: "" },
|
|
49
49
|
isOpen: r,
|
|
50
|
-
onClose:
|
|
51
|
-
onPrimaryAction:
|
|
52
|
-
onSecondaryAction:
|
|
50
|
+
onClose: s,
|
|
51
|
+
onPrimaryAction: o,
|
|
52
|
+
onSecondaryAction: s,
|
|
53
53
|
primaryText: t.send_verification,
|
|
54
54
|
secondaryText: n.back,
|
|
55
55
|
sx: {
|
|
@@ -60,7 +60,7 @@ const ye = x(() => {
|
|
|
60
60
|
justifyContent: "center"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
children: /* @__PURE__ */ c(
|
|
63
|
+
children: /* @__PURE__ */ c(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(
|
|
@@ -81,13 +81,13 @@ const ye = x(() => {
|
|
|
81
81
|
)
|
|
82
82
|
] });
|
|
83
83
|
}), be = x(
|
|
84
|
-
({ handleClose: n, handleVerify: t, isOpen:
|
|
84
|
+
({ handleClose: n, handleVerify: t, isOpen: o }) => {
|
|
85
85
|
const { common: l, settings: i } = D(), [r, a] = f.useState("");
|
|
86
86
|
return /* @__PURE__ */ e(
|
|
87
87
|
B,
|
|
88
88
|
{
|
|
89
89
|
copy: { title: i.enter_verification_code },
|
|
90
|
-
isOpen:
|
|
90
|
+
isOpen: o,
|
|
91
91
|
onClose: n,
|
|
92
92
|
onPrimaryAction: () => t(r),
|
|
93
93
|
onSecondaryAction: n,
|
|
@@ -101,17 +101,17 @@ 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: (s) => a(s.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:
|
|
110
|
-
|
|
109
|
+
const { common: n, settings: t } = D(), { sendPhoneVerification: o, verifyPhoneToken: l } = T(), { user: i } = w(), r = X(), [a, s] = f.useState(!1), [d, m] = f.useState(!1), _ = () => {
|
|
110
|
+
s(!1);
|
|
111
111
|
}, u = () => {
|
|
112
|
-
|
|
112
|
+
s(!0);
|
|
113
113
|
}, g = () => {
|
|
114
|
-
|
|
114
|
+
o().finally(() => {
|
|
115
115
|
m(!0);
|
|
116
116
|
});
|
|
117
117
|
}, p = (y) => {
|
|
@@ -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__ */ c(
|
|
145
|
+
children: /* @__PURE__ */ c(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,7 +172,7 @@ const ye = x(() => {
|
|
|
172
172
|
] });
|
|
173
173
|
}), Ce = x(
|
|
174
174
|
({ onProfileUpdated: n, profile: t }) => {
|
|
175
|
-
const { common:
|
|
175
|
+
const { common: o, recurring: l, settings: i } = D(), { updateAccount: r } = se(), a = t.notification_type === oe.DebtPaymentReminder, [s, d] = f.useState(!1), [m, _] = f.useState(t.threshold || 0), [u, g] = f.useState(
|
|
176
176
|
t.account?.day_payment_is_due || 0
|
|
177
177
|
), p = t.account?.name || t.account?.feed_name || "", y = t.account?.day_payment_is_due ? le(
|
|
178
178
|
i.notification_debt_payment_date,
|
|
@@ -180,7 +180,7 @@ const ye = x(() => {
|
|
|
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__ */ c(
|
|
183
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
184
184
|
/* @__PURE__ */ e(
|
|
185
185
|
F,
|
|
186
186
|
{
|
|
@@ -208,13 +208,13 @@ const ye = x(() => {
|
|
|
208
208
|
{
|
|
209
209
|
copy: {
|
|
210
210
|
title: a ? l.day_of_the_month : i.notification_threshold_label,
|
|
211
|
-
close_aria:
|
|
211
|
+
close_aria: o.close_aria
|
|
212
212
|
},
|
|
213
213
|
disablePrimaryButton: a && u === 0,
|
|
214
|
-
isOpen:
|
|
214
|
+
isOpen: s,
|
|
215
215
|
onClose: () => d(!1),
|
|
216
216
|
onPrimaryAction: A,
|
|
217
|
-
primaryText:
|
|
217
|
+
primaryText: o.save_button,
|
|
218
218
|
children: a ? /* @__PURE__ */ e(ne, { dateAdapter: ie, children: /* @__PURE__ */ e(
|
|
219
219
|
te,
|
|
220
220
|
{
|
|
@@ -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,59 +253,59 @@ const ye = x(() => {
|
|
|
253
253
|
}
|
|
254
254
|
), ve = x(
|
|
255
255
|
({ onUpdateProfile: n, profile: t }) => {
|
|
256
|
-
const { settings:
|
|
256
|
+
const { settings: o } = D(), { user: l } = w(), { clientCommunicationProfile: i, userCommunicationsProfile: r } = T(), { isMobile: a } = he(), s = 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__ */ c(
|
|
265
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
266
266
|
(u || p || g) && /* @__PURE__ */ c(M, { children: [
|
|
267
|
-
/* @__PURE__ */ e(b, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children:
|
|
267
|
+
/* @__PURE__ */ e(b, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: o.delivery_method_title }),
|
|
268
268
|
/* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
269
|
-
u && /* @__PURE__ */ e(
|
|
269
|
+
u && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
270
270
|
P,
|
|
271
271
|
{
|
|
272
272
|
isChecked: !d && t.email_channel && !!l.email,
|
|
273
273
|
isDisabled: d || !l.email,
|
|
274
274
|
onToggle: () => n({ ...t, email_channel: !t.email_channel }),
|
|
275
|
-
primaryText:
|
|
276
|
-
secondaryText: d || !t.email_channel || !l.email ?
|
|
275
|
+
primaryText: o.delivery_method_email_label,
|
|
276
|
+
secondaryText: d || !t.email_channel || !l.email ? o.notification_disabled : o.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 && !!l.phone,
|
|
285
|
+
isDisabled: _ || !l.phone,
|
|
286
286
|
onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
|
|
287
|
-
primaryText: `${
|
|
288
|
-
secondaryText:
|
|
287
|
+
primaryText: `${o.delivery_method_sms_label}`,
|
|
288
|
+
secondaryText: _ || !t.sms_channel || !l.phone ? o.notification_disabled : o.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,
|
|
297
297
|
isDisabled: m,
|
|
298
298
|
onToggle: () => n({ ...t, push_channel: !t.push_channel }),
|
|
299
|
-
primaryText:
|
|
300
|
-
secondaryText:
|
|
299
|
+
primaryText: o.delivery_method_push_label,
|
|
300
|
+
secondaryText: o.delivery_method_push_subtitle,
|
|
301
301
|
useExtraPadding: !1
|
|
302
302
|
}
|
|
303
303
|
) }),
|
|
304
304
|
/* @__PURE__ */ e(v, {})
|
|
305
305
|
] })
|
|
306
306
|
] }),
|
|
307
|
-
|
|
308
|
-
/* @__PURE__ */ e(b, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children:
|
|
307
|
+
s && !!t.children?.length && /* @__PURE__ */ c(h, { children: [
|
|
308
|
+
/* @__PURE__ */ e(b, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: o.accounts_threshold_title }),
|
|
309
309
|
/* @__PURE__ */ e(E, { sx: { bgcolor: "background.paper" }, children: t.children?.map((y) => /* @__PURE__ */ e(
|
|
310
310
|
Ce,
|
|
311
311
|
{
|
|
@@ -318,30 +318,30 @@ const ye = x(() => {
|
|
|
318
318
|
] });
|
|
319
319
|
}
|
|
320
320
|
), H = x(() => {
|
|
321
|
-
const { accountProfiles: n, updateNotificationProfile: t } = T(), [
|
|
322
|
-
() => n.find((
|
|
323
|
-
[n,
|
|
324
|
-
), r = async (
|
|
321
|
+
const { accountProfiles: n, updateNotificationProfile: t } = T(), [o, l] = f.useState(""), i = f.useMemo(
|
|
322
|
+
() => n.find((s) => s.guid === o),
|
|
323
|
+
[n, o]
|
|
324
|
+
), r = async (s) => {
|
|
325
325
|
await t({
|
|
326
|
-
...
|
|
327
|
-
is_enabled: !
|
|
326
|
+
...s,
|
|
327
|
+
is_enabled: !s.is_enabled
|
|
328
328
|
});
|
|
329
|
-
}, a = async (
|
|
330
|
-
await t(
|
|
329
|
+
}, a = async (s) => {
|
|
330
|
+
await t(s);
|
|
331
331
|
};
|
|
332
|
-
return /* @__PURE__ */ c(
|
|
333
|
-
n.filter((
|
|
332
|
+
return /* @__PURE__ */ c(h, { sx: { backgroundColor: "background.paper" }, children: [
|
|
333
|
+
n.filter((s) => s.children && s.children.length > 0).map((s) => /* @__PURE__ */ e(
|
|
334
334
|
F,
|
|
335
335
|
{
|
|
336
336
|
endIcon: /* @__PURE__ */ e(k, {}),
|
|
337
|
-
isChecked:
|
|
338
|
-
isDisabled: !
|
|
339
|
-
onClick: () => l(
|
|
340
|
-
onToggle: () => r(
|
|
341
|
-
primaryText:
|
|
342
|
-
secondaryText:
|
|
337
|
+
isChecked: s.is_enabled,
|
|
338
|
+
isDisabled: !s.is_enabled,
|
|
339
|
+
onClick: () => l(s.guid),
|
|
340
|
+
onToggle: () => r(s),
|
|
341
|
+
primaryText: s.label,
|
|
342
|
+
secondaryText: s.is_enabled ? s.deliveryMethodsLabel : void 0
|
|
343
343
|
},
|
|
344
|
-
|
|
344
|
+
s.guid
|
|
345
345
|
)),
|
|
346
346
|
/* @__PURE__ */ e(
|
|
347
347
|
J,
|
|
@@ -362,21 +362,21 @@ const ye = x(() => {
|
|
|
362
362
|
}), q = x(({ profile: n }) => {
|
|
363
363
|
const { settings: t } = D(), {
|
|
364
364
|
clientCommunicationProfile: {
|
|
365
|
-
email_notifications_enabled:
|
|
365
|
+
email_notifications_enabled: o,
|
|
366
366
|
push_notifications_enabled: l,
|
|
367
367
|
sms_notifications_enabled: i
|
|
368
368
|
},
|
|
369
369
|
updateNotificationProfile: r,
|
|
370
370
|
userCommunicationsProfile: {
|
|
371
371
|
opted_out_of_email_notifications: a,
|
|
372
|
-
opted_out_of_push_notifications:
|
|
372
|
+
opted_out_of_push_notifications: s,
|
|
373
373
|
opted_out_of_sms_notifications: d
|
|
374
374
|
}
|
|
375
|
-
} = T(), { user: m } = w(), [
|
|
375
|
+
} = T(), { user: m } = w(), [_, u] = f.useState(!1), g = async () => {
|
|
376
376
|
await p({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && u(!1);
|
|
377
377
|
}, p = async (S) => {
|
|
378
378
|
await r(S);
|
|
379
|
-
}, y =
|
|
379
|
+
}, y = o || i || l;
|
|
380
380
|
return /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
381
381
|
/* @__PURE__ */ e(
|
|
382
382
|
F,
|
|
@@ -386,21 +386,21 @@ const ye = x(() => {
|
|
|
386
386
|
{
|
|
387
387
|
sx: {
|
|
388
388
|
transition: "transform 0.3s ease-in-out",
|
|
389
|
-
transform:
|
|
389
|
+
transform: _ ? "rotate(180deg)" : "rotate(0deg)"
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
) : void 0,
|
|
393
393
|
isChecked: n.is_enabled,
|
|
394
394
|
isDisabled: !n.is_enabled,
|
|
395
|
-
onClick: () => u(!
|
|
395
|
+
onClick: () => u(!_),
|
|
396
396
|
onToggle: () => g(),
|
|
397
397
|
primaryText: n.label,
|
|
398
398
|
secondaryText: n.is_enabled ? n.deliveryMethodsLabel : void 0
|
|
399
399
|
},
|
|
400
400
|
n.guid
|
|
401
401
|
),
|
|
402
|
-
y && /* @__PURE__ */ e(
|
|
403
|
-
|
|
402
|
+
y && /* @__PURE__ */ e(_e, { in: _, children: /* @__PURE__ */ c(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
403
|
+
o && /* @__PURE__ */ e(
|
|
404
404
|
P,
|
|
405
405
|
{
|
|
406
406
|
isChecked: !a && n.email_channel && !!m.email,
|
|
@@ -412,7 +412,7 @@ const ye = x(() => {
|
|
|
412
412
|
primaryText: t.delivery_method_email_label
|
|
413
413
|
}
|
|
414
414
|
),
|
|
415
|
-
|
|
415
|
+
o && (i || l) && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
416
416
|
i && /* @__PURE__ */ e(
|
|
417
417
|
P,
|
|
418
418
|
{
|
|
@@ -429,8 +429,8 @@ const ye = x(() => {
|
|
|
429
429
|
l && /* @__PURE__ */ e(
|
|
430
430
|
P,
|
|
431
431
|
{
|
|
432
|
-
isChecked: !
|
|
433
|
-
isDisabled:
|
|
432
|
+
isChecked: !s && n.push_channel,
|
|
433
|
+
isDisabled: s,
|
|
434
434
|
onToggle: () => p({
|
|
435
435
|
...n,
|
|
436
436
|
push_channel: !n.push_channel
|
|
@@ -443,23 +443,23 @@ const ye = x(() => {
|
|
|
443
443
|
] }, n.guid);
|
|
444
444
|
}), z = x(() => {
|
|
445
445
|
const { budgetProfiles: n } = T();
|
|
446
|
-
return /* @__PURE__ */ e(
|
|
446
|
+
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
|
|
447
447
|
}), Te = x(() => {
|
|
448
448
|
const { onEvent: n } = ae(), { settings: t } = D(), {
|
|
449
|
-
clientCommunicationProfile:
|
|
449
|
+
clientCommunicationProfile: o,
|
|
450
450
|
updateUserCommunicationProfile: l,
|
|
451
451
|
userCommunicationsProfile: i
|
|
452
|
-
} = T(), { user: r } = w(), a = async (
|
|
453
|
-
const m = { ...i, [
|
|
452
|
+
} = T(), { user: r } = w(), a = async (s, d) => {
|
|
453
|
+
const m = { ...i, [s]: d };
|
|
454
454
|
if (n) {
|
|
455
|
-
const u =
|
|
455
|
+
const u = s.split("_")[3];
|
|
456
456
|
d === !1 ? n("opt_in_notification_method", { notificationType: u }) : n("opt_out_notification_method", { notificationType: u });
|
|
457
457
|
}
|
|
458
458
|
await l(m);
|
|
459
459
|
};
|
|
460
|
-
return /* @__PURE__ */ c(
|
|
460
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
461
461
|
/* @__PURE__ */ e(U, { sx: { mt: 24 }, children: t.delivery_method_title }),
|
|
462
|
-
|
|
462
|
+
o.email_notifications_enabled && /* @__PURE__ */ c(M, { children: [
|
|
463
463
|
/* @__PURE__ */ e(
|
|
464
464
|
P,
|
|
465
465
|
{
|
|
@@ -474,9 +474,9 @@ const ye = x(() => {
|
|
|
474
474
|
useExtraPadding: !1
|
|
475
475
|
}
|
|
476
476
|
),
|
|
477
|
-
(
|
|
477
|
+
(o.sms_notifications_enabled || o.push_notifications_enabled) && /* @__PURE__ */ e(v, {})
|
|
478
478
|
] }),
|
|
479
|
-
|
|
479
|
+
o.sms_notifications_enabled && /* @__PURE__ */ c(M, { children: [
|
|
480
480
|
/* @__PURE__ */ e(
|
|
481
481
|
P,
|
|
482
482
|
{
|
|
@@ -488,9 +488,9 @@ const ye = x(() => {
|
|
|
488
488
|
useExtraPadding: !1
|
|
489
489
|
}
|
|
490
490
|
),
|
|
491
|
-
|
|
491
|
+
o.push_notifications_enabled && /* @__PURE__ */ e(v, {})
|
|
492
492
|
] }),
|
|
493
|
-
|
|
493
|
+
o.push_notifications_enabled && /* @__PURE__ */ e(
|
|
494
494
|
P,
|
|
495
495
|
{
|
|
496
496
|
isChecked: !i.opted_out_of_push_notifications,
|
|
@@ -502,30 +502,30 @@ const ye = x(() => {
|
|
|
502
502
|
useExtraPadding: !1
|
|
503
503
|
}
|
|
504
504
|
),
|
|
505
|
-
|
|
505
|
+
o.sms_notifications_enabled && /* @__PURE__ */ e(ue, { sx: { backgroundColor: "background.default", mt: 12 }, variant: "outlined", children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ c(h, { alignItems: "flex-start", direction: "row", gap: 6, children: [
|
|
506
506
|
/* @__PURE__ */ e(Q, { color: "primary", filled: !0 }),
|
|
507
507
|
/* @__PURE__ */ e(b, { sx: { whiteSpace: "wrap" }, variant: "XSmall", children: t.delivery_method_sms_note_1 })
|
|
508
508
|
] }) }) })
|
|
509
509
|
] });
|
|
510
510
|
}), $ = x(() => {
|
|
511
511
|
const { insightsProfiles: n } = T();
|
|
512
|
-
return /* @__PURE__ */ e(
|
|
512
|
+
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
|
|
513
513
|
}), Pe = () => {
|
|
514
|
-
const { config: n } = W(), [t, { width:
|
|
514
|
+
const { config: n } = W(), [t, { width: o }] = fe(), { common: l, settings: i } = D(), { updateUser: r } = T(), { user: a } = w(), [s, d] = f.useState(!1), [m, _] = f.useState({
|
|
515
515
|
email: a.email,
|
|
516
516
|
phone: a.phone
|
|
517
|
-
}), u = m.email && !a.email_is_verified && !
|
|
517
|
+
}), u = m.email && !a.email_is_verified && !s, g = m.phone && !a.phone_is_verified && !s, p = (S) => {
|
|
518
518
|
const { name: A, value: I } = S.target, j = { ...m, [A]: I };
|
|
519
|
-
|
|
519
|
+
_(j), d(JSON.stringify({ ...a, ...j }) !== JSON.stringify(a));
|
|
520
520
|
}, y = async () => {
|
|
521
521
|
await r({ ...a, ...m }), d(!1);
|
|
522
522
|
};
|
|
523
|
-
return /* @__PURE__ */ c(
|
|
523
|
+
return /* @__PURE__ */ c(h, { ref: t, children: [
|
|
524
524
|
/* @__PURE__ */ e(v, {}),
|
|
525
|
-
/* @__PURE__ */ c(
|
|
525
|
+
/* @__PURE__ */ c(h, { sx: { pt: 12 }, children: [
|
|
526
526
|
/* @__PURE__ */ e(U, { sx: { lineHeight: "20px", pb: 4, pt: 16 }, children: i.personal_details }),
|
|
527
|
-
/* @__PURE__ */ c(
|
|
528
|
-
n.display_email_edit_field_in_settings && /* @__PURE__ */ c(
|
|
527
|
+
/* @__PURE__ */ c(h, { sx: { flexDirection: o <= 768 ? "column" : "row", gap: 24, py: 16 }, children: [
|
|
528
|
+
n.display_email_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { flex: 1, pb: 14 }, children: [
|
|
529
529
|
/* @__PURE__ */ e(
|
|
530
530
|
L,
|
|
531
531
|
{
|
|
@@ -552,7 +552,7 @@ const ye = x(() => {
|
|
|
552
552
|
}
|
|
553
553
|
)
|
|
554
554
|
] }),
|
|
555
|
-
n.display_sms_edit_field_in_settings && /* @__PURE__ */ c(
|
|
555
|
+
n.display_sms_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { flex: 1, pb: 14 }, children: [
|
|
556
556
|
/* @__PURE__ */ e(
|
|
557
557
|
L,
|
|
558
558
|
{
|
|
@@ -583,7 +583,7 @@ const ye = x(() => {
|
|
|
583
583
|
/* @__PURE__ */ e(
|
|
584
584
|
R,
|
|
585
585
|
{
|
|
586
|
-
disabled: !
|
|
586
|
+
disabled: !s,
|
|
587
587
|
onClick: y,
|
|
588
588
|
sx: { width: 84 },
|
|
589
589
|
variant: "contained",
|
|
@@ -593,30 +593,30 @@ const ye = x(() => {
|
|
|
593
593
|
] })
|
|
594
594
|
] });
|
|
595
595
|
}, De = x(Pe), st = x(
|
|
596
|
-
({ notificationTypes: n = [], showPersonalDetails: t = !1, view:
|
|
597
|
-
const { config: l } = W(), { settings: i } = D(), { isInitialized: r } = ce(), { clientCommunicationProfile: a, loadNotificationProfiles:
|
|
596
|
+
({ notificationTypes: n = [], showPersonalDetails: t = !1, view: o }) => {
|
|
597
|
+
const { config: l } = W(), { settings: i } = D(), { isInitialized: r } = ce(), { clientCommunicationProfile: a, loadNotificationProfiles: s } = T(), [d, m] = f.useState(
|
|
598
598
|
void 0
|
|
599
599
|
);
|
|
600
|
-
if (f.useEffect(() => {
|
|
601
|
-
r &&
|
|
600
|
+
if (console.log("view from NotificationSettings component", o, typeof o), f.useEffect(() => {
|
|
601
|
+
r && s().finally();
|
|
602
602
|
}, [r]), !r)
|
|
603
603
|
return /* @__PURE__ */ e(ge, {});
|
|
604
|
-
let
|
|
605
|
-
d === C.Budgets ?
|
|
604
|
+
let _ = i.manage_account_notifications;
|
|
605
|
+
d === C.Budgets ? _ = i.manage_budget_notifications : d === C.Insights && (_ = i.manage_insights_notifications);
|
|
606
606
|
const {
|
|
607
607
|
email_notifications_enabled: u,
|
|
608
608
|
sms_notifications_enabled: g,
|
|
609
609
|
push_notifications_enabled: p
|
|
610
610
|
} = a, y = u || g || p;
|
|
611
|
-
if (
|
|
611
|
+
if (o === "accounts")
|
|
612
612
|
return /* @__PURE__ */ e(H, {});
|
|
613
|
-
if (
|
|
613
|
+
if (o === "budgets")
|
|
614
614
|
return /* @__PURE__ */ e(z, {});
|
|
615
|
-
if (
|
|
616
|
-
return /* @__PURE__ */ e($, {});
|
|
615
|
+
if (o === "insights")
|
|
616
|
+
return console.log("view is insights"), /* @__PURE__ */ e($, {});
|
|
617
617
|
const S = l.display_email_edit_field_in_settings || l.display_sms_edit_field_in_settings, A = t && a.can_edit_contact_info && S;
|
|
618
|
-
return /* @__PURE__ */ c(
|
|
619
|
-
/* @__PURE__ */ c(
|
|
618
|
+
return /* @__PURE__ */ c(h, { sx: { pt: y ? 0 : 24 }, children: [
|
|
619
|
+
/* @__PURE__ */ c(h, { sx: { px: 24 }, children: [
|
|
620
620
|
y && /* @__PURE__ */ c(M, { children: [
|
|
621
621
|
/* @__PURE__ */ e(Te, {}),
|
|
622
622
|
/* @__PURE__ */ e(v, { sx: { my: 24 } })
|
|
@@ -624,27 +624,27 @@ const ye = x(() => {
|
|
|
624
624
|
/* @__PURE__ */ e(U, { sx: { mb: 4 }, children: i.notification_types_title })
|
|
625
625
|
] }),
|
|
626
626
|
/* @__PURE__ */ c(E, { children: [
|
|
627
|
-
n.includes(C.Accounts) && /* @__PURE__ */ e(
|
|
628
|
-
/* @__PURE__ */ e(
|
|
627
|
+
n.includes(C.Accounts) && /* @__PURE__ */ e(N, { children: /* @__PURE__ */ c(V, { onClick: () => m(C.Accounts), children: [
|
|
628
|
+
/* @__PURE__ */ e(O, { primary: i.accounts_title, secondary: i.accounts_subtitle }),
|
|
629
629
|
/* @__PURE__ */ e(k, {})
|
|
630
630
|
] }) }),
|
|
631
|
-
n.includes(C.Budgets) && /* @__PURE__ */ e(
|
|
632
|
-
/* @__PURE__ */ e(
|
|
631
|
+
n.includes(C.Budgets) && /* @__PURE__ */ e(N, { children: /* @__PURE__ */ c(V, { onClick: () => m(C.Budgets), children: [
|
|
632
|
+
/* @__PURE__ */ e(O, { primary: i.budgets_title, secondary: i.budgets_subtitle }),
|
|
633
633
|
/* @__PURE__ */ e(k, {})
|
|
634
634
|
] }) }),
|
|
635
|
-
n.includes(C.Insights) && /* @__PURE__ */ e(
|
|
636
|
-
/* @__PURE__ */ e(
|
|
635
|
+
n.includes(C.Insights) && /* @__PURE__ */ e(N, { children: /* @__PURE__ */ c(V, { onClick: () => m(C.Insights), children: [
|
|
636
|
+
/* @__PURE__ */ e(O, { primary: i.insights_title, secondary: i.insights_subtitle }),
|
|
637
637
|
/* @__PURE__ */ e(k, {})
|
|
638
638
|
] }) })
|
|
639
639
|
] }),
|
|
640
|
-
A && /* @__PURE__ */ e(
|
|
640
|
+
A && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(De, {}) }),
|
|
641
641
|
/* @__PURE__ */ e(
|
|
642
642
|
J,
|
|
643
643
|
{
|
|
644
644
|
isOpen: !!d,
|
|
645
645
|
onClose: () => m(void 0),
|
|
646
|
-
title:
|
|
647
|
-
children: /* @__PURE__ */ c(
|
|
646
|
+
title: _,
|
|
647
|
+
children: /* @__PURE__ */ c(h, { children: [
|
|
648
648
|
d === C.Accounts && /* @__PURE__ */ e(H, {}),
|
|
649
649
|
d === C.Budgets && /* @__PURE__ */ e(z, {}),
|
|
650
650
|
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-ClJT-Sg3.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-ClJT-Sg3.mjs";
|
|
20
|
+
import { A as Yt, B as qt, I as Qt } from "../NotificationSettings-ClJT-Sg3.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";
|