@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-alpha.mega1
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 +217 -0
- package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/Account-CMjOp7S2.mjs +118 -0
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
- package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
- package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
- package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
- package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
- package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
- package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
- package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
- package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
- package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
- package/dist/Drawer-Bet2ZPJo.mjs +176 -0
- package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
- package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
- package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
- package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
- package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
- package/dist/LineChart-DHj-Bufi.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
- package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
- package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
- package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
- package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
- package/dist/NotificationSettings-e789PcRb.mjs +676 -0
- package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
- package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
- package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
- package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
- package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
- package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
- package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
- package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
- package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
- package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
- package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
- package/dist/accounts/index.es.js +933 -232
- package/dist/accounts/stores/AccountStore.d.ts +6 -2
- package/dist/accounts/utils/AccountDetails.d.ts +5 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +561 -522
- package/dist/cashflow/index.es.js +397 -396
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
- package/dist/categories/components/SubcategoryRow.d.ts +1 -0
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +5 -3
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +325 -306
- package/dist/common/stores/GlobalUiStore.d.ts +7 -4
- package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
- package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
- package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
- package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
- package/dist/dashboard/index.es.js +95 -125
- package/dist/debts/index.es.js +466 -460
- package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +1660 -1553
- package/dist/goals/index.es.js +716 -677
- package/dist/goals/stores/GoalStore.d.ts +2 -0
- package/dist/help/index.es.js +14 -10
- package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
- package/dist/investments/index.es.js +464 -457
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/cards/InsightCard.d.ts +0 -2
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
- package/dist/microinsights/index.d.ts +2 -2
- package/dist/microinsights/index.es.js +824 -14
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +433 -438
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +331 -325
- package/dist/settings/index.es.js +293 -285
- package/dist/spending/components/SpendingChart.d.ts +1 -1
- package/dist/spending/components/SpendingList.d.ts +1 -1
- package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
- package/dist/spending/index.es.js +250 -235
- package/dist/transactions/index.es.js +288 -281
- package/dist/transactions/stores/TransactionStore.d.ts +5 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +876 -802
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/trends/utils/TrendsTable.d.ts +12 -0
- package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
- package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
- package/package.json +26 -21
- package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
- package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
- package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
- package/dist/Drawer-Dqe5EqvA.mjs +0 -163
- package/dist/LineChart-bc1D9xBE.mjs +0 -581
- package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
- package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
- package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
- package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
- 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/microinsights/cards/BaseCard.d.ts +0 -13
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
import { S as
|
|
2
|
-
import { jsxs as c, Fragment as
|
|
3
|
-
import
|
|
4
|
-
import { observer as
|
|
5
|
-
import
|
|
1
|
+
import { S as Jt, a as Kt } from "../SettingsStore-CInvh-rQ.mjs";
|
|
2
|
+
import { jsxs as c, Fragment as Q, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import p from "react";
|
|
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
|
|
21
|
-
import {
|
|
22
|
-
import { u as
|
|
23
|
-
import { u as
|
|
24
|
-
import { formatDistanceToNow as
|
|
25
|
-
import { fromUnixTime 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-e789PcRb.mjs";
|
|
20
|
+
import { A as Yt, B as qt, I as Qt } from "../NotificationSettings-e789PcRb.mjs";
|
|
21
|
+
import { a as z } from "../Dialog-CWymUiuO.mjs";
|
|
22
|
+
import { u as D, a as $, r as A, o as Se, b as ee, m as G } from "../hooks-fY_n74f7.mjs";
|
|
23
|
+
import { u as O } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
24
|
+
import { formatDistanceToNow as te } from "date-fns/formatDistanceToNow";
|
|
25
|
+
import { fromUnixTime as oe } from "date-fns/fromUnixTime";
|
|
26
26
|
import P from "@mui/material/styles/useTheme";
|
|
27
|
-
import
|
|
28
|
-
import { DataGridPro as
|
|
29
|
-
import { H as
|
|
30
|
-
import { b as
|
|
31
|
-
import
|
|
27
|
+
import W from "@mui/material/IconButton";
|
|
28
|
+
import { DataGridPro as we } from "@mui/x-data-grid-pro";
|
|
29
|
+
import { H as F } from "../HeaderCell-DjuifqHJ.mjs";
|
|
30
|
+
import { b as H } from "../Localization-2MODESHW.mjs";
|
|
31
|
+
import ke from "@mui/material/Accordion";
|
|
32
32
|
import Te from "@mui/material/AccordionDetails";
|
|
33
33
|
import Ie from "@mui/material/AccordionSummary";
|
|
34
|
-
import { L as
|
|
34
|
+
import { L as ie } from "../Loader-BSWSYqvn.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
|
-
import {
|
|
38
|
+
import { b as Pe, u as Re } from "../CategorySelectorDrawer-C4aZYP4N.mjs";
|
|
39
39
|
import Be from "@mui/material/ListItem";
|
|
40
|
-
import
|
|
41
|
-
import
|
|
40
|
+
import Ne from "@mui/material/ListItemButton";
|
|
41
|
+
import Me from "@mui/material/ListItemIcon";
|
|
42
42
|
import Le from "@mui/material/ListItemText";
|
|
43
|
-
import { D as He } from "../Drawer-
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
import { D as He } from "../Drawer-Bet2ZPJo.mjs";
|
|
44
|
+
import { u as re } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
|
|
45
|
+
import { H as Oe } from "../Help-BW_ar-4B.mjs";
|
|
46
|
+
import { W as X } from "../WidgetContainer-mzejMmz2.mjs";
|
|
47
|
+
const Fe = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
48
|
+
const o = xe(), { common: i, settings: r } = D(), { isDesktop: d, isMobile: l, isSmallMobile: n, isTablet: s } = O(t), { config: b } = $(), { updateUser: _ } = A(), { user: m } = Se(), [h, S] = p.useState({
|
|
48
49
|
first_name: m.first_name,
|
|
49
50
|
last_name: m.last_name,
|
|
50
51
|
email: m.email,
|
|
@@ -52,54 +53,54 @@ const Ue = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
52
53
|
birthday: m.birthday,
|
|
53
54
|
postal_code: m.postal_code,
|
|
54
55
|
credit_score: m.credit_score
|
|
55
|
-
}), [
|
|
56
|
-
|
|
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
|
+
p.useEffect(() => {
|
|
57
58
|
if (a) {
|
|
58
|
-
const
|
|
59
|
-
|
|
59
|
+
const g = (R) => {
|
|
60
|
+
u.current && !u.current.contains(R.target) && x && T(!0);
|
|
60
61
|
};
|
|
61
|
-
return document.addEventListener("mousedown",
|
|
62
|
-
document.removeEventListener("mousedown",
|
|
62
|
+
return document.addEventListener("mousedown", g), () => {
|
|
63
|
+
document.removeEventListener("mousedown", g);
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
}, [
|
|
66
|
+
}, [x]);
|
|
66
67
|
const ae = () => {
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
68
|
+
if (h.birthday) {
|
|
69
|
+
const g = new Date(h.birthday * 1e3), R = g.getUTCFullYear(), de = g.getUTCMonth(), me = g.getUTCDate();
|
|
69
70
|
return new Date(R, de, me);
|
|
70
71
|
}
|
|
71
72
|
}, le = async () => {
|
|
72
|
-
await _({ ...m, ...
|
|
73
|
+
await _({ ...m, ...h }), w(!1);
|
|
73
74
|
}, se = () => {
|
|
74
|
-
|
|
75
|
+
T(!1), a && a();
|
|
75
76
|
}, ce = () => {
|
|
76
|
-
|
|
77
|
-
}, E = (
|
|
77
|
+
T(!1);
|
|
78
|
+
}, E = (g) => {
|
|
78
79
|
const R = {
|
|
79
|
-
...
|
|
80
|
-
...
|
|
80
|
+
...h,
|
|
81
|
+
...g
|
|
81
82
|
};
|
|
82
83
|
S(R), w(JSON.stringify({ ...m, ...R }) !== JSON.stringify(m));
|
|
83
84
|
};
|
|
84
|
-
return /* @__PURE__ */ c(
|
|
85
|
+
return /* @__PURE__ */ c(Q, { children: [
|
|
85
86
|
/* @__PURE__ */ c(
|
|
86
|
-
|
|
87
|
+
V,
|
|
87
88
|
{
|
|
88
89
|
component: "form",
|
|
89
|
-
ref:
|
|
90
|
+
ref: u,
|
|
90
91
|
sx: {
|
|
91
92
|
backgroundColor: "background.paper",
|
|
92
93
|
p: 24,
|
|
93
|
-
width:
|
|
94
|
+
width: n ? 320 : s ? 680 : d ? 990 : 400,
|
|
94
95
|
"& .MuiTextField-root": {
|
|
95
|
-
width:
|
|
96
|
+
width: n ? 272 : s ? 328 : d ? 483 : 352
|
|
96
97
|
}
|
|
97
98
|
},
|
|
98
99
|
children: [
|
|
99
|
-
/* @__PURE__ */ e(
|
|
100
|
-
/* @__PURE__ */ e(
|
|
100
|
+
/* @__PURE__ */ e(K, { children: r.personal_details }),
|
|
101
|
+
/* @__PURE__ */ e(N, { variant: "Body", children: r.update_information }),
|
|
101
102
|
/* @__PURE__ */ c(
|
|
102
|
-
|
|
103
|
+
f,
|
|
103
104
|
{
|
|
104
105
|
direction: l ? "column" : "row",
|
|
105
106
|
spacing: l ? 44 : 24,
|
|
@@ -108,53 +109,53 @@ const Ue = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
108
109
|
/* @__PURE__ */ e(
|
|
109
110
|
I,
|
|
110
111
|
{
|
|
111
|
-
defaultValue:
|
|
112
|
+
defaultValue: h.first_name,
|
|
112
113
|
label: r.first_name,
|
|
113
|
-
onChange: (
|
|
114
|
+
onChange: (g) => E({ first_name: g.target.value })
|
|
114
115
|
}
|
|
115
116
|
),
|
|
116
117
|
/* @__PURE__ */ e(
|
|
117
118
|
I,
|
|
118
119
|
{
|
|
119
|
-
defaultValue:
|
|
120
|
+
defaultValue: h.last_name,
|
|
120
121
|
label: r.last_name,
|
|
121
|
-
onChange: (
|
|
122
|
+
onChange: (g) => E({ last_name: g.target.value })
|
|
122
123
|
}
|
|
123
124
|
)
|
|
124
125
|
]
|
|
125
126
|
}
|
|
126
127
|
),
|
|
127
|
-
/* @__PURE__ */ c(
|
|
128
|
-
b.display_email_edit_field_in_settings && /* @__PURE__ */ c(
|
|
128
|
+
/* @__PURE__ */ c(f, { direction: l ? "column" : "row", children: [
|
|
129
|
+
b.display_email_edit_field_in_settings && /* @__PURE__ */ c(f, { sx: { mb: M ? 20 : 44, mr: l ? 0 : 24 }, children: [
|
|
129
130
|
/* @__PURE__ */ e(
|
|
130
131
|
I,
|
|
131
132
|
{
|
|
132
|
-
defaultValue:
|
|
133
|
+
defaultValue: h.email,
|
|
133
134
|
label: r.email_address,
|
|
134
|
-
onChange: (
|
|
135
|
+
onChange: (g) => E({ email: g.target.value })
|
|
135
136
|
}
|
|
136
137
|
),
|
|
137
|
-
|
|
138
|
+
M && /* @__PURE__ */ e(Ce, {})
|
|
138
139
|
] }),
|
|
139
|
-
b.display_sms_edit_field_in_settings && /* @__PURE__ */ c(
|
|
140
|
+
b.display_sms_edit_field_in_settings && /* @__PURE__ */ c(f, { sx: { mb: q ? 20 : 44 }, children: [
|
|
140
141
|
/* @__PURE__ */ e(
|
|
141
142
|
I,
|
|
142
143
|
{
|
|
143
|
-
defaultValue:
|
|
144
|
+
defaultValue: h.phone,
|
|
144
145
|
label: r.mobile_number,
|
|
145
|
-
onChange: (
|
|
146
|
+
onChange: (g) => E({ phone: g.target.value }),
|
|
146
147
|
type: "tel"
|
|
147
148
|
}
|
|
148
149
|
),
|
|
149
|
-
|
|
150
|
+
q && /* @__PURE__ */ e(De, {})
|
|
150
151
|
] })
|
|
151
152
|
] }),
|
|
152
|
-
/* @__PURE__ */ c(
|
|
153
|
-
/* @__PURE__ */ e(ye, { dateAdapter:
|
|
153
|
+
/* @__PURE__ */ c(f, { direction: l ? "column" : "row", spacing: l ? 44 : 24, sx: { mb: 44 }, children: [
|
|
154
|
+
/* @__PURE__ */ e(ye, { dateAdapter: _e, children: /* @__PURE__ */ e(
|
|
154
155
|
be,
|
|
155
156
|
{
|
|
156
157
|
label: r.birthdate,
|
|
157
|
-
onChange: (
|
|
158
|
+
onChange: (g) => E({ birthday: ge(g) }),
|
|
158
159
|
slotProps: {
|
|
159
160
|
nextIconButton: {
|
|
160
161
|
sx: {
|
|
@@ -182,30 +183,30 @@ const Ue = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
182
183
|
/* @__PURE__ */ e(
|
|
183
184
|
I,
|
|
184
185
|
{
|
|
185
|
-
defaultValue:
|
|
186
|
+
defaultValue: h.postal_code,
|
|
186
187
|
label: r.zip_code,
|
|
187
|
-
onChange: (
|
|
188
|
+
onChange: (g) => E({ postal_code: g.target.value })
|
|
188
189
|
}
|
|
189
190
|
)
|
|
190
191
|
] }),
|
|
191
|
-
/* @__PURE__ */ c(
|
|
192
|
+
/* @__PURE__ */ c(f, { children: [
|
|
192
193
|
/* @__PURE__ */ e(
|
|
193
194
|
I,
|
|
194
195
|
{
|
|
195
|
-
defaultValue:
|
|
196
|
+
defaultValue: h.credit_score,
|
|
196
197
|
label: r.credit_score,
|
|
197
|
-
onChange: (
|
|
198
|
+
onChange: (g) => E({ credit_score: Number(g.target.value) }),
|
|
198
199
|
sx: { mb: 44 }
|
|
199
200
|
}
|
|
200
201
|
),
|
|
201
202
|
/* @__PURE__ */ e(
|
|
202
|
-
|
|
203
|
+
Z,
|
|
203
204
|
{
|
|
204
|
-
disabled: !
|
|
205
|
+
disabled: !x,
|
|
205
206
|
onClick: le,
|
|
206
|
-
sx: { width:
|
|
207
|
+
sx: { width: n ? 272 : 124 },
|
|
207
208
|
variant: "contained",
|
|
208
|
-
children:
|
|
209
|
+
children: i.save_button
|
|
209
210
|
}
|
|
210
211
|
)
|
|
211
212
|
] })
|
|
@@ -213,10 +214,10 @@ const Ue = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
213
214
|
}
|
|
214
215
|
),
|
|
215
216
|
/* @__PURE__ */ e(
|
|
216
|
-
|
|
217
|
+
z,
|
|
217
218
|
{
|
|
218
219
|
copy: { title: r.discard_changes },
|
|
219
|
-
isOpen:
|
|
220
|
+
isOpen: k,
|
|
220
221
|
onClose: ce,
|
|
221
222
|
onSecondaryAction: se,
|
|
222
223
|
primaryText: r.keep_editing,
|
|
@@ -225,27 +226,27 @@ const Ue = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
|
225
226
|
}
|
|
226
227
|
)
|
|
227
228
|
] });
|
|
228
|
-
},
|
|
229
|
+
}, Ue = C(Fe);
|
|
229
230
|
var y = /* @__PURE__ */ ((t) => (t.Delete = "delete", t.Edit = "edit", t.Token = "token", t))(y || {});
|
|
230
231
|
const Ve = ({
|
|
231
232
|
devices: t,
|
|
232
233
|
onClickDeviceEdit: a,
|
|
233
234
|
onClickDeviceDelete: o
|
|
234
235
|
}) => {
|
|
235
|
-
const
|
|
236
|
+
const i = P(), { settings: r } = D(), d = [
|
|
236
237
|
{
|
|
237
238
|
field: "name",
|
|
238
239
|
headerName: r.mobile_devices_column_name,
|
|
239
|
-
renderHeader:
|
|
240
|
-
renderCell: (
|
|
241
|
-
/* @__PURE__ */ e(v, { variant: "Small", children:
|
|
240
|
+
renderHeader: F,
|
|
241
|
+
renderCell: (n) => /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
242
|
+
/* @__PURE__ */ e(v, { variant: "Small", children: n.value }),
|
|
242
243
|
/* @__PURE__ */ e(
|
|
243
|
-
|
|
244
|
+
W,
|
|
244
245
|
{
|
|
245
246
|
"aria-label": r.mobile_devices_edit_label,
|
|
246
247
|
color: "secondary",
|
|
247
|
-
onClick: () => a(
|
|
248
|
-
children: /* @__PURE__ */ e(
|
|
248
|
+
onClick: () => a(n.row),
|
|
249
|
+
children: /* @__PURE__ */ e(L, { name: "edit" })
|
|
249
250
|
}
|
|
250
251
|
)
|
|
251
252
|
] }),
|
|
@@ -256,7 +257,7 @@ const Ve = ({
|
|
|
256
257
|
{
|
|
257
258
|
field: "device_type",
|
|
258
259
|
headerName: r.mobile_devices_column_type,
|
|
259
|
-
renderHeader:
|
|
260
|
+
renderHeader: F,
|
|
260
261
|
sortable: !0,
|
|
261
262
|
hideSortIcons: !1,
|
|
262
263
|
flex: 1,
|
|
@@ -265,8 +266,8 @@ const Ve = ({
|
|
|
265
266
|
{
|
|
266
267
|
field: "created_at",
|
|
267
268
|
headerName: r.mobile_devices_column_added,
|
|
268
|
-
renderHeader:
|
|
269
|
-
valueFormatter: (
|
|
269
|
+
renderHeader: F,
|
|
270
|
+
valueFormatter: (n) => te(oe(n), { addSuffix: !0 }),
|
|
270
271
|
sortable: !0,
|
|
271
272
|
hideSortIcons: !1,
|
|
272
273
|
flex: 1,
|
|
@@ -275,27 +276,27 @@ const Ve = ({
|
|
|
275
276
|
{
|
|
276
277
|
field: "delete",
|
|
277
278
|
headerName: "",
|
|
278
|
-
renderHeader:
|
|
279
|
-
renderCell: (
|
|
280
|
-
|
|
279
|
+
renderHeader: F,
|
|
280
|
+
renderCell: (n) => /* @__PURE__ */ e(f, { mr: 4, children: /* @__PURE__ */ e(
|
|
281
|
+
W,
|
|
281
282
|
{
|
|
282
283
|
"aria-label": r.mobile_devices_delete_label,
|
|
283
284
|
color: "secondary",
|
|
284
|
-
onClick: () => o(
|
|
285
|
-
children: /* @__PURE__ */ e(
|
|
285
|
+
onClick: () => o(n.row),
|
|
286
|
+
children: /* @__PURE__ */ e(L, { name: "delete" })
|
|
286
287
|
}
|
|
287
288
|
) }),
|
|
288
289
|
sortable: !1,
|
|
289
290
|
hideSortIcons: !1,
|
|
290
291
|
width: 58
|
|
291
292
|
}
|
|
292
|
-
], l =
|
|
293
|
-
id:
|
|
294
|
-
...
|
|
295
|
-
device_type: `${
|
|
293
|
+
], l = p.useMemo(() => t.map((n) => ({
|
|
294
|
+
id: n.guid,
|
|
295
|
+
...n,
|
|
296
|
+
device_type: `${n.make} ${n.model}`
|
|
296
297
|
})), [t]);
|
|
297
|
-
return /* @__PURE__ */ e(
|
|
298
|
-
|
|
298
|
+
return /* @__PURE__ */ e(V, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
299
|
+
we,
|
|
299
300
|
{
|
|
300
301
|
columns: d,
|
|
301
302
|
disableColumnFilter: !0,
|
|
@@ -309,16 +310,16 @@ const Ve = ({
|
|
|
309
310
|
},
|
|
310
311
|
slots: {
|
|
311
312
|
footer: () => /* @__PURE__ */ e(
|
|
312
|
-
|
|
313
|
+
V,
|
|
313
314
|
{
|
|
314
315
|
sx: {
|
|
315
|
-
backgroundColor:
|
|
316
|
+
backgroundColor: i.palette.background.default,
|
|
316
317
|
display: "flex",
|
|
317
318
|
justifyContent: "flex-end",
|
|
318
319
|
alignItems: "center",
|
|
319
320
|
p: "12px 16px"
|
|
320
321
|
},
|
|
321
|
-
children: /* @__PURE__ */ e(v, { color:
|
|
322
|
+
children: /* @__PURE__ */ e(v, { color: i.palette.text.secondary, variant: "Small", children: H(
|
|
322
323
|
r.mobile_devices_count,
|
|
323
324
|
/* @__PURE__ */ e("b", { children: t.length }),
|
|
324
325
|
/* @__PURE__ */ e("b", { children: t.length })
|
|
@@ -328,16 +329,16 @@ const Ve = ({
|
|
|
328
329
|
},
|
|
329
330
|
sx: {
|
|
330
331
|
border: "1px solid",
|
|
331
|
-
borderColor:
|
|
332
|
+
borderColor: i.palette.border.light,
|
|
332
333
|
borderRadius: "8px",
|
|
333
334
|
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
334
|
-
color:
|
|
335
|
+
color: i.palette.primary.main,
|
|
335
336
|
"&:hover": {
|
|
336
|
-
backgroundColor: U(
|
|
337
|
+
backgroundColor: U(i.palette.primary.main, 0.1)
|
|
337
338
|
}
|
|
338
339
|
},
|
|
339
340
|
"& .MuiDataGrid-sortIcon": {
|
|
340
|
-
color:
|
|
341
|
+
color: i.palette.primary.main
|
|
341
342
|
}
|
|
342
343
|
}
|
|
343
344
|
}
|
|
@@ -347,40 +348,40 @@ const Ve = ({
|
|
|
347
348
|
onClickDeviceEdit: a,
|
|
348
349
|
onClickDeviceDelete: o
|
|
349
350
|
}) => {
|
|
350
|
-
const
|
|
351
|
+
const i = P(), { settings: r } = D(), [d, l] = p.useState(!1), n = (s) => (b, _) => {
|
|
351
352
|
l(_ ? s : !1);
|
|
352
353
|
};
|
|
353
|
-
return /* @__PURE__ */ c(
|
|
354
|
+
return /* @__PURE__ */ c(f, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
|
|
354
355
|
t.map((s) => /* @__PURE__ */ c(
|
|
355
|
-
|
|
356
|
+
ke,
|
|
356
357
|
{
|
|
357
358
|
expanded: d === s.guid,
|
|
358
|
-
onChange:
|
|
359
|
+
onChange: n(s.guid),
|
|
359
360
|
sx: { boxShadow: "none" },
|
|
360
361
|
children: [
|
|
361
362
|
/* @__PURE__ */ e(
|
|
362
363
|
Ie,
|
|
363
364
|
{
|
|
364
|
-
expandIcon: /* @__PURE__ */ e(
|
|
365
|
+
expandIcon: /* @__PURE__ */ e(L, { color: "secondary", name: "keyboard_arrow_down", size: 24 }),
|
|
365
366
|
sx: {
|
|
366
367
|
padding: "14px 24px",
|
|
367
368
|
borderBottom: "1px solid",
|
|
368
|
-
borderColor:
|
|
369
|
+
borderColor: i.palette.border.light
|
|
369
370
|
},
|
|
370
|
-
children: /* @__PURE__ */ c(
|
|
371
|
+
children: /* @__PURE__ */ c(f, { gap: 4, children: [
|
|
371
372
|
/* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: s.name }),
|
|
372
|
-
/* @__PURE__ */ e(v, { color:
|
|
373
|
-
/* @__PURE__ */ e(v, { color:
|
|
373
|
+
/* @__PURE__ */ e(v, { color: i.palette.text.secondary, variant: "Small", children: `${s.make} ${s.model}` }),
|
|
374
|
+
/* @__PURE__ */ e(v, { color: i.palette.text.secondary, variant: "Small", children: te(oe(s.created_at), { addSuffix: !0 }) })
|
|
374
375
|
] })
|
|
375
376
|
}
|
|
376
377
|
),
|
|
377
378
|
/* @__PURE__ */ c(
|
|
378
379
|
Te,
|
|
379
380
|
{
|
|
380
|
-
sx: { backgroundColor:
|
|
381
|
+
sx: { backgroundColor: i.palette.background.default, p: "0 0 0 24px" },
|
|
381
382
|
children: [
|
|
382
383
|
/* @__PURE__ */ c(
|
|
383
|
-
|
|
384
|
+
f,
|
|
384
385
|
{
|
|
385
386
|
onClick: () => a(s),
|
|
386
387
|
sx: {
|
|
@@ -391,16 +392,16 @@ const Ve = ({
|
|
|
391
392
|
py: 16,
|
|
392
393
|
cursor: "pointer",
|
|
393
394
|
borderBottom: "1px solid",
|
|
394
|
-
borderColor:
|
|
395
|
+
borderColor: i.palette.border.light
|
|
395
396
|
},
|
|
396
397
|
children: [
|
|
397
|
-
/* @__PURE__ */ e(
|
|
398
|
+
/* @__PURE__ */ e(W, { "aria-label": r.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(L, { name: "edit" }) }),
|
|
398
399
|
/* @__PURE__ */ e(v, { variant: "Body", children: r.mobile_devices_edit_label })
|
|
399
400
|
]
|
|
400
401
|
}
|
|
401
402
|
),
|
|
402
403
|
/* @__PURE__ */ c(
|
|
403
|
-
|
|
404
|
+
f,
|
|
404
405
|
{
|
|
405
406
|
onClick: () => o(s),
|
|
406
407
|
sx: {
|
|
@@ -412,7 +413,7 @@ const Ve = ({
|
|
|
412
413
|
cursor: "pointer"
|
|
413
414
|
},
|
|
414
415
|
children: [
|
|
415
|
-
/* @__PURE__ */ e(
|
|
416
|
+
/* @__PURE__ */ e(W, { "aria-label": r.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(L, { name: "delete" }) }),
|
|
416
417
|
/* @__PURE__ */ e(v, { variant: "Body", children: r.mobile_devices_delete_label })
|
|
417
418
|
]
|
|
418
419
|
}
|
|
@@ -425,15 +426,15 @@ const Ve = ({
|
|
|
425
426
|
s.guid
|
|
426
427
|
)),
|
|
427
428
|
/* @__PURE__ */ e(
|
|
428
|
-
|
|
429
|
+
V,
|
|
429
430
|
{
|
|
430
431
|
sx: {
|
|
431
|
-
backgroundColor:
|
|
432
|
+
backgroundColor: i.palette.background.default,
|
|
432
433
|
borderTop: "1px solid",
|
|
433
|
-
borderColor:
|
|
434
|
+
borderColor: i.palette.border.light,
|
|
434
435
|
p: "12px 16px"
|
|
435
436
|
},
|
|
436
|
-
children: /* @__PURE__ */ e(v, { color:
|
|
437
|
+
children: /* @__PURE__ */ e(v, { color: i.palette.text.secondary, variant: "Small", children: H(
|
|
437
438
|
r.mobile_devices_count,
|
|
438
439
|
/* @__PURE__ */ e("b", { children: t.length }),
|
|
439
440
|
/* @__PURE__ */ e("b", { children: t.length })
|
|
@@ -441,23 +442,23 @@ const Ve = ({
|
|
|
441
442
|
}
|
|
442
443
|
)
|
|
443
444
|
] });
|
|
444
|
-
},
|
|
445
|
+
}, ze = ({
|
|
445
446
|
dialogType: t,
|
|
446
447
|
isOpen: a,
|
|
447
448
|
onClose: o,
|
|
448
|
-
device:
|
|
449
|
+
device: i,
|
|
449
450
|
deviceToken: r = ""
|
|
450
451
|
}) => {
|
|
451
|
-
const d = P(), { common: l, settings:
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}, [
|
|
455
|
-
const
|
|
452
|
+
const d = P(), { common: l, settings: n } = D(), { updateDevice: s, deleteDevice: b, setAlert: _, loadDevices: m } = A(), [h, S] = p.useState("");
|
|
453
|
+
p.useEffect(() => {
|
|
454
|
+
i && S(i.name);
|
|
455
|
+
}, [i, t]);
|
|
456
|
+
const x = () => {
|
|
456
457
|
switch (t) {
|
|
457
458
|
case y.Edit:
|
|
458
|
-
return
|
|
459
|
+
return n.mobile_devices_edit_label;
|
|
459
460
|
case y.Delete:
|
|
460
|
-
return
|
|
461
|
+
return n.mobile_devices_delete_label;
|
|
461
462
|
default:
|
|
462
463
|
return "";
|
|
463
464
|
}
|
|
@@ -472,15 +473,15 @@ const Ve = ({
|
|
|
472
473
|
default:
|
|
473
474
|
return "";
|
|
474
475
|
}
|
|
475
|
-
},
|
|
476
|
-
const
|
|
476
|
+
}, k = () => {
|
|
477
|
+
const u = {
|
|
477
478
|
"& .MuiDialogContent-root": {
|
|
478
479
|
width: 400,
|
|
479
480
|
pt: 0
|
|
480
481
|
}
|
|
481
482
|
};
|
|
482
483
|
return t === y.Token ? {
|
|
483
|
-
...
|
|
484
|
+
...u,
|
|
484
485
|
"& .MuiToolbar-root:last-child": {
|
|
485
486
|
padding: "32px 60px 48px",
|
|
486
487
|
justifyContent: "center"
|
|
@@ -492,7 +493,7 @@ const Ve = ({
|
|
|
492
493
|
flex: 1
|
|
493
494
|
}
|
|
494
495
|
} : {
|
|
495
|
-
...
|
|
496
|
+
...u,
|
|
496
497
|
"& .MuiToolbar-root:last-child": {
|
|
497
498
|
gap: 8,
|
|
498
499
|
padding: 24,
|
|
@@ -504,40 +505,40 @@ const Ve = ({
|
|
|
504
505
|
}
|
|
505
506
|
}
|
|
506
507
|
};
|
|
507
|
-
},
|
|
508
|
-
if (t === y.Token && o(), t === y.Edit &&
|
|
509
|
-
const
|
|
510
|
-
(await s(
|
|
511
|
-
|
|
508
|
+
}, T = async () => {
|
|
509
|
+
if (t === y.Token && o(), t === y.Edit && i) {
|
|
510
|
+
const u = { ...i, name: h };
|
|
511
|
+
(await s(u)).success ? (_(n.mobile_devices_edit_success, "success"), m()) : _(
|
|
512
|
+
H(n.mobile_devices_edit_error, i.name),
|
|
512
513
|
"error"
|
|
513
514
|
), o();
|
|
514
515
|
}
|
|
515
|
-
t === y.Delete &&
|
|
516
|
-
|
|
516
|
+
t === y.Delete && i && ((await b(i.guid)).success ? (_(
|
|
517
|
+
H(n.mobile_devices_delete_success, i.name),
|
|
517
518
|
"success"
|
|
518
519
|
), m()) : _(
|
|
519
|
-
|
|
520
|
+
H(n.mobile_devices_delete_error, i.name),
|
|
520
521
|
"error"
|
|
521
522
|
), o());
|
|
522
523
|
};
|
|
523
524
|
return /* @__PURE__ */ c(
|
|
524
|
-
|
|
525
|
+
z,
|
|
525
526
|
{
|
|
526
|
-
copy: { title:
|
|
527
|
+
copy: { title: x() },
|
|
527
528
|
isOpen: a,
|
|
528
529
|
onClose: o,
|
|
529
|
-
onPrimaryAction:
|
|
530
|
+
onPrimaryAction: T,
|
|
530
531
|
onSecondaryAction: o,
|
|
531
532
|
primaryColor: t === y.Delete ? "error" : void 0,
|
|
532
533
|
primaryText: w(),
|
|
533
534
|
secondaryText: t === y.Token ? l.back : l.cancel_button,
|
|
534
|
-
sx:
|
|
535
|
+
sx: k(),
|
|
535
536
|
children: [
|
|
536
|
-
t === y.Token && /* @__PURE__ */ c(
|
|
537
|
-
/* @__PURE__ */ e(v, { bold: !0, truncate: !1, variant: "Body", children:
|
|
538
|
-
/* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children:
|
|
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: n.mobile_devices_access_label }),
|
|
539
|
+
/* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children: n.mobile_devices_access_info_1 }),
|
|
539
540
|
/* @__PURE__ */ e(
|
|
540
|
-
|
|
541
|
+
N,
|
|
541
542
|
{
|
|
542
543
|
sx: {
|
|
543
544
|
border: `1px solid ${d.palette.border.light}`,
|
|
@@ -548,30 +549,30 @@ const Ve = ({
|
|
|
548
549
|
children: r
|
|
549
550
|
}
|
|
550
551
|
),
|
|
551
|
-
/* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children:
|
|
552
|
+
/* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children: n.mobile_devices_access_info_2 })
|
|
552
553
|
] }),
|
|
553
|
-
t === y.Edit && /* @__PURE__ */ e(
|
|
554
|
-
t === y.Delete && /* @__PURE__ */ e(
|
|
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: n.mobile_devices_delete_info })
|
|
555
556
|
]
|
|
556
557
|
}
|
|
557
558
|
);
|
|
558
|
-
},
|
|
559
|
-
const { isMobile: t } =
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
}, [
|
|
563
|
-
const
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
}, w = (
|
|
567
|
-
m(
|
|
568
|
-
},
|
|
569
|
-
m(
|
|
570
|
-
},
|
|
559
|
+
}, $e = C(ze), Ge = C(() => {
|
|
560
|
+
const { isMobile: t } = O(), { settings: a } = D(), { isCopyLoaded: o, isInitialized: i } = ee(), { setAlert: r, devices: d, loadDevices: l, generateDeviceToken: n } = A(), [s, b] = p.useState({ open: !1, type: "" }), [_, m] = p.useState(), [h, S] = p.useState("");
|
|
561
|
+
p.useEffect(() => {
|
|
562
|
+
i && l();
|
|
563
|
+
}, [i]);
|
|
564
|
+
const x = async () => {
|
|
565
|
+
const u = await n();
|
|
566
|
+
u ? (S(u), b({ open: !0, type: y.Token })) : r(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
|
+
}, T = () => {
|
|
571
572
|
b({ open: !1, type: "" }), m(void 0);
|
|
572
573
|
};
|
|
573
|
-
return !o || !
|
|
574
|
-
|
|
574
|
+
return !o || !i ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ c(
|
|
575
|
+
f,
|
|
575
576
|
{
|
|
576
577
|
sx: {
|
|
577
578
|
backgroundColor: "background.paper",
|
|
@@ -579,64 +580,64 @@ const Ve = ({
|
|
|
579
580
|
gap: 24
|
|
580
581
|
},
|
|
581
582
|
children: [
|
|
582
|
-
/* @__PURE__ */ c(
|
|
583
|
-
/* @__PURE__ */ e(
|
|
584
|
-
/* @__PURE__ */ e(
|
|
583
|
+
/* @__PURE__ */ c(f, { gap: 4, children: [
|
|
584
|
+
/* @__PURE__ */ e(K, { children: a.mobile_devices_title }),
|
|
585
|
+
/* @__PURE__ */ e(N, { variant: "Body", children: a.mobile_devices_info })
|
|
585
586
|
] }),
|
|
586
587
|
t ? /* @__PURE__ */ e(
|
|
587
588
|
We,
|
|
588
589
|
{
|
|
589
590
|
devices: d,
|
|
590
|
-
onClickDeviceDelete:
|
|
591
|
+
onClickDeviceDelete: k,
|
|
591
592
|
onClickDeviceEdit: w
|
|
592
593
|
}
|
|
593
594
|
) : /* @__PURE__ */ e(
|
|
594
595
|
Ve,
|
|
595
596
|
{
|
|
596
597
|
devices: d,
|
|
597
|
-
onClickDeviceDelete:
|
|
598
|
+
onClickDeviceDelete: k,
|
|
598
599
|
onClickDeviceEdit: w
|
|
599
600
|
}
|
|
600
601
|
),
|
|
601
|
-
/* @__PURE__ */ c(
|
|
602
|
+
/* @__PURE__ */ c(f, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
|
|
602
603
|
/* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: a.mobile_devices_access_title }),
|
|
603
|
-
/* @__PURE__ */ e(
|
|
604
|
-
/* @__PURE__ */ e(
|
|
604
|
+
/* @__PURE__ */ e(N, { align: "center", variant: "Small", children: a.mobile_devices_access_description }),
|
|
605
|
+
/* @__PURE__ */ e(Z, { onClick: x, variant: "text", children: a.mobile_devices_access_cta })
|
|
605
606
|
] }),
|
|
606
607
|
/* @__PURE__ */ e(
|
|
607
|
-
|
|
608
|
+
$e,
|
|
608
609
|
{
|
|
609
610
|
device: _,
|
|
610
|
-
deviceToken:
|
|
611
|
+
deviceToken: h,
|
|
611
612
|
dialogType: s.type,
|
|
612
613
|
isOpen: s.open,
|
|
613
|
-
onClose:
|
|
614
|
+
onClose: T
|
|
614
615
|
}
|
|
615
616
|
)
|
|
616
617
|
]
|
|
617
618
|
}
|
|
618
619
|
);
|
|
619
|
-
}),
|
|
620
|
-
({ onClick: t, primaryText: a, secondaryText: o, sx:
|
|
620
|
+
}), Y = C(
|
|
621
|
+
({ onClick: t, primaryText: a, secondaryText: o, sx: i }) => {
|
|
621
622
|
const r = P();
|
|
622
|
-
return /* @__PURE__ */ e(Be, { sx: { bgcolor: r.palette.background.paper }, children: /* @__PURE__ */ c(
|
|
623
|
+
return /* @__PURE__ */ e(Be, { sx: { bgcolor: r.palette.background.paper }, children: /* @__PURE__ */ c(Ne, { alignItems: "flex-start", onClick: t, sx: i, children: [
|
|
623
624
|
/* @__PURE__ */ e(Le, { primary: a, secondary: o }),
|
|
624
|
-
/* @__PURE__ */ e(
|
|
625
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(ve, {}) })
|
|
625
626
|
] }) });
|
|
626
627
|
}
|
|
627
|
-
), je =
|
|
628
|
-
const { settings: t } =
|
|
628
|
+
), je = C(() => {
|
|
629
|
+
const { settings: t } = D(), { categories: a } = G(), { selectedRule: o, updateRuleCategory: i } = A(), [r, d] = p.useState(!1), l = () => {
|
|
629
630
|
d(!1);
|
|
630
|
-
},
|
|
631
|
+
}, n = () => {
|
|
631
632
|
d(!0);
|
|
632
633
|
}, s = (_) => a.find((m) => m.guid === _)?.name, b = async (_) => {
|
|
633
|
-
o && o.category_guid !== _ && (o.category_guid = _, await
|
|
634
|
+
o && o.category_guid !== _ && (o.category_guid = _, await i(o)), l();
|
|
634
635
|
};
|
|
635
|
-
return /* @__PURE__ */ c(
|
|
636
|
+
return /* @__PURE__ */ c(p.Fragment, { children: [
|
|
636
637
|
/* @__PURE__ */ e(
|
|
637
|
-
|
|
638
|
+
Y,
|
|
638
639
|
{
|
|
639
|
-
onClick:
|
|
640
|
+
onClick: n,
|
|
640
641
|
primaryText: o?.category_guid ? s(o.category_guid) : "",
|
|
641
642
|
secondaryText: t.category
|
|
642
643
|
}
|
|
@@ -652,23 +653,23 @@ const Ve = ({
|
|
|
652
653
|
}
|
|
653
654
|
)
|
|
654
655
|
] });
|
|
655
|
-
}), Je =
|
|
656
|
-
const { common: t, settings: a } =
|
|
656
|
+
}), Je = C(() => {
|
|
657
|
+
const { common: t, settings: a } = D(), { selectedRule: o, updateRulePayee: i } = A(), r = P(), [d, l] = p.useState(!1), n = o?.description ? o.description : o?.match_description, [s, b] = p.useState(n || ""), _ = () => {
|
|
657
658
|
l(!0);
|
|
658
659
|
}, m = async () => {
|
|
659
|
-
s !==
|
|
660
|
+
s !== n && o && (o.description = s, await i(o), l(!1));
|
|
660
661
|
};
|
|
661
|
-
return /* @__PURE__ */ c(
|
|
662
|
+
return /* @__PURE__ */ c(p.Fragment, { children: [
|
|
662
663
|
/* @__PURE__ */ e(
|
|
663
|
-
|
|
664
|
+
Y,
|
|
664
665
|
{
|
|
665
666
|
onClick: _,
|
|
666
|
-
primaryText:
|
|
667
|
+
primaryText: n,
|
|
667
668
|
secondaryText: a.payee
|
|
668
669
|
}
|
|
669
670
|
),
|
|
670
671
|
/* @__PURE__ */ e(
|
|
671
|
-
|
|
672
|
+
z,
|
|
672
673
|
{
|
|
673
674
|
copy: { title: a.edit_payee },
|
|
674
675
|
isOpen: d,
|
|
@@ -684,7 +685,7 @@ const Ve = ({
|
|
|
684
685
|
children: /* @__PURE__ */ e(
|
|
685
686
|
I,
|
|
686
687
|
{
|
|
687
|
-
onChange: (
|
|
688
|
+
onChange: (h) => b(h.target.value),
|
|
688
689
|
sx: { width: 352 },
|
|
689
690
|
value: s
|
|
690
691
|
}
|
|
@@ -692,10 +693,10 @@ const Ve = ({
|
|
|
692
693
|
}
|
|
693
694
|
)
|
|
694
695
|
] });
|
|
695
|
-
}), Ke =
|
|
696
|
-
const { common:
|
|
696
|
+
}), Ke = C(({ onClose: t, onDelete: a, isOpen: o }) => {
|
|
697
|
+
const { common: i, settings: r } = D(), d = P();
|
|
697
698
|
return /* @__PURE__ */ e(
|
|
698
|
-
|
|
699
|
+
z,
|
|
699
700
|
{
|
|
700
701
|
copy: { title: r.delete_rule },
|
|
701
702
|
isOpen: o,
|
|
@@ -703,8 +704,8 @@ const Ve = ({
|
|
|
703
704
|
onPrimaryAction: a,
|
|
704
705
|
onSecondaryAction: t,
|
|
705
706
|
primaryColor: "error",
|
|
706
|
-
primaryText:
|
|
707
|
-
secondaryText:
|
|
707
|
+
primaryText: i.delete_button,
|
|
708
|
+
secondaryText: i.cancel_button,
|
|
708
709
|
sx: {
|
|
709
710
|
"& .MuiButton-outlined": {
|
|
710
711
|
borderColor: d.palette.border.main,
|
|
@@ -716,9 +717,9 @@ const Ve = ({
|
|
|
716
717
|
children: /* @__PURE__ */ e(v, { truncate: !1, variant: "Small", children: r.delete_rule_confirm })
|
|
717
718
|
}
|
|
718
719
|
);
|
|
719
|
-
}), Xe =
|
|
720
|
+
}), Xe = C(
|
|
720
721
|
({ isOpen: t, onClose: a, onDelete: o }) => {
|
|
721
|
-
const { common:
|
|
722
|
+
const { common: i, settings: r } = D(), d = P(), [l, n] = p.useState(!1);
|
|
722
723
|
return /* @__PURE__ */ c(
|
|
723
724
|
He,
|
|
724
725
|
{
|
|
@@ -726,10 +727,10 @@ const Ve = ({
|
|
|
726
727
|
isOpen: t,
|
|
727
728
|
onClose: a,
|
|
728
729
|
onPrimaryAction: () => {
|
|
729
|
-
|
|
730
|
+
n(!0);
|
|
730
731
|
},
|
|
731
732
|
primaryColor: "error",
|
|
732
|
-
primaryText:
|
|
733
|
+
primaryText: i.delete_button,
|
|
733
734
|
sx: {
|
|
734
735
|
"& .MuiToolbar-root": { borderTop: `1px solid ${d.palette.border.light}` }
|
|
735
736
|
},
|
|
@@ -737,14 +738,14 @@ const Ve = ({
|
|
|
737
738
|
children: [
|
|
738
739
|
/* @__PURE__ */ e(Ee, { children: /* @__PURE__ */ e(v, { bold: !0, variant: "XSmall", children: r.details }) }),
|
|
739
740
|
/* @__PURE__ */ e(Je, {}),
|
|
740
|
-
/* @__PURE__ */ e(
|
|
741
|
+
/* @__PURE__ */ e(J, { sx: { ml: 24 } }),
|
|
741
742
|
/* @__PURE__ */ e(je, {}),
|
|
742
|
-
/* @__PURE__ */ e(
|
|
743
|
+
/* @__PURE__ */ e(J, { sx: { ml: 24 } }),
|
|
743
744
|
/* @__PURE__ */ e(
|
|
744
745
|
Ke,
|
|
745
746
|
{
|
|
746
747
|
isOpen: l,
|
|
747
|
-
onClose: () =>
|
|
748
|
+
onClose: () => n(!1),
|
|
748
749
|
onDelete: o
|
|
749
750
|
}
|
|
750
751
|
)
|
|
@@ -752,49 +753,50 @@ const Ve = ({
|
|
|
752
753
|
}
|
|
753
754
|
);
|
|
754
755
|
}
|
|
755
|
-
), Ye =
|
|
756
|
-
const { categories: a } =
|
|
756
|
+
), Ye = C(({ rule: t }) => {
|
|
757
|
+
const { categories: a } = G(), { setSelectedGuid: o } = Re(), { deleteTransactionRule: i, setSelectedRule: r } = A(), { isDesktop: d, isTablet: l } = O(), [n, s] = p.useState(!1), b = () => {
|
|
757
758
|
s(!1), o(null), r(void 0);
|
|
758
759
|
}, _ = async () => {
|
|
759
|
-
await
|
|
760
|
+
await i(), b();
|
|
760
761
|
}, m = () => {
|
|
761
762
|
s(!0), r(t);
|
|
762
|
-
},
|
|
763
|
-
return /* @__PURE__ */ c(
|
|
763
|
+
}, h = (S) => a.find((x) => x.guid === S)?.name;
|
|
764
|
+
return /* @__PURE__ */ c(p.Fragment, { children: [
|
|
764
765
|
/* @__PURE__ */ e(
|
|
765
|
-
|
|
766
|
+
Y,
|
|
766
767
|
{
|
|
767
768
|
onClick: m,
|
|
768
769
|
primaryText: t.description ? t.description : t.match_description,
|
|
769
|
-
secondaryText: t.category_guid ?
|
|
770
|
+
secondaryText: t.category_guid ? h(t.category_guid) : ""
|
|
770
771
|
}
|
|
771
772
|
),
|
|
772
|
-
/* @__PURE__ */ e(
|
|
773
|
-
/* @__PURE__ */ e(Xe, { isOpen:
|
|
773
|
+
/* @__PURE__ */ e(J, { sx: { ml: l || d ? 0 : 24 } }),
|
|
774
|
+
/* @__PURE__ */ e(Xe, { isOpen: n, onClose: b, onDelete: _ })
|
|
774
775
|
] });
|
|
775
|
-
}),
|
|
776
|
-
const { settings: t } =
|
|
777
|
-
return
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
/* @__PURE__ */ e(
|
|
776
|
+
}), ne = C(() => {
|
|
777
|
+
const { settings: t } = D(), { loadTransactionRules: a, transactionRules: o } = A(), [i, r] = p.useState(!1);
|
|
778
|
+
return re({
|
|
779
|
+
widgetName: "TransactionRulesTab",
|
|
780
|
+
isLoaded: i
|
|
781
|
+
}), p.useEffect(() => {
|
|
782
|
+
a().finally(() => r(!0));
|
|
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
|
+
/* @__PURE__ */ e(N, { variant: "Body", children: t.transaction_rules_description })
|
|
785
787
|
] }),
|
|
786
|
-
/* @__PURE__ */ e(Ae, { children: o.map((
|
|
788
|
+
/* @__PURE__ */ e(Ae, { children: o.map((d, l) => /* @__PURE__ */ e(Ye, { rule: d }, l)) })
|
|
787
789
|
] });
|
|
788
|
-
}), qe =
|
|
790
|
+
}), qe = C(({ selectedTab: t }) => {
|
|
789
791
|
const { alert: a, setAlert: o } = A(), {
|
|
790
|
-
config: { display_user_profile_in_settings:
|
|
792
|
+
config: { display_user_profile_in_settings: i }
|
|
791
793
|
} = $();
|
|
792
|
-
return /* @__PURE__ */ c(
|
|
793
|
-
t === B.Profile && /* @__PURE__ */ e(
|
|
794
|
+
return /* @__PURE__ */ c(Q, { children: [
|
|
795
|
+
t === B.Profile && /* @__PURE__ */ e(Ue, {}),
|
|
794
796
|
t === B.Devices && /* @__PURE__ */ e(Ge, {}),
|
|
795
|
-
t === B.Notifications && /* @__PURE__ */ e(
|
|
796
|
-
t === B.TransactionRules && /* @__PURE__ */ e(
|
|
797
|
-
t === B.Help && /* @__PURE__ */ e(
|
|
797
|
+
t === B.Notifications && /* @__PURE__ */ e(j, { showPersonalDetails: !i }),
|
|
798
|
+
t === B.TransactionRules && /* @__PURE__ */ e(ne, {}),
|
|
799
|
+
t === B.Help && /* @__PURE__ */ e(f, { sx: { px: 24 }, children: /* @__PURE__ */ e(Oe, {}) }),
|
|
798
800
|
/* @__PURE__ */ e(
|
|
799
801
|
fe,
|
|
800
802
|
{
|
|
@@ -818,68 +820,74 @@ const Ve = ({
|
|
|
818
820
|
] });
|
|
819
821
|
});
|
|
820
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 || {});
|
|
821
|
-
const
|
|
822
|
-
const { settings: o } =
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
823
|
+
const Wt = C(({ onBackClick: t, sx: a }) => {
|
|
824
|
+
const { settings: o } = D(), { isCopyLoaded: i, isInitialized: r } = ee(), { config: d } = $(), { isMobile: l } = O(), { categoriesLoaded: n, loadCategories: s } = G();
|
|
825
|
+
re({
|
|
826
|
+
widgetName: "SettingsWidget",
|
|
827
|
+
isLoaded: r && i
|
|
828
|
+
}), p.useEffect(() => {
|
|
829
|
+
n || s().finally();
|
|
830
|
+
}, []);
|
|
826
831
|
const {
|
|
827
|
-
display_user_profile_in_settings:
|
|
828
|
-
display_mobile_devices_in_settings:
|
|
829
|
-
display_notification_settings_in_settings:
|
|
830
|
-
display_user_transaction_rules_in_settings:
|
|
831
|
-
show_help_widget_in_master:
|
|
832
|
-
} = d,
|
|
833
|
-
{ enabled:
|
|
834
|
-
{ enabled:
|
|
835
|
-
{ enabled:
|
|
836
|
-
{ enabled:
|
|
837
|
-
{ enabled:
|
|
838
|
-
],
|
|
839
|
-
return !
|
|
840
|
-
|
|
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);
|
|
844
|
+
return !i || !r ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ e(
|
|
845
|
+
X,
|
|
841
846
|
{
|
|
842
847
|
onBackClick: t,
|
|
848
|
+
showAccountFilter: !1,
|
|
843
849
|
sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...a },
|
|
844
850
|
title: o.title,
|
|
845
|
-
children: /* @__PURE__ */ c(
|
|
851
|
+
children: /* @__PURE__ */ c(f, { mx: l ? 0 : 48, my: 24, children: [
|
|
846
852
|
/* @__PURE__ */ e(
|
|
847
853
|
pe,
|
|
848
854
|
{
|
|
849
|
-
onChange: (
|
|
855
|
+
onChange: (u, M) => T(M),
|
|
850
856
|
sx: { bgcolor: "background.paper" },
|
|
851
857
|
textColor: "primary",
|
|
852
|
-
value:
|
|
858
|
+
value: k,
|
|
853
859
|
variant: "scrollable",
|
|
854
|
-
children:
|
|
855
|
-
(
|
|
860
|
+
children: x.map(
|
|
861
|
+
(u) => u.enabled && /* @__PURE__ */ e(ue, { label: u.label, value: u.index }, u.index)
|
|
856
862
|
)
|
|
857
863
|
}
|
|
858
864
|
),
|
|
859
|
-
/* @__PURE__ */ e(qe, { selectedTab:
|
|
865
|
+
/* @__PURE__ */ e(qe, { selectedTab: k })
|
|
860
866
|
] })
|
|
861
867
|
}
|
|
862
868
|
);
|
|
863
|
-
}),
|
|
869
|
+
}), zt = C((t) => {
|
|
864
870
|
const { clientConfig: a } = $(), o = a?.master?.deep_link_params?.view;
|
|
865
|
-
return o ? /* @__PURE__ */ e(
|
|
871
|
+
return o ? /* @__PURE__ */ e(j, { view: o }) : /* @__PURE__ */ e(X, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(f, { my: 24, children: /* @__PURE__ */ e(j, {}) }) });
|
|
866
872
|
}), $t = (t) => {
|
|
867
|
-
const { isMobile: a } =
|
|
868
|
-
return
|
|
873
|
+
const { isMobile: a } = O(), { categoriesLoaded: o, loadCategories: i } = G();
|
|
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(ne, {}) }) });
|
|
869
877
|
};
|
|
870
878
|
export {
|
|
871
|
-
|
|
872
|
-
|
|
879
|
+
Yt as AccountNotificationProfiles,
|
|
880
|
+
qt as BudgetNotificationProfiles,
|
|
873
881
|
Ge as DeviceTab,
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
882
|
+
Qt as InsightsNotificationProfiles,
|
|
883
|
+
j as NotificationSettings,
|
|
884
|
+
zt as NotificationSettingsWidget,
|
|
885
|
+
Ue as ProfileTab,
|
|
886
|
+
Jt as SettingsApi,
|
|
887
|
+
Kt as SettingsStore,
|
|
880
888
|
B as SettingsTabs,
|
|
881
|
-
|
|
889
|
+
Wt as SettingsWidget,
|
|
882
890
|
qe as SettingsWidgetContents,
|
|
883
|
-
|
|
891
|
+
ne as TransactionRulesTab,
|
|
884
892
|
$t as TransactionRulesWidget
|
|
885
893
|
};
|