@mx-cartographer/experiences 9.0.3 → 9.1.0-alpha.bb1

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 (121) hide show
  1. package/CHANGELOG.md +0 -4
  2. package/dist/Analytics-BKzTPees.mjs +61 -0
  3. package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
  4. package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
  5. package/dist/Loader-BlVzRtUd.mjs +73 -0
  6. package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
  7. package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
  8. package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
  9. package/dist/accounts/index.es.js +12 -1598
  10. package/dist/accounts-DkyAiLpg.mjs +15632 -0
  11. package/dist/analytics/index.es.js +155 -139
  12. package/dist/budgets/index.es.js +1317 -1266
  13. package/dist/cashflow/index.es.js +1047 -942
  14. package/dist/categories/index.es.js +4 -4
  15. package/dist/common/index.es.js +101 -310
  16. package/dist/core/index.es.js +80 -104
  17. package/dist/core-BexP5oiV.mjs +4047 -0
  18. package/dist/dashboard/index.es.js +185 -141
  19. package/dist/debts/index.es.js +1384 -1272
  20. package/dist/finstrong/index.es.js +3366 -3471
  21. package/dist/goals/index.es.js +1103 -984
  22. package/dist/help/index.es.js +3 -25
  23. package/dist/help-CctDYrAH.mjs +2308 -0
  24. package/dist/insights/index.es.js +93 -4843
  25. package/dist/investments/index.es.js +1533 -1522
  26. package/dist/merchants/index.es.js +75 -64
  27. package/dist/microinsights/index.es.js +15 -824
  28. package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
  29. package/dist/networth/index.es.js +550 -503
  30. package/dist/notifications/index.es.js +169 -161
  31. package/dist/recurringtransactions/index.es.js +10 -962
  32. package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
  33. package/dist/settings/index.es.js +13 -880
  34. package/dist/settings-ZMHe439l.mjs +1526 -0
  35. package/dist/spending/index.es.js +400 -456
  36. package/dist/transactions/index.es.js +10 -603
  37. package/dist/trends/index.es.js +1268 -1407
  38. package/package.json +28 -28
  39. package/dist/Account-BaJmiJAG.mjs +0 -118
  40. package/dist/Account-BxHMlV9R.mjs +0 -30
  41. package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
  42. package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
  43. package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
  44. package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
  45. package/dist/AccountUtils-T5_Odvos.mjs +0 -27
  46. package/dist/Accounts-CseLC3lL.mjs +0 -5
  47. package/dist/Analytics-CkYXKvco.mjs +0 -53
  48. package/dist/Analytics-CzGzz_sE.mjs +0 -136
  49. package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
  50. package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
  51. package/dist/Category-DEKZGLYe.mjs +0 -301
  52. package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
  53. package/dist/Connect-Dk6GZEsA.mjs +0 -39
  54. package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
  55. package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
  56. package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
  57. package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
  58. package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
  59. package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
  60. package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
  61. package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
  62. package/dist/DebtUtils-DD3186U-.mjs +0 -153
  63. package/dist/Dialog-Bvd2n8hz.mjs +0 -66
  64. package/dist/Donut-SzzfZDHF.mjs +0 -88
  65. package/dist/Drawer-BXqqBMxg.mjs +0 -174
  66. package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
  67. package/dist/EmptyState-CJUDc3kD.mjs +0 -84
  68. package/dist/Error-Dogaw2jO.mjs +0 -84
  69. package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
  70. package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
  71. package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
  72. package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
  73. package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
  74. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  75. package/dist/Help-CkQTjORd.mjs +0 -299
  76. package/dist/Help-DJ8PrVHX.mjs +0 -3209
  77. package/dist/IconBacking-DgT8DCeh.mjs +0 -39
  78. package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
  79. package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
  80. package/dist/LineChart-CejWS_rh.mjs +0 -612
  81. package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
  82. package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
  83. package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
  84. package/dist/Loader-CxeBwuPG.mjs +0 -21
  85. package/dist/Localization-DnoVyBNK.mjs +0 -38
  86. package/dist/ManageIncome-D1yBODQi.mjs +0 -595
  87. package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
  88. package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
  89. package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
  90. package/dist/Notification-DTNYSd8P.mjs +0 -7
  91. package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
  92. package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
  93. package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
  94. package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
  95. package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
  96. package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
  97. package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
  98. package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
  99. package/dist/Select-BFt-HD-L.mjs +0 -55
  100. package/dist/SelectionBox-B4xELRgp.mjs +0 -48
  101. package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
  102. package/dist/Sizes-DISGrlUg.mjs +0 -6
  103. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  104. package/dist/SpendingData-Fii_xATx.mjs +0 -53
  105. package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
  106. package/dist/StatusBar-CPfSXe80.mjs +0 -30
  107. package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
  108. package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
  109. package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
  110. package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
  111. package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
  112. package/dist/UserStore-CRpKQjpP.mjs +0 -3002
  113. package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
  114. package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
  115. package/dist/hooks-BaO_gOI6.mjs +0 -77
  116. package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
  117. package/dist/useAriaLive-MkYebyUR.mjs +0 -35
  118. package/dist/useDimensions-CeDR9V8N.mjs +0 -36
  119. package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
  120. package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
  121. package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
