@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.mega2

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 (154) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
  4. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
  5. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
  6. package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
  7. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
  10. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  11. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
  16. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  19. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  21. package/dist/Drawer-By9V-B5L.mjs +178 -0
  22. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
  23. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  24. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
  25. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
  28. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  29. package/dist/LineChart-BF4QA-Lx.mjs +580 -0
  30. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
  31. package/dist/Loader-DUaFpDGv.mjs +24 -0
  32. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
  33. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  34. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  35. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
  36. package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
  37. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
  38. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
  39. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
  40. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
  41. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
  42. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  43. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  44. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  45. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  46. package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
  47. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
  48. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  49. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  50. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  51. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  52. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  53. package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
  54. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
  55. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
  56. package/dist/accounts/index.es.js +200 -197
  57. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  58. package/dist/accounts/utils/Accounts.d.ts +1 -2
  59. package/dist/analytics/index.es.js +27 -27
  60. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  61. package/dist/budgets/index.es.js +703 -669
  62. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +420 -404
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +3 -6
  66. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  67. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  68. package/dist/common/components/Loader.d.ts +2 -1
  69. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  70. package/dist/common/components/barchart/Bar.d.ts +25 -0
  71. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  72. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  73. package/dist/common/components/barchart/Legend.d.ts +8 -0
  74. package/dist/common/components/barchart/Util.d.ts +42 -0
  75. package/dist/common/components/barchart/index.d.ts +1 -0
  76. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  77. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  78. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  79. package/dist/common/components/index.d.ts +1 -0
  80. package/dist/common/hooks/index.d.ts +2 -0
  81. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  82. package/dist/common/hooks/usePrevious.d.ts +2 -0
  83. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  84. package/dist/common/index.es.js +712 -436
  85. package/dist/common/stores/AppDataStore.d.ts +1 -3
  86. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  87. package/dist/common/stores/GlobalStore.d.ts +3 -3
  88. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  89. package/dist/common/stores/UserStore.d.ts +2 -3
  90. package/dist/common/types/Account.d.ts +6 -9
  91. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  92. package/dist/common/utils/Theme.d.ts +3 -1
  93. package/dist/dashboard/index.es.js +93 -91
  94. package/dist/debts/components/DebtsChart.d.ts +2 -1
  95. package/dist/debts/index.es.js +529 -527
  96. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  98. package/dist/finstrong/index.es.js +876 -867
  99. package/dist/goals/index.es.js +526 -525
  100. package/dist/goals/stores/GoalStore.d.ts +4 -17
  101. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  102. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  103. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  104. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  105. package/dist/help/index.es.js +13 -9
  106. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  107. package/dist/investments/index.es.js +534 -531
  108. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  109. package/dist/merchants/index.es.js +8 -8
  110. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  111. package/dist/microinsights/index.d.ts +1 -0
  112. package/dist/microinsights/index.es.js +101 -14
  113. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  114. package/dist/networth/index.es.js +284 -285
  115. package/dist/notifications/index.es.js +95 -94
  116. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  117. package/dist/recurringtransactions/index.es.js +582 -562
  118. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
  119. package/dist/settings/index.es.js +340 -337
  120. package/dist/spending/index.es.js +281 -268
  121. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  122. package/dist/transactions/index.es.js +253 -255
  123. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  124. package/dist/transactions/stores/UiStore.d.ts +2 -0
  125. package/dist/trends/components/TrendsTable.d.ts +0 -2
  126. package/dist/trends/index.es.js +838 -793
  127. package/dist/trends/utils/TrendsData.d.ts +1 -0
  128. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  129. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  130. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  131. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  132. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  133. package/package.json +57 -52
  134. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  135. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  136. package/dist/Accounts-CRUehOiy.mjs +0 -27
  137. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  138. package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
  139. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  140. package/dist/Drawer-BF40nbsH.mjs +0 -163
  141. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  142. package/dist/LineChart-C1PxNf7P.mjs +0 -581
  143. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  144. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  145. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  146. package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
  147. package/dist/SearchBox-B7km148n.mjs +0 -39
  148. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  149. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  150. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
  151. package/dist/TransactionStore-DbwAutwC.mjs +0 -671
  152. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  153. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  154. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
