@mx-cartographer/experiences 7.7.2 → 7.8.0-alpha-ram-goal-bug
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 +18 -0
- package/dist/Account-BiB1F8lL.mjs +118 -0
- package/dist/{Account-BfkKlfsW.mjs → Account-DuOz1a27.mjs} +1 -1
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/{AccountDetailsHeader-DqYIuhOs.mjs → AccountDetailsHeader-Cf2TUJnM.mjs} +4 -4
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-yP8QdgPd.mjs → AccountFields-UdOvbQ5H.mjs} +7 -6
- package/dist/{AccountListItem-DMbu9ehd.mjs → AccountListItem-BPVxmNT_.mjs} +7 -7
- package/dist/AccountStore-BbPWe2C9.mjs +244 -0
- package/dist/Accounts-M-LTzStv.mjs +27 -0
- package/dist/{CategoryStore-Cnw9yUys.mjs → CategoryStore-BYICdb9m.mjs} +73 -73
- package/dist/CategoryUtil-meuejJqP.mjs +80 -0
- package/dist/{ConnectionsDrawer-BqR6FWJO.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +1 -1
- package/dist/{DebtsStore-DuSdXM1k.mjs → DebtsStore-BIbOVCPe.mjs} +12 -12
- package/dist/{ExportCsvAction-HK5CeZWR.mjs → ExportCsvAction-CDuzTva1.mjs} +2 -2
- package/dist/GlobalAccountFilter-DQCPNc95.mjs +316 -0
- package/dist/GoalStore-B4LVt_kH.mjs +422 -0
- package/dist/{ManageIncome-BrTrlplL.mjs → ManageIncome-CL3hv8i9.mjs} +44 -44
- package/dist/NetWorthStore-yV43kJro.mjs +168 -0
- package/dist/{NotificationSettings-D4Vh3z8I.mjs → NotificationSettings-SPg3pwbX.mjs} +171 -169
- package/dist/{NotificationStore-CDX_kqHa.mjs → NotificationStore-Ck2KdNmT.mjs} +22 -14
- package/dist/{RecurringSettings-D2V6l77l.mjs → RecurringSettings-Bmnnpb48.mjs} +16 -16
- package/dist/{RecurringTransactionsStore-Caf1cq4v.mjs → RecurringTransactionsStore-BQBEJOPP.mjs} +91 -81
- package/dist/{RecurringTransactions-Bf4lX0Cn.mjs → RepeatingTransaction-miZVnk_A.mjs} +4 -4
- package/dist/{SettingsStore-krIRNwHK.mjs → SettingsStore-BHpuyujx.mjs} +1 -1
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingLegend-gTCJLLkV.mjs → SpendingLegend-CD60HCYS.mjs} +33 -33
- package/dist/{TransactionDetails-7MHOshKQ.mjs → TransactionDetails-BDhz3DLT.mjs} +2 -2
- package/dist/TransactionStore-BSp5bOKg.mjs +705 -0
- package/dist/{User-LJpEwPtn.mjs → User-B0LnmiKO.mjs} +21 -20
- package/dist/WidgetContainer-BbPS3Yxz.mjs +555 -0
- package/dist/accounts/index.es.js +421 -391
- package/dist/accounts/stores/AccountStore.d.ts +30 -23
- package/dist/accounts/utils/Accounts.d.ts +2 -1
- package/dist/budgets/index.es.js +546 -540
- package/dist/budgets/store/BudgetsStore.d.ts +1 -0
- package/dist/cashflow/index.es.js +444 -457
- package/dist/categories/index.es.js +1 -1
- package/dist/categories/stores/CategoryStore.d.ts +10 -5
- package/dist/categories/util/CategoryUtil.d.ts +3 -2
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +459 -445
- package/dist/common/stores/AppDataStore.d.ts +3 -1
- package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
- package/dist/common/stores/GlobalStore.d.ts +3 -3
- package/dist/common/stores/GlobalUiStore.d.ts +10 -6
- package/dist/common/stores/UserStore.d.ts +3 -2
- package/dist/common/types/Account.d.ts +9 -6
- package/dist/dashboard/index.es.js +84 -116
- package/dist/debts/index.es.js +417 -413
- package/dist/{exportTransactionsToCSV-BrTYdSgJ.mjs → exportTransactionsToCSV-DtQ7ovAR.mjs} +1 -1
- package/dist/finstrong/index.es.js +1167 -1110
- package/dist/goals/index.es.js +618 -598
- package/dist/goals/stores/GoalStore.d.ts +19 -4
- package/dist/help/index.es.js +13 -13
- package/dist/investments/index.es.js +330 -325
- package/dist/investments/stores/HoldingStore.d.ts +1 -0
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +423 -433
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +90 -91
- package/dist/notifications/stores/NotificationStore.d.ts +3 -1
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +543 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +4 -2
- package/dist/settings/index.es.js +253 -248
- package/dist/spending/index.es.js +282 -301
- package/dist/transactions/index.es.js +269 -263
- package/dist/transactions/stores/TransactionStore.d.ts +26 -77
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +708 -699
- package/dist/{useAccountDisplayName-BTvP_pw6.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
- package/package.json +3 -3
- package/dist/AccountStore-CWFzg8-E.mjs +0 -260
- package/dist/Accounts-CWt-NRq8.mjs +0 -9
- package/dist/CategoryUtil-DZflYFam.mjs +0 -78
- package/dist/ConnectDrawer-BOjfI6rz.mjs +0 -563
- package/dist/GoalStore-C7ahxxLi.mjs +0 -364
- package/dist/NetWorthStore-xWIo9CYU.mjs +0 -150
- package/dist/TransactionStore-DJwPaZuM.mjs +0 -677
- package/dist/WidgetContainer-CrK6tyHr.mjs +0 -572
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { S as Xt, a as Yt } from "../SettingsStore-
|
|
2
|
-
import { jsxs as c, Fragment as
|
|
1
|
+
import { S as Xt, a as Yt } from "../SettingsStore-BHpuyujx.mjs";
|
|
2
|
+
import { jsxs as c, Fragment as Q, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import p from "react";
|
|
4
|
-
import { observer as
|
|
5
|
-
import
|
|
4
|
+
import { observer as C } from "mobx-react-lite";
|
|
5
|
+
import f 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";
|
|
9
9
|
import fe from "@mui/material/Snackbar";
|
|
10
|
-
import { getUnixTime as
|
|
11
|
-
import { AdapterDateFns as
|
|
10
|
+
import { getUnixTime as ge } from "date-fns/getUnixTime";
|
|
11
|
+
import { AdapterDateFns as _e } 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
14
|
import { useTheme as xe, alpha as U } from "@mui/material/styles";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
15
|
+
import V from "@mui/material/Box";
|
|
16
|
+
import Z from "@mui/material/Button";
|
|
17
17
|
import I from "@mui/material/TextField";
|
|
18
|
-
import { H3 as
|
|
19
|
-
import { V as Ce, a as De, N as
|
|
20
|
-
import { A as Qt, B as Zt, I as eo } from "../NotificationSettings-
|
|
21
|
-
import { u as
|
|
22
|
-
import { u as
|
|
23
|
-
import { a as
|
|
18
|
+
import { H3 as K, P as N, Text as v, Icon as L, ChevronRightIcon as ve } from "@mxenabled/mxui";
|
|
19
|
+
import { V as Ce, a as De, N as j } from "../NotificationSettings-SPg3pwbX.mjs";
|
|
20
|
+
import { A as Qt, B as Zt, I as eo } from "../NotificationSettings-SPg3pwbX.mjs";
|
|
21
|
+
import { u as D, a as $, r as A, o as Se, b as ee, m as z } from "../hooks-ZMp65DFz.mjs";
|
|
22
|
+
import { u as O } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
23
|
+
import { a as G } from "../Dialog-B4PI-_bL.mjs";
|
|
24
24
|
import { formatDistanceToNow as te } from "date-fns/formatDistanceToNow";
|
|
25
25
|
import { fromUnixTime as oe } from "date-fns/fromUnixTime";
|
|
26
26
|
import R from "@mui/material/styles/useTheme";
|
|
27
|
-
import
|
|
27
|
+
import W from "@mui/material/IconButton";
|
|
28
28
|
import { DataGridPro as we } from "@mui/x-data-grid-pro";
|
|
29
|
-
import { H as
|
|
30
|
-
import { b as
|
|
29
|
+
import { H as F } from "../HeaderCell-DjuifqHJ.mjs";
|
|
30
|
+
import { b as H } from "../Localization-2MODESHW.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-DUaFpDGv.mjs";
|
|
35
35
|
import Ae from "@mui/material/List";
|
|
36
|
-
import
|
|
36
|
+
import J from "@mui/material/Divider";
|
|
37
37
|
import Ee from "@mui/material/ListSubheader";
|
|
38
38
|
import { a as Re, u as Pe } from "../CategorySelectorDrawer-cQKX5dZb.mjs";
|
|
39
39
|
import Be from "@mui/material/ListItem";
|
|
@@ -43,9 +43,9 @@ import Le from "@mui/material/ListItemText";
|
|
|
43
43
|
import { D as He } from "../Drawer-DV4NTsFg.mjs";
|
|
44
44
|
import { u as ne } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
45
45
|
import { H as Oe } from "../Help-DODxp9uw.mjs";
|
|
46
|
-
import { W as
|
|
47
|
-
const
|
|
48
|
-
const o = xe(), { common: i, settings: n } =
|
|
46
|
+
import { W as X } from "../WidgetContainer-BbPS3Yxz.mjs";
|
|
47
|
+
const Fe = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
48
|
+
const o = xe(), { common: i, settings: n } = D(), { isDesktop: d, isMobile: s, isSmallMobile: r, isTablet: l } = O(t), { config: b } = $(), { updateUser: _ } = A(), { user: m } = Se(), [h, S] = p.useState({
|
|
49
49
|
first_name: m.first_name,
|
|
50
50
|
last_name: m.last_name,
|
|
51
51
|
email: m.email,
|
|
@@ -53,109 +53,109 @@ const Ue = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
53
53
|
birthday: m.birthday,
|
|
54
54
|
postal_code: m.postal_code,
|
|
55
55
|
credit_score: m.credit_score
|
|
56
|
-
}), [x,
|
|
56
|
+
}), [x, w] = p.useState(!1), [k, T] = p.useState(!1), u = p.useRef(null), M = h.email && !m.email_is_verified && !x, q = h.phone && !m.phone_is_verified && !x;
|
|
57
57
|
p.useEffect(() => {
|
|
58
58
|
if (a) {
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const g = (P) => {
|
|
60
|
+
u.current && !u.current.contains(P.target) && x && T(!0);
|
|
61
61
|
};
|
|
62
|
-
return document.addEventListener("mousedown",
|
|
63
|
-
document.removeEventListener("mousedown",
|
|
62
|
+
return document.addEventListener("mousedown", g), () => {
|
|
63
|
+
document.removeEventListener("mousedown", g);
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
}, [x]);
|
|
67
67
|
const ae = () => {
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
68
|
+
if (h.birthday) {
|
|
69
|
+
const g = new Date(h.birthday * 1e3), P = g.getUTCFullYear(), de = g.getUTCMonth(), me = g.getUTCDate();
|
|
70
70
|
return new Date(P, de, me);
|
|
71
71
|
}
|
|
72
|
-
},
|
|
73
|
-
await _({ ...m, ...
|
|
74
|
-
},
|
|
72
|
+
}, se = async () => {
|
|
73
|
+
await _({ ...m, ...h }), w(!1);
|
|
74
|
+
}, le = () => {
|
|
75
75
|
T(!1), a && a();
|
|
76
76
|
}, ce = () => {
|
|
77
77
|
T(!1);
|
|
78
|
-
}, E = (
|
|
78
|
+
}, E = (g) => {
|
|
79
79
|
const P = {
|
|
80
|
-
...
|
|
81
|
-
...
|
|
80
|
+
...h,
|
|
81
|
+
...g
|
|
82
82
|
};
|
|
83
|
-
S(P),
|
|
83
|
+
S(P), w(JSON.stringify({ ...m, ...P }) !== JSON.stringify(m));
|
|
84
84
|
};
|
|
85
|
-
return /* @__PURE__ */ c(
|
|
85
|
+
return /* @__PURE__ */ c(Q, { children: [
|
|
86
86
|
/* @__PURE__ */ c(
|
|
87
|
-
|
|
87
|
+
V,
|
|
88
88
|
{
|
|
89
89
|
component: "form",
|
|
90
|
-
ref:
|
|
90
|
+
ref: u,
|
|
91
91
|
sx: {
|
|
92
92
|
backgroundColor: "background.paper",
|
|
93
93
|
p: 24,
|
|
94
|
-
width: r ? 320 :
|
|
94
|
+
width: r ? 320 : l ? 680 : d ? 990 : 400,
|
|
95
95
|
"& .MuiTextField-root": {
|
|
96
|
-
width: r ? 272 :
|
|
96
|
+
width: r ? 272 : l ? 328 : d ? 483 : 352
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
children: [
|
|
100
|
-
/* @__PURE__ */ e(
|
|
100
|
+
/* @__PURE__ */ e(K, { children: n.personal_details }),
|
|
101
101
|
/* @__PURE__ */ e(N, { variant: "Body", children: n.update_information }),
|
|
102
102
|
/* @__PURE__ */ c(
|
|
103
|
-
|
|
103
|
+
f,
|
|
104
104
|
{
|
|
105
|
-
direction:
|
|
106
|
-
spacing:
|
|
105
|
+
direction: s ? "column" : "row",
|
|
106
|
+
spacing: s ? 44 : 24,
|
|
107
107
|
sx: { mb: 44, pt: 32 },
|
|
108
108
|
children: [
|
|
109
109
|
/* @__PURE__ */ e(
|
|
110
110
|
I,
|
|
111
111
|
{
|
|
112
|
-
defaultValue:
|
|
112
|
+
defaultValue: h.first_name,
|
|
113
113
|
label: n.first_name,
|
|
114
|
-
onChange: (
|
|
114
|
+
onChange: (g) => E({ first_name: g.target.value })
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
117
|
/* @__PURE__ */ e(
|
|
118
118
|
I,
|
|
119
119
|
{
|
|
120
|
-
defaultValue:
|
|
120
|
+
defaultValue: h.last_name,
|
|
121
121
|
label: n.last_name,
|
|
122
|
-
onChange: (
|
|
122
|
+
onChange: (g) => E({ last_name: g.target.value })
|
|
123
123
|
}
|
|
124
124
|
)
|
|
125
125
|
]
|
|
126
126
|
}
|
|
127
127
|
),
|
|
128
|
-
/* @__PURE__ */ c(
|
|
129
|
-
|
|
128
|
+
/* @__PURE__ */ c(f, { direction: s ? "column" : "row", children: [
|
|
129
|
+
b.display_email_edit_field_in_settings && /* @__PURE__ */ c(f, { sx: { mb: M ? 20 : 44, mr: s ? 0 : 24 }, children: [
|
|
130
130
|
/* @__PURE__ */ e(
|
|
131
131
|
I,
|
|
132
132
|
{
|
|
133
|
-
defaultValue:
|
|
133
|
+
defaultValue: h.email,
|
|
134
134
|
label: n.email_address,
|
|
135
|
-
onChange: (
|
|
135
|
+
onChange: (g) => E({ email: g.target.value })
|
|
136
136
|
}
|
|
137
137
|
),
|
|
138
|
-
|
|
138
|
+
M && /* @__PURE__ */ e(Ce, {})
|
|
139
139
|
] }),
|
|
140
|
-
|
|
140
|
+
b.display_sms_edit_field_in_settings && /* @__PURE__ */ c(f, { sx: { mb: q ? 20 : 44 }, children: [
|
|
141
141
|
/* @__PURE__ */ e(
|
|
142
142
|
I,
|
|
143
143
|
{
|
|
144
|
-
defaultValue:
|
|
144
|
+
defaultValue: h.phone,
|
|
145
145
|
label: n.mobile_number,
|
|
146
|
-
onChange: (
|
|
146
|
+
onChange: (g) => E({ phone: g.target.value }),
|
|
147
147
|
type: "tel"
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
|
-
|
|
150
|
+
q && /* @__PURE__ */ e(De, {})
|
|
151
151
|
] })
|
|
152
152
|
] }),
|
|
153
|
-
/* @__PURE__ */ c(
|
|
154
|
-
/* @__PURE__ */ e(ye, { dateAdapter:
|
|
153
|
+
/* @__PURE__ */ c(f, { direction: s ? "column" : "row", spacing: s ? 44 : 24, sx: { mb: 44 }, children: [
|
|
154
|
+
/* @__PURE__ */ e(ye, { dateAdapter: _e, children: /* @__PURE__ */ e(
|
|
155
155
|
be,
|
|
156
156
|
{
|
|
157
157
|
label: n.birthdate,
|
|
158
|
-
onChange: (
|
|
158
|
+
onChange: (g) => E({ birthday: ge(g) }),
|
|
159
159
|
slotProps: {
|
|
160
160
|
nextIconButton: {
|
|
161
161
|
sx: {
|
|
@@ -183,27 +183,27 @@ const Ue = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
183
183
|
/* @__PURE__ */ e(
|
|
184
184
|
I,
|
|
185
185
|
{
|
|
186
|
-
defaultValue:
|
|
186
|
+
defaultValue: h.postal_code,
|
|
187
187
|
label: n.zip_code,
|
|
188
|
-
onChange: (
|
|
188
|
+
onChange: (g) => E({ postal_code: g.target.value })
|
|
189
189
|
}
|
|
190
190
|
)
|
|
191
191
|
] }),
|
|
192
|
-
/* @__PURE__ */ c(
|
|
192
|
+
/* @__PURE__ */ c(f, { children: [
|
|
193
193
|
/* @__PURE__ */ e(
|
|
194
194
|
I,
|
|
195
195
|
{
|
|
196
|
-
defaultValue:
|
|
196
|
+
defaultValue: h.credit_score,
|
|
197
197
|
label: n.credit_score,
|
|
198
|
-
onChange: (
|
|
198
|
+
onChange: (g) => E({ credit_score: Number(g.target.value) }),
|
|
199
199
|
sx: { mb: 44 }
|
|
200
200
|
}
|
|
201
201
|
),
|
|
202
202
|
/* @__PURE__ */ e(
|
|
203
|
-
|
|
203
|
+
Z,
|
|
204
204
|
{
|
|
205
205
|
disabled: !x,
|
|
206
|
-
onClick:
|
|
206
|
+
onClick: se,
|
|
207
207
|
sx: { width: r ? 272 : 124 },
|
|
208
208
|
variant: "contained",
|
|
209
209
|
children: i.save_button
|
|
@@ -214,39 +214,39 @@ const Ue = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
214
214
|
}
|
|
215
215
|
),
|
|
216
216
|
/* @__PURE__ */ e(
|
|
217
|
-
|
|
217
|
+
G,
|
|
218
218
|
{
|
|
219
219
|
copy: { title: n.discard_changes },
|
|
220
|
-
isOpen:
|
|
220
|
+
isOpen: k,
|
|
221
221
|
onClose: ce,
|
|
222
|
-
onSecondaryAction:
|
|
222
|
+
onSecondaryAction: le,
|
|
223
223
|
primaryText: n.keep_editing,
|
|
224
224
|
secondaryText: n.leave,
|
|
225
225
|
children: n.discard_changes_message
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] });
|
|
229
|
-
},
|
|
230
|
-
var
|
|
229
|
+
}, Ue = C(Fe);
|
|
230
|
+
var y = /* @__PURE__ */ ((t) => (t.Delete = "delete", t.Edit = "edit", t.Token = "token", t))(y || {});
|
|
231
231
|
const Ve = ({
|
|
232
232
|
devices: t,
|
|
233
233
|
onClickDeviceEdit: a,
|
|
234
234
|
onClickDeviceDelete: o
|
|
235
235
|
}) => {
|
|
236
|
-
const i = R(), { settings: n } =
|
|
236
|
+
const i = R(), { settings: n } = D(), d = [
|
|
237
237
|
{
|
|
238
238
|
field: "name",
|
|
239
239
|
headerName: n.mobile_devices_column_name,
|
|
240
|
-
renderHeader:
|
|
241
|
-
renderCell: (r) => /* @__PURE__ */ c(
|
|
242
|
-
/* @__PURE__ */ e(
|
|
240
|
+
renderHeader: F,
|
|
241
|
+
renderCell: (r) => /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
242
|
+
/* @__PURE__ */ e(v, { variant: "Small", children: r.value }),
|
|
243
243
|
/* @__PURE__ */ e(
|
|
244
|
-
|
|
244
|
+
W,
|
|
245
245
|
{
|
|
246
246
|
"aria-label": n.mobile_devices_edit_label,
|
|
247
247
|
color: "secondary",
|
|
248
248
|
onClick: () => a(r.row),
|
|
249
|
-
children: /* @__PURE__ */ e(
|
|
249
|
+
children: /* @__PURE__ */ e(L, { name: "edit" })
|
|
250
250
|
}
|
|
251
251
|
)
|
|
252
252
|
] }),
|
|
@@ -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: F,
|
|
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: F,
|
|
270
270
|
valueFormatter: (r) => te(oe(r), { addSuffix: !0 }),
|
|
271
271
|
sortable: !0,
|
|
272
272
|
hideSortIcons: !1,
|
|
@@ -276,33 +276,33 @@ const Ve = ({
|
|
|
276
276
|
{
|
|
277
277
|
field: "delete",
|
|
278
278
|
headerName: "",
|
|
279
|
-
renderHeader:
|
|
280
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
281
|
-
|
|
279
|
+
renderHeader: F,
|
|
280
|
+
renderCell: (r) => /* @__PURE__ */ e(f, { mr: 4, children: /* @__PURE__ */ e(
|
|
281
|
+
W,
|
|
282
282
|
{
|
|
283
283
|
"aria-label": n.mobile_devices_delete_label,
|
|
284
284
|
color: "secondary",
|
|
285
285
|
onClick: () => o(r.row),
|
|
286
|
-
children: /* @__PURE__ */ e(
|
|
286
|
+
children: /* @__PURE__ */ e(L, { name: "delete" })
|
|
287
287
|
}
|
|
288
288
|
) }),
|
|
289
289
|
sortable: !1,
|
|
290
290
|
hideSortIcons: !1,
|
|
291
291
|
width: 58
|
|
292
292
|
}
|
|
293
|
-
],
|
|
293
|
+
], s = p.useMemo(() => t.map((r) => ({
|
|
294
294
|
id: r.guid,
|
|
295
295
|
...r,
|
|
296
296
|
device_type: `${r.make} ${r.model}`
|
|
297
297
|
})), [t]);
|
|
298
|
-
return /* @__PURE__ */ e(
|
|
298
|
+
return /* @__PURE__ */ e(V, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
299
299
|
we,
|
|
300
300
|
{
|
|
301
301
|
columns: d,
|
|
302
302
|
disableColumnFilter: !0,
|
|
303
303
|
disableColumnMenu: !0,
|
|
304
304
|
disableRowSelectionOnClick: !0,
|
|
305
|
-
rows:
|
|
305
|
+
rows: s,
|
|
306
306
|
slotProps: {
|
|
307
307
|
footer: {
|
|
308
308
|
sx: { justifyContent: "flex-end" }
|
|
@@ -310,7 +310,7 @@ const Ve = ({
|
|
|
310
310
|
},
|
|
311
311
|
slots: {
|
|
312
312
|
footer: () => /* @__PURE__ */ e(
|
|
313
|
-
|
|
313
|
+
V,
|
|
314
314
|
{
|
|
315
315
|
sx: {
|
|
316
316
|
backgroundColor: i.palette.background.default,
|
|
@@ -319,7 +319,7 @@ const Ve = ({
|
|
|
319
319
|
alignItems: "center",
|
|
320
320
|
p: "12px 16px"
|
|
321
321
|
},
|
|
322
|
-
children: /* @__PURE__ */ e(
|
|
322
|
+
children: /* @__PURE__ */ e(v, { color: i.palette.text.secondary, variant: "Small", children: H(
|
|
323
323
|
n.mobile_devices_count,
|
|
324
324
|
/* @__PURE__ */ e("b", { children: t.length }),
|
|
325
325
|
/* @__PURE__ */ e("b", { children: t.length })
|
|
@@ -348,30 +348,30 @@ const Ve = ({
|
|
|
348
348
|
onClickDeviceEdit: a,
|
|
349
349
|
onClickDeviceDelete: o
|
|
350
350
|
}) => {
|
|
351
|
-
const i = R(), { settings: n } =
|
|
352
|
-
|
|
351
|
+
const i = R(), { settings: n } = D(), [d, s] = p.useState(!1), r = (l) => (b, _) => {
|
|
352
|
+
s(_ ? l : !1);
|
|
353
353
|
};
|
|
354
|
-
return /* @__PURE__ */ c(
|
|
355
|
-
t.map((
|
|
354
|
+
return /* @__PURE__ */ c(f, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
|
|
355
|
+
t.map((l) => /* @__PURE__ */ c(
|
|
356
356
|
ke,
|
|
357
357
|
{
|
|
358
|
-
expanded: d ===
|
|
359
|
-
onChange: r(
|
|
358
|
+
expanded: d === l.guid,
|
|
359
|
+
onChange: r(l.guid),
|
|
360
360
|
sx: { boxShadow: "none" },
|
|
361
361
|
children: [
|
|
362
362
|
/* @__PURE__ */ e(
|
|
363
363
|
Ie,
|
|
364
364
|
{
|
|
365
|
-
expandIcon: /* @__PURE__ */ e(
|
|
365
|
+
expandIcon: /* @__PURE__ */ e(L, { color: "secondary", name: "keyboard_arrow_down", size: 24 }),
|
|
366
366
|
sx: {
|
|
367
367
|
padding: "14px 24px",
|
|
368
368
|
borderBottom: "1px solid",
|
|
369
369
|
borderColor: i.palette.border.light
|
|
370
370
|
},
|
|
371
|
-
children: /* @__PURE__ */ c(
|
|
372
|
-
/* @__PURE__ */ e(
|
|
373
|
-
/* @__PURE__ */ e(
|
|
374
|
-
/* @__PURE__ */ e(
|
|
371
|
+
children: /* @__PURE__ */ c(f, { gap: 4, children: [
|
|
372
|
+
/* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: l.name }),
|
|
373
|
+
/* @__PURE__ */ e(v, { color: i.palette.text.secondary, variant: "Small", children: `${l.make} ${l.model}` }),
|
|
374
|
+
/* @__PURE__ */ e(v, { color: i.palette.text.secondary, variant: "Small", children: te(oe(l.created_at), { addSuffix: !0 }) })
|
|
375
375
|
] })
|
|
376
376
|
}
|
|
377
377
|
),
|
|
@@ -381,9 +381,9 @@ const Ve = ({
|
|
|
381
381
|
sx: { backgroundColor: i.palette.background.default, p: "0 0 0 24px" },
|
|
382
382
|
children: [
|
|
383
383
|
/* @__PURE__ */ c(
|
|
384
|
-
|
|
384
|
+
f,
|
|
385
385
|
{
|
|
386
|
-
onClick: () => a(
|
|
386
|
+
onClick: () => a(l),
|
|
387
387
|
sx: {
|
|
388
388
|
alignItems: "center",
|
|
389
389
|
flexDirection: "row",
|
|
@@ -395,15 +395,15 @@ const Ve = ({
|
|
|
395
395
|
borderColor: i.palette.border.light
|
|
396
396
|
},
|
|
397
397
|
children: [
|
|
398
|
-
/* @__PURE__ */ e(
|
|
399
|
-
/* @__PURE__ */ e(
|
|
398
|
+
/* @__PURE__ */ e(W, { "aria-label": n.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(L, { name: "edit" }) }),
|
|
399
|
+
/* @__PURE__ */ e(v, { variant: "Body", children: n.mobile_devices_edit_label })
|
|
400
400
|
]
|
|
401
401
|
}
|
|
402
402
|
),
|
|
403
403
|
/* @__PURE__ */ c(
|
|
404
|
-
|
|
404
|
+
f,
|
|
405
405
|
{
|
|
406
|
-
onClick: () => o(
|
|
406
|
+
onClick: () => o(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(W, { "aria-label": n.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(L, { name: "delete" }) }),
|
|
417
|
+
/* @__PURE__ */ e(v, { variant: "Body", children: n.mobile_devices_delete_label })
|
|
418
418
|
]
|
|
419
419
|
}
|
|
420
420
|
)
|
|
@@ -423,10 +423,10 @@ const Ve = ({
|
|
|
423
423
|
)
|
|
424
424
|
]
|
|
425
425
|
},
|
|
426
|
-
|
|
426
|
+
l.guid
|
|
427
427
|
)),
|
|
428
428
|
/* @__PURE__ */ e(
|
|
429
|
-
|
|
429
|
+
V,
|
|
430
430
|
{
|
|
431
431
|
sx: {
|
|
432
432
|
backgroundColor: i.palette.background.default,
|
|
@@ -434,7 +434,7 @@ const Ve = ({
|
|
|
434
434
|
borderColor: i.palette.border.light,
|
|
435
435
|
p: "12px 16px"
|
|
436
436
|
},
|
|
437
|
-
children: /* @__PURE__ */ e(
|
|
437
|
+
children: /* @__PURE__ */ e(v, { color: i.palette.text.secondary, variant: "Small", children: H(
|
|
438
438
|
n.mobile_devices_count,
|
|
439
439
|
/* @__PURE__ */ e("b", { children: t.length }),
|
|
440
440
|
/* @__PURE__ */ e("b", { children: t.length })
|
|
@@ -449,39 +449,39 @@ const Ve = ({
|
|
|
449
449
|
device: i,
|
|
450
450
|
deviceToken: n = ""
|
|
451
451
|
}) => {
|
|
452
|
-
const d = R(), { common:
|
|
452
|
+
const d = R(), { common: s, settings: r } = D(), { updateDevice: l, deleteDevice: b, setAlert: _, loadDevices: m } = A(), [h, S] = p.useState("");
|
|
453
453
|
p.useEffect(() => {
|
|
454
454
|
i && S(i.name);
|
|
455
455
|
}, [i, t]);
|
|
456
456
|
const x = () => {
|
|
457
457
|
switch (t) {
|
|
458
|
-
case
|
|
458
|
+
case y.Edit:
|
|
459
459
|
return r.mobile_devices_edit_label;
|
|
460
|
-
case
|
|
460
|
+
case y.Delete:
|
|
461
461
|
return r.mobile_devices_delete_label;
|
|
462
462
|
default:
|
|
463
463
|
return "";
|
|
464
464
|
}
|
|
465
|
-
},
|
|
465
|
+
}, w = () => {
|
|
466
466
|
switch (t) {
|
|
467
|
-
case
|
|
468
|
-
return
|
|
469
|
-
case
|
|
470
|
-
return
|
|
471
|
-
case
|
|
472
|
-
return
|
|
467
|
+
case y.Token:
|
|
468
|
+
return s.done_button;
|
|
469
|
+
case y.Edit:
|
|
470
|
+
return s.save_button;
|
|
471
|
+
case y.Delete:
|
|
472
|
+
return s.delete_button;
|
|
473
473
|
default:
|
|
474
474
|
return "";
|
|
475
475
|
}
|
|
476
|
-
},
|
|
477
|
-
const
|
|
476
|
+
}, k = () => {
|
|
477
|
+
const u = {
|
|
478
478
|
"& .MuiDialogContent-root": {
|
|
479
479
|
width: 400,
|
|
480
480
|
pt: 0
|
|
481
481
|
}
|
|
482
482
|
};
|
|
483
|
-
return t ===
|
|
484
|
-
...
|
|
483
|
+
return t === y.Token ? {
|
|
484
|
+
...u,
|
|
485
485
|
"& .MuiToolbar-root:last-child": {
|
|
486
486
|
padding: "32px 60px 48px",
|
|
487
487
|
justifyContent: "center"
|
|
@@ -493,50 +493,50 @@ const Ve = ({
|
|
|
493
493
|
flex: 1
|
|
494
494
|
}
|
|
495
495
|
} : {
|
|
496
|
-
...
|
|
496
|
+
...u,
|
|
497
497
|
"& .MuiToolbar-root:last-child": {
|
|
498
498
|
gap: 8,
|
|
499
499
|
padding: 24,
|
|
500
500
|
justifyContent: "flex-end"
|
|
501
501
|
},
|
|
502
|
-
...t ===
|
|
502
|
+
...t === y.Delete && {
|
|
503
503
|
"& .MuiTypography-Body": {
|
|
504
504
|
padding: 0
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
};
|
|
508
508
|
}, T = async () => {
|
|
509
|
-
if (t ===
|
|
510
|
-
const
|
|
511
|
-
(await
|
|
512
|
-
|
|
509
|
+
if (t === y.Token && o(), t === y.Edit && i) {
|
|
510
|
+
const u = { ...i, name: h };
|
|
511
|
+
(await l(u)).success ? (_(r.mobile_devices_edit_success, "success"), m()) : _(
|
|
512
|
+
H(r.mobile_devices_edit_error, i.name),
|
|
513
513
|
"error"
|
|
514
514
|
), o();
|
|
515
515
|
}
|
|
516
|
-
t ===
|
|
517
|
-
|
|
516
|
+
t === y.Delete && i && ((await b(i.guid)).success ? (_(
|
|
517
|
+
H(r.mobile_devices_delete_success, i.name),
|
|
518
518
|
"success"
|
|
519
519
|
), m()) : _(
|
|
520
|
-
|
|
520
|
+
H(r.mobile_devices_delete_error, i.name),
|
|
521
521
|
"error"
|
|
522
522
|
), o());
|
|
523
523
|
};
|
|
524
524
|
return /* @__PURE__ */ c(
|
|
525
|
-
|
|
525
|
+
G,
|
|
526
526
|
{
|
|
527
527
|
copy: { title: x() },
|
|
528
528
|
isOpen: a,
|
|
529
529
|
onClose: o,
|
|
530
530
|
onPrimaryAction: T,
|
|
531
531
|
onSecondaryAction: o,
|
|
532
|
-
primaryColor: t ===
|
|
533
|
-
primaryText:
|
|
534
|
-
secondaryText: t ===
|
|
535
|
-
sx:
|
|
532
|
+
primaryColor: t === y.Delete ? "error" : void 0,
|
|
533
|
+
primaryText: w(),
|
|
534
|
+
secondaryText: t === y.Token ? s.back : s.cancel_button,
|
|
535
|
+
sx: k(),
|
|
536
536
|
children: [
|
|
537
|
-
t ===
|
|
538
|
-
/* @__PURE__ */ e(
|
|
539
|
-
/* @__PURE__ */ e(
|
|
537
|
+
t === y.Token && /* @__PURE__ */ c(f, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
538
|
+
/* @__PURE__ */ e(v, { bold: !0, truncate: !1, variant: "Body", children: r.mobile_devices_access_label }),
|
|
539
|
+
/* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children: r.mobile_devices_access_info_1 }),
|
|
540
540
|
/* @__PURE__ */ e(
|
|
541
541
|
N,
|
|
542
542
|
{
|
|
@@ -549,30 +549,30 @@ const Ve = ({
|
|
|
549
549
|
children: n
|
|
550
550
|
}
|
|
551
551
|
),
|
|
552
|
-
/* @__PURE__ */ e(
|
|
552
|
+
/* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children: r.mobile_devices_access_info_2 })
|
|
553
553
|
] }),
|
|
554
|
-
t ===
|
|
555
|
-
t ===
|
|
554
|
+
t === y.Edit && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(I, { onChange: (u) => S(u.target.value), value: h }) }),
|
|
555
|
+
t === y.Delete && /* @__PURE__ */ e(N, { children: r.mobile_devices_delete_info })
|
|
556
556
|
]
|
|
557
557
|
}
|
|
558
558
|
);
|
|
559
|
-
}, ze =
|
|
560
|
-
const { isMobile: t } =
|
|
559
|
+
}, ze = C($e), Ge = C(() => {
|
|
560
|
+
const { isMobile: t } = O(), { settings: a } = D(), { isCopyLoaded: o, isInitialized: i } = ee(), { setAlert: n, devices: d, loadDevices: s, generateDeviceToken: r } = A(), [l, b] = p.useState({ open: !1, type: "" }), [_, m] = p.useState(), [h, S] = p.useState("");
|
|
561
561
|
p.useEffect(() => {
|
|
562
|
-
i &&
|
|
562
|
+
i && s();
|
|
563
563
|
}, [i]);
|
|
564
564
|
const x = async () => {
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
},
|
|
568
|
-
m(
|
|
569
|
-
},
|
|
570
|
-
m(
|
|
565
|
+
const u = await r();
|
|
566
|
+
u ? (S(u), b({ open: !0, type: y.Token })) : n(a.mobile_devices_access_error, "error");
|
|
567
|
+
}, w = (u) => {
|
|
568
|
+
m(u), b({ open: !0, type: y.Edit });
|
|
569
|
+
}, k = (u) => {
|
|
570
|
+
m(u), b({ open: !0, type: y.Delete });
|
|
571
571
|
}, T = () => {
|
|
572
|
-
|
|
572
|
+
b({ open: !1, type: "" }), m(void 0);
|
|
573
573
|
};
|
|
574
574
|
return !o || !i ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ c(
|
|
575
|
-
|
|
575
|
+
f,
|
|
576
576
|
{
|
|
577
577
|
sx: {
|
|
578
578
|
backgroundColor: "background.paper",
|
|
@@ -580,44 +580,44 @@ const Ve = ({
|
|
|
580
580
|
gap: 24
|
|
581
581
|
},
|
|
582
582
|
children: [
|
|
583
|
-
/* @__PURE__ */ c(
|
|
584
|
-
/* @__PURE__ */ e(
|
|
583
|
+
/* @__PURE__ */ c(f, { gap: 4, children: [
|
|
584
|
+
/* @__PURE__ */ e(K, { children: a.mobile_devices_title }),
|
|
585
585
|
/* @__PURE__ */ e(N, { variant: "Body", children: a.mobile_devices_info })
|
|
586
586
|
] }),
|
|
587
587
|
t ? /* @__PURE__ */ e(
|
|
588
588
|
We,
|
|
589
589
|
{
|
|
590
590
|
devices: d,
|
|
591
|
-
onClickDeviceDelete:
|
|
592
|
-
onClickDeviceEdit:
|
|
591
|
+
onClickDeviceDelete: k,
|
|
592
|
+
onClickDeviceEdit: w
|
|
593
593
|
}
|
|
594
594
|
) : /* @__PURE__ */ e(
|
|
595
595
|
Ve,
|
|
596
596
|
{
|
|
597
597
|
devices: d,
|
|
598
|
-
onClickDeviceDelete:
|
|
599
|
-
onClickDeviceEdit:
|
|
598
|
+
onClickDeviceDelete: k,
|
|
599
|
+
onClickDeviceEdit: w
|
|
600
600
|
}
|
|
601
601
|
),
|
|
602
|
-
/* @__PURE__ */ c(
|
|
603
|
-
/* @__PURE__ */ e(
|
|
602
|
+
/* @__PURE__ */ c(f, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
|
|
603
|
+
/* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: a.mobile_devices_access_title }),
|
|
604
604
|
/* @__PURE__ */ e(N, { align: "center", variant: "Small", children: a.mobile_devices_access_description }),
|
|
605
|
-
/* @__PURE__ */ e(
|
|
605
|
+
/* @__PURE__ */ e(Z, { onClick: x, variant: "text", children: a.mobile_devices_access_cta })
|
|
606
606
|
] }),
|
|
607
607
|
/* @__PURE__ */ e(
|
|
608
608
|
ze,
|
|
609
609
|
{
|
|
610
610
|
device: _,
|
|
611
|
-
deviceToken:
|
|
612
|
-
dialogType:
|
|
613
|
-
isOpen:
|
|
611
|
+
deviceToken: h,
|
|
612
|
+
dialogType: l.type,
|
|
613
|
+
isOpen: l.open,
|
|
614
614
|
onClose: T
|
|
615
615
|
}
|
|
616
616
|
)
|
|
617
617
|
]
|
|
618
618
|
}
|
|
619
619
|
);
|
|
620
|
-
}), je = Ge,
|
|
620
|
+
}), je = Ge, Y = C(
|
|
621
621
|
({ onClick: t, primaryText: a, secondaryText: o, sx: i }) => {
|
|
622
622
|
const n = R();
|
|
623
623
|
return /* @__PURE__ */ e(Be, { sx: { bgcolor: n.palette.background.paper }, children: /* @__PURE__ */ c(Ne, { alignItems: "flex-start", onClick: t, sx: i, children: [
|
|
@@ -625,20 +625,20 @@ const Ve = ({
|
|
|
625
625
|
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(ve, {}) })
|
|
626
626
|
] }) });
|
|
627
627
|
}
|
|
628
|
-
), Je =
|
|
629
|
-
const { settings: t } =
|
|
628
|
+
), Je = C(() => {
|
|
629
|
+
const { settings: t } = D(), { categories: a } = z(), { selectedRule: o, updateRuleCategory: i } = A(), [n, d] = p.useState(!1), s = () => {
|
|
630
630
|
d(!1);
|
|
631
631
|
}, r = () => {
|
|
632
632
|
d(!0);
|
|
633
|
-
},
|
|
634
|
-
o && o.category_guid !== _ && (o.category_guid = _, await i(o)),
|
|
633
|
+
}, l = (_) => a.find((m) => m.guid === _)?.name, b = async (_) => {
|
|
634
|
+
o && o.category_guid !== _ && (o.category_guid = _, await i(o)), s();
|
|
635
635
|
};
|
|
636
636
|
return /* @__PURE__ */ c(p.Fragment, { children: [
|
|
637
637
|
/* @__PURE__ */ e(
|
|
638
|
-
|
|
638
|
+
Y,
|
|
639
639
|
{
|
|
640
640
|
onClick: r,
|
|
641
|
-
primaryText: o?.category_guid ?
|
|
641
|
+
primaryText: o?.category_guid ? l(o.category_guid) : "",
|
|
642
642
|
secondaryText: t.category
|
|
643
643
|
}
|
|
644
644
|
),
|
|
@@ -646,22 +646,22 @@ const Ve = ({
|
|
|
646
646
|
Re,
|
|
647
647
|
{
|
|
648
648
|
initialSelected: o?.category_guid ? o.category_guid : void 0,
|
|
649
|
-
onClose:
|
|
650
|
-
onSelect:
|
|
649
|
+
onClose: s,
|
|
650
|
+
onSelect: b,
|
|
651
651
|
showDrawer: n,
|
|
652
652
|
title: t.select_category
|
|
653
653
|
}
|
|
654
654
|
)
|
|
655
655
|
] });
|
|
656
|
-
}), Ke =
|
|
657
|
-
const { common: t, settings: a } =
|
|
658
|
-
|
|
656
|
+
}), Ke = C(() => {
|
|
657
|
+
const { common: t, settings: a } = D(), { selectedRule: o, updateRulePayee: i } = A(), n = R(), [d, s] = p.useState(!1), r = o?.description ? o.description : o?.match_description, [l, b] = p.useState(r || ""), _ = () => {
|
|
658
|
+
s(!0);
|
|
659
659
|
}, m = async () => {
|
|
660
|
-
|
|
660
|
+
l !== r && o && (o.description = l, await i(o), s(!1));
|
|
661
661
|
};
|
|
662
662
|
return /* @__PURE__ */ c(p.Fragment, { children: [
|
|
663
663
|
/* @__PURE__ */ e(
|
|
664
|
-
|
|
664
|
+
Y,
|
|
665
665
|
{
|
|
666
666
|
onClick: _,
|
|
667
667
|
primaryText: r,
|
|
@@ -669,13 +669,13 @@ const Ve = ({
|
|
|
669
669
|
}
|
|
670
670
|
),
|
|
671
671
|
/* @__PURE__ */ e(
|
|
672
|
-
|
|
672
|
+
G,
|
|
673
673
|
{
|
|
674
674
|
copy: { title: a.edit_payee },
|
|
675
675
|
isOpen: d,
|
|
676
|
-
onClose: () =>
|
|
676
|
+
onClose: () => s(!1),
|
|
677
677
|
onPrimaryAction: m,
|
|
678
|
-
onSecondaryAction: () =>
|
|
678
|
+
onSecondaryAction: () => s(!1),
|
|
679
679
|
primaryText: t.save_button,
|
|
680
680
|
secondaryText: t.cancel_button,
|
|
681
681
|
sx: {
|
|
@@ -685,18 +685,18 @@ const Ve = ({
|
|
|
685
685
|
children: /* @__PURE__ */ e(
|
|
686
686
|
I,
|
|
687
687
|
{
|
|
688
|
-
onChange: (
|
|
688
|
+
onChange: (h) => b(h.target.value),
|
|
689
689
|
sx: { width: 352 },
|
|
690
|
-
value:
|
|
690
|
+
value: l
|
|
691
691
|
}
|
|
692
692
|
)
|
|
693
693
|
}
|
|
694
694
|
)
|
|
695
695
|
] });
|
|
696
|
-
}), Xe =
|
|
697
|
-
const { common: i, settings: n } =
|
|
696
|
+
}), Xe = C(({ onClose: t, onDelete: a, isOpen: o }) => {
|
|
697
|
+
const { common: i, settings: n } = D(), d = R();
|
|
698
698
|
return /* @__PURE__ */ e(
|
|
699
|
-
|
|
699
|
+
G,
|
|
700
700
|
{
|
|
701
701
|
copy: { title: n.delete_rule },
|
|
702
702
|
isOpen: o,
|
|
@@ -714,12 +714,12 @@ const Ve = ({
|
|
|
714
714
|
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
715
715
|
path: { fill: d.palette.secondary.darker }
|
|
716
716
|
},
|
|
717
|
-
children: /* @__PURE__ */ e(
|
|
717
|
+
children: /* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children: n.delete_rule_confirm })
|
|
718
718
|
}
|
|
719
719
|
);
|
|
720
|
-
}), Ye =
|
|
720
|
+
}), Ye = C(
|
|
721
721
|
({ isOpen: t, onClose: a, onDelete: o }) => {
|
|
722
|
-
const { common: i, settings: n } =
|
|
722
|
+
const { common: i, settings: n } = D(), d = R(), [s, r] = p.useState(!1);
|
|
723
723
|
return /* @__PURE__ */ c(
|
|
724
724
|
He,
|
|
725
725
|
{
|
|
@@ -736,15 +736,15 @@ const Ve = ({
|
|
|
736
736
|
},
|
|
737
737
|
title: n.edit_rule,
|
|
738
738
|
children: [
|
|
739
|
-
/* @__PURE__ */ e(Ee, { children: /* @__PURE__ */ e(
|
|
739
|
+
/* @__PURE__ */ e(Ee, { children: /* @__PURE__ */ e(v, { bold: !0, variant: "XSmall", children: n.details }) }),
|
|
740
740
|
/* @__PURE__ */ e(Ke, {}),
|
|
741
|
-
/* @__PURE__ */ e(
|
|
741
|
+
/* @__PURE__ */ e(J, { sx: { ml: 24 } }),
|
|
742
742
|
/* @__PURE__ */ e(Je, {}),
|
|
743
|
-
/* @__PURE__ */ e(
|
|
743
|
+
/* @__PURE__ */ e(J, { sx: { ml: 24 } }),
|
|
744
744
|
/* @__PURE__ */ e(
|
|
745
745
|
Xe,
|
|
746
746
|
{
|
|
747
|
-
isOpen:
|
|
747
|
+
isOpen: s,
|
|
748
748
|
onClose: () => r(!1),
|
|
749
749
|
onDelete: o
|
|
750
750
|
}
|
|
@@ -753,50 +753,50 @@ const Ve = ({
|
|
|
753
753
|
}
|
|
754
754
|
);
|
|
755
755
|
}
|
|
756
|
-
), qe =
|
|
757
|
-
const { categories: a } =
|
|
758
|
-
|
|
756
|
+
), qe = C(({ rule: t }) => {
|
|
757
|
+
const { categories: a } = z(), { setSelectedGuid: o } = Pe(), { deleteTransactionRule: i, setSelectedRule: n } = A(), { isDesktop: d, isTablet: s } = O(), [r, l] = p.useState(!1), b = () => {
|
|
758
|
+
l(!1), o(null), n(void 0);
|
|
759
759
|
}, _ = async () => {
|
|
760
|
-
await i(),
|
|
760
|
+
await i(), b();
|
|
761
761
|
}, m = () => {
|
|
762
|
-
|
|
763
|
-
},
|
|
762
|
+
l(!0), n(t);
|
|
763
|
+
}, h = (S) => a.find((x) => x.guid === S)?.name;
|
|
764
764
|
return /* @__PURE__ */ c(p.Fragment, { children: [
|
|
765
765
|
/* @__PURE__ */ e(
|
|
766
|
-
|
|
766
|
+
Y,
|
|
767
767
|
{
|
|
768
768
|
onClick: m,
|
|
769
769
|
primaryText: t.description ? t.description : t.match_description,
|
|
770
|
-
secondaryText: t.category_guid ?
|
|
770
|
+
secondaryText: t.category_guid ? h(t.category_guid) : ""
|
|
771
771
|
}
|
|
772
772
|
),
|
|
773
|
-
/* @__PURE__ */ e(
|
|
774
|
-
/* @__PURE__ */ e(Ye, { isOpen: r, onClose:
|
|
773
|
+
/* @__PURE__ */ e(J, { sx: { ml: s || d ? 0 : 24 } }),
|
|
774
|
+
/* @__PURE__ */ e(Ye, { isOpen: r, onClose: b, onDelete: _ })
|
|
775
775
|
] });
|
|
776
|
-
}), Qe =
|
|
777
|
-
const { settings: t } =
|
|
776
|
+
}), Qe = C(() => {
|
|
777
|
+
const { settings: t } = D(), { loadTransactionRules: a, transactionRules: o } = A(), [i, n] = p.useState(!1);
|
|
778
778
|
return ne({
|
|
779
779
|
widgetName: "TransactionRulesTab",
|
|
780
780
|
isLoaded: i
|
|
781
781
|
}), p.useEffect(() => {
|
|
782
782
|
a().finally(() => n(!0));
|
|
783
|
-
}, []), /* @__PURE__ */ c(
|
|
784
|
-
/* @__PURE__ */ c(
|
|
785
|
-
/* @__PURE__ */ e(
|
|
783
|
+
}, []), /* @__PURE__ */ c(f, { sx: { gap: 24, py: 24 }, children: [
|
|
784
|
+
/* @__PURE__ */ c(f, { sx: { px: 24 }, children: [
|
|
785
|
+
/* @__PURE__ */ e(K, { children: t.transaction_rules_label }),
|
|
786
786
|
/* @__PURE__ */ e(N, { variant: "Body", children: t.transaction_rules_description })
|
|
787
787
|
] }),
|
|
788
|
-
/* @__PURE__ */ e(Ae, { children: o.map((d,
|
|
788
|
+
/* @__PURE__ */ e(Ae, { children: o.map((d, s) => /* @__PURE__ */ e(qe, { rule: d }, s)) })
|
|
789
789
|
] });
|
|
790
|
-
}), re = Qe, Ze =
|
|
790
|
+
}), re = Qe, Ze = C(({ selectedTab: t }) => {
|
|
791
791
|
const { alert: a, setAlert: o } = A(), {
|
|
792
792
|
config: { display_user_profile_in_settings: i }
|
|
793
|
-
} =
|
|
794
|
-
return /* @__PURE__ */ c(
|
|
795
|
-
t === B.Profile && /* @__PURE__ */ e(
|
|
793
|
+
} = $();
|
|
794
|
+
return /* @__PURE__ */ c(Q, { children: [
|
|
795
|
+
t === B.Profile && /* @__PURE__ */ e(Ue, {}),
|
|
796
796
|
t === B.Devices && /* @__PURE__ */ e(je, {}),
|
|
797
|
-
t === B.Notifications && /* @__PURE__ */ e(
|
|
797
|
+
t === B.Notifications && /* @__PURE__ */ e(j, { showPersonalDetails: !i }),
|
|
798
798
|
t === B.TransactionRules && /* @__PURE__ */ e(re, {}),
|
|
799
|
-
t === B.Help && /* @__PURE__ */ e(
|
|
799
|
+
t === B.Help && /* @__PURE__ */ e(f, { sx: { px: 24 }, children: /* @__PURE__ */ e(Oe, {}) }),
|
|
800
800
|
/* @__PURE__ */ e(
|
|
801
801
|
fe,
|
|
802
802
|
{
|
|
@@ -820,64 +820,69 @@ const Ve = ({
|
|
|
820
820
|
] });
|
|
821
821
|
});
|
|
822
822
|
var B = /* @__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))(B || {});
|
|
823
|
-
const zt =
|
|
824
|
-
const { settings: o } =
|
|
823
|
+
const zt = C(({ onBackClick: t, sx: a }) => {
|
|
824
|
+
const { settings: o } = D(), { isCopyLoaded: i, isInitialized: n } = ee(), { config: d } = $(), { isMobile: s } = O(), { categoriesLoaded: r, loadCategories: l } = z();
|
|
825
825
|
ne({
|
|
826
826
|
widgetName: "SettingsWidget",
|
|
827
827
|
isLoaded: n && i
|
|
828
|
-
})
|
|
828
|
+
}), p.useEffect(() => {
|
|
829
|
+
r || l().finally();
|
|
830
|
+
}, []);
|
|
829
831
|
const {
|
|
830
|
-
display_user_profile_in_settings:
|
|
831
|
-
display_mobile_devices_in_settings:
|
|
832
|
-
display_notification_settings_in_settings:
|
|
833
|
-
display_user_transaction_rules_in_settings:
|
|
834
|
-
show_help_widget_in_master:
|
|
835
|
-
} = d,
|
|
836
|
-
{ enabled:
|
|
837
|
-
{ enabled:
|
|
838
|
-
{ enabled:
|
|
839
|
-
{ enabled:
|
|
840
|
-
{ enabled:
|
|
841
|
-
],
|
|
832
|
+
display_user_profile_in_settings: b,
|
|
833
|
+
display_mobile_devices_in_settings: _,
|
|
834
|
+
display_notification_settings_in_settings: m,
|
|
835
|
+
display_user_transaction_rules_in_settings: h,
|
|
836
|
+
show_help_widget_in_master: S
|
|
837
|
+
} = d, x = [
|
|
838
|
+
{ enabled: b, index: 0, label: o?.profile_label },
|
|
839
|
+
{ enabled: _, index: 1, label: o?.mobile_devices_label },
|
|
840
|
+
{ enabled: m, index: 2, label: o?.notifications_label },
|
|
841
|
+
{ enabled: h, index: 3, label: o?.transaction_rules_label },
|
|
842
|
+
{ enabled: S, index: 4, label: o?.help_label }
|
|
843
|
+
], w = x.find((u) => u.enabled), [k, T] = p.useState(w ? w.index : -1);
|
|
842
844
|
return !i || !n ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ e(
|
|
843
|
-
|
|
845
|
+
X,
|
|
844
846
|
{
|
|
845
847
|
onBackClick: t,
|
|
848
|
+
showAccountFilter: !1,
|
|
846
849
|
sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...a },
|
|
847
850
|
title: o.title,
|
|
848
|
-
children: /* @__PURE__ */ c(
|
|
851
|
+
children: /* @__PURE__ */ c(f, { mx: s ? 0 : 48, my: 24, children: [
|
|
849
852
|
/* @__PURE__ */ e(
|
|
850
853
|
pe,
|
|
851
854
|
{
|
|
852
|
-
onChange: (
|
|
855
|
+
onChange: (u, M) => T(M),
|
|
853
856
|
sx: { bgcolor: "background.paper" },
|
|
854
857
|
textColor: "primary",
|
|
855
|
-
value:
|
|
858
|
+
value: k,
|
|
856
859
|
variant: "scrollable",
|
|
857
|
-
children:
|
|
858
|
-
(
|
|
860
|
+
children: x.map(
|
|
861
|
+
(u) => u.enabled && /* @__PURE__ */ e(ue, { label: u.label, value: u.index }, u.index)
|
|
859
862
|
)
|
|
860
863
|
}
|
|
861
864
|
),
|
|
862
|
-
/* @__PURE__ */ e(Ze, { selectedTab:
|
|
865
|
+
/* @__PURE__ */ e(Ze, { selectedTab: k })
|
|
863
866
|
] })
|
|
864
867
|
}
|
|
865
868
|
);
|
|
866
|
-
}), Gt =
|
|
867
|
-
const { clientConfig: a } =
|
|
868
|
-
return o ? /* @__PURE__ */ e(
|
|
869
|
+
}), Gt = C((t) => {
|
|
870
|
+
const { clientConfig: a } = $(), o = a?.master?.deep_link_params?.view;
|
|
871
|
+
return o ? /* @__PURE__ */ e(j, { view: o }) : /* @__PURE__ */ e(X, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(f, { my: 24, children: /* @__PURE__ */ e(j, {}) }) });
|
|
869
872
|
}), jt = (t) => {
|
|
870
|
-
const { isMobile: a } =
|
|
871
|
-
return
|
|
873
|
+
const { isMobile: a } = O(), { categoriesLoaded: o, loadCategories: i } = z();
|
|
874
|
+
return p.useEffect(() => {
|
|
875
|
+
o || i().finally();
|
|
876
|
+
}), /* @__PURE__ */ e(X, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(f, { sx: { mx: a ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(re, {}) }) });
|
|
872
877
|
};
|
|
873
878
|
export {
|
|
874
879
|
Qt as AccountNotificationProfiles,
|
|
875
880
|
Zt as BudgetNotificationProfiles,
|
|
876
881
|
je as DeviceTab,
|
|
877
882
|
eo as InsightsNotificationProfiles,
|
|
878
|
-
|
|
883
|
+
j as NotificationSettings,
|
|
879
884
|
Gt as NotificationSettingsWidget,
|
|
880
|
-
|
|
885
|
+
Ue as ProfileTab,
|
|
881
886
|
Xt as SettingsApi,
|
|
882
887
|
Yt as SettingsStore,
|
|
883
888
|
B as SettingsTabs,
|