@@ -1,882 +1,15 @@
1
- import { jsxs as c, Fragment as X, jsx as e } from "react/jsx-runtime";
2
- import m from "react";
3
- import { observer as C } from "mobx-react-lite";
4
- import h from "@mui/material/Stack";
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
- import { useTheme as L, alpha as V } from "@mui/material/styles";
14
- import W from "@mui/material/Box";
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";
18
- import { V as xe, a as ve, N as J } from "../NotificationSettings-B4JA5IKE.mjs";
19
- import { A as $t, B as Jt, I as Kt } from "../NotificationSettings-B4JA5IKE.mjs";
20
- import { u as w, a as G, A as E, C as Ce, b as ee, l as j } from "../hooks-BaO_gOI6.mjs";
21
- import { u as O } 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 z from "@mui/material/IconButton";
26
- import { DataGridPro as De } from "@mui/x-data-grid-pro";
27
- import { b as H } from "../Localization-DnoVyBNK.mjs";
28
- import { H as U } from "../HeaderCell-P8w6CmfO.mjs";
29
- import we from "@mui/material/Accordion";
30
- import ke from "@mui/material/AccordionDetails";
31
- import Se from "@mui/material/AccordionSummary";
32
- import { L as ie } from "../Loader-CxeBwuPG.mjs";
33
- import Te from "@mui/material/List";
34
- import K from "@mui/material/Divider";
35
- import Ae from "@mui/material/ListSubheader";
36
- import { b as Ie, u as Ee } from "../CategorySelectorDrawer-8soGrhB8.mjs";
37
- import Pe from "@mui/material/ListItem";
38
- import Re from "@mui/material/ListItemButton";
39
- import Ne from "@mui/material/ListItemIcon";
40
- import Me from "@mui/material/ListItemText";
41
- import { ChevronRight as Le } from "@mxenabled/mx-icons";
42
- import { D as Be } from "../Drawer-BXqqBMxg.mjs";
43
- import { u as ne } from "../useWidgetLoadTimer-CJb-RELP.mjs";
44
- import { H as He } from "../Help-DJ8PrVHX.mjs";
45
- import { W as q } from "../WidgetContainer-CmbU4CBH.mjs";
46
- const Oe = ({ availableWidth: t, handleOnLeavClick: r }) => {
47
- const i = L(), { common: o, settings: n } = w(), { isDesktop: u, isMobile: s, isSmallMobile: a, isTablet: l } = O(t), { config: b } = G(), { updateUser: _ } = E(), { user: d } = Ce(), [p, k] = 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 = p.email && !d.email_is_verified && !v, F = p.phone && !d.phone_is_verified && !v;
56
- m.useEffect(() => {
57
- if (r) {
58
- const f = (R) => {
59
- g.current && !g.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 ae = () => {
67
- if (p.birthday) {
68
- const f = new Date(p.birthday * 1e3), R = f.getUTCFullYear(), de = f.getUTCMonth(), me = f.getUTCDate();
69
- return new Date(R, de, me);
70
- }
71
- }, se = async () => {
72
- await _({ ...d, ...p }), S(!1);
73
- }, le = () => {
74
- T(!1), r && r();
75
- }, ce = () => {
76
- T(!1);
77
- }, P = (f) => {
78
- const R = {
79
- ...p,
80
- ...f
81
- };
82
- k(R), S(JSON.stringify({ ...d, ...R }) !== JSON.stringify(d));
83
- };
84
- return /* @__PURE__ */ c(X, { children: [
85
- /* @__PURE__ */ c(
86
- W,
87
- {
88
- component: "form",
89
- ref: g,
90
- sx: {
91
- backgroundColor: "background.paper",
92
- p: 24,
93
- width: a ? 320 : l ? 680 : u ? 990 : 400,
94
- "& .MuiTextField-root": {
95
- width: a ? 272 : l ? 328 : u ? 483 : 352
96
- }
97
- },
98
- children: [
99
- /* @__PURE__ */ e(Y, { children: n.personal_details }),
100
- /* @__PURE__ */ e(M, { variant: "body1", children: n.update_information }),
101
- /* @__PURE__ */ c(
102
- h,
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: p.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: p.last_name,
120
- label: n.last_name,
121
- onChange: (f) => P({ last_name: f.target.value })
122
- }
123
- )
124
- ]
125
- }
126
- ),
127
- /* @__PURE__ */ c(h, { direction: s ? "column" : "row", children: [
128
- b.display_email_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { mb: D ? 20 : 44, mr: s ? 0 : 24 }, children: [
129
- /* @__PURE__ */ e(
130
- I,
131
- {
132
- defaultValue: p.email,
133
- label: n.email_address,
134
- onChange: (f) => P({ email: f.target.value })
135
- }
136
- ),
137
- D && /* @__PURE__ */ e(xe, {})
138
- ] }),
139
- b.display_sms_edit_field_in_settings && /* @__PURE__ */ c(h, { sx: { mb: F ? 20 : 44 }, children: [
140
- /* @__PURE__ */ e(
141
- I,
142
- {
143
- defaultValue: p.phone,
144
- label: n.mobile_number,
145
- onChange: (f) => P({ phone: f.target.value }),
146
- type: "tel"
147
- }
148
- ),
149
- F && /* @__PURE__ */ e(ve, {})
150
- ] })
151
- ] }),
152
- /* @__PURE__ */ c(h, { direction: s ? "column" : "row", spacing: s ? 44 : 24, sx: { mb: 44 }, children: [
153
- /* @__PURE__ */ e(ye, { dateAdapter: ge, children: /* @__PURE__ */ e(
154
- be,
155
- {
156
- label: n.birthdate,
157
- onChange: (f) => P({ birthday: _e(f) }),
158
- slotProps: {
159
- nextIconButton: {
160
- sx: {
161
- color: "primary.main",
162
- "&:hover": { backgroundColor: V(i.palette.primary.light, 0.1) }
163
- }
164
- },
165
- previousIconButton: {
166
- sx: {
167
- color: "primary.main",
168
- "&:hover": { backgroundColor: V(i.palette.primary.light, 0.1) }
169
- }
170
- }
171
- },
172
- sx: {
173
- width: "100%",
174
- "& .MuiIconButton-edgeEnd": {
175
- color: "primary.main",
176
- "&:hover": { backgroundColor: V(i.palette.primary.light, 0.1) }
177
- }
178
- },
179
- value: ae()
180
- }
181
- ) }),
182
- /* @__PURE__ */ e(
183
- I,
184
- {
185
- defaultValue: p.postal_code,
186
- label: n.zip_code,
187
- onChange: (f) => P({ postal_code: f.target.value })
188
- }
189
- )
190
- ] }),
191
- /* @__PURE__ */ c(h, { children: [
192
- /* @__PURE__ */ e(
193
- I,
194
- {
195
- defaultValue: p.credit_score,
196
- label: n.credit_score,
197
- onChange: (f) => P({ credit_score: Number(f.target.value) }),
198
- sx: { mb: 44 }
199
- }
200
- ),
201
- /* @__PURE__ */ e(
202
- Z,
203
- {
204
- disabled: !v,
205
- onClick: se,
206
- sx: { width: a ? 272 : 124 },
207
- variant: "contained",
208
- children: o.save_button
209
- }
210
- )
211
- ] })
212
- ]
213
- }
214
- ),
215
- /* @__PURE__ */ e(
216
- $,
217
- {
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
225
- }
226
- )
227
- ] });
228
- }, Fe = C(Oe);
229
- var y = /* @__PURE__ */ ((t) => (t.Delete = "delete", t.Edit = "edit", t.Token = "token", t))(y || {});
230
- const Ue = ({
231
- devices: t,
232
- onClickDeviceEdit: r,
233
- onClickDeviceDelete: i
234
- }) => {
235
- const o = L(), { settings: n } = w(), u = [
236
- {
237
- field: "name",
238
- headerName: n.mobile_devices_column_name,
239
- renderHeader: U,
240
- renderCell: (a) => /* @__PURE__ */ c(h, { alignItems: "center", direction: "row", gap: 4, children: [
241
- /* @__PURE__ */ e(x, { variant: "body2", children: a.value }),
242
- /* @__PURE__ */ e(
243
- z,
244
- {
245
- "aria-label": n.mobile_devices_edit_label,
246
- color: "secondary",
247
- onClick: () => r(a.row),
248
- children: /* @__PURE__ */ e(B, { name: "edit" })
249
- }
250
- )
251
- ] }),
252
- sortable: !0,
253
- flex: 1,
254
- minWidth: 200
255
- },
256
- {
257
- field: "device_type",
258
- headerName: n.mobile_devices_column_type,
259
- renderHeader: U,
260
- sortable: !0,
261
- hideSortIcons: !1,
262
- flex: 1,
263
- minWidth: 150
264
- },
265
- {
266
- field: "created_at",
267
- headerName: n.mobile_devices_column_added,
268
- renderHeader: U,
269
- valueFormatter: (a) => te(oe(a), { addSuffix: !0 }),
270
- sortable: !0,
271
- hideSortIcons: !1,
272
- flex: 1,
273
- minWidth: 150
274
- },
275
- {
276
- field: "delete",
277
- headerName: "",
278
- renderHeader: U,
279
- renderCell: (a) => /* @__PURE__ */ e(h, { mr: 4, children: /* @__PURE__ */ e(
280
- z,
281
- {
282
- "aria-label": n.mobile_devices_delete_label,
283
- color: "secondary",
284
- onClick: () => i(a.row),
285
- children: /* @__PURE__ */ e(B, { name: "delete" })
286
- }
287
- ) }),
288
- sortable: !1,
289
- hideSortIcons: !1,
290
- width: 58
291
- }
292
- ], s = m.useMemo(() => t.map((a) => ({
293
- id: a.guid,
294
- ...a,
295
- device_type: `${a.make} ${a.model}`
296
- })), [t]);
297
- return /* @__PURE__ */ e(W, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
298
- De,
299
- {
300
- columns: u,
301
- disableColumnFilter: !0,
302
- disableColumnMenu: !0,
303
- disableRowSelectionOnClick: !0,
304
- rows: s,
305
- slotProps: {
306
- footer: {
307
- sx: { justifyContent: "flex-end" }
308
- }
309
- },
310
- slots: {
311
- footer: () => /* @__PURE__ */ e(
312
- W,
313
- {
314
- sx: {
315
- backgroundColor: o.palette.background.default,
316
- display: "flex",
317
- justifyContent: "flex-end",
318
- alignItems: "center",
319
- p: "12px 16px"
320
- },
321
- children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: H(
322
- n.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: o.palette.neutral.light,
332
- borderRadius: "8px",
333
- "& .MuiDataGrid-columnHeader .MuiIconButton-root": {
334
- color: o.palette.primary.main,
335
- "&:hover": {
336
- backgroundColor: V(o.palette.primary.main, 0.1)
337
- }
338
- },
339
- "& .MuiDataGrid-sortIcon": {
340
- color: o.palette.primary.main
341
- }
342
- }
343
- }
344
- ) });
345
- }, Ve = ({
346
- devices: t,
347
- onClickDeviceEdit: r,
348
- onClickDeviceDelete: i
349
- }) => {
350
- const o = L(), { settings: n } = w(), [u, s] = m.useState(!1), a = (l) => (b, _) => {
351
- s(_ ? l : !1);
352
- };
353
- return /* @__PURE__ */ c(h, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
354
- t.map((l) => /* @__PURE__ */ c(
355
- we,
356
- {
357
- expanded: u === l.guid,
358
- onChange: a(l.guid),
359
- sx: { boxShadow: "none" },
360
- children: [
361
- /* @__PURE__ */ e(
362
- Se,
363
- {
364
- expandIcon: /* @__PURE__ */ e(B, { color: "secondary", name: "keyboard_arrow_down", size: 24 }),
365
- sx: {
366
- padding: "14px 24px",
367
- borderBottom: "1px solid",
368
- borderColor: o.palette.divider
369
- },
370
- children: /* @__PURE__ */ c(h, { 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 }) })
374
- ] })
375
- }
376
- ),
377
- /* @__PURE__ */ c(
378
- ke,
379
- {
380
- sx: { backgroundColor: o.palette.background.default, p: "0 0 0 24px" },
381
- children: [
382
- /* @__PURE__ */ c(
383
- h,
384
- {
385
- onClick: () => r(l),
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: o.palette.divider
395
- },
396
- children: [
397
- /* @__PURE__ */ e(z, { "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 })
399
- ]
400
- }
401
- ),
402
- /* @__PURE__ */ c(
403
- h,
404
- {
405
- onClick: () => i(l),
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(z, { "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 })
417
- ]
418
- }
419
- )
420
- ]
421
- }
422
- )
423
- ]
424
- },
425
- l.guid
426
- )),
427
- /* @__PURE__ */ e(
428
- W,
429
- {
430
- sx: {
431
- backgroundColor: o.palette.background.default,
432
- borderTop: "1px solid",
433
- borderColor: o.palette.divider,
434
- p: "12px 16px"
435
- },
436
- children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: H(
437
- n.mobile_devices_count,
438
- /* @__PURE__ */ e("b", { children: t.length }),
439
- /* @__PURE__ */ e("b", { children: t.length })
440
- ) })
441
- }
442
- )
443
- ] });
444
- }, We = ({
445
- dialogType: t,
446
- isOpen: r,
447
- onClose: i,
448
- device: o,
449
- deviceToken: n = ""
450
- }) => {
451
- const u = L(), { common: s, settings: a } = w(), { updateDevice: l, deleteDevice: b, setAlert: _, loadDevices: d } = E(), [p, k] = m.useState("");
452
- m.useEffect(() => {
453
- o && k(o.name);
454
- }, [o, t]);
455
- const v = () => {
456
- switch (t) {
457
- case y.Edit:
458
- return a.mobile_devices_edit_label;
459
- case y.Delete:
460
- return a.mobile_devices_delete_label;
461
- default:
462
- return "";
463
- }
464
- }, S = () => {
465
- switch (t) {
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;
472
- default:
473
- return "";
474
- }
475
- }, A = () => {
476
- const g = {
477
- "& .MuiDialogContent-root": {
478
- width: 400,
479
- pt: 0
480
- }
481
- };
482
- return t === y.Token ? {
483
- ...g,
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
- ...g,
496
- "& .MuiToolbar-root:last-child": {
497
- gap: 8,
498
- padding: 24,
499
- justifyContent: "flex-end"
500
- },
501
- ...t === y.Delete && {
502
- "& .MuiTypography-body1": {
503
- padding: 0
504
- }
505
- }
506
- };
507
- }, T = async () => {
508
- if (t === y.Token && i(), t === y.Edit && o) {
509
- const g = { ...o, name: p };
510
- (await l(g)).success ? (_(a.mobile_devices_edit_success, "success"), d()) : _(
511
- H(a.mobile_devices_edit_error, o.name),
512
- "error"
513
- ), i();
514
- }
515
- t === y.Delete && o && ((await b(o.guid)).success ? (_(
516
- H(a.mobile_devices_delete_success, o.name),
517
- "success"
518
- ), d()) : _(
519
- H(a.mobile_devices_delete_error, o.name),
520
- "error"
521
- ), i());
522
- };
523
- return /* @__PURE__ */ c(
524
- $,
525
- {
526
- copy: { title: v() },
527
- isOpen: r,
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(),
535
- children: [
536
- t === y.Token && /* @__PURE__ */ c(h, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
537
- /* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "body1", children: a.mobile_devices_access_label }),
538
- /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: a.mobile_devices_access_info_1 }),
539
- /* @__PURE__ */ e(
540
- M,
541
- {
542
- sx: {
543
- border: `1px solid ${u.palette.neutral.light}`,
544
- borderRadius: "4px",
545
- p: "16px 32px"
546
- },
547
- variant: "h1",
548
- children: n
549
- }
550
- ),
551
- /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: a.mobile_devices_access_info_2 })
552
- ] }),
553
- t === y.Edit && /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(I, { onChange: (g) => k(g.target.value), value: p }) }),
554
- t === y.Delete && /* @__PURE__ */ e(M, { children: a.mobile_devices_delete_info })
555
- ]
556
- }
557
- );
558
- }, ze = C(We), Ge = C(() => {
559
- const { isMobile: t } = O(), { settings: r } = w(), { isCopyLoaded: i, isInitialized: o } = ee(), { setAlert: n, devices: u, loadDevices: s, generateDeviceToken: a } = E(), [l, b] = m.useState({ open: !1, type: "" }), [_, d] = m.useState(), [p, k] = m.useState("");
560
- m.useEffect(() => {
561
- o && s();
562
- }, [o]);
563
- const v = async () => {
564
- const g = await a();
565
- g ? (k(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);
572
- };
573
- return !i || !o ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ c(
574
- h,
575
- {
576
- sx: {
577
- backgroundColor: "background.paper",
578
- p: 24,
579
- gap: 24
580
- },
581
- children: [
582
- /* @__PURE__ */ c(h, { gap: 4, children: [
583
- /* @__PURE__ */ e(Y, { children: r.mobile_devices_title }),
584
- /* @__PURE__ */ e(M, { variant: "body1", children: r.mobile_devices_info })
585
- ] }),
586
- t ? /* @__PURE__ */ e(
587
- Ve,
588
- {
589
- devices: u,
590
- onClickDeviceDelete: A,
591
- onClickDeviceEdit: S
592
- }
593
- ) : /* @__PURE__ */ e(
594
- Ue,
595
- {
596
- devices: u,
597
- onClickDeviceDelete: A,
598
- onClickDeviceEdit: S
599
- }
600
- ),
601
- /* @__PURE__ */ c(h, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
602
- /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: r.mobile_devices_access_title }),
603
- /* @__PURE__ */ e(M, { align: "center", variant: "body2", children: r.mobile_devices_access_description }),
604
- /* @__PURE__ */ e(Z, { onClick: v, variant: "text", children: r.mobile_devices_access_cta })
605
- ] }),
606
- /* @__PURE__ */ e(
607
- ze,
608
- {
609
- device: _,
610
- deviceToken: p,
611
- dialogType: l.type,
612
- isOpen: l.open,
613
- onClose: T
614
- }
615
- )
616
- ]
617
- }
618
- );
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, {}) })
625
- ] }) });
626
- }
627
- ), je = C(() => {
628
- const { settings: t } = w(), { categories: r } = j(), { selectedRule: i, updateRuleCategory: o } = E(), [n, u] = m.useState(!1), s = () => {
629
- u(!1);
630
- }, a = () => {
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();
634
- };
635
- return /* @__PURE__ */ c(m.Fragment, { children: [
636
- /* @__PURE__ */ e(
637
- Q,
638
- {
639
- onClick: a,
640
- primaryText: i?.category_guid ? l(i.category_guid) : "",
641
- secondaryText: t.category
642
- }
643
- ),
644
- /* @__PURE__ */ e(
645
- Ie,
646
- {
647
- initialSelected: i?.category_guid ? i.category_guid : void 0,
648
- onClose: s,
649
- onSelect: b,
650
- showDrawer: n,
651
- title: t.select_category
652
- }
653
- )
654
- ] });
655
- }), $e = C(() => {
656
- const { common: t, settings: r } = w(), { 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));
660
- };
661
- return /* @__PURE__ */ c(m.Fragment, { children: [
662
- /* @__PURE__ */ e(
663
- Q,
664
- {
665
- onClick: _,
666
- primaryText: a,
667
- secondaryText: r.payee
668
- }
669
- ),
670
- /* @__PURE__ */ e(
671
- $,
672
- {
673
- copy: { title: r.edit_payee },
674
- isOpen: u,
675
- onClose: () => s(!1),
676
- onPrimaryAction: d,
677
- onSecondaryAction: () => s(!1),
678
- primaryText: t.save_button,
679
- secondaryText: t.cancel_button,
680
- sx: {
681
- "& .MuiDialogContent-root": { pt: 0, width: 400 },
682
- path: { fill: n.palette.secondary.darker }
683
- },
684
- children: /* @__PURE__ */ e(
685
- I,
686
- {
687
- onChange: (p) => b(p.target.value),
688
- sx: { width: 352 },
689
- value: l
690
- }
691
- )
692
- }
693
- )
694
- ] });
695
- }), Je = C(({ onClose: t, onDelete: r, isOpen: i }) => {
696
- const { common: o, settings: n } = w();
697
- return /* @__PURE__ */ e(
698
- $,
699
- {
700
- copy: { title: n.delete_rule },
701
- isOpen: i,
702
- onClose: t,
703
- onPrimaryAction: r,
704
- onSecondaryAction: t,
705
- primaryColor: "error",
706
- primaryText: o.delete_button,
707
- secondaryColor: "secondary",
708
- secondaryText: o.cancel_button,
709
- sx: { "& .MuiDialogContent-root": { pt: 0, width: 400 } },
710
- children: /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: n.delete_rule_confirm })
711
- }
712
- );
713
- }), Ke = C(
714
- ({ isOpen: t, onClose: r, onDelete: i }) => {
715
- const { common: o, settings: n } = w(), [u, s] = m.useState(!1);
716
- return /* @__PURE__ */ c(
717
- Be,
718
- {
719
- hasSecondaryAction: !1,
720
- isOpen: t,
721
- onClose: r,
722
- onPrimaryAction: () => {
723
- s(!0);
724
- },
725
- primaryColor: "error",
726
- primaryText: o.delete_button,
727
- title: n.edit_rule,
728
- children: [
729
- /* @__PURE__ */ e(Ae, { children: /* @__PURE__ */ e(x, { bold: !0, variant: "caption", children: n.details }) }),
730
- /* @__PURE__ */ e($e, {}),
731
- /* @__PURE__ */ e(K, { sx: { ml: 24 } }),
732
- /* @__PURE__ */ e(je, {}),
733
- /* @__PURE__ */ e(K, { sx: { ml: 24 } }),
734
- /* @__PURE__ */ e(
735
- Je,
736
- {
737
- isOpen: u,
738
- onClose: () => s(!1),
739
- onDelete: i
740
- }
741
- )
742
- ]
743
- }
744
- );
745
- }
746
- ), Ye = C(({ rule: t }) => {
747
- const { categories: r } = j(), { setSelectedGuid: i } = Ee(), { deleteTransactionRule: o, setSelectedRule: n } = E(), { isDesktop: u, isTablet: s } = O(), [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
- }, p = (k) => r.find((v) => v.guid === k)?.name;
754
- return /* @__PURE__ */ c(m.Fragment, { children: [
755
- /* @__PURE__ */ e(
756
- Q,
757
- {
758
- onClick: d,
759
- primaryText: t.description ? t.description : t.match_description,
760
- secondaryText: t.category_guid ? p(t.category_guid) : ""
761
- }
762
- ),
763
- /* @__PURE__ */ e(K, { sx: { ml: s || u ? 0 : 24 } }),
764
- /* @__PURE__ */ e(Ke, { isOpen: a, onClose: b, onDelete: _ })
765
- ] });
766
- }), re = C(() => {
767
- const { settings: t } = w(), { loadTransactionRules: r, transactionRules: i } = E(), [o, n] = m.useState(!1);
768
- return ne({
769
- widgetName: "TransactionRulesTab",
770
- isLoaded: o
771
- }), m.useEffect(() => {
772
- r().finally(() => n(!0));
773
- }, []), /* @__PURE__ */ c(h, { sx: { gap: 24, py: 24 }, children: [
774
- /* @__PURE__ */ c(h, { sx: { px: 24 }, children: [
775
- /* @__PURE__ */ e(Y, { children: t.transaction_rules_label }),
776
- /* @__PURE__ */ e(M, { variant: "body1", children: t.transaction_rules_description })
777
- ] }),
778
- /* @__PURE__ */ e(Te, { children: i.map((u, s) => /* @__PURE__ */ e(Ye, { rule: u }, s)) })
779
- ] });
780
- }), qe = C(({ selectedTab: t }) => {
781
- const { alert: r, setAlert: i } = E(), {
782
- config: { display_user_profile_in_settings: o }
783
- } = G();
784
- return /* @__PURE__ */ c(X, { children: [
785
- t === N.Profile && /* @__PURE__ */ e(Fe, {}),
786
- t === N.Devices && /* @__PURE__ */ e(Ge, {}),
787
- t === N.Notifications && /* @__PURE__ */ e(J, { showPersonalDetails: !o }),
788
- t === N.TransactionRules && /* @__PURE__ */ e(re, {}),
789
- t === N.Help && /* @__PURE__ */ e(h, { sx: { px: 24 }, children: /* @__PURE__ */ e(He, {}) }),
790
- /* @__PURE__ */ e(
791
- fe,
792
- {
793
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
794
- autoHideDuration: 3500,
795
- onClose: () => i(""),
796
- open: !!r.message,
797
- children: /* @__PURE__ */ e(
798
- he,
799
- {
800
- onClose: () => {
801
- i("");
802
- },
803
- severity: r.severity,
804
- variant: "filled",
805
- children: r.message
806
- }
807
- )
808
- }
809
- )
810
- ] });
811
- });
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 Vt = C(({ onBackClick: t, onMenuClick: r, sx: i }) => {
814
- const { settings: o } = w(), { isCopyLoaded: n, isInitialized: u } = ee(), { config: s } = G(), { isMobile: a } = O(), { categoriesLoaded: l, loadCategories: b } = j();
815
- ne({
816
- widgetName: "SettingsWidget",
817
- isLoaded: u && n
818
- }), m.useEffect(() => {
819
- l || b().finally();
820
- }, []);
821
- const {
822
- display_user_profile_in_settings: _,
823
- display_mobile_devices_in_settings: d,
824
- display_notification_settings_in_settings: p,
825
- display_user_transaction_rules_in_settings: k,
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: p, index: 2, label: o?.notifications_label },
831
- { enabled: k, 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,
836
- {
837
- onBackClick: t,
838
- onMenuClick: r,
839
- showAccountFilter: !1,
840
- sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...i },
841
- title: o.title,
842
- children: /* @__PURE__ */ c(h, { mx: a ? 0 : 48, my: 24, children: [
843
- /* @__PURE__ */ e(
844
- pe,
845
- {
846
- onChange: (D, F) => g(F),
847
- sx: { bgcolor: "background.paper" },
848
- textColor: "primary",
849
- value: T,
850
- variant: "scrollable",
851
- children: S.map(
852
- (D) => D.enabled && /* @__PURE__ */ e(ue, { label: D.label, value: D.index }, D.index)
853
- )
854
- }
855
- ),
856
- /* @__PURE__ */ e(qe, { selectedTab: T })
857
- ] })
858
- }
859
- );
860
- }), Wt = C((t) => {
861
- const { clientConfig: r } = G(), i = r?.master?.deep_link_params?.view;
862
- return i ? /* @__PURE__ */ e(J, { view: i }) : /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(h, { my: 24, children: /* @__PURE__ */ e(J, {}) }) });
863
- }), zt = (t) => {
864
- const { isMobile: r } = O(), { categoriesLoaded: i, loadCategories: o } = j();
865
- return m.useEffect(() => {
866
- i || o().finally();
867
- }), /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(h, { sx: { mx: r ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(re, {}) }) });
868
- };
1
+ import { a as t, c as s, d as a, f as o, i as e, l as n, n as f, o as c, r as g, s as r, t as l, u as d } from "../settings-ZMHe439l.mjs";
869
2
  export {
870
- $t as AccountNotificationProfiles,
871
- Jt as BudgetNotificationProfiles,
872
- Ge as DeviceTab,
873
- Kt as InsightsNotificationProfiles,
874
- J as NotificationSettings,
875
- Wt as NotificationSettingsWidget,
876
- Fe as ProfileTab,
877
- N as SettingsTabs,
878
- Vt as SettingsWidget,
879
- qe as SettingsWidgetContents,
880
- re as TransactionRulesTab,
881
- zt as TransactionRulesWidget
3
+ n as AccountNotificationProfiles,
4
+ s as BudgetNotificationProfiles,
5
+ a as DeviceTab,
6
+ r as InsightsNotificationProfiles,
7
+ c as NotificationSettings,
8
+ f as NotificationSettingsWidget,
9
+ o as ProfileTab,
10
+ g as SettingsTabs,
11
+ e as SettingsWidget,
12
+ t as SettingsWidgetContents,
13
+ d as TransactionRulesTab,
14
+ l as TransactionRulesWidget
882
15
  };