@mx-cartographer/experiences 9.2.9-alpha.al4 → 9.2.9
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 +4 -0
- package/dist/{AccountDetailsDrawer-CwDPr4i5.mjs → AccountDetailsDrawer-uaxiCVOl.mjs} +2 -2
- package/dist/{AccountDetailsDrawer-CwDPr4i5.mjs.map → AccountDetailsDrawer-uaxiCVOl.mjs.map} +1 -1
- package/dist/{Analytics-DST_WxYZ.mjs → Analytics-B8AaC22u.mjs} +2 -2
- package/dist/{Analytics-DST_WxYZ.mjs.map → Analytics-B8AaC22u.mjs.map} +1 -1
- package/dist/{ApiEndpoints-YY8ajnnd.mjs → ApiEndpoints-DXwIYNUV.mjs} +1 -2
- package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
- package/dist/{CategorySelectorDrawer-NJsFsKP1.mjs → CategorySelectorDrawer-BYeVJ_kO.mjs} +94 -86
- package/dist/{CategorySelectorDrawer-NJsFsKP1.mjs.map → CategorySelectorDrawer-BYeVJ_kO.mjs.map} +1 -1
- package/dist/{GlobalCopyApi-DNC5K2QG.mjs → GlobalCopyApi-CLhyon-B.mjs} +2 -2
- package/dist/{GlobalCopyApi-DNC5K2QG.mjs.map → GlobalCopyApi-CLhyon-B.mjs.map} +1 -1
- package/dist/{ManageIncome-Br11zvAT.mjs → ManageIncome-CtD65bN_.mjs} +3 -3
- package/dist/{ManageIncome-Br11zvAT.mjs.map → ManageIncome-CtD65bN_.mjs.map} +1 -1
- package/dist/{NotificationSettings-DXYTQcTs.mjs → NotificationSettings-CW7okUrk.mjs} +127 -117
- package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
- package/dist/{RecurringSettings-BkRz-uzd.mjs → RecurringSettings-BM2bQfSY.mjs} +2 -2
- package/dist/{RecurringSettings-BkRz-uzd.mjs.map → RecurringSettings-BM2bQfSY.mjs.map} +1 -1
- package/dist/{TransactionDetails-CLc7oeHT.mjs → TransactionDetails-Bo0rVT-L.mjs} +2 -2
- package/dist/{TransactionDetails-CLc7oeHT.mjs.map → TransactionDetails-Bo0rVT-L.mjs.map} +1 -1
- package/dist/{UserStore-cI7SJMs_.mjs → UserStore-CgsAunf1.mjs} +145 -166
- package/dist/UserStore-CgsAunf1.mjs.map +1 -0
- package/dist/{ViewMoreMicroCard-Bx9xa2z5.mjs → ViewMoreMicroCard-B4oeGrbE.mjs} +3 -3
- package/dist/{ViewMoreMicroCard-Bx9xa2z5.mjs.map → ViewMoreMicroCard-B4oeGrbE.mjs.map} +1 -1
- package/dist/accounts/index.es.js +2 -2
- package/dist/budgets/index.es.js +3 -3
- package/dist/cashflow/index.es.js +3 -3
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +2 -2
- package/dist/core/api/SettingsApi.d.ts +0 -4
- package/dist/core/constants/ApiEndpoints.d.ts +0 -1
- package/dist/core/index.es.js +4 -4
- package/dist/core/stores/SettingsStore.d.ts +0 -4
- package/dist/core/types/localization/SettingsCopy.d.ts +0 -6
- package/dist/finstrong/index.es.js +2 -2
- package/dist/microinsights/index.es.js +1 -1
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +4 -4
- package/dist/settings/components/profile/ProfileTab.d.ts +1 -1
- package/dist/settings/index.es.js +405 -468
- package/dist/settings/index.es.js.map +1 -1
- package/dist/spending/index.es.js +1 -1
- package/dist/transactions/index.es.js +3 -3
- package/dist/trends/index.es.js +2 -2
- package/package.json +1 -1
- package/dist/ApiEndpoints-YY8ajnnd.mjs.map +0 -1
- package/dist/NotificationSettings-DXYTQcTs.mjs.map +0 -1
- package/dist/UserStore-cI7SJMs_.mjs.map +0 -1
- package/dist/settings/components/profile/actions/ResetPasswordAction.d.ts +0 -4
|
@@ -1,234 +1,171 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as c, Fragment as X, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
3
|
import { observer as C } from "mobx-react-lite";
|
|
4
4
|
import p from "@mui/material/Stack";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { getUnixTime as
|
|
10
|
-
import { AdapterDateFns as
|
|
11
|
-
import { DatePicker as
|
|
12
|
-
import { LocalizationProvider as
|
|
13
|
-
import { useTheme as
|
|
5
|
+
import ue from "@mui/material/Tab";
|
|
6
|
+
import pe from "@mui/material/Tabs";
|
|
7
|
+
import he from "@mui/material/Alert";
|
|
8
|
+
import fe from "@mui/material/Snackbar";
|
|
9
|
+
import { getUnixTime as _e } from "date-fns/getUnixTime";
|
|
10
|
+
import { AdapterDateFns as ge } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
11
|
+
import { DatePicker as be } from "@mui/x-date-pickers";
|
|
12
|
+
import { LocalizationProvider as ye } from "@mui/x-date-pickers/LocalizationProvider";
|
|
13
|
+
import { useTheme as L, alpha as W } from "@mui/material/styles";
|
|
14
14
|
import z from "@mui/material/Box";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import N from "
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import { u as A, A as I, i as G, C as Ce, a as ie, l as j } from "../hooks-97sNJ_lf.mjs";
|
|
22
|
-
import { D as U } from "../Dialog-Bvd2n8hz.mjs";
|
|
23
|
-
import { V as we, a as De, N as J } from "../NotificationSettings-DXYTQcTs.mjs";
|
|
24
|
-
import { A as Xt, B as eo, I as to } from "../NotificationSettings-DXYTQcTs.mjs";
|
|
15
|
+
import Z from "@mui/material/Button";
|
|
16
|
+
import I from "@mui/material/TextField";
|
|
17
|
+
import { H3 as Y, P as M, Text as x, Icon as B } from "@mxenabled/mxui";
|
|
18
|
+
import { V as xe, a as ve, N as J } from "../NotificationSettings-CW7okUrk.mjs";
|
|
19
|
+
import { A as Jt, B as Kt, I as Yt } from "../NotificationSettings-CW7okUrk.mjs";
|
|
20
|
+
import { u as k, i as G, A as E, C as Ce, a as ee, l as j } from "../hooks-97sNJ_lf.mjs";
|
|
25
21
|
import { u as F } from "../useScreenSize-mWpmnh5w.mjs";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
22
|
+
import { D as $ } from "../Dialog-Bvd2n8hz.mjs";
|
|
23
|
+
import { formatDistanceToNow as te } from "date-fns/formatDistanceToNow";
|
|
24
|
+
import { fromUnixTime as oe } from "date-fns/fromUnixTime";
|
|
25
|
+
import O from "@mui/material/IconButton";
|
|
26
|
+
import { DataGridPro as De } from "@mui/x-data-grid-pro";
|
|
29
27
|
import { b as H } from "../Localization-DnoVyBNK.mjs";
|
|
30
28
|
import { H as V } from "../HeaderCell-P8w6CmfO.mjs";
|
|
31
29
|
import ke from "@mui/material/Accordion";
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import { L as
|
|
35
|
-
import
|
|
30
|
+
import we from "@mui/material/AccordionDetails";
|
|
31
|
+
import Se from "@mui/material/AccordionSummary";
|
|
32
|
+
import { L as ie } from "../Loader-CxeBwuPG.mjs";
|
|
33
|
+
import Te from "@mui/material/List";
|
|
36
34
|
import K from "@mui/material/Divider";
|
|
37
|
-
import
|
|
38
|
-
import { b as
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
35
|
+
import Ae from "@mui/material/ListSubheader";
|
|
36
|
+
import { b as Ie, u as Ee } from "../CategorySelectorDrawer-BYeVJ_kO.mjs";
|
|
37
|
+
import Pe from "@mui/material/ListItem";
|
|
38
|
+
import Re from "@mui/material/ListItemButton";
|
|
39
|
+
import Ne from "@mui/material/ListItemIcon";
|
|
40
|
+
import Me from "@mui/material/ListItemText";
|
|
41
|
+
import { ChevronRight as Le, ChevronLeft as Be } from "@mxenabled/mx-icons";
|
|
42
|
+
import { D as He } from "../Drawer-DsnW2o0v.mjs";
|
|
43
|
+
import { u as ne } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
44
|
+
import { H as Oe } from "../Help-D4sOpItq.mjs";
|
|
46
45
|
import { W as q } from "../WidgetContainer-eosXfD5G.mjs";
|
|
47
|
-
const
|
|
48
|
-
const { common:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */ e(ne, {})
|
|
59
|
-
] }),
|
|
60
|
-
/* @__PURE__ */ e(
|
|
61
|
-
U,
|
|
62
|
-
{
|
|
63
|
-
copy: { title: r.reset_password },
|
|
64
|
-
disablePrimaryButton: !S,
|
|
65
|
-
isOpen: o,
|
|
66
|
-
onClose: v,
|
|
67
|
-
onPrimaryAction: k,
|
|
68
|
-
onSecondaryAction: v,
|
|
69
|
-
primaryText: r.save_password,
|
|
70
|
-
secondaryText: t.cancel_button,
|
|
71
|
-
sx: {
|
|
72
|
-
"& .MuiToolbar-root:last-child": {
|
|
73
|
-
padding: 24,
|
|
74
|
-
justifyContent: "flex-end"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
children: /* @__PURE__ */ m(p, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
78
|
-
/* @__PURE__ */ e(x, { variant: "body1", children: We }),
|
|
79
|
-
/* @__PURE__ */ e(
|
|
80
|
-
P,
|
|
81
|
-
{
|
|
82
|
-
label: r.new_password,
|
|
83
|
-
onChange: (D) => c(D.target.value),
|
|
84
|
-
slotProps: {
|
|
85
|
-
input: {
|
|
86
|
-
endAdornment: /* @__PURE__ */ e(X, { position: "end", children: /* @__PURE__ */ e(N, { edge: "end", onClick: () => h(!d), children: d ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ e(te, {}) }) })
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
type: d ? "text" : "password",
|
|
90
|
-
value: l
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
/* @__PURE__ */ e(
|
|
94
|
-
P,
|
|
95
|
-
{
|
|
96
|
-
label: r.confirm_new_password,
|
|
97
|
-
onChange: (D) => s(D.target.value),
|
|
98
|
-
slotProps: {
|
|
99
|
-
input: {
|
|
100
|
-
endAdornment: /* @__PURE__ */ e(X, { position: "end", children: /* @__PURE__ */ e(
|
|
101
|
-
N,
|
|
102
|
-
{
|
|
103
|
-
edge: "end",
|
|
104
|
-
onClick: () => y(!f),
|
|
105
|
-
children: f ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ e(te, {})
|
|
106
|
-
}
|
|
107
|
-
) })
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
type: f ? "text" : "password",
|
|
111
|
-
value: a
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
] })
|
|
115
|
-
}
|
|
116
|
-
)
|
|
117
|
-
] });
|
|
118
|
-
}), Ge = ({ availableWidth: t, handleOnLeaveClick: r }) => {
|
|
119
|
-
const n = B(), { common: o, settings: i } = A(), { isMobile: l } = F(t), { config: c } = G(), { updateUser: a } = I(), { user: s } = Ce(), [d, h] = u.useState({
|
|
120
|
-
first_name: s.first_name,
|
|
121
|
-
last_name: s.last_name,
|
|
122
|
-
email: s.email,
|
|
123
|
-
phone: s.phone,
|
|
124
|
-
birthday: s.birthday,
|
|
125
|
-
postal_code: s.postal_code,
|
|
126
|
-
credit_score: s.credit_score
|
|
127
|
-
}), [f, y] = u.useState(!1), [S, v] = u.useState(!1), w = u.useRef(null), k = d.email && !s.email_is_verified && !f, D = d.phone && !s.phone_is_verified && !f;
|
|
128
|
-
u.useEffect(() => {
|
|
46
|
+
const Fe = ({ availableWidth: t, handleOnLeavClick: r }) => {
|
|
47
|
+
const i = L(), { common: o, settings: n } = k(), { isDesktop: u, isMobile: s, isSmallMobile: a, isTablet: l } = F(t), { config: b } = G(), { updateUser: _ } = E(), { user: d } = Ce(), [h, w] = m.useState({
|
|
48
|
+
first_name: d.first_name,
|
|
49
|
+
last_name: d.last_name,
|
|
50
|
+
email: d.email,
|
|
51
|
+
phone: d.phone,
|
|
52
|
+
birthday: d.birthday,
|
|
53
|
+
postal_code: d.postal_code,
|
|
54
|
+
credit_score: d.credit_score
|
|
55
|
+
}), [v, S] = m.useState(!1), [A, T] = m.useState(!1), g = m.useRef(null), D = h.email && !d.email_is_verified && !v, U = h.phone && !d.phone_is_verified && !v;
|
|
56
|
+
m.useEffect(() => {
|
|
129
57
|
if (r) {
|
|
130
|
-
const
|
|
131
|
-
|
|
58
|
+
const f = (R) => {
|
|
59
|
+
g.current && !g.current.contains(R.target) && v && T(!0);
|
|
132
60
|
};
|
|
133
|
-
return document.addEventListener("mousedown",
|
|
134
|
-
document.removeEventListener("mousedown",
|
|
61
|
+
return document.addEventListener("mousedown", f), () => {
|
|
62
|
+
document.removeEventListener("mousedown", f);
|
|
135
63
|
};
|
|
136
64
|
}
|
|
137
|
-
}, [
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
const
|
|
141
|
-
return new Date(R,
|
|
65
|
+
}, [v]);
|
|
66
|
+
const ae = () => {
|
|
67
|
+
if (h.birthday) {
|
|
68
|
+
const f = new Date(h.birthday * 1e3), R = f.getUTCFullYear(), de = f.getUTCMonth(), me = f.getUTCDate();
|
|
69
|
+
return new Date(R, de, me);
|
|
142
70
|
}
|
|
143
|
-
},
|
|
144
|
-
await
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
},
|
|
71
|
+
}, se = async () => {
|
|
72
|
+
await _({ ...d, ...h }), S(!1);
|
|
73
|
+
}, le = () => {
|
|
74
|
+
T(!1), r && r();
|
|
75
|
+
}, ce = () => {
|
|
76
|
+
T(!1);
|
|
77
|
+
}, P = (f) => {
|
|
150
78
|
const R = {
|
|
151
|
-
...
|
|
152
|
-
...
|
|
79
|
+
...h,
|
|
80
|
+
...f
|
|
153
81
|
};
|
|
154
|
-
|
|
82
|
+
w(R), S(JSON.stringify({ ...d, ...R }) !== JSON.stringify(d));
|
|
155
83
|
};
|
|
156
|
-
return /* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ c(X, { children: [
|
|
85
|
+
/* @__PURE__ */ c(
|
|
158
86
|
z,
|
|
159
87
|
{
|
|
160
88
|
component: "form",
|
|
161
|
-
ref:
|
|
89
|
+
ref: g,
|
|
162
90
|
sx: {
|
|
163
91
|
backgroundColor: "background.paper",
|
|
164
92
|
p: 24,
|
|
93
|
+
width: a ? 320 : l ? 680 : u ? 990 : 400,
|
|
165
94
|
"& .MuiTextField-root": {
|
|
166
|
-
|
|
95
|
+
width: a ? 272 : l ? 328 : u ? 483 : 352
|
|
167
96
|
}
|
|
168
97
|
},
|
|
169
98
|
children: [
|
|
170
|
-
/* @__PURE__ */ e(
|
|
171
|
-
/* @__PURE__ */ e(
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
99
|
+
/* @__PURE__ */ e(Y, { children: n.personal_details }),
|
|
100
|
+
/* @__PURE__ */ e(M, { variant: "body1", children: n.update_information }),
|
|
101
|
+
/* @__PURE__ */ c(
|
|
102
|
+
p,
|
|
103
|
+
{
|
|
104
|
+
direction: s ? "column" : "row",
|
|
105
|
+
spacing: s ? 44 : 24,
|
|
106
|
+
sx: { mb: 44, pt: 32 },
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ e(
|
|
109
|
+
I,
|
|
110
|
+
{
|
|
111
|
+
defaultValue: h.first_name,
|
|
112
|
+
label: n.first_name,
|
|
113
|
+
onChange: (f) => P({ first_name: f.target.value })
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ e(
|
|
117
|
+
I,
|
|
118
|
+
{
|
|
119
|
+
defaultValue: h.last_name,
|
|
120
|
+
label: n.last_name,
|
|
121
|
+
onChange: (f) => P({ last_name: f.target.value })
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ c(p, { direction: s ? "column" : "row", children: [
|
|
128
|
+
b.display_email_edit_field_in_settings && /* @__PURE__ */ c(p, { sx: { mb: D ? 20 : 44, mr: s ? 0 : 24 }, children: [
|
|
192
129
|
/* @__PURE__ */ e(
|
|
193
|
-
|
|
130
|
+
I,
|
|
194
131
|
{
|
|
195
|
-
defaultValue:
|
|
196
|
-
label:
|
|
197
|
-
onChange: (
|
|
132
|
+
defaultValue: h.email,
|
|
133
|
+
label: n.email_address,
|
|
134
|
+
onChange: (f) => P({ email: f.target.value })
|
|
198
135
|
}
|
|
199
136
|
),
|
|
200
|
-
|
|
137
|
+
D && /* @__PURE__ */ e(xe, {})
|
|
201
138
|
] }),
|
|
202
|
-
|
|
139
|
+
b.display_sms_edit_field_in_settings && /* @__PURE__ */ c(p, { sx: { mb: U ? 20 : 44 }, children: [
|
|
203
140
|
/* @__PURE__ */ e(
|
|
204
|
-
|
|
141
|
+
I,
|
|
205
142
|
{
|
|
206
|
-
defaultValue:
|
|
207
|
-
label:
|
|
208
|
-
onChange: (
|
|
143
|
+
defaultValue: h.phone,
|
|
144
|
+
label: n.mobile_number,
|
|
145
|
+
onChange: (f) => P({ phone: f.target.value }),
|
|
209
146
|
type: "tel"
|
|
210
147
|
}
|
|
211
148
|
),
|
|
212
|
-
|
|
149
|
+
U && /* @__PURE__ */ e(ve, {})
|
|
213
150
|
] })
|
|
214
151
|
] }),
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */ e(
|
|
217
|
-
|
|
152
|
+
/* @__PURE__ */ c(p, { direction: s ? "column" : "row", spacing: s ? 44 : 24, sx: { mb: 44 }, children: [
|
|
153
|
+
/* @__PURE__ */ e(ye, { dateAdapter: ge, children: /* @__PURE__ */ e(
|
|
154
|
+
be,
|
|
218
155
|
{
|
|
219
|
-
label:
|
|
220
|
-
onChange: (
|
|
156
|
+
label: n.birthdate,
|
|
157
|
+
onChange: (f) => P({ birthday: _e(f) }),
|
|
221
158
|
slotProps: {
|
|
222
159
|
nextIconButton: {
|
|
223
160
|
sx: {
|
|
224
161
|
color: "primary.main",
|
|
225
|
-
"&:hover": { backgroundColor: W(
|
|
162
|
+
"&:hover": { backgroundColor: W(i.palette.primary.light, 0.1) }
|
|
226
163
|
}
|
|
227
164
|
},
|
|
228
165
|
previousIconButton: {
|
|
229
166
|
sx: {
|
|
230
167
|
color: "primary.main",
|
|
231
|
-
"&:hover": { backgroundColor: W(
|
|
168
|
+
"&:hover": { backgroundColor: W(i.palette.primary.light, 0.1) }
|
|
232
169
|
}
|
|
233
170
|
}
|
|
234
171
|
},
|
|
@@ -236,37 +173,37 @@ const Ue = 12, Fe = /[a-zA-Z]/, Ve = /\d/, We = "Passwords must be at least 12 c
|
|
|
236
173
|
width: "100%",
|
|
237
174
|
"& .MuiIconButton-edgeEnd": {
|
|
238
175
|
color: "primary.main",
|
|
239
|
-
"&:hover": { backgroundColor: W(
|
|
176
|
+
"&:hover": { backgroundColor: W(i.palette.primary.light, 0.1) }
|
|
240
177
|
}
|
|
241
178
|
},
|
|
242
|
-
value:
|
|
179
|
+
value: ae()
|
|
243
180
|
}
|
|
244
181
|
) }),
|
|
245
182
|
/* @__PURE__ */ e(
|
|
246
|
-
|
|
183
|
+
I,
|
|
247
184
|
{
|
|
248
|
-
defaultValue:
|
|
249
|
-
label:
|
|
250
|
-
onChange: (
|
|
185
|
+
defaultValue: h.postal_code,
|
|
186
|
+
label: n.zip_code,
|
|
187
|
+
onChange: (f) => P({ postal_code: f.target.value })
|
|
251
188
|
}
|
|
252
189
|
)
|
|
253
190
|
] }),
|
|
254
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ c(p, { children: [
|
|
255
192
|
/* @__PURE__ */ e(
|
|
256
|
-
|
|
193
|
+
I,
|
|
257
194
|
{
|
|
258
|
-
defaultValue:
|
|
259
|
-
label:
|
|
260
|
-
onChange: (
|
|
195
|
+
defaultValue: h.credit_score,
|
|
196
|
+
label: n.credit_score,
|
|
197
|
+
onChange: (f) => P({ credit_score: Number(f.target.value) }),
|
|
198
|
+
sx: { mb: 44 }
|
|
261
199
|
}
|
|
262
200
|
),
|
|
263
|
-
c.display_password_options_in_settings && /* @__PURE__ */ e(ze, {}),
|
|
264
201
|
/* @__PURE__ */ e(
|
|
265
|
-
|
|
202
|
+
Z,
|
|
266
203
|
{
|
|
267
|
-
disabled: !
|
|
268
|
-
onClick:
|
|
269
|
-
sx: { width:
|
|
204
|
+
disabled: !v,
|
|
205
|
+
onClick: se,
|
|
206
|
+
sx: { width: a ? 272 : 124 },
|
|
270
207
|
variant: "contained",
|
|
271
208
|
children: o.save_button
|
|
272
209
|
}
|
|
@@ -276,39 +213,39 @@ const Ue = 12, Fe = /[a-zA-Z]/, Ve = /\d/, We = "Passwords must be at least 12 c
|
|
|
276
213
|
}
|
|
277
214
|
),
|
|
278
215
|
/* @__PURE__ */ e(
|
|
279
|
-
|
|
216
|
+
$,
|
|
280
217
|
{
|
|
281
|
-
copy: { title:
|
|
282
|
-
isOpen:
|
|
283
|
-
onClose:
|
|
284
|
-
onSecondaryAction:
|
|
285
|
-
primaryText:
|
|
286
|
-
secondaryText:
|
|
287
|
-
children:
|
|
218
|
+
copy: { title: n.discard_changes },
|
|
219
|
+
isOpen: A,
|
|
220
|
+
onClose: ce,
|
|
221
|
+
onSecondaryAction: le,
|
|
222
|
+
primaryText: n.keep_editing,
|
|
223
|
+
secondaryText: n.leave,
|
|
224
|
+
children: n.discard_changes_message
|
|
288
225
|
}
|
|
289
226
|
)
|
|
290
227
|
] });
|
|
291
|
-
},
|
|
292
|
-
var
|
|
293
|
-
const
|
|
228
|
+
}, Ue = C(Fe);
|
|
229
|
+
var y = /* @__PURE__ */ ((t) => (t.Delete = "delete", t.Edit = "edit", t.Token = "token", t))(y || {});
|
|
230
|
+
const Ve = ({
|
|
294
231
|
devices: t,
|
|
295
232
|
onClickDeviceEdit: r,
|
|
296
|
-
onClickDeviceDelete:
|
|
233
|
+
onClickDeviceDelete: i
|
|
297
234
|
}) => {
|
|
298
|
-
const o =
|
|
235
|
+
const o = L(), { settings: n } = k(), u = [
|
|
299
236
|
{
|
|
300
237
|
field: "name",
|
|
301
|
-
headerName:
|
|
238
|
+
headerName: n.mobile_devices_column_name,
|
|
302
239
|
renderHeader: V,
|
|
303
|
-
renderCell: (a) => /* @__PURE__ */
|
|
240
|
+
renderCell: (a) => /* @__PURE__ */ c(p, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
304
241
|
/* @__PURE__ */ e(x, { variant: "body2", children: a.value }),
|
|
305
242
|
/* @__PURE__ */ e(
|
|
306
|
-
|
|
243
|
+
O,
|
|
307
244
|
{
|
|
308
|
-
"aria-label":
|
|
245
|
+
"aria-label": n.mobile_devices_edit_label,
|
|
309
246
|
color: "secondary",
|
|
310
247
|
onClick: () => r(a.row),
|
|
311
|
-
children: /* @__PURE__ */ e(
|
|
248
|
+
children: /* @__PURE__ */ e(B, { name: "edit" })
|
|
312
249
|
}
|
|
313
250
|
)
|
|
314
251
|
] }),
|
|
@@ -318,7 +255,7 @@ const $e = ({
|
|
|
318
255
|
},
|
|
319
256
|
{
|
|
320
257
|
field: "device_type",
|
|
321
|
-
headerName:
|
|
258
|
+
headerName: n.mobile_devices_column_type,
|
|
322
259
|
renderHeader: V,
|
|
323
260
|
sortable: !0,
|
|
324
261
|
hideSortIcons: !1,
|
|
@@ -327,9 +264,9 @@ const $e = ({
|
|
|
327
264
|
},
|
|
328
265
|
{
|
|
329
266
|
field: "created_at",
|
|
330
|
-
headerName:
|
|
267
|
+
headerName: n.mobile_devices_column_added,
|
|
331
268
|
renderHeader: V,
|
|
332
|
-
valueFormatter: (a) =>
|
|
269
|
+
valueFormatter: (a) => te(oe(a), { addSuffix: !0 }),
|
|
333
270
|
sortable: !0,
|
|
334
271
|
hideSortIcons: !1,
|
|
335
272
|
flex: 1,
|
|
@@ -340,31 +277,31 @@ const $e = ({
|
|
|
340
277
|
headerName: "",
|
|
341
278
|
renderHeader: V,
|
|
342
279
|
renderCell: (a) => /* @__PURE__ */ e(p, { mr: 4, children: /* @__PURE__ */ e(
|
|
343
|
-
|
|
280
|
+
O,
|
|
344
281
|
{
|
|
345
|
-
"aria-label":
|
|
282
|
+
"aria-label": n.mobile_devices_delete_label,
|
|
346
283
|
color: "secondary",
|
|
347
|
-
onClick: () =>
|
|
348
|
-
children: /* @__PURE__ */ e(
|
|
284
|
+
onClick: () => i(a.row),
|
|
285
|
+
children: /* @__PURE__ */ e(B, { name: "delete" })
|
|
349
286
|
}
|
|
350
287
|
) }),
|
|
351
288
|
sortable: !1,
|
|
352
289
|
hideSortIcons: !1,
|
|
353
290
|
width: 58
|
|
354
291
|
}
|
|
355
|
-
],
|
|
292
|
+
], s = m.useMemo(() => t.map((a) => ({
|
|
356
293
|
id: a.guid,
|
|
357
294
|
...a,
|
|
358
295
|
device_type: `${a.make} ${a.model}`
|
|
359
296
|
})), [t]);
|
|
360
297
|
return /* @__PURE__ */ e(z, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
361
|
-
|
|
298
|
+
De,
|
|
362
299
|
{
|
|
363
|
-
columns:
|
|
300
|
+
columns: u,
|
|
364
301
|
disableColumnFilter: !0,
|
|
365
302
|
disableColumnMenu: !0,
|
|
366
303
|
disableRowSelectionOnClick: !0,
|
|
367
|
-
rows:
|
|
304
|
+
rows: s,
|
|
368
305
|
slotProps: {
|
|
369
306
|
footer: {
|
|
370
307
|
sx: { justifyContent: "flex-end" }
|
|
@@ -382,7 +319,7 @@ const $e = ({
|
|
|
382
319
|
p: "12px 16px"
|
|
383
320
|
},
|
|
384
321
|
children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: H(
|
|
385
|
-
|
|
322
|
+
n.mobile_devices_count,
|
|
386
323
|
/* @__PURE__ */ e("b", { children: t.length }),
|
|
387
324
|
/* @__PURE__ */ e("b", { children: t.length })
|
|
388
325
|
) })
|
|
@@ -405,47 +342,47 @@ const $e = ({
|
|
|
405
342
|
}
|
|
406
343
|
}
|
|
407
344
|
) });
|
|
408
|
-
},
|
|
345
|
+
}, We = ({
|
|
409
346
|
devices: t,
|
|
410
347
|
onClickDeviceEdit: r,
|
|
411
|
-
onClickDeviceDelete:
|
|
348
|
+
onClickDeviceDelete: i
|
|
412
349
|
}) => {
|
|
413
|
-
const o =
|
|
414
|
-
|
|
350
|
+
const o = L(), { settings: n } = k(), [u, s] = m.useState(!1), a = (l) => (b, _) => {
|
|
351
|
+
s(_ ? l : !1);
|
|
415
352
|
};
|
|
416
|
-
return /* @__PURE__ */
|
|
417
|
-
t.map((
|
|
353
|
+
return /* @__PURE__ */ c(p, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
|
|
354
|
+
t.map((l) => /* @__PURE__ */ c(
|
|
418
355
|
ke,
|
|
419
356
|
{
|
|
420
|
-
expanded:
|
|
421
|
-
onChange: a(
|
|
357
|
+
expanded: u === l.guid,
|
|
358
|
+
onChange: a(l.guid),
|
|
422
359
|
sx: { boxShadow: "none" },
|
|
423
360
|
children: [
|
|
424
361
|
/* @__PURE__ */ e(
|
|
425
|
-
|
|
362
|
+
Se,
|
|
426
363
|
{
|
|
427
|
-
expandIcon: /* @__PURE__ */ e(
|
|
364
|
+
expandIcon: /* @__PURE__ */ e(B, { color: "secondary", name: "keyboard_arrow_down", size: 24 }),
|
|
428
365
|
sx: {
|
|
429
366
|
padding: "14px 24px",
|
|
430
367
|
borderBottom: "1px solid",
|
|
431
368
|
borderColor: o.palette.divider
|
|
432
369
|
},
|
|
433
|
-
children: /* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */ e(x, { bold: !0, variant: "body1", children:
|
|
435
|
-
/* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: `${
|
|
436
|
-
/* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children:
|
|
370
|
+
children: /* @__PURE__ */ c(p, { gap: 4, children: [
|
|
371
|
+
/* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: l.name }),
|
|
372
|
+
/* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: `${l.make} ${l.model}` }),
|
|
373
|
+
/* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: te(oe(l.created_at), { addSuffix: !0 }) })
|
|
437
374
|
] })
|
|
438
375
|
}
|
|
439
376
|
),
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
|
|
377
|
+
/* @__PURE__ */ c(
|
|
378
|
+
we,
|
|
442
379
|
{
|
|
443
380
|
sx: { backgroundColor: o.palette.background.default, p: "0 0 0 24px" },
|
|
444
381
|
children: [
|
|
445
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ c(
|
|
446
383
|
p,
|
|
447
384
|
{
|
|
448
|
-
onClick: () => r(
|
|
385
|
+
onClick: () => r(l),
|
|
449
386
|
sx: {
|
|
450
387
|
alignItems: "center",
|
|
451
388
|
flexDirection: "row",
|
|
@@ -457,15 +394,15 @@ const $e = ({
|
|
|
457
394
|
borderColor: o.palette.divider
|
|
458
395
|
},
|
|
459
396
|
children: [
|
|
460
|
-
/* @__PURE__ */ e(
|
|
461
|
-
/* @__PURE__ */ e(x, { variant: "body1", children:
|
|
397
|
+
/* @__PURE__ */ e(O, { "aria-label": n.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(B, { name: "edit" }) }),
|
|
398
|
+
/* @__PURE__ */ e(x, { variant: "body1", children: n.mobile_devices_edit_label })
|
|
462
399
|
]
|
|
463
400
|
}
|
|
464
401
|
),
|
|
465
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ c(
|
|
466
403
|
p,
|
|
467
404
|
{
|
|
468
|
-
onClick: () =>
|
|
405
|
+
onClick: () => i(l),
|
|
469
406
|
sx: {
|
|
470
407
|
alignItems: "center",
|
|
471
408
|
flexDirection: "row",
|
|
@@ -475,8 +412,8 @@ const $e = ({
|
|
|
475
412
|
cursor: "pointer"
|
|
476
413
|
},
|
|
477
414
|
children: [
|
|
478
|
-
/* @__PURE__ */ e(
|
|
479
|
-
/* @__PURE__ */ e(x, { variant: "body1", children:
|
|
415
|
+
/* @__PURE__ */ e(O, { "aria-label": n.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(B, { name: "delete" }) }),
|
|
416
|
+
/* @__PURE__ */ e(x, { variant: "body1", children: n.mobile_devices_delete_label })
|
|
480
417
|
]
|
|
481
418
|
}
|
|
482
419
|
)
|
|
@@ -485,7 +422,7 @@ const $e = ({
|
|
|
485
422
|
)
|
|
486
423
|
]
|
|
487
424
|
},
|
|
488
|
-
|
|
425
|
+
l.guid
|
|
489
426
|
)),
|
|
490
427
|
/* @__PURE__ */ e(
|
|
491
428
|
z,
|
|
@@ -497,53 +434,53 @@ const $e = ({
|
|
|
497
434
|
p: "12px 16px"
|
|
498
435
|
},
|
|
499
436
|
children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: H(
|
|
500
|
-
|
|
437
|
+
n.mobile_devices_count,
|
|
501
438
|
/* @__PURE__ */ e("b", { children: t.length }),
|
|
502
439
|
/* @__PURE__ */ e("b", { children: t.length })
|
|
503
440
|
) })
|
|
504
441
|
}
|
|
505
442
|
)
|
|
506
443
|
] });
|
|
507
|
-
},
|
|
444
|
+
}, ze = ({
|
|
508
445
|
dialogType: t,
|
|
509
446
|
isOpen: r,
|
|
510
|
-
onClose:
|
|
447
|
+
onClose: i,
|
|
511
448
|
device: o,
|
|
512
|
-
deviceToken:
|
|
449
|
+
deviceToken: n = ""
|
|
513
450
|
}) => {
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
o &&
|
|
451
|
+
const u = L(), { common: s, settings: a } = k(), { updateDevice: l, deleteDevice: b, setAlert: _, loadDevices: d } = E(), [h, w] = m.useState("");
|
|
452
|
+
m.useEffect(() => {
|
|
453
|
+
o && w(o.name);
|
|
517
454
|
}, [o, t]);
|
|
518
455
|
const v = () => {
|
|
519
456
|
switch (t) {
|
|
520
|
-
case
|
|
457
|
+
case y.Edit:
|
|
521
458
|
return a.mobile_devices_edit_label;
|
|
522
|
-
case
|
|
459
|
+
case y.Delete:
|
|
523
460
|
return a.mobile_devices_delete_label;
|
|
524
461
|
default:
|
|
525
462
|
return "";
|
|
526
463
|
}
|
|
527
|
-
},
|
|
464
|
+
}, S = () => {
|
|
528
465
|
switch (t) {
|
|
529
|
-
case
|
|
530
|
-
return
|
|
531
|
-
case
|
|
532
|
-
return
|
|
533
|
-
case
|
|
534
|
-
return
|
|
466
|
+
case y.Token:
|
|
467
|
+
return s.done_button;
|
|
468
|
+
case y.Edit:
|
|
469
|
+
return s.save_button;
|
|
470
|
+
case y.Delete:
|
|
471
|
+
return s.delete_button;
|
|
535
472
|
default:
|
|
536
473
|
return "";
|
|
537
474
|
}
|
|
538
|
-
},
|
|
539
|
-
const
|
|
475
|
+
}, A = () => {
|
|
476
|
+
const g = {
|
|
540
477
|
"& .MuiDialogContent-root": {
|
|
541
478
|
width: 400,
|
|
542
479
|
pt: 0
|
|
543
480
|
}
|
|
544
481
|
};
|
|
545
|
-
return t ===
|
|
546
|
-
...
|
|
482
|
+
return t === y.Token ? {
|
|
483
|
+
...g,
|
|
547
484
|
"& .MuiToolbar-root:last-child": {
|
|
548
485
|
padding: "32px 60px 48px",
|
|
549
486
|
justifyContent: "center"
|
|
@@ -555,85 +492,85 @@ const $e = ({
|
|
|
555
492
|
flex: 1
|
|
556
493
|
}
|
|
557
494
|
} : {
|
|
558
|
-
...
|
|
495
|
+
...g,
|
|
559
496
|
"& .MuiToolbar-root:last-child": {
|
|
560
497
|
gap: 8,
|
|
561
498
|
padding: 24,
|
|
562
499
|
justifyContent: "flex-end"
|
|
563
500
|
},
|
|
564
|
-
...t ===
|
|
501
|
+
...t === y.Delete && {
|
|
565
502
|
"& .MuiTypography-body1": {
|
|
566
503
|
padding: 0
|
|
567
504
|
}
|
|
568
505
|
}
|
|
569
506
|
};
|
|
570
|
-
},
|
|
571
|
-
if (t ===
|
|
572
|
-
const
|
|
573
|
-
(await
|
|
507
|
+
}, T = async () => {
|
|
508
|
+
if (t === y.Token && i(), t === y.Edit && o) {
|
|
509
|
+
const g = { ...o, name: h };
|
|
510
|
+
(await l(g)).success ? (_(a.mobile_devices_edit_success, "success"), d()) : _(
|
|
574
511
|
H(a.mobile_devices_edit_error, o.name),
|
|
575
512
|
"error"
|
|
576
|
-
),
|
|
513
|
+
), i();
|
|
577
514
|
}
|
|
578
|
-
t ===
|
|
515
|
+
t === y.Delete && o && ((await b(o.guid)).success ? (_(
|
|
579
516
|
H(a.mobile_devices_delete_success, o.name),
|
|
580
517
|
"success"
|
|
581
|
-
),
|
|
518
|
+
), d()) : _(
|
|
582
519
|
H(a.mobile_devices_delete_error, o.name),
|
|
583
520
|
"error"
|
|
584
|
-
),
|
|
521
|
+
), i());
|
|
585
522
|
};
|
|
586
|
-
return /* @__PURE__ */
|
|
587
|
-
|
|
523
|
+
return /* @__PURE__ */ c(
|
|
524
|
+
$,
|
|
588
525
|
{
|
|
589
526
|
copy: { title: v() },
|
|
590
527
|
isOpen: r,
|
|
591
|
-
onClose:
|
|
592
|
-
onPrimaryAction:
|
|
593
|
-
onSecondaryAction:
|
|
594
|
-
primaryColor: t ===
|
|
595
|
-
primaryText:
|
|
596
|
-
secondaryText: t ===
|
|
597
|
-
sx:
|
|
528
|
+
onClose: i,
|
|
529
|
+
onPrimaryAction: T,
|
|
530
|
+
onSecondaryAction: i,
|
|
531
|
+
primaryColor: t === y.Delete ? "error" : void 0,
|
|
532
|
+
primaryText: S(),
|
|
533
|
+
secondaryText: t === y.Token ? s.back : s.cancel_button,
|
|
534
|
+
sx: A(),
|
|
598
535
|
children: [
|
|
599
|
-
t ===
|
|
536
|
+
t === y.Token && /* @__PURE__ */ c(p, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
600
537
|
/* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "body1", children: a.mobile_devices_access_label }),
|
|
601
538
|
/* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: a.mobile_devices_access_info_1 }),
|
|
602
539
|
/* @__PURE__ */ e(
|
|
603
|
-
|
|
540
|
+
M,
|
|
604
541
|
{
|
|
605
542
|
sx: {
|
|
606
|
-
border: `1px solid ${
|
|
543
|
+
border: `1px solid ${u.palette.neutral.light}`,
|
|
607
544
|
borderRadius: "4px",
|
|
608
545
|
p: "16px 32px"
|
|
609
546
|
},
|
|
610
547
|
variant: "h1",
|
|
611
|
-
children:
|
|
548
|
+
children: n
|
|
612
549
|
}
|
|
613
550
|
),
|
|
614
551
|
/* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: a.mobile_devices_access_info_2 })
|
|
615
552
|
] }),
|
|
616
|
-
t ===
|
|
617
|
-
t ===
|
|
553
|
+
t === y.Edit && /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(I, { onChange: (g) => w(g.target.value), value: h }) }),
|
|
554
|
+
t === y.Delete && /* @__PURE__ */ e(M, { children: a.mobile_devices_delete_info })
|
|
618
555
|
]
|
|
619
556
|
}
|
|
620
557
|
);
|
|
621
|
-
},
|
|
622
|
-
const { isMobile: t } = F(), { settings: r } =
|
|
623
|
-
|
|
624
|
-
o &&
|
|
558
|
+
}, Ge = C(ze), je = C(() => {
|
|
559
|
+
const { isMobile: t } = F(), { settings: r } = k(), { isCopyLoaded: i, isInitialized: o } = ee(), { setAlert: n, devices: u, loadDevices: s, generateDeviceToken: a } = E(), [l, b] = m.useState({ open: !1, type: "" }), [_, d] = m.useState(), [h, w] = m.useState("");
|
|
560
|
+
m.useEffect(() => {
|
|
561
|
+
o && s();
|
|
625
562
|
}, [o]);
|
|
626
563
|
const v = async () => {
|
|
627
|
-
const
|
|
628
|
-
|
|
629
|
-
},
|
|
630
|
-
|
|
631
|
-
},
|
|
632
|
-
|
|
633
|
-
},
|
|
634
|
-
|
|
564
|
+
const g = await a();
|
|
565
|
+
g ? (w(g), b({ open: !0, type: y.Token })) : n(r.mobile_devices_access_error, "error");
|
|
566
|
+
}, S = (g) => {
|
|
567
|
+
d(g), b({ open: !0, type: y.Edit });
|
|
568
|
+
}, A = (g) => {
|
|
569
|
+
d(g), b({ open: !0, type: y.Delete });
|
|
570
|
+
}, T = () => {
|
|
571
|
+
b({ open: !1, type: "" }), d(void 0);
|
|
635
572
|
};
|
|
636
|
-
return !
|
|
573
|
+
return !i || !o ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ c(
|
|
637
574
|
p,
|
|
638
575
|
{
|
|
639
576
|
sx: {
|
|
@@ -642,126 +579,126 @@ const $e = ({
|
|
|
642
579
|
gap: 24
|
|
643
580
|
},
|
|
644
581
|
children: [
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
/* @__PURE__ */ e(
|
|
647
|
-
/* @__PURE__ */ e(
|
|
582
|
+
/* @__PURE__ */ c(p, { gap: 4, children: [
|
|
583
|
+
/* @__PURE__ */ e(Y, { children: r.mobile_devices_title }),
|
|
584
|
+
/* @__PURE__ */ e(M, { variant: "body1", children: r.mobile_devices_info })
|
|
648
585
|
] }),
|
|
649
586
|
t ? /* @__PURE__ */ e(
|
|
650
|
-
|
|
587
|
+
We,
|
|
651
588
|
{
|
|
652
|
-
devices:
|
|
653
|
-
onClickDeviceDelete:
|
|
654
|
-
onClickDeviceEdit:
|
|
589
|
+
devices: u,
|
|
590
|
+
onClickDeviceDelete: A,
|
|
591
|
+
onClickDeviceEdit: S
|
|
655
592
|
}
|
|
656
593
|
) : /* @__PURE__ */ e(
|
|
657
|
-
|
|
594
|
+
Ve,
|
|
658
595
|
{
|
|
659
|
-
devices:
|
|
660
|
-
onClickDeviceDelete:
|
|
661
|
-
onClickDeviceEdit:
|
|
596
|
+
devices: u,
|
|
597
|
+
onClickDeviceDelete: A,
|
|
598
|
+
onClickDeviceEdit: S
|
|
662
599
|
}
|
|
663
600
|
),
|
|
664
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ c(p, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
|
|
665
602
|
/* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: r.mobile_devices_access_title }),
|
|
666
|
-
/* @__PURE__ */ e(
|
|
667
|
-
/* @__PURE__ */ e(
|
|
603
|
+
/* @__PURE__ */ e(M, { align: "center", variant: "body2", children: r.mobile_devices_access_description }),
|
|
604
|
+
/* @__PURE__ */ e(Z, { onClick: v, variant: "text", children: r.mobile_devices_access_cta })
|
|
668
605
|
] }),
|
|
669
606
|
/* @__PURE__ */ e(
|
|
670
|
-
|
|
607
|
+
Ge,
|
|
671
608
|
{
|
|
672
|
-
device:
|
|
673
|
-
deviceToken:
|
|
674
|
-
dialogType:
|
|
675
|
-
isOpen:
|
|
676
|
-
onClose:
|
|
609
|
+
device: _,
|
|
610
|
+
deviceToken: h,
|
|
611
|
+
dialogType: l.type,
|
|
612
|
+
isOpen: l.open,
|
|
613
|
+
onClose: T
|
|
677
614
|
}
|
|
678
615
|
)
|
|
679
616
|
]
|
|
680
617
|
}
|
|
681
618
|
);
|
|
682
619
|
}), Q = C(
|
|
683
|
-
({ onClick: t, primaryText: r, secondaryText:
|
|
684
|
-
const
|
|
685
|
-
return /* @__PURE__ */ e(
|
|
686
|
-
/* @__PURE__ */ e(
|
|
687
|
-
/* @__PURE__ */ e(
|
|
620
|
+
({ onClick: t, primaryText: r, secondaryText: i, sx: o }) => {
|
|
621
|
+
const n = L();
|
|
622
|
+
return /* @__PURE__ */ e(Pe, { sx: { bgcolor: n.palette.background.paper }, children: /* @__PURE__ */ c(Re, { alignItems: "flex-start", onClick: t, sx: o, children: [
|
|
623
|
+
/* @__PURE__ */ e(Me, { primary: r, secondary: i }),
|
|
624
|
+
/* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(Le, {}) })
|
|
688
625
|
] }) });
|
|
689
626
|
}
|
|
690
|
-
),
|
|
691
|
-
const { settings: t } =
|
|
692
|
-
|
|
627
|
+
), $e = C(() => {
|
|
628
|
+
const { settings: t } = k(), { categories: r } = j(), { selectedRule: i, updateRuleCategory: o } = E(), [n, u] = m.useState(!1), s = () => {
|
|
629
|
+
u(!1);
|
|
693
630
|
}, a = () => {
|
|
694
|
-
|
|
695
|
-
},
|
|
696
|
-
|
|
631
|
+
u(!0);
|
|
632
|
+
}, l = (_) => r.find((d) => d.guid === _)?.name, b = async (_) => {
|
|
633
|
+
i && i.category_guid !== _ && (i.category_guid = _, await o(i)), s();
|
|
697
634
|
};
|
|
698
|
-
return /* @__PURE__ */ m
|
|
635
|
+
return /* @__PURE__ */ c(m.Fragment, { children: [
|
|
699
636
|
/* @__PURE__ */ e(
|
|
700
637
|
Q,
|
|
701
638
|
{
|
|
702
639
|
onClick: a,
|
|
703
|
-
primaryText:
|
|
640
|
+
primaryText: i?.category_guid ? l(i.category_guid) : "",
|
|
704
641
|
secondaryText: t.category
|
|
705
642
|
}
|
|
706
643
|
),
|
|
707
644
|
/* @__PURE__ */ e(
|
|
708
|
-
|
|
645
|
+
Ie,
|
|
709
646
|
{
|
|
710
|
-
initialSelected:
|
|
711
|
-
onClose:
|
|
712
|
-
onSelect:
|
|
713
|
-
showDrawer:
|
|
647
|
+
initialSelected: i?.category_guid ? i.category_guid : void 0,
|
|
648
|
+
onClose: s,
|
|
649
|
+
onSelect: b,
|
|
650
|
+
showDrawer: n,
|
|
714
651
|
title: t.select_category
|
|
715
652
|
}
|
|
716
653
|
)
|
|
717
654
|
] });
|
|
718
|
-
}),
|
|
719
|
-
const { common: t, settings: r } =
|
|
720
|
-
|
|
721
|
-
},
|
|
722
|
-
|
|
655
|
+
}), Je = C(() => {
|
|
656
|
+
const { common: t, settings: r } = k(), { selectedRule: i, updateRulePayee: o } = E(), n = L(), [u, s] = m.useState(!1), a = i?.description ? i.description : i?.match_description, [l, b] = m.useState(a || ""), _ = () => {
|
|
657
|
+
s(!0);
|
|
658
|
+
}, d = async () => {
|
|
659
|
+
l !== a && i && (i.description = l, await o(i), s(!1));
|
|
723
660
|
};
|
|
724
|
-
return /* @__PURE__ */ m
|
|
661
|
+
return /* @__PURE__ */ c(m.Fragment, { children: [
|
|
725
662
|
/* @__PURE__ */ e(
|
|
726
663
|
Q,
|
|
727
664
|
{
|
|
728
|
-
onClick:
|
|
665
|
+
onClick: _,
|
|
729
666
|
primaryText: a,
|
|
730
667
|
secondaryText: r.payee
|
|
731
668
|
}
|
|
732
669
|
),
|
|
733
670
|
/* @__PURE__ */ e(
|
|
734
|
-
|
|
671
|
+
$,
|
|
735
672
|
{
|
|
736
673
|
copy: { title: r.edit_payee },
|
|
737
|
-
isOpen:
|
|
738
|
-
onClose: () =>
|
|
739
|
-
onPrimaryAction:
|
|
740
|
-
onSecondaryAction: () =>
|
|
674
|
+
isOpen: u,
|
|
675
|
+
onClose: () => s(!1),
|
|
676
|
+
onPrimaryAction: d,
|
|
677
|
+
onSecondaryAction: () => s(!1),
|
|
741
678
|
primaryText: t.save_button,
|
|
742
679
|
secondaryText: t.cancel_button,
|
|
743
680
|
sx: {
|
|
744
681
|
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
745
|
-
path: { fill:
|
|
682
|
+
path: { fill: n.palette.secondary.darker }
|
|
746
683
|
},
|
|
747
684
|
children: /* @__PURE__ */ e(
|
|
748
|
-
|
|
685
|
+
I,
|
|
749
686
|
{
|
|
750
|
-
onChange: (
|
|
687
|
+
onChange: (h) => b(h.target.value),
|
|
751
688
|
sx: { width: 352 },
|
|
752
|
-
value:
|
|
689
|
+
value: l
|
|
753
690
|
}
|
|
754
691
|
)
|
|
755
692
|
}
|
|
756
693
|
)
|
|
757
694
|
] });
|
|
758
|
-
}),
|
|
759
|
-
const { common: o, settings:
|
|
695
|
+
}), Ke = C(({ onClose: t, onDelete: r, isOpen: i }) => {
|
|
696
|
+
const { common: o, settings: n } = k();
|
|
760
697
|
return /* @__PURE__ */ e(
|
|
761
|
-
|
|
698
|
+
$,
|
|
762
699
|
{
|
|
763
|
-
copy: { title:
|
|
764
|
-
isOpen:
|
|
700
|
+
copy: { title: n.delete_rule },
|
|
701
|
+
isOpen: i,
|
|
765
702
|
onClose: t,
|
|
766
703
|
onPrimaryAction: r,
|
|
767
704
|
onSecondaryAction: t,
|
|
@@ -770,98 +707,98 @@ const $e = ({
|
|
|
770
707
|
secondaryColor: "secondary",
|
|
771
708
|
secondaryText: o.cancel_button,
|
|
772
709
|
sx: { "& .MuiDialogContent-root": { pt: 0, width: 400 } },
|
|
773
|
-
children: /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children:
|
|
710
|
+
children: /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: n.delete_rule_confirm })
|
|
774
711
|
}
|
|
775
712
|
);
|
|
776
|
-
}),
|
|
777
|
-
({ isOpen: t, onClose: r, onDelete:
|
|
778
|
-
const { common: o, settings:
|
|
779
|
-
return /* @__PURE__ */
|
|
780
|
-
|
|
713
|
+
}), Ye = C(
|
|
714
|
+
({ isOpen: t, onClose: r, onDelete: i }) => {
|
|
715
|
+
const { common: o, settings: n } = k(), [u, s] = m.useState(!1);
|
|
716
|
+
return /* @__PURE__ */ c(
|
|
717
|
+
He,
|
|
781
718
|
{
|
|
782
719
|
hasSecondaryAction: !1,
|
|
783
720
|
isOpen: t,
|
|
784
721
|
onClose: r,
|
|
785
722
|
onPrimaryAction: () => {
|
|
786
|
-
|
|
723
|
+
s(!0);
|
|
787
724
|
},
|
|
788
725
|
primaryColor: "error",
|
|
789
726
|
primaryText: o.delete_button,
|
|
790
|
-
title:
|
|
727
|
+
title: n.edit_rule,
|
|
791
728
|
children: [
|
|
792
|
-
/* @__PURE__ */ e(
|
|
793
|
-
/* @__PURE__ */ e(
|
|
729
|
+
/* @__PURE__ */ e(Ae, { children: /* @__PURE__ */ e(x, { bold: !0, variant: "caption", children: n.details }) }),
|
|
730
|
+
/* @__PURE__ */ e(Je, {}),
|
|
794
731
|
/* @__PURE__ */ e(K, { sx: { ml: 24 } }),
|
|
795
|
-
/* @__PURE__ */ e(
|
|
732
|
+
/* @__PURE__ */ e($e, {}),
|
|
796
733
|
/* @__PURE__ */ e(K, { sx: { ml: 24 } }),
|
|
797
734
|
/* @__PURE__ */ e(
|
|
798
|
-
|
|
735
|
+
Ke,
|
|
799
736
|
{
|
|
800
|
-
isOpen:
|
|
801
|
-
onClose: () =>
|
|
802
|
-
onDelete:
|
|
737
|
+
isOpen: u,
|
|
738
|
+
onClose: () => s(!1),
|
|
739
|
+
onDelete: i
|
|
803
740
|
}
|
|
804
741
|
)
|
|
805
742
|
]
|
|
806
743
|
}
|
|
807
744
|
);
|
|
808
745
|
}
|
|
809
|
-
),
|
|
810
|
-
const { categories: r } = j(), { setSelectedGuid:
|
|
811
|
-
|
|
812
|
-
},
|
|
813
|
-
await o(),
|
|
814
|
-
},
|
|
815
|
-
|
|
816
|
-
},
|
|
817
|
-
return /* @__PURE__ */ m
|
|
746
|
+
), qe = C(({ rule: t }) => {
|
|
747
|
+
const { categories: r } = j(), { setSelectedGuid: i } = Ee(), { deleteTransactionRule: o, setSelectedRule: n } = E(), { isDesktop: u, isTablet: s } = F(), [a, l] = m.useState(!1), b = () => {
|
|
748
|
+
l(!1), i(null), n(void 0);
|
|
749
|
+
}, _ = async () => {
|
|
750
|
+
await o(), b();
|
|
751
|
+
}, d = () => {
|
|
752
|
+
l(!0), n(t);
|
|
753
|
+
}, h = (w) => r.find((v) => v.guid === w)?.name;
|
|
754
|
+
return /* @__PURE__ */ c(m.Fragment, { children: [
|
|
818
755
|
/* @__PURE__ */ e(
|
|
819
756
|
Q,
|
|
820
757
|
{
|
|
821
|
-
onClick:
|
|
758
|
+
onClick: d,
|
|
822
759
|
primaryText: t.description ? t.description : t.match_description,
|
|
823
|
-
secondaryText: t.category_guid ?
|
|
760
|
+
secondaryText: t.category_guid ? h(t.category_guid) : ""
|
|
824
761
|
}
|
|
825
762
|
),
|
|
826
|
-
/* @__PURE__ */ e(K, { sx: { ml:
|
|
827
|
-
/* @__PURE__ */ e(
|
|
763
|
+
/* @__PURE__ */ e(K, { sx: { ml: s || u ? 0 : 24 } }),
|
|
764
|
+
/* @__PURE__ */ e(Ye, { isOpen: a, onClose: b, onDelete: _ })
|
|
828
765
|
] });
|
|
829
|
-
}),
|
|
830
|
-
const { settings: t } =
|
|
831
|
-
return
|
|
766
|
+
}), re = C(() => {
|
|
767
|
+
const { settings: t } = k(), { loadTransactionRules: r, transactionRules: i } = E(), [o, n] = m.useState(!1);
|
|
768
|
+
return ne({
|
|
832
769
|
widgetName: "TransactionRulesTab",
|
|
833
770
|
isLoaded: o
|
|
834
|
-
}),
|
|
835
|
-
r().finally(() =>
|
|
836
|
-
}, []), /* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
/* @__PURE__ */ e(
|
|
839
|
-
/* @__PURE__ */ e(
|
|
771
|
+
}), m.useEffect(() => {
|
|
772
|
+
r().finally(() => n(!0));
|
|
773
|
+
}, []), /* @__PURE__ */ c(p, { sx: { gap: 24, py: 24 }, children: [
|
|
774
|
+
/* @__PURE__ */ c(p, { sx: { px: 24 }, children: [
|
|
775
|
+
/* @__PURE__ */ e(Y, { children: t.transaction_rules_label }),
|
|
776
|
+
/* @__PURE__ */ e(M, { variant: "body1", children: t.transaction_rules_description })
|
|
840
777
|
] }),
|
|
841
|
-
/* @__PURE__ */ e(
|
|
778
|
+
/* @__PURE__ */ e(Te, { children: i.map((u, s) => /* @__PURE__ */ e(qe, { rule: u }, s)) })
|
|
842
779
|
] });
|
|
843
|
-
}),
|
|
844
|
-
const { alert: r, setAlert:
|
|
780
|
+
}), Qe = C(({ selectedTab: t }) => {
|
|
781
|
+
const { alert: r, setAlert: i } = E(), {
|
|
845
782
|
config: { display_user_profile_in_settings: o }
|
|
846
783
|
} = G();
|
|
847
|
-
return /* @__PURE__ */
|
|
848
|
-
t ===
|
|
849
|
-
t ===
|
|
850
|
-
t ===
|
|
851
|
-
t ===
|
|
852
|
-
t ===
|
|
784
|
+
return /* @__PURE__ */ c(X, { children: [
|
|
785
|
+
t === N.Profile && /* @__PURE__ */ e(Ue, {}),
|
|
786
|
+
t === N.Devices && /* @__PURE__ */ e(je, {}),
|
|
787
|
+
t === N.Notifications && /* @__PURE__ */ e(J, { showPersonalDetails: !o }),
|
|
788
|
+
t === N.TransactionRules && /* @__PURE__ */ e(re, {}),
|
|
789
|
+
t === N.Help && /* @__PURE__ */ e(p, { sx: { px: 24 }, children: /* @__PURE__ */ e(Oe, {}) }),
|
|
853
790
|
/* @__PURE__ */ e(
|
|
854
|
-
|
|
791
|
+
fe,
|
|
855
792
|
{
|
|
856
793
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
857
794
|
autoHideDuration: 3500,
|
|
858
|
-
onClose: () =>
|
|
795
|
+
onClose: () => i(""),
|
|
859
796
|
open: !!r.message,
|
|
860
797
|
children: /* @__PURE__ */ e(
|
|
861
|
-
|
|
798
|
+
he,
|
|
862
799
|
{
|
|
863
800
|
onClose: () => {
|
|
864
|
-
|
|
801
|
+
i("");
|
|
865
802
|
},
|
|
866
803
|
severity: r.severity,
|
|
867
804
|
variant: "filled",
|
|
@@ -872,86 +809,86 @@ const $e = ({
|
|
|
872
809
|
)
|
|
873
810
|
] });
|
|
874
811
|
});
|
|
875
|
-
var
|
|
876
|
-
const
|
|
877
|
-
const { settings: o } =
|
|
878
|
-
|
|
812
|
+
var N = /* @__PURE__ */ ((t) => (t[t.Profile = 0] = "Profile", t[t.Devices = 1] = "Devices", t[t.Notifications = 2] = "Notifications", t[t.TransactionRules = 3] = "TransactionRules", t[t.Help = 4] = "Help", t))(N || {});
|
|
813
|
+
const Wt = C(({ onBackClick: t, onMenuClick: r, sx: i }) => {
|
|
814
|
+
const { settings: o } = k(), { isCopyLoaded: n, isInitialized: u } = ee(), { config: s } = G(), { isMobile: a } = F(), { categoriesLoaded: l, loadCategories: b } = j();
|
|
815
|
+
ne({
|
|
879
816
|
widgetName: "SettingsWidget",
|
|
880
|
-
isLoaded:
|
|
881
|
-
}),
|
|
882
|
-
|
|
817
|
+
isLoaded: u && n
|
|
818
|
+
}), m.useEffect(() => {
|
|
819
|
+
l || b().finally();
|
|
883
820
|
}, []);
|
|
884
821
|
const {
|
|
885
|
-
display_user_profile_in_settings:
|
|
886
|
-
display_mobile_devices_in_settings:
|
|
887
|
-
display_notification_settings_in_settings:
|
|
888
|
-
display_user_transaction_rules_in_settings:
|
|
822
|
+
display_user_profile_in_settings: _,
|
|
823
|
+
display_mobile_devices_in_settings: d,
|
|
824
|
+
display_notification_settings_in_settings: h,
|
|
825
|
+
display_user_transaction_rules_in_settings: w,
|
|
889
826
|
show_help_widget_in_master: v
|
|
890
|
-
} =
|
|
891
|
-
{ enabled:
|
|
892
|
-
{ enabled:
|
|
893
|
-
{ enabled:
|
|
894
|
-
{ enabled:
|
|
827
|
+
} = s, S = [
|
|
828
|
+
{ enabled: _, index: 0, label: o?.profile_label },
|
|
829
|
+
{ enabled: d, index: 1, label: o?.mobile_devices_label },
|
|
830
|
+
{ enabled: h, index: 2, label: o?.notifications_label },
|
|
831
|
+
{ enabled: w, index: 3, label: o?.transaction_rules_label },
|
|
895
832
|
{ enabled: v, index: 4, label: o?.help_label }
|
|
896
|
-
],
|
|
897
|
-
return !
|
|
833
|
+
], A = S.find((D) => D.enabled), [T, g] = m.useState(A ? A.index : -1);
|
|
834
|
+
return !n || !u ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ e(
|
|
898
835
|
q,
|
|
899
836
|
{
|
|
900
837
|
onBackClick: t,
|
|
901
838
|
onMenuClick: r,
|
|
902
839
|
showAccountFilter: !1,
|
|
903
|
-
sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...
|
|
840
|
+
sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...i },
|
|
904
841
|
title: o.title,
|
|
905
|
-
children: /* @__PURE__ */
|
|
842
|
+
children: /* @__PURE__ */ c(p, { mx: a ? 0 : 48, my: 24, children: [
|
|
906
843
|
/* @__PURE__ */ e(
|
|
907
|
-
|
|
844
|
+
pe,
|
|
908
845
|
{
|
|
909
|
-
onChange: (
|
|
846
|
+
onChange: (D, U) => g(U),
|
|
910
847
|
sx: { bgcolor: "background.paper" },
|
|
911
848
|
textColor: "primary",
|
|
912
|
-
value:
|
|
849
|
+
value: T,
|
|
913
850
|
variant: "scrollable",
|
|
914
|
-
children:
|
|
915
|
-
(
|
|
851
|
+
children: S.map(
|
|
852
|
+
(D) => D.enabled && /* @__PURE__ */ e(ue, { label: D.label, value: D.index }, D.index)
|
|
916
853
|
)
|
|
917
854
|
}
|
|
918
855
|
),
|
|
919
|
-
/* @__PURE__ */ e(
|
|
856
|
+
/* @__PURE__ */ e(Qe, { selectedTab: T })
|
|
920
857
|
] })
|
|
921
858
|
}
|
|
922
859
|
);
|
|
923
|
-
}),
|
|
924
|
-
const { clientConfig: r } = G(),
|
|
925
|
-
return
|
|
860
|
+
}), zt = C((t) => {
|
|
861
|
+
const { clientConfig: r } = G(), i = r?.master?.deep_link_params?.view, o = r?.master?.show_back_button;
|
|
862
|
+
return i ? /* @__PURE__ */ c(p, { children: [
|
|
926
863
|
o && t.onBackClick && /* @__PURE__ */ e(
|
|
927
|
-
|
|
864
|
+
O,
|
|
928
865
|
{
|
|
929
866
|
color: "primary",
|
|
930
867
|
onClick: t.onBackClick,
|
|
931
868
|
sx: { p: 10, alignSelf: "flex-start" },
|
|
932
|
-
children: /* @__PURE__ */ e(
|
|
869
|
+
children: /* @__PURE__ */ e(Be, { size: 24 })
|
|
933
870
|
}
|
|
934
871
|
),
|
|
935
|
-
/* @__PURE__ */ e(J, { view:
|
|
872
|
+
/* @__PURE__ */ e(J, { view: i })
|
|
936
873
|
] }) : /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { my: 24, children: /* @__PURE__ */ e(J, {}) }) });
|
|
937
|
-
}),
|
|
938
|
-
const { isMobile: r } = F(), { categoriesLoaded:
|
|
939
|
-
return
|
|
940
|
-
|
|
941
|
-
}), /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { sx: { mx: r ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(
|
|
874
|
+
}), Gt = (t) => {
|
|
875
|
+
const { isMobile: r } = F(), { categoriesLoaded: i, loadCategories: o } = j();
|
|
876
|
+
return m.useEffect(() => {
|
|
877
|
+
i || o().finally();
|
|
878
|
+
}), /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { sx: { mx: r ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(re, {}) }) });
|
|
942
879
|
};
|
|
943
880
|
export {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
881
|
+
Jt as AccountNotificationProfiles,
|
|
882
|
+
Kt as BudgetNotificationProfiles,
|
|
883
|
+
je as DeviceTab,
|
|
884
|
+
Yt as InsightsNotificationProfiles,
|
|
948
885
|
J as NotificationSettings,
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
886
|
+
zt as NotificationSettingsWidget,
|
|
887
|
+
Ue as ProfileTab,
|
|
888
|
+
N as SettingsTabs,
|
|
889
|
+
Wt as SettingsWidget,
|
|
890
|
+
Qe as SettingsWidgetContents,
|
|
891
|
+
re as TransactionRulesTab,
|
|
892
|
+
Gt as TransactionRulesWidget
|
|
956
893
|
};
|
|
957
894
|
//# sourceMappingURL=index.es.js.map
|