@mx-cartographer/experiences 7.0.27-alpha.sms4 → 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,10 +1,10 @@
|
|
|
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";
|
|
5
5
|
import E from "@mui/material/List";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import O from "@mui/material/ListItem";
|
|
7
|
+
import N from "@mui/material/ListItemText";
|
|
8
8
|
import V from "@mui/material/ListItemButton";
|
|
9
9
|
import h from "@mui/material/Stack";
|
|
10
10
|
import { ChevronRight as k, ExpandMore as K, Star as Q } from "@mxenabled/mx-icons";
|
|
@@ -15,8 +15,8 @@ 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";
|
|
@@ -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:
|
|
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
|
] }),
|
|
@@ -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: o,
|
|
51
|
+
onPrimaryAction: s,
|
|
52
|
+
onSecondaryAction: o,
|
|
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__ */
|
|
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 })
|
|
@@ -81,18 +81,18 @@ const ye = x(() => {
|
|
|
81
81
|
)
|
|
82
82
|
] });
|
|
83
83
|
}), be = x(
|
|
84
|
-
({ handleClose: n, handleVerify: t, isOpen:
|
|
85
|
-
const { common:
|
|
84
|
+
({ handleClose: n, handleVerify: t, isOpen: s }) => {
|
|
85
|
+
const { common: c, 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: s,
|
|
91
91
|
onClose: n,
|
|
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,26 +101,26 @@ const ye = x(() => {
|
|
|
101
101
|
justifyContent: "flex-end"
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
|
-
children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(L, { onChange: (
|
|
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:
|
|
110
|
-
|
|
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
|
+
o(!1);
|
|
111
111
|
}, u = () => {
|
|
112
|
-
|
|
112
|
+
o(!0);
|
|
113
113
|
}, g = () => {
|
|
114
|
-
|
|
114
|
+
s().finally(() => {
|
|
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
|
] }),
|
|
@@ -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:
|
|
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,14 +207,14 @@ const ye = x(() => {
|
|
|
207
207
|
B,
|
|
208
208
|
{
|
|
209
209
|
copy: {
|
|
210
|
-
title: a ?
|
|
211
|
-
close_aria:
|
|
210
|
+
title: a ? c.day_of_the_month : i.notification_threshold_label,
|
|
211
|
+
close_aria: s.close_aria
|
|
212
212
|
},
|
|
213
213
|
disablePrimaryButton: a && u === 0,
|
|
214
|
-
isOpen:
|
|
214
|
+
isOpen: o,
|
|
215
215
|
onClose: () => d(!1),
|
|
216
216
|
onPrimaryAction: A,
|
|
217
|
-
primaryText:
|
|
217
|
+
primaryText: s.save_button,
|
|
218
218
|
children: a ? /* @__PURE__ */ e(ne, { dateAdapter: ie, children: /* @__PURE__ */ e(
|
|
219
219
|
te,
|
|
220
220
|
{
|
|
@@ -253,7 +253,7 @@ const ye = x(() => {
|
|
|
253
253
|
}
|
|
254
254
|
), ve = x(
|
|
255
255
|
({ onUpdateProfile: n, profile: t }) => {
|
|
256
|
-
const { settings:
|
|
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
259
|
opted_out_of_sms_notifications: _
|
|
@@ -262,18 +262,18 @@ const ye = x(() => {
|
|
|
262
262
|
push_notifications_enabled: g,
|
|
263
263
|
sms_notifications_enabled: p
|
|
264
264
|
} = i;
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
-
(u || p || g) && /* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */ e(b, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children:
|
|
268
|
-
/* @__PURE__ */
|
|
265
|
+
return /* @__PURE__ */ l(h, { children: [
|
|
266
|
+
(u || p || g) && /* @__PURE__ */ l(M, { children: [
|
|
267
|
+
/* @__PURE__ */ e(b, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: s.delivery_method_title }),
|
|
268
|
+
/* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
269
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
|
-
primaryText:
|
|
276
|
-
secondaryText: d || !t.email_channel || !
|
|
275
|
+
primaryText: s.delivery_method_email_label,
|
|
276
|
+
secondaryText: d || !t.email_channel || !c.email ? s.notification_disabled : s.notification_enabled,
|
|
277
277
|
useExtraPadding: !1
|
|
278
278
|
}
|
|
279
279
|
) }),
|
|
@@ -281,11 +281,11 @@ const ye = x(() => {
|
|
|
281
281
|
p && /* @__PURE__ */ e(h, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
|
|
282
282
|
P,
|
|
283
283
|
{
|
|
284
|
-
isChecked: !_ && t.sms_channel && !!
|
|
285
|
-
isDisabled: _ || !
|
|
284
|
+
isChecked: !_ && t.sms_channel && !!c.phone,
|
|
285
|
+
isDisabled: _ || !c.phone,
|
|
286
286
|
onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
|
|
287
|
-
primaryText: `${
|
|
288
|
-
secondaryText: _ || !t.sms_channel || !
|
|
287
|
+
primaryText: `${s.delivery_method_sms_label}`,
|
|
288
|
+
secondaryText: _ || !t.sms_channel || !c.phone ? s.notification_disabled : s.notification_enabled,
|
|
289
289
|
useExtraPadding: !1
|
|
290
290
|
}
|
|
291
291
|
) }),
|
|
@@ -296,16 +296,16 @@ const ye = x(() => {
|
|
|
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: s.delivery_method_push_label,
|
|
300
|
+
secondaryText: s.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
|
+
o && !!t.children?.length && /* @__PURE__ */ l(h, { children: [
|
|
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,
|
|
311
311
|
{
|
|
@@ -318,36 +318,36 @@ 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(), [s, c] = f.useState(""), i = f.useMemo(
|
|
322
|
+
() => n.find((o) => o.guid === s),
|
|
323
|
+
[n, s]
|
|
324
|
+
), r = async (o) => {
|
|
325
325
|
await t({
|
|
326
|
-
...
|
|
327
|
-
is_enabled: !
|
|
326
|
+
...o,
|
|
327
|
+
is_enabled: !o.is_enabled
|
|
328
328
|
});
|
|
329
|
-
}, a = async (
|
|
330
|
-
await t(
|
|
329
|
+
}, a = async (o) => {
|
|
330
|
+
await t(o);
|
|
331
331
|
};
|
|
332
|
-
return /* @__PURE__ */
|
|
333
|
-
n.filter((
|
|
332
|
+
return /* @__PURE__ */ l(h, { sx: { backgroundColor: "background.paper" }, children: [
|
|
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
|
-
isChecked:
|
|
338
|
-
isDisabled: !
|
|
339
|
-
onClick: () =>
|
|
340
|
-
onToggle: () => r(
|
|
341
|
-
primaryText:
|
|
342
|
-
secondaryText:
|
|
337
|
+
isChecked: o.is_enabled,
|
|
338
|
+
isDisabled: !o.is_enabled,
|
|
339
|
+
onClick: () => c(o.guid),
|
|
340
|
+
onToggle: () => r(o),
|
|
341
|
+
primaryText: o.label,
|
|
342
|
+
secondaryText: o.is_enabled ? o.deliveryMethodsLabel : void 0
|
|
343
343
|
},
|
|
344
|
-
|
|
344
|
+
o.guid
|
|
345
345
|
)),
|
|
346
346
|
/* @__PURE__ */ e(
|
|
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,
|
|
@@ -362,22 +362,24 @@ const ye = x(() => {
|
|
|
362
362
|
}), q = x(({ profile: n }) => {
|
|
363
363
|
const { settings: t } = D(), {
|
|
364
364
|
clientCommunicationProfile: {
|
|
365
|
-
email_notifications_enabled:
|
|
366
|
-
push_notifications_enabled:
|
|
365
|
+
email_notifications_enabled: s,
|
|
366
|
+
push_notifications_enabled: c,
|
|
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: 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 =
|
|
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
|
{
|
|
@@ -399,8 +401,8 @@ const ye = x(() => {
|
|
|
399
401
|
},
|
|
400
402
|
n.guid
|
|
401
403
|
),
|
|
402
|
-
y && /* @__PURE__ */ e(_e, { in: _, children: /* @__PURE__ */
|
|
403
|
-
|
|
404
|
+
y && /* @__PURE__ */ e(_e, { in: _, children: /* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
|
|
405
|
+
s && /* @__PURE__ */ e(
|
|
404
406
|
P,
|
|
405
407
|
{
|
|
406
408
|
isChecked: !a && n.email_channel && !!m.email,
|
|
@@ -412,7 +414,7 @@ const ye = x(() => {
|
|
|
412
414
|
primaryText: t.delivery_method_email_label
|
|
413
415
|
}
|
|
414
416
|
),
|
|
415
|
-
|
|
417
|
+
s && (i || c) && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
|
|
416
418
|
i && /* @__PURE__ */ e(
|
|
417
419
|
P,
|
|
418
420
|
{
|
|
@@ -425,12 +427,12 @@ 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
|
-
isChecked: !
|
|
433
|
-
isDisabled:
|
|
434
|
+
isChecked: !o && n.push_channel,
|
|
435
|
+
isDisabled: o,
|
|
434
436
|
onToggle: () => p({
|
|
435
437
|
...n,
|
|
436
438
|
push_channel: !n.push_channel
|
|
@@ -446,20 +448,20 @@ const ye = x(() => {
|
|
|
446
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
|
-
clientCommunicationProfile:
|
|
450
|
-
updateUserCommunicationProfile:
|
|
451
|
+
clientCommunicationProfile: s,
|
|
452
|
+
updateUserCommunicationProfile: c,
|
|
451
453
|
userCommunicationsProfile: i
|
|
452
|
-
} = T(), { user: r } = w(), a = async (
|
|
453
|
-
const m = { ...i, [
|
|
454
|
+
} = T(), { user: r } = w(), a = async (o, d) => {
|
|
455
|
+
const m = { ...i, [o]: d };
|
|
454
456
|
if (n) {
|
|
455
|
-
const u =
|
|
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
|
-
|
|
464
|
+
s.email_notifications_enabled && /* @__PURE__ */ l(M, { children: [
|
|
463
465
|
/* @__PURE__ */ e(
|
|
464
466
|
P,
|
|
465
467
|
{
|
|
@@ -474,9 +476,9 @@ const ye = x(() => {
|
|
|
474
476
|
useExtraPadding: !1
|
|
475
477
|
}
|
|
476
478
|
),
|
|
477
|
-
(
|
|
479
|
+
(s.sms_notifications_enabled || s.push_notifications_enabled) && /* @__PURE__ */ e(v, {})
|
|
478
480
|
] }),
|
|
479
|
-
|
|
481
|
+
s.sms_notifications_enabled && /* @__PURE__ */ l(M, { children: [
|
|
480
482
|
/* @__PURE__ */ e(
|
|
481
483
|
P,
|
|
482
484
|
{
|
|
@@ -488,9 +490,9 @@ const ye = x(() => {
|
|
|
488
490
|
useExtraPadding: !1
|
|
489
491
|
}
|
|
490
492
|
),
|
|
491
|
-
|
|
493
|
+
s.push_notifications_enabled && /* @__PURE__ */ e(v, {})
|
|
492
494
|
] }),
|
|
493
|
-
|
|
495
|
+
s.push_notifications_enabled && /* @__PURE__ */ e(
|
|
494
496
|
P,
|
|
495
497
|
{
|
|
496
498
|
isChecked: !i.opted_out_of_push_notifications,
|
|
@@ -502,30 +504,30 @@ const ye = x(() => {
|
|
|
502
504
|
useExtraPadding: !1
|
|
503
505
|
}
|
|
504
506
|
),
|
|
505
|
-
|
|
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(h, { children: n.map((t) => /* @__PURE__ */ e(q, { profile: t }, t.guid)) });
|
|
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:
|
|
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
|
-
}), u = m.email && !a.email_is_verified && !
|
|
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
|
{
|
|
@@ -583,22 +585,22 @@ const ye = x(() => {
|
|
|
583
585
|
/* @__PURE__ */ e(
|
|
584
586
|
R,
|
|
585
587
|
{
|
|
586
|
-
disabled: !
|
|
588
|
+
disabled: !o,
|
|
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
|
-
({ notificationTypes: n = [], showPersonalDetails: t = !1, view:
|
|
597
|
-
const { config:
|
|
598
|
+
({ notificationTypes: n = [], showPersonalDetails: t = !1, view: s }) => {
|
|
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
|
-
if (
|
|
601
|
-
r &&
|
|
602
|
+
if (f.useEffect(() => {
|
|
603
|
+
r && o().finally();
|
|
602
604
|
}, [r]), !r)
|
|
603
605
|
return /* @__PURE__ */ e(ge, {});
|
|
604
606
|
let _ = i.manage_account_notifications;
|
|
@@ -608,32 +610,32 @@ const ye = x(() => {
|
|
|
608
610
|
sms_notifications_enabled: g,
|
|
609
611
|
push_notifications_enabled: p
|
|
610
612
|
} = a, y = u || g || p;
|
|
611
|
-
if (
|
|
613
|
+
if (s === "accounts")
|
|
612
614
|
return /* @__PURE__ */ e(H, {});
|
|
613
|
-
if (
|
|
615
|
+
if (s === "budgets")
|
|
614
616
|
return /* @__PURE__ */ e(z, {});
|
|
615
|
-
if (
|
|
617
|
+
if (s === "insights")
|
|
616
618
|
return console.log("view is insights"), /* @__PURE__ */ e($, {});
|
|
617
|
-
const S =
|
|
618
|
-
return /* @__PURE__ */
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
y && /* @__PURE__ */
|
|
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(
|
|
628
|
-
/* @__PURE__ */ e(
|
|
628
|
+
/* @__PURE__ */ l(E, { children: [
|
|
629
|
+
n.includes(C.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => m(C.Accounts), children: [
|
|
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(
|
|
632
|
-
/* @__PURE__ */ e(
|
|
633
|
+
n.includes(C.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => m(C.Budgets), children: [
|
|
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(
|
|
636
|
-
/* @__PURE__ */ e(
|
|
637
|
+
n.includes(C.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => m(C.Insights), children: [
|
|
638
|
+
/* @__PURE__ */ e(N, { primary: i.insights_title, secondary: i.insights_subtitle }),
|
|
637
639
|
/* @__PURE__ */ e(k, {})
|
|
638
640
|
] }) })
|
|
639
641
|
] }),
|
|
@@ -644,7 +646,7 @@ const ye = x(() => {
|
|
|
644
646
|
isOpen: !!d,
|
|
645
647
|
onClose: () => m(void 0),
|
|
646
648
|
title: _,
|
|
647
|
-
children: /* @__PURE__ */
|
|
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, {}) }) });
|