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