@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.sms1
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/dist/{Account-B4CDD-zq.mjs → Account-BDXA6PWh.mjs} +1 -1
- package/dist/AccountDetailsContent-CUztd3-b.mjs +683 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-i3KFhNuo.mjs} +18 -18
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-QZspYAji.mjs} +10 -12
- package/dist/AccountListItem-DX5upmCS.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-BcnDpyLL.mjs} +3 -3
- package/dist/{Accounts-CRUehOiy.mjs → Accounts-DXfZotRC.mjs} +1 -1
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-Df2nII9u.mjs} +31 -31
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
- package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +27 -27
- package/dist/{CategoryStore-MUwRWH9e.mjs → CategoryStore-DTgyAMM7.mjs} +2 -2
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-C5cR-nfQ.mjs} +4 -4
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BIbTqYOH.mjs} +47 -48
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-BFfY3_zB.mjs} +2 -2
- package/dist/CurrencyInput-BFKcs-_K.mjs +85 -0
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-BbJB0nmu.mjs} +3 -3
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
- package/dist/{Drawer-BF40nbsH.mjs → Drawer-BEtCk82g.mjs} +17 -17
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-DpWY3gVb.mjs} +4 -4
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-DBfsTkAi.mjs → Help-BnPXM_N2.mjs} +145 -124
- package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
- package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
- package/dist/{LineChart-C1PxNf7P.mjs → LineChart-bc1D9xBE.mjs} +78 -78
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-uobBrm_a.mjs} +1 -1
- package/dist/Loader-DUaFpDGv.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-NpXHhO1n.mjs} +46 -46
- package/dist/MicroWidgetContainer-DEiRnYVa.mjs +45 -0
- package/dist/MiniWidgetContainer-CmXpTylX.mjs +56 -0
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-lsuhEpn6.mjs} +4 -4
- package/dist/{NotificationSettings-B74rQVYC.mjs → NotificationSettings-CNmJWVeI.mjs} +77 -77
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +8 -8
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-CqZh1SQa.mjs} +3 -3
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BKcYmpv3.mjs} +77 -77
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-Ni5tSQIO.mjs} +1 -1
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
- package/dist/{SpendingData-DPQ96k3x.mjs → SpendingData-BuJ03S9d.mjs} +4 -4
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CjX-hX2O.mjs} +12 -12
- package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
- package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
- package/dist/TransactionDetails-5M2vfr59.mjs +1379 -0
- package/dist/{TransactionStore-DbwAutwC.mjs → TransactionStore-D-Q3BU9Z.mjs} +58 -41
- package/dist/{TrendsStore-_mRaFUdf.mjs → TrendsStore-BW9FGQeE.mjs} +37 -37
- package/dist/{User-BklmOUSd.mjs → User-wXzDI4M8.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-C0832BMe.mjs} +233 -231
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-BhQ1Kx2z.mjs} +36 -36
- package/dist/accounts/index.es.js +94 -94
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/index.es.js +251 -250
- package/dist/cashflow/index.es.js +158 -157
- package/dist/categories/index.es.js +2 -2
- package/dist/common/components/Loader.d.ts +2 -1
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/barchart/Bar.d.ts +25 -0
- package/dist/common/components/barchart/BarChart.d.ts +34 -0
- package/dist/common/components/barchart/BarColumn.d.ts +37 -0
- package/dist/common/components/barchart/Legend.d.ts +8 -0
- package/dist/common/components/barchart/Util.d.ts +42 -0
- package/dist/common/components/barchart/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +660 -395
- package/dist/common/utils/Theme.d.ts +3 -1
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +2 -1
- package/dist/debts/index.es.js +440 -440
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +3 -3
- package/dist/finstrong/index.es.js +118 -118
- package/dist/goals/index.es.js +380 -386
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +6 -6
- package/dist/investments/index.es.js +279 -278
- package/dist/merchants/index.es.js +7 -7
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/components/NetWorthChange.d.ts +1 -3
- package/dist/networth/index.es.js +185 -191
- package/dist/notifications/index.es.js +30 -30
- package/dist/recurringtransactions/index.es.js +85 -85
- package/dist/settings/index.es.js +270 -270
- package/dist/spending/index.es.js +44 -44
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +169 -168
- package/dist/trends/index.es.js +318 -317
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-CFNF8766.mjs} +1 -1
- package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
- package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
- package/package.json +50 -45
- package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
- package/dist/AccountListItem-wgmlex-_.mjs +0 -90
- package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Loader-Ckqi9Rx6.mjs +0 -21
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
- package/dist/SearchBox-B7km148n.mjs +0 -39
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as
|
|
2
|
-
import { jsxs as c, Fragment as
|
|
1
|
+
import { S as Kt, a as Xt } from "../SettingsStore-krIRNwHK.mjs";
|
|
2
|
+
import { jsxs as c, Fragment as q, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import u from "react";
|
|
4
4
|
import { observer as D } from "mobx-react-lite";
|
|
5
5
|
import h from "@mui/material/Stack";
|
|
@@ -11,40 +11,40 @@ 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
|
|
14
|
+
import { useTheme as xe, alpha as U } from "@mui/material/styles";
|
|
15
15
|
import F from "@mui/material/Box";
|
|
16
|
-
import
|
|
16
|
+
import Q from "@mui/material/Button";
|
|
17
17
|
import I from "@mui/material/TextField";
|
|
18
|
-
import { H3 as J, P as
|
|
19
|
-
import { V as
|
|
20
|
-
import { A as
|
|
21
|
-
import {
|
|
22
|
-
import { u as
|
|
23
|
-
import {
|
|
18
|
+
import { H3 as J, P as L, Text as v, Icon as M, ChevronRightIcon as ve } from "@mxenabled/mxui";
|
|
19
|
+
import { V as Ce, a as De, N as G } from "../NotificationSettings-CNmJWVeI.mjs";
|
|
20
|
+
import { A as qt, B as Qt, I as Zt } from "../NotificationSettings-CNmJWVeI.mjs";
|
|
21
|
+
import { u as k, a as W, s as A, p as Se, b as Z, m as ee, n as te } from "../hooks-C41HAxM5.mjs";
|
|
22
|
+
import { u as H } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
23
|
+
import { D as $ } from "../Dialog-BPTr3qHE.mjs";
|
|
24
24
|
import { formatDistanceToNow as oe } from "date-fns/formatDistanceToNow";
|
|
25
25
|
import { fromUnixTime as ne } from "date-fns/fromUnixTime";
|
|
26
|
+
import R from "@mui/material/styles/useTheme";
|
|
26
27
|
import V from "@mui/material/IconButton";
|
|
27
|
-
import { DataGridPro as
|
|
28
|
-
import { H as O } from "../HeaderCell-
|
|
29
|
-
import { b as
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import { L as
|
|
34
|
-
import
|
|
28
|
+
import { DataGridPro as ke } from "@mui/x-data-grid-pro";
|
|
29
|
+
import { H as O } from "../HeaderCell-DjuifqHJ.mjs";
|
|
30
|
+
import { b as N } from "../Localization-2MODESHW.mjs";
|
|
31
|
+
import we from "@mui/material/Accordion";
|
|
32
|
+
import Te from "@mui/material/AccordionDetails";
|
|
33
|
+
import Ie from "@mui/material/AccordionSummary";
|
|
34
|
+
import { L as re } from "../Loader-DUaFpDGv.mjs";
|
|
35
|
+
import Ae from "@mui/material/List";
|
|
35
36
|
import j from "@mui/material/Divider";
|
|
36
|
-
import
|
|
37
|
-
import { a as
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
const o = A(), { common: n, settings: i } = w(), { isDesktop: d, isMobile: s, isSmallMobile: r, isTablet: l } = H(t), { config: b } = z(), { updateUser: _ } = E(), { user: m } = Ce(), [p, k] = u.useState({
|
|
37
|
+
import Ee from "@mui/material/ListSubheader";
|
|
38
|
+
import { a as Re, u as Pe } from "../CategorySelectorDrawer-DqJK_rrL.mjs";
|
|
39
|
+
import Be from "@mui/material/ListItem";
|
|
40
|
+
import Me from "@mui/material/ListItemButton";
|
|
41
|
+
import Ne from "@mui/material/ListItemIcon";
|
|
42
|
+
import Le from "@mui/material/ListItemText";
|
|
43
|
+
import { D as He } from "../Drawer-BEtCk82g.mjs";
|
|
44
|
+
import { H as Oe } from "../Help-BnPXM_N2.mjs";
|
|
45
|
+
import { W as K } from "../WidgetContainer-BhQ1Kx2z.mjs";
|
|
46
|
+
const Ue = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
47
|
+
const o = xe(), { common: n, settings: r } = k(), { isDesktop: d, isMobile: l, isSmallMobile: i, isTablet: s } = H(t), { config: b } = W(), { updateUser: _ } = A(), { user: m } = Se(), [p, S] = u.useState({
|
|
48
48
|
first_name: m.first_name,
|
|
49
49
|
last_name: m.last_name,
|
|
50
50
|
email: m.email,
|
|
@@ -52,11 +52,11 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
52
52
|
birthday: m.birthday,
|
|
53
53
|
postal_code: m.postal_code,
|
|
54
54
|
credit_score: m.credit_score
|
|
55
|
-
}), [C,
|
|
55
|
+
}), [C, w] = u.useState(!1), [T, x] = u.useState(!1), g = u.useRef(null), z = p.email && !m.email_is_verified && !C, Y = p.phone && !m.phone_is_verified && !C;
|
|
56
56
|
u.useEffect(() => {
|
|
57
57
|
if (a) {
|
|
58
|
-
const f = (
|
|
59
|
-
g.current && !g.current.contains(
|
|
58
|
+
const f = (P) => {
|
|
59
|
+
g.current && !g.current.contains(P.target) && C && x(!0);
|
|
60
60
|
};
|
|
61
61
|
return document.addEventListener("mousedown", f), () => {
|
|
62
62
|
document.removeEventListener("mousedown", f);
|
|
@@ -65,23 +65,23 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
65
65
|
}, [C]);
|
|
66
66
|
const ae = () => {
|
|
67
67
|
if (p.birthday) {
|
|
68
|
-
const f = new Date(p.birthday * 1e3),
|
|
69
|
-
return new Date(
|
|
68
|
+
const f = new Date(p.birthday * 1e3), P = f.getUTCFullYear(), de = f.getUTCMonth(), me = f.getUTCDate();
|
|
69
|
+
return new Date(P, de, me);
|
|
70
70
|
}
|
|
71
|
-
},
|
|
72
|
-
await _({ ...m, ...p }),
|
|
73
|
-
},
|
|
71
|
+
}, le = async () => {
|
|
72
|
+
await _({ ...m, ...p }), w(!1);
|
|
73
|
+
}, se = () => {
|
|
74
74
|
x(!1), a && a();
|
|
75
75
|
}, ce = () => {
|
|
76
76
|
x(!1);
|
|
77
|
-
},
|
|
78
|
-
const
|
|
77
|
+
}, E = (f) => {
|
|
78
|
+
const P = {
|
|
79
79
|
...p,
|
|
80
80
|
...f
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
S(P), w(JSON.stringify({ ...m, ...P }) !== JSON.stringify(m));
|
|
83
83
|
};
|
|
84
|
-
return /* @__PURE__ */ c(
|
|
84
|
+
return /* @__PURE__ */ c(q, { children: [
|
|
85
85
|
/* @__PURE__ */ c(
|
|
86
86
|
F,
|
|
87
87
|
{
|
|
@@ -90,71 +90,71 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
90
90
|
sx: {
|
|
91
91
|
backgroundColor: "background.paper",
|
|
92
92
|
p: 24,
|
|
93
|
-
width:
|
|
93
|
+
width: i ? 320 : s ? 680 : d ? 990 : 400,
|
|
94
94
|
"& .MuiTextField-root": {
|
|
95
|
-
width:
|
|
95
|
+
width: i ? 272 : s ? 328 : d ? 483 : 352
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
children: [
|
|
99
|
-
/* @__PURE__ */ e(J, { children:
|
|
100
|
-
/* @__PURE__ */ e(
|
|
99
|
+
/* @__PURE__ */ e(J, { children: r.personal_details }),
|
|
100
|
+
/* @__PURE__ */ e(L, { variant: "Body", children: r.update_information }),
|
|
101
101
|
/* @__PURE__ */ c(
|
|
102
102
|
h,
|
|
103
103
|
{
|
|
104
|
-
direction:
|
|
105
|
-
spacing:
|
|
104
|
+
direction: l ? "column" : "row",
|
|
105
|
+
spacing: l ? 44 : 24,
|
|
106
106
|
sx: { mb: 44, pt: 32 },
|
|
107
107
|
children: [
|
|
108
108
|
/* @__PURE__ */ e(
|
|
109
109
|
I,
|
|
110
110
|
{
|
|
111
111
|
defaultValue: p.first_name,
|
|
112
|
-
label:
|
|
113
|
-
onChange: (f) =>
|
|
112
|
+
label: r.first_name,
|
|
113
|
+
onChange: (f) => E({ first_name: f.target.value })
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
116
|
/* @__PURE__ */ e(
|
|
117
117
|
I,
|
|
118
118
|
{
|
|
119
119
|
defaultValue: p.last_name,
|
|
120
|
-
label:
|
|
121
|
-
onChange: (f) =>
|
|
120
|
+
label: r.last_name,
|
|
121
|
+
onChange: (f) => E({ last_name: f.target.value })
|
|
122
122
|
}
|
|
123
123
|
)
|
|
124
124
|
]
|
|
125
125
|
}
|
|
126
126
|
),
|
|
127
|
-
/* @__PURE__ */ c(h, { direction:
|
|
128
|
-
b.display_email_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { mb:
|
|
127
|
+
/* @__PURE__ */ c(h, { direction: l ? "column" : "row", children: [
|
|
128
|
+
b.display_email_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { mb: z ? 20 : 44, mr: l ? 0 : 24 }, children: [
|
|
129
129
|
/* @__PURE__ */ e(
|
|
130
130
|
I,
|
|
131
131
|
{
|
|
132
132
|
defaultValue: p.email,
|
|
133
|
-
label:
|
|
134
|
-
onChange: (f) =>
|
|
133
|
+
label: r.email_address,
|
|
134
|
+
onChange: (f) => E({ email: f.target.value })
|
|
135
135
|
}
|
|
136
136
|
),
|
|
137
|
-
|
|
137
|
+
z && /* @__PURE__ */ e(Ce, {})
|
|
138
138
|
] }),
|
|
139
|
-
b.display_sms_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { mb:
|
|
139
|
+
b.display_sms_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { mb: Y ? 20 : 44 }, children: [
|
|
140
140
|
/* @__PURE__ */ e(
|
|
141
141
|
I,
|
|
142
142
|
{
|
|
143
143
|
defaultValue: p.phone,
|
|
144
|
-
label:
|
|
145
|
-
onChange: (f) =>
|
|
144
|
+
label: r.mobile_number,
|
|
145
|
+
onChange: (f) => E({ phone: f.target.value }),
|
|
146
146
|
type: "tel"
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
|
-
|
|
149
|
+
Y && /* @__PURE__ */ e(De, {})
|
|
150
150
|
] })
|
|
151
151
|
] }),
|
|
152
|
-
/* @__PURE__ */ c(h, { direction:
|
|
152
|
+
/* @__PURE__ */ c(h, { direction: l ? "column" : "row", spacing: l ? 44 : 24, sx: { mb: 44 }, children: [
|
|
153
153
|
/* @__PURE__ */ e(ye, { dateAdapter: ge, children: /* @__PURE__ */ e(
|
|
154
154
|
be,
|
|
155
155
|
{
|
|
156
|
-
label:
|
|
157
|
-
onChange: (f) =>
|
|
156
|
+
label: r.birthdate,
|
|
157
|
+
onChange: (f) => E({ birthday: _e(f) }),
|
|
158
158
|
slotProps: {
|
|
159
159
|
nextIconButton: {
|
|
160
160
|
sx: {
|
|
@@ -183,8 +183,8 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
183
183
|
I,
|
|
184
184
|
{
|
|
185
185
|
defaultValue: p.postal_code,
|
|
186
|
-
label:
|
|
187
|
-
onChange: (f) =>
|
|
186
|
+
label: r.zip_code,
|
|
187
|
+
onChange: (f) => E({ postal_code: f.target.value })
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
190
|
] }),
|
|
@@ -193,17 +193,17 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
193
193
|
I,
|
|
194
194
|
{
|
|
195
195
|
defaultValue: p.credit_score,
|
|
196
|
-
label:
|
|
197
|
-
onChange: (f) =>
|
|
196
|
+
label: r.credit_score,
|
|
197
|
+
onChange: (f) => E({ credit_score: Number(f.target.value) }),
|
|
198
198
|
sx: { mb: 44 }
|
|
199
199
|
}
|
|
200
200
|
),
|
|
201
201
|
/* @__PURE__ */ e(
|
|
202
|
-
|
|
202
|
+
Q,
|
|
203
203
|
{
|
|
204
204
|
disabled: !C,
|
|
205
|
-
onClick:
|
|
206
|
-
sx: { width:
|
|
205
|
+
onClick: le,
|
|
206
|
+
sx: { width: i ? 272 : 124 },
|
|
207
207
|
variant: "contained",
|
|
208
208
|
children: n.save_button
|
|
209
209
|
}
|
|
@@ -213,39 +213,39 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
213
213
|
}
|
|
214
214
|
),
|
|
215
215
|
/* @__PURE__ */ e(
|
|
216
|
-
|
|
216
|
+
$,
|
|
217
217
|
{
|
|
218
|
-
copy: { title:
|
|
218
|
+
copy: { title: r.discard_changes },
|
|
219
219
|
isOpen: T,
|
|
220
220
|
onClose: ce,
|
|
221
|
-
onSecondaryAction:
|
|
222
|
-
primaryText:
|
|
223
|
-
secondaryText:
|
|
224
|
-
children:
|
|
221
|
+
onSecondaryAction: se,
|
|
222
|
+
primaryText: r.keep_editing,
|
|
223
|
+
secondaryText: r.leave,
|
|
224
|
+
children: r.discard_changes_message
|
|
225
225
|
}
|
|
226
226
|
)
|
|
227
227
|
] });
|
|
228
|
-
},
|
|
228
|
+
}, Fe = D(Ue);
|
|
229
229
|
var y = /* @__PURE__ */ ((t) => (t.Delete = "delete", t.Edit = "edit", t.Token = "token", t))(y || {});
|
|
230
|
-
const
|
|
230
|
+
const Ve = ({
|
|
231
231
|
devices: t,
|
|
232
232
|
onClickDeviceEdit: a,
|
|
233
233
|
onClickDeviceDelete: o
|
|
234
234
|
}) => {
|
|
235
|
-
const n =
|
|
235
|
+
const n = R(), { settings: r } = k(), d = [
|
|
236
236
|
{
|
|
237
237
|
field: "name",
|
|
238
|
-
headerName:
|
|
238
|
+
headerName: r.mobile_devices_column_name,
|
|
239
239
|
renderHeader: O,
|
|
240
|
-
renderCell: (
|
|
241
|
-
/* @__PURE__ */ e(v, { variant: "
|
|
240
|
+
renderCell: (i) => /* @__PURE__ */ c(h, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
241
|
+
/* @__PURE__ */ e(v, { variant: "Small", children: i.value }),
|
|
242
242
|
/* @__PURE__ */ e(
|
|
243
243
|
V,
|
|
244
244
|
{
|
|
245
|
-
"aria-label":
|
|
245
|
+
"aria-label": r.mobile_devices_edit_label,
|
|
246
246
|
color: "secondary",
|
|
247
|
-
onClick: () => a(
|
|
248
|
-
children: /* @__PURE__ */ e(
|
|
247
|
+
onClick: () => a(i.row),
|
|
248
|
+
children: /* @__PURE__ */ e(M, { name: "edit" })
|
|
249
249
|
}
|
|
250
250
|
)
|
|
251
251
|
] }),
|
|
@@ -255,7 +255,7 @@ const Fe = ({
|
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
257
|
field: "device_type",
|
|
258
|
-
headerName:
|
|
258
|
+
headerName: r.mobile_devices_column_type,
|
|
259
259
|
renderHeader: O,
|
|
260
260
|
sortable: !0,
|
|
261
261
|
hideSortIcons: !1,
|
|
@@ -264,9 +264,9 @@ const Fe = ({
|
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
266
|
field: "created_at",
|
|
267
|
-
headerName:
|
|
267
|
+
headerName: r.mobile_devices_column_added,
|
|
268
268
|
renderHeader: O,
|
|
269
|
-
valueFormatter: (
|
|
269
|
+
valueFormatter: (i) => oe(ne(i), { addSuffix: !0 }),
|
|
270
270
|
sortable: !0,
|
|
271
271
|
hideSortIcons: !1,
|
|
272
272
|
flex: 1,
|
|
@@ -276,32 +276,32 @@ const Fe = ({
|
|
|
276
276
|
field: "delete",
|
|
277
277
|
headerName: "",
|
|
278
278
|
renderHeader: O,
|
|
279
|
-
renderCell: (
|
|
279
|
+
renderCell: (i) => /* @__PURE__ */ e(h, { mr: 4, children: /* @__PURE__ */ e(
|
|
280
280
|
V,
|
|
281
281
|
{
|
|
282
|
-
"aria-label":
|
|
282
|
+
"aria-label": r.mobile_devices_delete_label,
|
|
283
283
|
color: "secondary",
|
|
284
|
-
onClick: () => o(
|
|
285
|
-
children: /* @__PURE__ */ e(
|
|
284
|
+
onClick: () => o(i.row),
|
|
285
|
+
children: /* @__PURE__ */ e(M, { name: "delete" })
|
|
286
286
|
}
|
|
287
287
|
) }),
|
|
288
288
|
sortable: !1,
|
|
289
289
|
hideSortIcons: !1,
|
|
290
290
|
width: 58
|
|
291
291
|
}
|
|
292
|
-
],
|
|
293
|
-
id:
|
|
294
|
-
...
|
|
295
|
-
device_type: `${
|
|
292
|
+
], l = u.useMemo(() => t.map((i) => ({
|
|
293
|
+
id: i.guid,
|
|
294
|
+
...i,
|
|
295
|
+
device_type: `${i.make} ${i.model}`
|
|
296
296
|
})), [t]);
|
|
297
297
|
return /* @__PURE__ */ e(F, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
298
|
-
|
|
298
|
+
ke,
|
|
299
299
|
{
|
|
300
300
|
columns: d,
|
|
301
301
|
disableColumnFilter: !0,
|
|
302
302
|
disableColumnMenu: !0,
|
|
303
303
|
disableRowSelectionOnClick: !0,
|
|
304
|
-
rows:
|
|
304
|
+
rows: l,
|
|
305
305
|
slotProps: {
|
|
306
306
|
footer: {
|
|
307
307
|
sx: { justifyContent: "flex-end" }
|
|
@@ -318,8 +318,8 @@ const Fe = ({
|
|
|
318
318
|
alignItems: "center",
|
|
319
319
|
p: "12px 16px"
|
|
320
320
|
},
|
|
321
|
-
children: /* @__PURE__ */ e(v, { color: n.palette.text.secondary, variant: "
|
|
322
|
-
|
|
321
|
+
children: /* @__PURE__ */ e(v, { color: n.palette.text.secondary, variant: "Small", children: N(
|
|
322
|
+
r.mobile_devices_count,
|
|
323
323
|
/* @__PURE__ */ e("b", { children: t.length }),
|
|
324
324
|
/* @__PURE__ */ e("b", { children: t.length })
|
|
325
325
|
) })
|
|
@@ -328,7 +328,7 @@ const Fe = ({
|
|
|
328
328
|
},
|
|
329
329
|
sx: {
|
|
330
330
|
border: "1px solid",
|
|
331
|
-
borderColor: n.palette.
|
|
331
|
+
borderColor: n.palette.border.light,
|
|
332
332
|
borderRadius: "8px",
|
|
333
333
|
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
334
334
|
color: n.palette.primary.main,
|
|
@@ -342,47 +342,47 @@ const Fe = ({
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
) });
|
|
345
|
-
},
|
|
345
|
+
}, We = ({
|
|
346
346
|
devices: t,
|
|
347
347
|
onClickDeviceEdit: a,
|
|
348
348
|
onClickDeviceDelete: o
|
|
349
349
|
}) => {
|
|
350
|
-
const n =
|
|
351
|
-
|
|
350
|
+
const n = R(), { settings: r } = k(), [d, l] = u.useState(!1), i = (s) => (b, _) => {
|
|
351
|
+
l(_ ? s : !1);
|
|
352
352
|
};
|
|
353
353
|
return /* @__PURE__ */ c(h, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
|
|
354
|
-
t.map((
|
|
355
|
-
|
|
354
|
+
t.map((s) => /* @__PURE__ */ c(
|
|
355
|
+
we,
|
|
356
356
|
{
|
|
357
|
-
expanded: d ===
|
|
358
|
-
onChange:
|
|
357
|
+
expanded: d === s.guid,
|
|
358
|
+
onChange: i(s.guid),
|
|
359
359
|
sx: { boxShadow: "none" },
|
|
360
360
|
children: [
|
|
361
361
|
/* @__PURE__ */ e(
|
|
362
|
-
|
|
362
|
+
Ie,
|
|
363
363
|
{
|
|
364
|
-
expandIcon: /* @__PURE__ */ e(
|
|
364
|
+
expandIcon: /* @__PURE__ */ e(M, { color: "secondary", name: "keyboard_arrow_down", size: 24 }),
|
|
365
365
|
sx: {
|
|
366
366
|
padding: "14px 24px",
|
|
367
367
|
borderBottom: "1px solid",
|
|
368
|
-
borderColor: n.palette.
|
|
368
|
+
borderColor: n.palette.border.light
|
|
369
369
|
},
|
|
370
370
|
children: /* @__PURE__ */ c(h, { gap: 4, children: [
|
|
371
|
-
/* @__PURE__ */ e(v, { bold: !0, variant: "
|
|
372
|
-
/* @__PURE__ */ e(v, { color: n.palette.text.secondary, variant: "
|
|
373
|
-
/* @__PURE__ */ e(v, { color: n.palette.text.secondary, variant: "
|
|
371
|
+
/* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: s.name }),
|
|
372
|
+
/* @__PURE__ */ e(v, { color: n.palette.text.secondary, variant: "Small", children: `${s.make} ${s.model}` }),
|
|
373
|
+
/* @__PURE__ */ e(v, { color: n.palette.text.secondary, variant: "Small", children: oe(ne(s.created_at), { addSuffix: !0 }) })
|
|
374
374
|
] })
|
|
375
375
|
}
|
|
376
376
|
),
|
|
377
377
|
/* @__PURE__ */ c(
|
|
378
|
-
|
|
378
|
+
Te,
|
|
379
379
|
{
|
|
380
380
|
sx: { backgroundColor: n.palette.background.default, p: "0 0 0 24px" },
|
|
381
381
|
children: [
|
|
382
382
|
/* @__PURE__ */ c(
|
|
383
383
|
h,
|
|
384
384
|
{
|
|
385
|
-
onClick: () => a(
|
|
385
|
+
onClick: () => a(s),
|
|
386
386
|
sx: {
|
|
387
387
|
alignItems: "center",
|
|
388
388
|
flexDirection: "row",
|
|
@@ -391,18 +391,18 @@ const Fe = ({
|
|
|
391
391
|
py: 16,
|
|
392
392
|
cursor: "pointer",
|
|
393
393
|
borderBottom: "1px solid",
|
|
394
|
-
borderColor: n.palette.
|
|
394
|
+
borderColor: n.palette.border.light
|
|
395
395
|
},
|
|
396
396
|
children: [
|
|
397
|
-
/* @__PURE__ */ e(V, { "aria-label":
|
|
398
|
-
/* @__PURE__ */ e(v, { variant: "
|
|
397
|
+
/* @__PURE__ */ e(V, { "aria-label": r.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(M, { name: "edit" }) }),
|
|
398
|
+
/* @__PURE__ */ e(v, { variant: "Body", children: r.mobile_devices_edit_label })
|
|
399
399
|
]
|
|
400
400
|
}
|
|
401
401
|
),
|
|
402
402
|
/* @__PURE__ */ c(
|
|
403
403
|
h,
|
|
404
404
|
{
|
|
405
|
-
onClick: () => o(
|
|
405
|
+
onClick: () => o(s),
|
|
406
406
|
sx: {
|
|
407
407
|
alignItems: "center",
|
|
408
408
|
flexDirection: "row",
|
|
@@ -412,8 +412,8 @@ const Fe = ({
|
|
|
412
412
|
cursor: "pointer"
|
|
413
413
|
},
|
|
414
414
|
children: [
|
|
415
|
-
/* @__PURE__ */ e(V, { "aria-label":
|
|
416
|
-
/* @__PURE__ */ e(v, { variant: "
|
|
415
|
+
/* @__PURE__ */ e(V, { "aria-label": r.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(M, { name: "delete" }) }),
|
|
416
|
+
/* @__PURE__ */ e(v, { variant: "Body", children: r.mobile_devices_delete_label })
|
|
417
417
|
]
|
|
418
418
|
}
|
|
419
419
|
)
|
|
@@ -422,7 +422,7 @@ const Fe = ({
|
|
|
422
422
|
)
|
|
423
423
|
]
|
|
424
424
|
},
|
|
425
|
-
|
|
425
|
+
s.guid
|
|
426
426
|
)),
|
|
427
427
|
/* @__PURE__ */ e(
|
|
428
428
|
F,
|
|
@@ -430,45 +430,45 @@ const Fe = ({
|
|
|
430
430
|
sx: {
|
|
431
431
|
backgroundColor: n.palette.background.default,
|
|
432
432
|
borderTop: "1px solid",
|
|
433
|
-
borderColor: n.palette.
|
|
433
|
+
borderColor: n.palette.border.light,
|
|
434
434
|
p: "12px 16px"
|
|
435
435
|
},
|
|
436
|
-
children: /* @__PURE__ */ e(v, { color: n.palette.text.secondary, variant: "
|
|
437
|
-
|
|
436
|
+
children: /* @__PURE__ */ e(v, { color: n.palette.text.secondary, variant: "Small", children: N(
|
|
437
|
+
r.mobile_devices_count,
|
|
438
438
|
/* @__PURE__ */ e("b", { children: t.length }),
|
|
439
439
|
/* @__PURE__ */ e("b", { children: t.length })
|
|
440
440
|
) })
|
|
441
441
|
}
|
|
442
442
|
)
|
|
443
443
|
] });
|
|
444
|
-
},
|
|
444
|
+
}, $e = ({
|
|
445
445
|
dialogType: t,
|
|
446
446
|
isOpen: a,
|
|
447
447
|
onClose: o,
|
|
448
448
|
device: n,
|
|
449
|
-
deviceToken:
|
|
449
|
+
deviceToken: r = ""
|
|
450
450
|
}) => {
|
|
451
|
-
const d =
|
|
451
|
+
const d = R(), { common: l, settings: i } = k(), { updateDevice: s, deleteDevice: b, setAlert: _, loadDevices: m } = A(), [p, S] = u.useState("");
|
|
452
452
|
u.useEffect(() => {
|
|
453
|
-
n &&
|
|
453
|
+
n && S(n.name);
|
|
454
454
|
}, [n, t]);
|
|
455
455
|
const C = () => {
|
|
456
456
|
switch (t) {
|
|
457
457
|
case y.Edit:
|
|
458
|
-
return
|
|
458
|
+
return i.mobile_devices_edit_label;
|
|
459
459
|
case y.Delete:
|
|
460
|
-
return
|
|
460
|
+
return i.mobile_devices_delete_label;
|
|
461
461
|
default:
|
|
462
462
|
return "";
|
|
463
463
|
}
|
|
464
|
-
},
|
|
464
|
+
}, w = () => {
|
|
465
465
|
switch (t) {
|
|
466
466
|
case y.Token:
|
|
467
|
-
return
|
|
467
|
+
return l.done_button;
|
|
468
468
|
case y.Edit:
|
|
469
|
-
return
|
|
469
|
+
return l.save_button;
|
|
470
470
|
case y.Delete:
|
|
471
|
-
return
|
|
471
|
+
return l.delete_button;
|
|
472
472
|
default:
|
|
473
473
|
return "";
|
|
474
474
|
}
|
|
@@ -499,7 +499,7 @@ const Fe = ({
|
|
|
499
499
|
justifyContent: "flex-end"
|
|
500
500
|
},
|
|
501
501
|
...t === y.Delete && {
|
|
502
|
-
"& .MuiTypography-
|
|
502
|
+
"& .MuiTypography-Body": {
|
|
503
503
|
padding: 0
|
|
504
504
|
}
|
|
505
505
|
}
|
|
@@ -507,21 +507,21 @@ const Fe = ({
|
|
|
507
507
|
}, x = async () => {
|
|
508
508
|
if (t === y.Token && o(), t === y.Edit && n) {
|
|
509
509
|
const g = { ...n, name: p };
|
|
510
|
-
(await
|
|
511
|
-
|
|
510
|
+
(await s(g)).success ? (_(i.mobile_devices_edit_success, "success"), m()) : _(
|
|
511
|
+
N(i.mobile_devices_edit_error, n.name),
|
|
512
512
|
"error"
|
|
513
513
|
), o();
|
|
514
514
|
}
|
|
515
515
|
t === y.Delete && n && ((await b(n.guid)).success ? (_(
|
|
516
|
-
|
|
516
|
+
N(i.mobile_devices_delete_success, n.name),
|
|
517
517
|
"success"
|
|
518
518
|
), m()) : _(
|
|
519
|
-
|
|
519
|
+
N(i.mobile_devices_delete_error, n.name),
|
|
520
520
|
"error"
|
|
521
521
|
), o());
|
|
522
522
|
};
|
|
523
523
|
return /* @__PURE__ */ c(
|
|
524
|
-
|
|
524
|
+
$,
|
|
525
525
|
{
|
|
526
526
|
copy: { title: C() },
|
|
527
527
|
isOpen: a,
|
|
@@ -529,48 +529,48 @@ const Fe = ({
|
|
|
529
529
|
onPrimaryAction: x,
|
|
530
530
|
onSecondaryAction: o,
|
|
531
531
|
primaryColor: t === y.Delete ? "error" : void 0,
|
|
532
|
-
primaryText:
|
|
533
|
-
secondaryText: t === y.Token ?
|
|
532
|
+
primaryText: w(),
|
|
533
|
+
secondaryText: t === y.Token ? l.back : l.cancel_button,
|
|
534
534
|
sx: T(),
|
|
535
535
|
children: [
|
|
536
536
|
t === y.Token && /* @__PURE__ */ c(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
|
|
537
|
-
/* @__PURE__ */ e(v, { bold: !0, truncate: !1, variant: "
|
|
538
|
-
/* @__PURE__ */ e(v, { truncate: !1, variant: "
|
|
537
|
+
/* @__PURE__ */ e(v, { bold: !0, truncate: !1, variant: "Body", children: i.mobile_devices_access_label }),
|
|
538
|
+
/* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children: i.mobile_devices_access_info_1 }),
|
|
539
539
|
/* @__PURE__ */ e(
|
|
540
540
|
v,
|
|
541
541
|
{
|
|
542
542
|
sx: {
|
|
543
|
-
border: `1px solid ${d.palette.
|
|
543
|
+
border: `1px solid ${d.palette.border.light}`,
|
|
544
544
|
borderRadius: "4px",
|
|
545
545
|
p: "16px 32px"
|
|
546
546
|
},
|
|
547
|
-
variant: "
|
|
548
|
-
children:
|
|
547
|
+
variant: "H1",
|
|
548
|
+
children: r
|
|
549
549
|
}
|
|
550
550
|
),
|
|
551
|
-
/* @__PURE__ */ e(v, { truncate: !1, variant: "
|
|
551
|
+
/* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children: i.mobile_devices_access_info_2 })
|
|
552
552
|
] }),
|
|
553
|
-
t === y.Edit && /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(I, { onChange: (g) =>
|
|
554
|
-
t === y.Delete && /* @__PURE__ */ e(
|
|
553
|
+
t === y.Edit && /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(I, { onChange: (g) => S(g.target.value), value: p }) }),
|
|
554
|
+
t === y.Delete && /* @__PURE__ */ e(L, { children: i.mobile_devices_delete_info })
|
|
555
555
|
]
|
|
556
556
|
}
|
|
557
557
|
);
|
|
558
|
-
}, ze = D(
|
|
559
|
-
const { isMobile: t } = H(), { settings: a } =
|
|
558
|
+
}, ze = D($e), Ge = D(() => {
|
|
559
|
+
const { isMobile: t } = H(), { settings: a } = k(), { isCopyLoaded: o, isInitialized: n } = Z(), { setAlert: r, devices: d, loadDevices: l, generateDeviceToken: i } = A(), [s, b] = u.useState({ open: !1, type: "" }), [_, m] = u.useState(), [p, S] = u.useState("");
|
|
560
560
|
u.useEffect(() => {
|
|
561
|
-
n &&
|
|
561
|
+
n && l();
|
|
562
562
|
}, [n]);
|
|
563
563
|
const C = async () => {
|
|
564
|
-
const g = await
|
|
565
|
-
g ? (
|
|
566
|
-
},
|
|
564
|
+
const g = await i();
|
|
565
|
+
g ? (S(g), b({ open: !0, type: y.Token })) : r(a.mobile_devices_access_error, "error");
|
|
566
|
+
}, w = (g) => {
|
|
567
567
|
m(g), b({ open: !0, type: y.Edit });
|
|
568
568
|
}, T = (g) => {
|
|
569
569
|
m(g), b({ open: !0, type: y.Delete });
|
|
570
570
|
}, x = () => {
|
|
571
571
|
b({ open: !1, type: "" }), m(void 0);
|
|
572
572
|
};
|
|
573
|
-
return !o || !n ? /* @__PURE__ */ e(
|
|
573
|
+
return !o || !n ? /* @__PURE__ */ e(re, {}) : /* @__PURE__ */ c(
|
|
574
574
|
h,
|
|
575
575
|
{
|
|
576
576
|
sx: {
|
|
@@ -581,123 +581,123 @@ const Fe = ({
|
|
|
581
581
|
children: [
|
|
582
582
|
/* @__PURE__ */ c(h, { gap: 4, children: [
|
|
583
583
|
/* @__PURE__ */ e(J, { children: a.mobile_devices_title }),
|
|
584
|
-
/* @__PURE__ */ e(
|
|
584
|
+
/* @__PURE__ */ e(L, { variant: "Body", children: a.mobile_devices_info })
|
|
585
585
|
] }),
|
|
586
586
|
t ? /* @__PURE__ */ e(
|
|
587
|
-
|
|
587
|
+
We,
|
|
588
588
|
{
|
|
589
589
|
devices: d,
|
|
590
590
|
onClickDeviceDelete: T,
|
|
591
|
-
onClickDeviceEdit:
|
|
591
|
+
onClickDeviceEdit: w
|
|
592
592
|
}
|
|
593
593
|
) : /* @__PURE__ */ e(
|
|
594
|
-
|
|
594
|
+
Ve,
|
|
595
595
|
{
|
|
596
596
|
devices: d,
|
|
597
597
|
onClickDeviceDelete: T,
|
|
598
|
-
onClickDeviceEdit:
|
|
598
|
+
onClickDeviceEdit: w
|
|
599
599
|
}
|
|
600
600
|
),
|
|
601
601
|
/* @__PURE__ */ c(h, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
|
|
602
|
-
/* @__PURE__ */ e(v, { bold: !0, variant: "
|
|
603
|
-
/* @__PURE__ */ e(
|
|
604
|
-
/* @__PURE__ */ e(
|
|
602
|
+
/* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: a.mobile_devices_access_title }),
|
|
603
|
+
/* @__PURE__ */ e(L, { align: "center", variant: "Small", children: a.mobile_devices_access_description }),
|
|
604
|
+
/* @__PURE__ */ e(Q, { onClick: C, variant: "text", children: a.mobile_devices_access_cta })
|
|
605
605
|
] }),
|
|
606
606
|
/* @__PURE__ */ e(
|
|
607
607
|
ze,
|
|
608
608
|
{
|
|
609
609
|
device: _,
|
|
610
610
|
deviceToken: p,
|
|
611
|
-
dialogType:
|
|
612
|
-
isOpen:
|
|
611
|
+
dialogType: s.type,
|
|
612
|
+
isOpen: s.open,
|
|
613
613
|
onClose: x
|
|
614
614
|
}
|
|
615
615
|
)
|
|
616
616
|
]
|
|
617
617
|
}
|
|
618
618
|
);
|
|
619
|
-
}),
|
|
619
|
+
}), je = Ge, X = D(
|
|
620
620
|
({ onClick: t, primaryText: a, secondaryText: o, sx: n }) => {
|
|
621
|
-
const
|
|
622
|
-
return /* @__PURE__ */ e(
|
|
623
|
-
/* @__PURE__ */ e(
|
|
624
|
-
/* @__PURE__ */ e(
|
|
621
|
+
const r = R();
|
|
622
|
+
return /* @__PURE__ */ e(Be, { sx: { bgcolor: r.palette.background.paper }, children: /* @__PURE__ */ c(Me, { alignItems: "flex-start", onClick: t, sx: n, children: [
|
|
623
|
+
/* @__PURE__ */ e(Le, { primary: a, secondary: o }),
|
|
624
|
+
/* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(ve, {}) })
|
|
625
625
|
] }) });
|
|
626
626
|
}
|
|
627
|
-
),
|
|
628
|
-
const { settings: t } =
|
|
627
|
+
), Je = D(() => {
|
|
628
|
+
const { settings: t } = k(), { categories: a } = ee(), { selectedRule: o, updateRuleCategory: n } = A(), [r, d] = u.useState(!1), l = () => {
|
|
629
629
|
d(!1);
|
|
630
|
-
},
|
|
630
|
+
}, i = () => {
|
|
631
631
|
d(!0);
|
|
632
|
-
},
|
|
633
|
-
o && o.category_guid !== _ && (o.category_guid = _, await n(o)),
|
|
632
|
+
}, s = (_) => a.find((m) => m.guid === _)?.name, b = async (_) => {
|
|
633
|
+
o && o.category_guid !== _ && (o.category_guid = _, await n(o)), l();
|
|
634
634
|
};
|
|
635
635
|
return /* @__PURE__ */ c(u.Fragment, { children: [
|
|
636
636
|
/* @__PURE__ */ e(
|
|
637
|
-
|
|
637
|
+
X,
|
|
638
638
|
{
|
|
639
|
-
onClick:
|
|
640
|
-
primaryText: o?.category_guid ?
|
|
639
|
+
onClick: i,
|
|
640
|
+
primaryText: o?.category_guid ? s(o.category_guid) : "",
|
|
641
641
|
secondaryText: t.category
|
|
642
642
|
}
|
|
643
643
|
),
|
|
644
644
|
/* @__PURE__ */ e(
|
|
645
|
-
|
|
645
|
+
Re,
|
|
646
646
|
{
|
|
647
647
|
initialSelected: o?.category_guid ? o.category_guid : void 0,
|
|
648
|
-
onClose:
|
|
648
|
+
onClose: l,
|
|
649
649
|
onSelect: b,
|
|
650
|
-
showDrawer:
|
|
650
|
+
showDrawer: r,
|
|
651
651
|
title: t.select_category
|
|
652
652
|
}
|
|
653
653
|
)
|
|
654
654
|
] });
|
|
655
|
-
}),
|
|
656
|
-
const { common: t, settings: a } =
|
|
657
|
-
|
|
655
|
+
}), Ke = D(() => {
|
|
656
|
+
const { common: t, settings: a } = k(), { selectedRule: o, updateRulePayee: n } = A(), r = R(), [d, l] = u.useState(!1), i = o?.description ? o.description : o?.match_description, [s, b] = u.useState(i || ""), _ = () => {
|
|
657
|
+
l(!0);
|
|
658
658
|
}, m = async () => {
|
|
659
|
-
|
|
659
|
+
s !== i && o && (o.description = s, await n(o), l(!1));
|
|
660
660
|
};
|
|
661
661
|
return /* @__PURE__ */ c(u.Fragment, { children: [
|
|
662
662
|
/* @__PURE__ */ e(
|
|
663
|
-
|
|
663
|
+
X,
|
|
664
664
|
{
|
|
665
665
|
onClick: _,
|
|
666
|
-
primaryText:
|
|
666
|
+
primaryText: i,
|
|
667
667
|
secondaryText: a.payee
|
|
668
668
|
}
|
|
669
669
|
),
|
|
670
670
|
/* @__PURE__ */ e(
|
|
671
|
-
|
|
671
|
+
$,
|
|
672
672
|
{
|
|
673
673
|
copy: { title: a.edit_payee },
|
|
674
674
|
isOpen: d,
|
|
675
|
-
onClose: () =>
|
|
675
|
+
onClose: () => l(!1),
|
|
676
676
|
onPrimaryAction: m,
|
|
677
|
-
onSecondaryAction: () =>
|
|
677
|
+
onSecondaryAction: () => l(!1),
|
|
678
678
|
primaryText: t.save_button,
|
|
679
679
|
secondaryText: t.cancel_button,
|
|
680
680
|
sx: {
|
|
681
681
|
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
682
|
-
path: { fill:
|
|
682
|
+
path: { fill: r.palette.secondary.darker }
|
|
683
683
|
},
|
|
684
684
|
children: /* @__PURE__ */ e(
|
|
685
685
|
I,
|
|
686
686
|
{
|
|
687
687
|
onChange: (p) => b(p.target.value),
|
|
688
688
|
sx: { width: 352 },
|
|
689
|
-
value:
|
|
689
|
+
value: s
|
|
690
690
|
}
|
|
691
691
|
)
|
|
692
692
|
}
|
|
693
693
|
)
|
|
694
694
|
] });
|
|
695
|
-
}),
|
|
696
|
-
const { common: n, settings:
|
|
695
|
+
}), Xe = D(({ onClose: t, onDelete: a, isOpen: o }) => {
|
|
696
|
+
const { common: n, settings: r } = k(), d = R();
|
|
697
697
|
return /* @__PURE__ */ e(
|
|
698
|
-
|
|
698
|
+
$,
|
|
699
699
|
{
|
|
700
|
-
copy: { title:
|
|
700
|
+
copy: { title: r.delete_rule },
|
|
701
701
|
isOpen: o,
|
|
702
702
|
onClose: t,
|
|
703
703
|
onPrimaryAction: a,
|
|
@@ -707,44 +707,44 @@ const Fe = ({
|
|
|
707
707
|
secondaryText: n.cancel_button,
|
|
708
708
|
sx: {
|
|
709
709
|
"& .MuiButton-outlined": {
|
|
710
|
-
borderColor: d.palette.
|
|
710
|
+
borderColor: d.palette.border.main,
|
|
711
711
|
color: d.palette.secondary.main
|
|
712
712
|
},
|
|
713
713
|
"& .MuiDialogContent-root": { pt: 0, width: 400 },
|
|
714
|
-
path: { fill: d.palette.secondary.
|
|
714
|
+
path: { fill: d.palette.secondary.darker }
|
|
715
715
|
},
|
|
716
|
-
children: /* @__PURE__ */ e(v, { truncate: !1, variant: "
|
|
716
|
+
children: /* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children: r.delete_rule_confirm })
|
|
717
717
|
}
|
|
718
718
|
);
|
|
719
|
-
}),
|
|
719
|
+
}), Ye = D(
|
|
720
720
|
({ isOpen: t, onClose: a, onDelete: o }) => {
|
|
721
|
-
const { common: n, settings:
|
|
721
|
+
const { common: n, settings: r } = k(), d = R(), [l, i] = u.useState(!1);
|
|
722
722
|
return /* @__PURE__ */ c(
|
|
723
|
-
|
|
723
|
+
He,
|
|
724
724
|
{
|
|
725
725
|
hasSecondaryAction: !1,
|
|
726
726
|
isOpen: t,
|
|
727
727
|
onClose: a,
|
|
728
728
|
onPrimaryAction: () => {
|
|
729
|
-
|
|
729
|
+
i(!0);
|
|
730
730
|
},
|
|
731
731
|
primaryColor: "error",
|
|
732
732
|
primaryText: n.delete_button,
|
|
733
733
|
sx: {
|
|
734
|
-
"& .MuiToolbar-root": { borderTop: `1px solid ${d.palette.
|
|
734
|
+
"& .MuiToolbar-root": { borderTop: `1px solid ${d.palette.border.light}` }
|
|
735
735
|
},
|
|
736
|
-
title:
|
|
736
|
+
title: r.edit_rule,
|
|
737
737
|
children: [
|
|
738
|
-
/* @__PURE__ */ e(
|
|
739
|
-
/* @__PURE__ */ e(
|
|
738
|
+
/* @__PURE__ */ e(Ee, { children: /* @__PURE__ */ e(v, { bold: !0, variant: "XSmall", children: r.details }) }),
|
|
739
|
+
/* @__PURE__ */ e(Ke, {}),
|
|
740
740
|
/* @__PURE__ */ e(j, { sx: { ml: 24 } }),
|
|
741
|
-
/* @__PURE__ */ e(
|
|
741
|
+
/* @__PURE__ */ e(Je, {}),
|
|
742
742
|
/* @__PURE__ */ e(j, { sx: { ml: 24 } }),
|
|
743
743
|
/* @__PURE__ */ e(
|
|
744
|
-
|
|
744
|
+
Xe,
|
|
745
745
|
{
|
|
746
|
-
isOpen:
|
|
747
|
-
onClose: () =>
|
|
746
|
+
isOpen: l,
|
|
747
|
+
onClose: () => i(!1),
|
|
748
748
|
onDelete: o
|
|
749
749
|
}
|
|
750
750
|
)
|
|
@@ -752,28 +752,28 @@ const Fe = ({
|
|
|
752
752
|
}
|
|
753
753
|
);
|
|
754
754
|
}
|
|
755
|
-
),
|
|
756
|
-
const { categories: a } = ee(), { setSelectedGuid: o } =
|
|
757
|
-
|
|
755
|
+
), qe = D(({ rule: t }) => {
|
|
756
|
+
const { categories: a } = ee(), { setSelectedGuid: o } = Pe(), { deleteTransactionRule: n, setSelectedRule: r } = A(), { isDesktop: d, isTablet: l } = H(), [i, s] = u.useState(!1), b = () => {
|
|
757
|
+
s(!1), o(null), r(void 0);
|
|
758
758
|
}, _ = async () => {
|
|
759
759
|
await n(), b();
|
|
760
760
|
}, m = () => {
|
|
761
|
-
|
|
762
|
-
}, p = (
|
|
761
|
+
s(!0), r(t);
|
|
762
|
+
}, p = (S) => a.find((C) => C.guid === S)?.name;
|
|
763
763
|
return /* @__PURE__ */ c(u.Fragment, { children: [
|
|
764
764
|
/* @__PURE__ */ e(
|
|
765
|
-
|
|
765
|
+
X,
|
|
766
766
|
{
|
|
767
767
|
onClick: m,
|
|
768
768
|
primaryText: t.description ? t.description : t.match_description,
|
|
769
769
|
secondaryText: t.category_guid ? p(t.category_guid) : ""
|
|
770
770
|
}
|
|
771
771
|
),
|
|
772
|
-
/* @__PURE__ */ e(j, { sx: { ml:
|
|
773
|
-
/* @__PURE__ */ e(
|
|
772
|
+
/* @__PURE__ */ e(j, { sx: { ml: l || d ? 0 : 24 } }),
|
|
773
|
+
/* @__PURE__ */ e(Ye, { isOpen: i, onClose: b, onDelete: _ })
|
|
774
774
|
] });
|
|
775
|
-
}),
|
|
776
|
-
const { settings: t } =
|
|
775
|
+
}), Qe = D(() => {
|
|
776
|
+
const { settings: t } = k(), { loadTransactionRules: a, transactionRules: o } = A(), { onLoad: n } = te();
|
|
777
777
|
return u.useEffect(() => {
|
|
778
778
|
a().finally(() => {
|
|
779
779
|
n?.("TransactionRulesTab");
|
|
@@ -781,20 +781,20 @@ const Fe = ({
|
|
|
781
781
|
}, []), /* @__PURE__ */ c(h, { sx: { gap: 24, py: 24 }, children: [
|
|
782
782
|
/* @__PURE__ */ c(h, { sx: { px: 24 }, children: [
|
|
783
783
|
/* @__PURE__ */ e(J, { children: t.transaction_rules_label }),
|
|
784
|
-
/* @__PURE__ */ e(
|
|
784
|
+
/* @__PURE__ */ e(L, { variant: "Body", children: t.transaction_rules_description })
|
|
785
785
|
] }),
|
|
786
|
-
/* @__PURE__ */ e(
|
|
786
|
+
/* @__PURE__ */ e(Ae, { children: o.map((r, d) => /* @__PURE__ */ e(qe, { rule: r }, d)) })
|
|
787
787
|
] });
|
|
788
|
-
}),
|
|
789
|
-
const { alert: a, setAlert: o } =
|
|
788
|
+
}), ie = Qe, Ze = D(({ selectedTab: t }) => {
|
|
789
|
+
const { alert: a, setAlert: o } = A(), {
|
|
790
790
|
config: { display_user_profile_in_settings: n }
|
|
791
|
-
} =
|
|
792
|
-
return /* @__PURE__ */ c(
|
|
793
|
-
t ===
|
|
794
|
-
t ===
|
|
795
|
-
t ===
|
|
796
|
-
t ===
|
|
797
|
-
t ===
|
|
791
|
+
} = W();
|
|
792
|
+
return /* @__PURE__ */ c(q, { children: [
|
|
793
|
+
t === B.Profile && /* @__PURE__ */ e(Fe, {}),
|
|
794
|
+
t === B.Devices && /* @__PURE__ */ e(je, {}),
|
|
795
|
+
t === B.Notifications && /* @__PURE__ */ e(G, { showPersonalDetails: !n }),
|
|
796
|
+
t === B.TransactionRules && /* @__PURE__ */ e(ie, {}),
|
|
797
|
+
t === B.Help && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(Oe, {}) }),
|
|
798
798
|
/* @__PURE__ */ e(
|
|
799
799
|
fe,
|
|
800
800
|
{
|
|
@@ -817,69 +817,69 @@ const Fe = ({
|
|
|
817
817
|
)
|
|
818
818
|
] });
|
|
819
819
|
});
|
|
820
|
-
var
|
|
821
|
-
const
|
|
822
|
-
const { settings: o } =
|
|
820
|
+
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 || {});
|
|
821
|
+
const $t = D(({ onBackClick: t, sx: a }) => {
|
|
822
|
+
const { settings: o } = k(), { isCopyLoaded: n, isInitialized: r } = Z(), { config: d } = W(), { isMobile: l } = H(), { onLoad: i } = te();
|
|
823
823
|
u.useEffect(() => {
|
|
824
|
-
|
|
825
|
-
}, [
|
|
824
|
+
r && n && i?.("SettingsWidget");
|
|
825
|
+
}, [r, n]);
|
|
826
826
|
const {
|
|
827
|
-
display_user_profile_in_settings:
|
|
827
|
+
display_user_profile_in_settings: s,
|
|
828
828
|
display_mobile_devices_in_settings: b,
|
|
829
829
|
display_notification_settings_in_settings: _,
|
|
830
830
|
display_user_transaction_rules_in_settings: m,
|
|
831
831
|
show_help_widget_in_master: p
|
|
832
|
-
} = d,
|
|
833
|
-
{ enabled:
|
|
832
|
+
} = d, S = [
|
|
833
|
+
{ enabled: s, index: 0, label: o?.profile_label },
|
|
834
834
|
{ enabled: b, index: 1, label: o?.mobile_devices_label },
|
|
835
835
|
{ enabled: _, index: 2, label: o?.notifications_label },
|
|
836
836
|
{ enabled: m, index: 3, label: o?.transaction_rules_label },
|
|
837
837
|
{ enabled: p, index: 4, label: o?.help_label }
|
|
838
|
-
], C =
|
|
839
|
-
return !n || !
|
|
838
|
+
], C = S.find((x) => x.enabled), [w, T] = u.useState(C ? C.index : -1);
|
|
839
|
+
return !n || !r ? /* @__PURE__ */ e(re, {}) : /* @__PURE__ */ e(
|
|
840
840
|
K,
|
|
841
841
|
{
|
|
842
842
|
onBackClick: t,
|
|
843
843
|
sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...a },
|
|
844
844
|
title: o.title,
|
|
845
|
-
children: /* @__PURE__ */ c(h, { mx:
|
|
845
|
+
children: /* @__PURE__ */ c(h, { mx: l ? 0 : 48, my: 24, children: [
|
|
846
846
|
/* @__PURE__ */ e(
|
|
847
847
|
pe,
|
|
848
848
|
{
|
|
849
849
|
onChange: (x, g) => T(g),
|
|
850
850
|
sx: { bgcolor: "background.paper" },
|
|
851
851
|
textColor: "primary",
|
|
852
|
-
value:
|
|
852
|
+
value: w,
|
|
853
853
|
variant: "scrollable",
|
|
854
|
-
children:
|
|
854
|
+
children: S.map(
|
|
855
855
|
(x) => x.enabled && /* @__PURE__ */ e(ue, { label: x.label, value: x.index }, x.index)
|
|
856
856
|
)
|
|
857
857
|
}
|
|
858
858
|
),
|
|
859
|
-
/* @__PURE__ */ e(
|
|
859
|
+
/* @__PURE__ */ e(Ze, { selectedTab: w })
|
|
860
860
|
] })
|
|
861
861
|
}
|
|
862
862
|
);
|
|
863
|
-
}),
|
|
864
|
-
const { clientConfig: a } =
|
|
865
|
-
return o ? /* @__PURE__ */ e(
|
|
866
|
-
}),
|
|
863
|
+
}), zt = D((t) => {
|
|
864
|
+
const { clientConfig: a } = W(), o = a?.master?.deep_link_params?.view;
|
|
865
|
+
return o ? /* @__PURE__ */ e(G, { view: o }) : /* @__PURE__ */ e(K, { ...t, children: /* @__PURE__ */ e(h, { my: 24, children: /* @__PURE__ */ e(G, {}) }) });
|
|
866
|
+
}), Gt = (t) => {
|
|
867
867
|
const { isMobile: a } = H();
|
|
868
|
-
return /* @__PURE__ */ e(K, { ...t, children: /* @__PURE__ */ e(h, { sx: { mx: a ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(
|
|
868
|
+
return /* @__PURE__ */ e(K, { ...t, children: /* @__PURE__ */ e(h, { sx: { mx: a ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(ie, {}) }) });
|
|
869
869
|
};
|
|
870
870
|
export {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
871
|
+
qt as AccountNotificationProfiles,
|
|
872
|
+
Qt as BudgetNotificationProfiles,
|
|
873
|
+
je as DeviceTab,
|
|
874
|
+
Zt as InsightsNotificationProfiles,
|
|
875
|
+
G as NotificationSettings,
|
|
876
|
+
zt as NotificationSettingsWidget,
|
|
877
|
+
Fe as ProfileTab,
|
|
878
|
+
Kt as SettingsApi,
|
|
879
|
+
Xt as SettingsStore,
|
|
880
|
+
B as SettingsTabs,
|
|
881
|
+
$t as SettingsWidget,
|
|
882
|
+
Ze as SettingsWidgetContents,
|
|
883
|
+
ie as TransactionRulesTab,
|
|
884
|
+
Gt as TransactionRulesWidget
|
|
885
885
|
};
|