@@ -1,672 +0,0 @@
1
- import { jsxs as l, jsx as e, Fragment as B } from "react/jsx-runtime";
2
- import g from "react";
3
- import { observer as C } from "mobx-react-lite";
4
- import v from "@mui/material/Divider";
5
- import E from "@mui/material/List";
6
- import O from "@mui/material/ListItem";
7
- import L from "@mui/material/ListItemText";
8
- import V from "@mui/material/ListItemButton";
9
- import m from "@mui/material/Stack";
10
- import { ChevronRight as S, ExpandMore as Q, Star as X } from "@mxenabled/mx-icons";
11
- import { Text as x, InstitutionLogo as Y, H3 as F } from "@mxenabled/mxui";
12
- import { endOfMonth as Z } from "date-fns/endOfMonth";
13
- import { startOfMonth as ee } from "date-fns/startOfMonth";
14
- import { DateCalendar as te } from "@mui/x-date-pickers/DateCalendar";
15
- import { LocalizationProvider as ne } from "@mui/x-date-pickers/LocalizationProvider";
16
- import { AdapterDateFns as ie } from "@mui/x-date-pickers/AdapterDateFnsV3";
17
- import { A as oe, T as R, a as P, N as y } from "./ToggleListItem-ciFTiqRS.mjs";
18
- import { D as N } from "./Dialog-CDV0kKxj.mjs";
19
- import { C as se } from "./CurrencyInput-D1cjbdCI.mjs";
20
- import { u as D, s as T, p as I, d as ae, g as ce, a as W, n as le, b as re } from "./hooks-C41HAxM5.mjs";
21
- import { b as de } from "./Localization-2MODESHW.mjs";
22
- import { b as me, f as he } from "./NumberFormatting-DjTD0t3W.mjs";
23
- import { u as _e } from "./useScreenSize-B5afALev.mjs";
24
- import { D as J } from "./Drawer-BF40nbsH.mjs";
25
- import ue from "@mui/material/Collapse";
26
- import pe from "@mui/material/Card";
27
- import fe from "@mui/material/CardContent";
28
- import G from "@mui/material/Box";
29
- import j from "@mui/material/Button";
30
- import U from "@mui/material/TextField";
31
- import { u as ge } from "./useDimensions-27p2evRx.mjs";
32
- import { useTheme as q } from "@mui/material/styles";
33
- import { u as ye } from "./useInsightsEnabled-CNjP5cfR.mjs";
34
- import { L as be } from "./Loader-Ckqi9Rx6.mjs";
35
- const xe = C(() => {
36
- const { common: n, settings: t } = D(), { sendEmailVerification: o } = T(), { user: r } = I(), s = q(), [c, a] = g.useState(!1), i = () => {
37
- a(!1);
38
- }, _ = () => {
39
- a(!0);
40
- };
41
- return /* @__PURE__ */ l(g.Fragment, { children: [
42
- /* @__PURE__ */ l(j, { onClick: _, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
43
- /* @__PURE__ */ e(x, { variant: "body2", children: t.verify_email }),
44
- /* @__PURE__ */ e(S, {})
45
- ] }),
46
- /* @__PURE__ */ e(
47
- N,
48
- {
49
- copy: { title: "" },
50
- isOpen: c,
51
- onClose: i,
52
- onPrimaryAction: o,
53
- onSecondaryAction: i,
54
- primaryText: t.send_verification,
55
- secondaryText: n.back,
56
- sx: {
57
- "& .MuiDialogContent-root": { pt: 0, width: 400 },
58
- "& .MuiToolbar-root:last-child": {
59
- gap: 16,
60
- padding: "32px 60px 48px",
61
- justifyContent: "center"
62
- }
63
- },
64
- children: /* @__PURE__ */ l(m, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
65
- /* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "body1", children: t.confirm_your_email }),
66
- /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: t.confirm_email }),
67
- /* @__PURE__ */ e(
68
- x,
69
- {
70
- sx: {
71
- border: `1px solid ${s.palette.neutral.light}`,
72
- borderRadius: "4px",
73
- p: "16px 32px"
74
- },
75
- variant: "h3",
76
- children: r.email
77
- }
78
- ),
79
- /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: t.verification_notice_email })
80
- ] })
81
- }
82
- )
83
- ] });
84
- }), Ce = C(
85
- ({ handleClose: n, handleVerify: t, isOpen: o }) => {
86
- const { common: r, settings: s } = D(), [c, a] = g.useState("");
87
- return /* @__PURE__ */ e(
88
- N,
89
- {
90
- copy: { title: s.enter_verification_code },
91
- isOpen: o,
92
- onClose: n,
93
- onPrimaryAction: () => t(c),
94
- onSecondaryAction: n,
95
- primaryText: s.verify,
96
- secondaryText: r.cancel_button,
97
- sx: {
98
- "& .MuiDialogContent-root": { pt: 0, width: 400 },
99
- "& .MuiToolbar-root:last-child": {
100
- gap: 8,
101
- padding: 24,
102
- justifyContent: "flex-end"
103
- }
104
- },
105
- children: /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(U, { onChange: (i) => a(i.target.value), sx: { width: 352 }, value: c }) })
106
- }
107
- );
108
- }
109
- ), ve = C(() => {
110
- const { common: n, settings: t } = D(), { sendPhoneVerification: o, verifyPhoneToken: r } = T(), { user: s } = I(), c = q(), [a, i] = g.useState(!1), [_, d] = g.useState(!1), h = () => {
111
- i(!1);
112
- }, u = () => {
113
- i(!0);
114
- }, f = () => {
115
- o().finally(() => {
116
- d(!0);
117
- });
118
- }, p = (b) => {
119
- r(b).finally(() => {
120
- d(!1);
121
- });
122
- };
123
- return /* @__PURE__ */ l(g.Fragment, { children: [
124
- /* @__PURE__ */ l(j, { onClick: u, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
125
- /* @__PURE__ */ e(x, { variant: "body2", children: t.verify_phone }),
126
- /* @__PURE__ */ e(S, {})
127
- ] }),
128
- /* @__PURE__ */ e(
129
- N,
130
- {
131
- copy: { title: "" },
132
- isOpen: a,
133
- onClose: h,
134
- onPrimaryAction: f,
135
- onSecondaryAction: h,
136
- primaryText: t.send_verification,
137
- secondaryText: n.back,
138
- sx: {
139
- "& .MuiDialogContent-root": { pt: 0, width: 400 },
140
- "& .MuiToolbar-root:last-child": {
141
- gap: 16,
142
- padding: "32px 60px 48px",
143
- justifyContent: "center"
144
- }
145
- },
146
- children: /* @__PURE__ */ l(m, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
147
- /* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "body1", children: t.confirm_your_phone }),
148
- /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: t.confirm_phone }),
149
- /* @__PURE__ */ e(
150
- x,
151
- {
152
- sx: {
153
- border: `1px solid ${c.palette.neutral.light}`,
154
- borderRadius: "4px",
155
- p: "16px 32px"
156
- },
157
- variant: "h3",
158
- children: s.phone
159
- }
160
- ),
161
- /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: t.verification_notice_phone })
162
- ] })
163
- }
164
- ),
165
- /* @__PURE__ */ e(
166
- Ce,
167
- {
168
- handleClose: () => d(!1),
169
- handleVerify: p,
170
- isOpen: _
171
- }
172
- )
173
- ] });
174
- }), Te = C(
175
- ({ onProfileUpdated: n, profile: t }) => {
176
- const { common: o, recurring: r, settings: s } = D(), { updateAccount: c } = ae(), a = t.notification_type === oe.DebtPaymentReminder, [i, _] = g.useState(!1), [d, h] = g.useState(t.threshold || 0), [u, f] = g.useState(
177
- t.account?.day_payment_is_due || 0
178
- ), p = t.account?.name || t.account?.feed_name || "", b = t.account?.day_payment_is_due ? de(
179
- s.notification_debt_payment_date,
180
- me(t.account?.day_payment_is_due)
181
- ) : s.notification_debt_payment_zero_state, k = a ? b : he(t.threshold ?? 0, "0,0"), A = async () => {
182
- a && t.account ? await c({ ...t.account, day_payment_is_due: u }) : n({ ...t, threshold: d });
183
- };
184
- return /* @__PURE__ */ l(m, { children: [
185
- /* @__PURE__ */ e(
186
- R,
187
- {
188
- avatar: t.account?.institution_guid ? /* @__PURE__ */ e(
189
- Y,
190
- {
191
- alt: t.label,
192
- institutionGuid: t.account?.institution_guid
193
- }
194
- ) : void 0,
195
- endIcon: /* @__PURE__ */ e(S, {}),
196
- isChecked: t.is_enabled,
197
- isDisabled: !t.is_enabled,
198
- isPrimaryTextBold: !0,
199
- onClick: () => _(!0),
200
- onToggle: () => n({
201
- ...t,
202
- is_enabled: !t.is_enabled
203
- }),
204
- primaryText: p,
205
- secondaryText: t.is_enabled ? k : s.notification_disabled
206
- }
207
- ),
208
- /* @__PURE__ */ e(
209
- N,
210
- {
211
- copy: {
212
- title: a ? r.day_of_the_month : s.notification_threshold_label,
213
- close_aria: o.close_aria
214
- },
215
- disablePrimaryButton: a && u === 0,
216
- isOpen: i,
217
- onClose: () => _(!1),
218
- onPrimaryAction: A,
219
- primaryText: o.save_button,
220
- children: a ? /* @__PURE__ */ e(ne, { dateAdapter: ie, children: /* @__PURE__ */ e(
221
- te,
222
- {
223
- maxDate: Z(/* @__PURE__ */ new Date()),
224
- minDate: ee(/* @__PURE__ */ new Date()),
225
- onChange: (w) => {
226
- f(w.getDate());
227
- },
228
- slots: {
229
- // Hides the arrows
230
- leftArrowIcon: () => null,
231
- rightArrowIcon: () => null
232
- },
233
- sx: {
234
- // TODO: Needs to be updated in MXUI
235
- "& .MuiPickersDay-today": {
236
- color: "primary.main"
237
- }
238
- },
239
- views: ["day"]
240
- }
241
- ) }) : /* @__PURE__ */ e(
242
- se,
243
- {
244
- amount: d,
245
- autoFocus: !0,
246
- fullWidth: !0,
247
- minAmount: 0,
248
- setAmount: (w) => h(Number(w) || 0),
249
- sx: { ".MuiTypography-body1": { p: 0 } }
250
- }
251
- )
252
- }
253
- )
254
- ] });
255
- }
256
- ), Pe = C(
257
- ({ onUpdateProfile: n, profile: t }) => {
258
- const { settings: o } = D(), { user: r } = I(), { clientCommunicationProfile: s, userCommunicationsProfile: c } = T(), { isMobile: a } = _e(), i = t.notification_type > 2, {
259
- opted_out_of_email_notifications: _,
260
- opted_out_of_push_notifications: d,
261
- opted_out_of_sms_notifications: h
262
- } = c, {
263
- email_notifications_enabled: u,
264
- push_notifications_enabled: f,
265
- sms_notifications_enabled: p
266
- } = s;
267
- return /* @__PURE__ */ l(m, { children: [
268
- (u || p || f) && /* @__PURE__ */ l(B, { children: [
269
- /* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: o.delivery_method_title }),
270
- /* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
271
- u && /* @__PURE__ */ e(m, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
272
- P,
273
- {
274
- isChecked: !_ && t.email_channel && !!r.email,
275
- isDisabled: _ || !r.email,
276
- onToggle: () => n({ ...t, email_channel: !t.email_channel }),
277
- primaryText: o.delivery_method_email_label,
278
- secondaryText: _ || !t.email_channel || !r.email ? o.notification_disabled : o.notification_enabled,
279
- useExtraPadding: !1
280
- }
281
- ) }),
282
- u && (p || f) && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
283
- p && /* @__PURE__ */ e(m, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
284
- P,
285
- {
286
- isChecked: !h && t.sms_channel && !!r.phone,
287
- isDisabled: h || !r.phone,
288
- onToggle: () => n({ ...t, sms_channel: !t.sms_channel }),
289
- primaryText: `${o.delivery_method_sms_label}`,
290
- secondaryText: h || !t.sms_channel || !r.phone ? o.notification_disabled : o.notification_enabled,
291
- useExtraPadding: !1
292
- }
293
- ) }),
294
- p && f && /* @__PURE__ */ e(v, { sx: { ml: a ? 0 : 24 } }),
295
- f && /* @__PURE__ */ e(m, { sx: { pl: 24 }, children: /* @__PURE__ */ e(
296
- P,
297
- {
298
- isChecked: !d && t.push_channel,
299
- isDisabled: d,
300
- onToggle: () => n({ ...t, push_channel: !t.push_channel }),
301
- primaryText: o.delivery_method_push_label,
302
- secondaryText: o.delivery_method_push_subtitle,
303
- useExtraPadding: !1
304
- }
305
- ) }),
306
- /* @__PURE__ */ e(v, {})
307
- ] })
308
- ] }),
309
- i && !!t.children?.length && /* @__PURE__ */ l(m, { children: [
310
- /* @__PURE__ */ e(x, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: o.accounts_threshold_title }),
311
- /* @__PURE__ */ e(E, { sx: { bgcolor: "background.paper" }, children: t.children?.map((b) => /* @__PURE__ */ e(
312
- Te,
313
- {
314
- onProfileUpdated: n,
315
- profile: b
316
- },
317
- b.guid
318
- )) })
319
- ] })
320
- ] });
321
- }
322
- ), z = C(() => {
323
- const { accountProfiles: n, updateNotificationProfile: t } = T(), [o, r] = g.useState(""), s = g.useMemo(
324
- () => n.find((i) => i.guid === o),
325
- [n, o]
326
- ), c = async (i) => {
327
- await t({
328
- ...i,
329
- is_enabled: !i.is_enabled
330
- });
331
- }, a = async (i) => {
332
- await t(i);
333
- };
334
- return /* @__PURE__ */ l(m, { sx: { backgroundColor: "background.paper" }, children: [
335
- n.filter((i) => i.children && i.children.length > 0).map((i) => /* @__PURE__ */ e(
336
- R,
337
- {
338
- endIcon: /* @__PURE__ */ e(S, {}),
339
- isChecked: i.is_enabled,
340
- isDisabled: !i.is_enabled,
341
- onClick: () => r(i.guid),
342
- onToggle: () => c(i),
343
- primaryText: i.label,
344
- secondaryText: i.is_enabled ? i.deliveryMethodsLabel : void 0
345
- },
346
- i.guid
347
- )),
348
- /* @__PURE__ */ e(
349
- J,
350
- {
351
- isOpen: !!s,
352
- onClose: () => r(""),
353
- title: s ? s.label : "",
354
- children: s && /* @__PURE__ */ e(
355
- Pe,
356
- {
357
- onUpdateProfile: a,
358
- profile: s
359
- }
360
- )
361
- }
362
- )
363
- ] });
364
- }), K = C(({ profile: n }) => {
365
- const { settings: t } = D(), {
366
- clientCommunicationProfile: {
367
- email_notifications_enabled: o,
368
- push_notifications_enabled: r,
369
- sms_notifications_enabled: s
370
- },
371
- updateNotificationProfile: c,
372
- userCommunicationsProfile: {
373
- opted_out_of_email_notifications: a,
374
- opted_out_of_push_notifications: i,
375
- opted_out_of_sms_notifications: _
376
- }
377
- } = T(), { user: d } = I(), [h, u] = g.useState(!1), f = async () => {
378
- await p({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && u(!1);
379
- }, p = async (k) => {
380
- await c(k);
381
- }, b = o || s || r;
382
- return /* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
383
- /* @__PURE__ */ e(
384
- R,
385
- {
386
- endIcon: b ? /* @__PURE__ */ e(
387
- Q,
388
- {
389
- sx: {
390
- transition: "transform 0.3s ease-in-out",
391
- transform: h ? "rotate(180deg)" : "rotate(0deg)"
392
- }
393
- }
394
- ) : void 0,
395
- isChecked: n.is_enabled,
396
- isDisabled: !n.is_enabled,
397
- onClick: () => u(!h),
398
- onToggle: () => f(),
399
- primaryText: n.label,
400
- secondaryText: n.is_enabled ? n.deliveryMethodsLabel : void 0
401
- },
402
- n.guid
403
- ),
404
- b && /* @__PURE__ */ e(ue, { in: h, children: /* @__PURE__ */ l(E, { sx: { bgcolor: "background.paper" }, children: [
405
- o && /* @__PURE__ */ e(
406
- P,
407
- {
408
- isChecked: !a && n.email_channel && !!d.email,
409
- isDisabled: a || !d.email,
410
- onToggle: () => p({
411
- ...n,
412
- email_channel: !n.email_channel
413
- }),
414
- primaryText: t.delivery_method_email_label
415
- }
416
- ),
417
- o && (s || r) && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
418
- s && /* @__PURE__ */ e(
419
- P,
420
- {
421
- isChecked: !_ && n.sms_channel && !!d.phone,
422
- isDisabled: _ || !d.phone,
423
- onToggle: () => p({
424
- ...n,
425
- sms_channel: !n.sms_channel
426
- }),
427
- primaryText: t.delivery_method_sms_label
428
- }
429
- ),
430
- s && r && /* @__PURE__ */ e(v, { sx: { ml: 48 } }),
431
- r && /* @__PURE__ */ e(
432
- P,
433
- {
434
- isChecked: !i && n.push_channel,
435
- isDisabled: i,
436
- onToggle: () => p({
437
- ...n,
438
- push_channel: !n.push_channel
439
- }),
440
- primaryText: t.delivery_method_push_label
441
- }
442
- )
443
- ] }) }),
444
- /* @__PURE__ */ e(v, {})
445
- ] }, n.guid);
446
- }), $ = C(() => {
447
- const { budgetProfiles: n } = T();
448
- return /* @__PURE__ */ e(m, { children: n.map((t) => /* @__PURE__ */ e(K, { profile: t }, t.guid)) });
449
- }), De = C(() => {
450
- const { onEvent: n } = ce(), { settings: t } = D(), {
451
- clientCommunicationProfile: o,
452
- updateUserCommunicationProfile: r,
453
- userCommunicationsProfile: s
454
- } = T(), { user: c } = I(), a = async (i, _) => {
455
- const d = { ...s, [i]: _ };
456
- if (n) {
457
- const u = i.split("_")[3];
458
- _ === !1 ? n("opt_in_notification_method", { notificationType: u }) : n("opt_out_notification_method", { notificationType: u });
459
- }
460
- await r(d);
461
- };
462
- return /* @__PURE__ */ l(m, { children: [
463
- /* @__PURE__ */ e(F, { sx: { mt: 24 }, children: t.delivery_method_title }),
464
- o.email_notifications_enabled && /* @__PURE__ */ l(B, { children: [
465
- /* @__PURE__ */ e(
466
- P,
467
- {
468
- isChecked: !!c.email && !s.opted_out_of_email_notifications,
469
- isDisabled: !c.email,
470
- onToggle: () => a(
471
- "opted_out_of_email_notifications",
472
- !s.opted_out_of_email_notifications
473
- ),
474
- primaryText: t.delivery_method_email_title,
475
- secondaryText: c.email && !s.opted_out_of_email_notifications ? t.notification_enabled : t.notification_disabled,
476
- useExtraPadding: !1
477
- }
478
- ),
479
- (o.sms_notifications_enabled || o.push_notifications_enabled) && /* @__PURE__ */ e(v, {})
480
- ] }),
481
- o.sms_notifications_enabled && /* @__PURE__ */ l(B, { children: [
482
- /* @__PURE__ */ e(
483
- P,
484
- {
485
- isChecked: !!c.phone && !s.opted_out_of_sms_notifications,
486
- isDisabled: !c.phone,
487
- onToggle: () => a("opted_out_of_sms_notifications", !s.opted_out_of_sms_notifications),
488
- primaryText: t.delivery_method_sms_title,
489
- secondaryText: c.phone && !s.opted_out_of_sms_notifications ? t.notification_enabled : t.notification_disabled,
490
- useExtraPadding: !1
491
- }
492
- ),
493
- o.push_notifications_enabled && /* @__PURE__ */ e(v, {})
494
- ] }),
495
- o.push_notifications_enabled && /* @__PURE__ */ e(
496
- P,
497
- {
498
- isChecked: !s.opted_out_of_push_notifications,
499
- isDisabled: !0,
500
- onToggle: () => {
501
- },
502
- primaryText: t.delivery_method_push_title,
503
- secondaryText: t.delivery_method_push_subtitle,
504
- useExtraPadding: !1
505
- }
506
- ),
507
- o.sms_notifications_enabled && /* @__PURE__ */ e(pe, { sx: { backgroundColor: "background.default", mt: 12 }, variant: "outlined", children: /* @__PURE__ */ e(fe, { children: /* @__PURE__ */ l(m, { alignItems: "flex-start", direction: "row", gap: 6, children: [
508
- /* @__PURE__ */ e(X, { color: "primary", filled: !0 }),
509
- /* @__PURE__ */ e(x, { sx: { whiteSpace: "wrap" }, variant: "caption", children: t.delivery_method_sms_note_1 })
510
- ] }) }) })
511
- ] });
512
- }), H = C(() => {
513
- const { insightsProfiles: n } = T();
514
- return /* @__PURE__ */ e(m, { children: n.map((t) => /* @__PURE__ */ e(K, { profile: t }, t.guid)) });
515
- }), ke = () => {
516
- const { config: n } = W(), [t, { width: o }] = ge(), { common: r, settings: s } = D(), { updateUser: c } = T(), { user: a } = I(), [i, _] = g.useState(!1), [d, h] = g.useState({
517
- email: a.email,
518
- phone: a.phone
519
- }), u = d.email && !a.email_is_verified && !i, f = d.phone && !a.phone_is_verified && !i, p = (k) => {
520
- const { name: A, value: w } = k.target, M = { ...d, [A]: w };
521
- h(M), _(JSON.stringify({ ...a, ...M }) !== JSON.stringify(a));
522
- }, b = async () => {
523
- await c({ ...a, ...d }), _(!1);
524
- };
525
- return /* @__PURE__ */ l(m, { ref: t, children: [
526
- /* @__PURE__ */ e(v, {}),
527
- /* @__PURE__ */ l(m, { sx: { pt: 12 }, children: [
528
- /* @__PURE__ */ e(F, { sx: { lineHeight: "20px", pb: 4, pt: 16 }, children: s.personal_details }),
529
- /* @__PURE__ */ l(m, { sx: { flexDirection: o <= 768 ? "column" : "row", gap: 24, py: 16 }, children: [
530
- n.display_email_edit_field_in_settings && /* @__PURE__ */ l(m, { sx: { flex: 1, pb: 14 }, children: [
531
- /* @__PURE__ */ e(
532
- U,
533
- {
534
- defaultValue: a.email,
535
- fullWidth: !0,
536
- label: s.email_address,
537
- name: "email",
538
- onChange: p
539
- }
540
- ),
541
- u && /* @__PURE__ */ e(
542
- G,
543
- {
544
- sx: {
545
- height: 20,
546
- ".MuiButton-root": {
547
- px: 0,
548
- ":hover": {
549
- bgcolor: "transparent"
550
- }
551
- }
552
- },
553
- children: /* @__PURE__ */ e(xe, {})
554
- }
555
- )
556
- ] }),
557
- n.display_sms_edit_field_in_settings && /* @__PURE__ */ l(m, { sx: { flex: 1, pb: 14 }, children: [
558
- /* @__PURE__ */ e(
559
- U,
560
- {
561
- defaultValue: a.phone,
562
- fullWidth: !0,
563
- label: s.mobile_number,
564
- name: "phone",
565
- onChange: p
566
- }
567
- ),
568
- f && /* @__PURE__ */ e(
569
- G,
570
- {
571
- sx: {
572
- height: 20,
573
- ".MuiButton-root": {
574
- px: 0,
575
- ":hover": {
576
- bgcolor: "transparent"
577
- }
578
- }
579
- },
580
- children: /* @__PURE__ */ e(ve, {})
581
- }
582
- )
583
- ] })
584
- ] }),
585
- /* @__PURE__ */ e(
586
- j,
587
- {
588
- disabled: !i,
589
- onClick: b,
590
- sx: { width: 84 },
591
- variant: "contained",
592
- children: r.save_button
593
- }
594
- )
595
- ] })
596
- ] });
597
- }, we = C(ke), lt = C(
598
- ({
599
- notificationTypes: n = [y.Accounts, y.Budgets],
600
- showPersonalDetails: t = !1,
601
- view: o
602
- }) => {
603
- const { onLoad: r } = le(), { config: s } = W(), { settings: c } = D(), { isInitialized: a } = re(), { clientCommunicationProfile: i, loadNotificationProfiles: _ } = T(), d = ye(), [h, u] = g.useState(
604
- void 0
605
- );
606
- if (n.length > 0 && d && n.push(y.Insights), g.useEffect(() => {
607
- a && _().finally(() => {
608
- r?.("NotificationSettings");
609
- });
610
- }, [a]), !a)
611
- return /* @__PURE__ */ e(be, {});
612
- let f = c.manage_account_notifications;
613
- h === y.Budgets ? f = c.manage_budget_notifications : h === y.Insights && (f = c.manage_insights_notifications);
614
- const {
615
- email_notifications_enabled: p,
616
- sms_notifications_enabled: b,
617
- push_notifications_enabled: k
618
- } = i, A = p || b || k;
619
- if (o === "accounts")
620
- return /* @__PURE__ */ e(z, {});
621
- if (o === "budgets")
622
- return /* @__PURE__ */ e($, {});
623
- if (o === "insights")
624
- return /* @__PURE__ */ e(H, {});
625
- const w = s.display_email_edit_field_in_settings || s.display_sms_edit_field_in_settings, M = t && i.can_edit_contact_info && w;
626
- return /* @__PURE__ */ l(m, { sx: { pt: A ? 0 : 24 }, children: [
627
- /* @__PURE__ */ l(m, { sx: { px: 24 }, children: [
628
- A && /* @__PURE__ */ l(B, { children: [
629
- /* @__PURE__ */ e(De, {}),
630
- /* @__PURE__ */ e(v, { sx: { my: 24 } })
631
- ] }),
632
- /* @__PURE__ */ e(F, { sx: { mb: 4 }, children: c.notification_types_title })
633
- ] }),
634
- /* @__PURE__ */ l(E, { children: [
635
- n.includes(y.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => u(y.Accounts), children: [
636
- /* @__PURE__ */ e(L, { primary: c.accounts_title, secondary: c.accounts_subtitle }),
637
- /* @__PURE__ */ e(S, {})
638
- ] }) }),
639
- n.includes(y.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => u(y.Budgets), children: [
640
- /* @__PURE__ */ e(L, { primary: c.budgets_title, secondary: c.budgets_subtitle }),
641
- /* @__PURE__ */ e(S, {})
642
- ] }) }),
643
- n.includes(y.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(V, { onClick: () => u(y.Insights), children: [
644
- /* @__PURE__ */ e(L, { primary: c.insights_title, secondary: c.insights_subtitle }),
645
- /* @__PURE__ */ e(S, {})
646
- ] }) })
647
- ] }),
648
- M && /* @__PURE__ */ e(m, { sx: { px: 24 }, children: /* @__PURE__ */ e(we, {}) }),
649
- /* @__PURE__ */ e(
650
- J,
651
- {
652
- isOpen: !!h,
653
- onClose: () => u(void 0),
654
- title: f,
655
- children: /* @__PURE__ */ l(m, { children: [
656
- h === y.Accounts && /* @__PURE__ */ e(z, {}),
657
- h === y.Budgets && /* @__PURE__ */ e($, {}),
658
- h === y.Insights && /* @__PURE__ */ e(H, {})
659
- ] })
660
- }
661
- )
662
- ] });
663
- }
664
- );
665
- export {
666
- z as A,
667
- $ as B,
668
- H as I,
669
- lt as N,
670
- xe as V,
671
- ve as a
672
- };