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