@mx-cartographer/experiences 9.2.9-alpha.al3 → 9.2.9

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