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