@mx-cartographer/experiences 6.26.18-alpha.mega4 → 6.26.18-alpha.sms2

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