@mx-cartographer/experiences 7.7.2 → 7.8.0-alpha-ram-goal-bug

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 (92) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/Account-BiB1F8lL.mjs +118 -0
  3. package/dist/{Account-BfkKlfsW.mjs → Account-DuOz1a27.mjs} +1 -1
  4. package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
  5. package/dist/{AccountDetailsHeader-DqYIuhOs.mjs → AccountDetailsHeader-Cf2TUJnM.mjs} +4 -4
  6. package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
  7. package/dist/{AccountFields-yP8QdgPd.mjs → AccountFields-UdOvbQ5H.mjs} +7 -6
  8. package/dist/{AccountListItem-DMbu9ehd.mjs → AccountListItem-BPVxmNT_.mjs} +7 -7
  9. package/dist/AccountStore-BbPWe2C9.mjs +244 -0
  10. package/dist/Accounts-M-LTzStv.mjs +27 -0
  11. package/dist/{CategoryStore-Cnw9yUys.mjs → CategoryStore-BYICdb9m.mjs} +73 -73
  12. package/dist/CategoryUtil-meuejJqP.mjs +80 -0
  13. package/dist/{ConnectionsDrawer-BqR6FWJO.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +1 -1
  14. package/dist/{DebtsStore-DuSdXM1k.mjs → DebtsStore-BIbOVCPe.mjs} +12 -12
  15. package/dist/{ExportCsvAction-HK5CeZWR.mjs → ExportCsvAction-CDuzTva1.mjs} +2 -2
  16. package/dist/GlobalAccountFilter-DQCPNc95.mjs +316 -0
  17. package/dist/GoalStore-B4LVt_kH.mjs +422 -0
  18. package/dist/{ManageIncome-BrTrlplL.mjs → ManageIncome-CL3hv8i9.mjs} +44 -44
  19. package/dist/NetWorthStore-yV43kJro.mjs +168 -0
  20. package/dist/{NotificationSettings-D4Vh3z8I.mjs → NotificationSettings-SPg3pwbX.mjs} +171 -169
  21. package/dist/{NotificationStore-CDX_kqHa.mjs → NotificationStore-Ck2KdNmT.mjs} +22 -14
  22. package/dist/{RecurringSettings-D2V6l77l.mjs → RecurringSettings-Bmnnpb48.mjs} +16 -16
  23. package/dist/{RecurringTransactionsStore-Caf1cq4v.mjs → RecurringTransactionsStore-BQBEJOPP.mjs} +91 -81
  24. package/dist/{RecurringTransactions-Bf4lX0Cn.mjs → RepeatingTransaction-miZVnk_A.mjs} +4 -4
  25. package/dist/{SettingsStore-krIRNwHK.mjs → SettingsStore-BHpuyujx.mjs} +1 -1
  26. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  27. package/dist/{SpendingLegend-gTCJLLkV.mjs → SpendingLegend-CD60HCYS.mjs} +33 -33
  28. package/dist/{TransactionDetails-7MHOshKQ.mjs → TransactionDetails-BDhz3DLT.mjs} +2 -2
  29. package/dist/TransactionStore-BSp5bOKg.mjs +705 -0
  30. package/dist/{User-LJpEwPtn.mjs → User-B0LnmiKO.mjs} +21 -20
  31. package/dist/WidgetContainer-BbPS3Yxz.mjs +555 -0
  32. package/dist/accounts/index.es.js +421 -391
  33. package/dist/accounts/stores/AccountStore.d.ts +30 -23
  34. package/dist/accounts/utils/Accounts.d.ts +2 -1
  35. package/dist/budgets/index.es.js +546 -540
  36. package/dist/budgets/store/BudgetsStore.d.ts +1 -0
  37. package/dist/cashflow/index.es.js +444 -457
  38. package/dist/categories/index.es.js +1 -1
  39. package/dist/categories/stores/CategoryStore.d.ts +10 -5
  40. package/dist/categories/util/CategoryUtil.d.ts +3 -2
  41. package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
  42. package/dist/common/components/SkeletonLoader.d.ts +7 -0
  43. package/dist/common/components/WidgetContainer.d.ts +7 -6
  44. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
  45. package/dist/common/components/index.d.ts +2 -2
  46. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  47. package/dist/common/index.es.js +459 -445
  48. package/dist/common/stores/AppDataStore.d.ts +3 -1
  49. package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
  50. package/dist/common/stores/GlobalStore.d.ts +3 -3
  51. package/dist/common/stores/GlobalUiStore.d.ts +10 -6
  52. package/dist/common/stores/UserStore.d.ts +3 -2
  53. package/dist/common/types/Account.d.ts +9 -6
  54. package/dist/dashboard/index.es.js +84 -116
  55. package/dist/debts/index.es.js +417 -413
  56. package/dist/{exportTransactionsToCSV-BrTYdSgJ.mjs → exportTransactionsToCSV-DtQ7ovAR.mjs} +1 -1
  57. package/dist/finstrong/index.es.js +1167 -1110
  58. package/dist/goals/index.es.js +618 -598
  59. package/dist/goals/stores/GoalStore.d.ts +19 -4
  60. package/dist/help/index.es.js +13 -13
  61. package/dist/investments/index.es.js +330 -325
  62. package/dist/investments/stores/HoldingStore.d.ts +1 -0
  63. package/dist/networth/components/NetWorthChart.d.ts +3 -2
  64. package/dist/networth/components/NetWorthList.d.ts +3 -3
  65. package/dist/networth/index.es.js +423 -433
  66. package/dist/networth/stores/NetWorthStore.d.ts +20 -9
  67. package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
  68. package/dist/notifications/index.es.js +90 -91
  69. package/dist/notifications/stores/NotificationStore.d.ts +3 -1
  70. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  71. package/dist/recurringtransactions/index.es.js +543 -562
  72. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +4 -2
  73. package/dist/settings/index.es.js +253 -248
  74. package/dist/spending/index.es.js +282 -301
  75. package/dist/transactions/index.es.js +269 -263
  76. package/dist/transactions/stores/TransactionStore.d.ts +26 -77
  77. package/dist/transactions/stores/UiStore.d.ts +0 -2
  78. package/dist/trends/index.es.js +708 -699
  79. package/dist/{useAccountDisplayName-BTvP_pw6.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
  80. package/package.json +3 -3
  81. package/dist/AccountStore-CWFzg8-E.mjs +0 -260
  82. package/dist/Accounts-CWt-NRq8.mjs +0 -9
  83. package/dist/CategoryUtil-DZflYFam.mjs +0 -78
  84. package/dist/ConnectDrawer-BOjfI6rz.mjs +0 -563
  85. package/dist/GoalStore-C7ahxxLi.mjs +0 -364
  86. package/dist/NetWorthStore-xWIo9CYU.mjs +0 -150
  87. package/dist/TransactionStore-DJwPaZuM.mjs +0 -677
  88. package/dist/WidgetContainer-CrK6tyHr.mjs +0 -572
  89. package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
  90. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
  91. package/dist/common/components/accountfilter/index.d.ts +0 -1
  92. package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
@@ -23,9 +23,8 @@ import nn from "@mui/material/styles/useTheme";
23
23
  import k from "@mui/material/ListItem";
24
24
  import an from "@mui/material/ListItemButton";
25
25
  import { g as tn } from "./hooks-ZMp65DFz.mjs";
26
- var on = /* @__PURE__ */ ((n) => (n[n.CREDIT = 1] = "CREDIT", n[n.DEBIT = 2] = "DEBIT", n))(on || {}), en = /* @__PURE__ */ ((n) => (n[n.POSTED = 1] = "POSTED", n[n.PENDING = 2] = "PENDING", n))(en || {});
27
- const rn = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
28
- const c = v(), l = cn(c);
26
+ const on = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
27
+ const c = v(), l = en(c);
29
28
  return /* @__PURE__ */ h("div", { className: `mx-cmn-calendar-header ${l}`, children: [
30
29
  /* @__PURE__ */ e(z, { className: "mx-cmn-calendar-header-title", variant: "H3", children: q(a, J.MONTH_YEAR) }),
31
30
  /* @__PURE__ */ h("div", { className: "mx-cmn-calendar-header-button-container", children: [
@@ -33,7 +32,7 @@ const rn = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
33
32
  /* @__PURE__ */ e(E, { "aria-label": n.nextAria, onClick: o, children: /* @__PURE__ */ e(Z, { size: 24 }) })
34
33
  ] })
35
34
  ] });
36
- }, cn = (n) => p({
35
+ }, en = (n) => p({
37
36
  alignItems: "center",
38
37
  display: "flex",
39
38
  marginBottom: n.Spacing.Medium,
@@ -46,8 +45,8 @@ const rn = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
46
45
  display: "flex",
47
46
  gap: 4
48
47
  }
49
- }), sn = ({ beginDate: n, date: a, endDate: o, isInMonth: r, onClick: c }) => {
50
- const l = nn(), S = Tn(l), g = n && o && Q(a, { start: n, end: o }) && !T(a, n) && !T(a, o), s = n && o && T(n, a) && !T(n, o), N = o && n && T(o, a) && !T(n, o), i = n && T(n, a) || o && T(o, a), C = T(a, f());
48
+ }), rn = ({ beginDate: n, date: a, endDate: o, isInMonth: r, onClick: c }) => {
49
+ const l = nn(), S = cn(l), g = n && o && Q(a, { start: n, end: o }) && !T(a, n) && !T(a, o), s = n && o && T(n, a) && !T(n, o), N = o && n && T(o, a) && !T(n, o), i = n && T(n, a) || o && T(o, a), C = T(a, f());
51
50
  return /* @__PURE__ */ e(
52
51
  "div",
53
52
  {
@@ -83,7 +82,7 @@ const rn = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
83
82
  )
84
83
  }
85
84
  );
86
- }, Tn = (n) => p({
85
+ }, cn = (n) => p({
87
86
  height: I,
88
87
  width: I,
89
88
  display: "flex",
@@ -128,9 +127,9 @@ const rn = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
128
127
  paddingBottom: 5
129
128
  }
130
129
  }
131
- }), ln = 340, I = 44;
132
- var Cn = /* @__PURE__ */ ((n) => (n.None = "None", n.Single = "Single", n.Range = "Range", n))(Cn || {});
133
- const Nn = ({
130
+ }), sn = 340, I = 44;
131
+ var Tn = /* @__PURE__ */ ((n) => (n.None = "None", n.Single = "Single", n.Range = "Range", n))(Tn || {});
132
+ const ln = ({
134
133
  copy: n,
135
134
  beginDate: a = void 0,
136
135
  endDate: o = void 0,
@@ -139,7 +138,7 @@ const Nn = ({
139
138
  selectionType: l = "Single"
140
139
  /* Single */
141
140
  }) => {
142
- const S = v(), g = mn(S), [s, N] = A.useState(f), [i, C] = A.useState(a), [R, _] = A.useState(o);
141
+ const S = v(), g = Cn(S), [s, N] = A.useState(f), [i, C] = A.useState(a), [R, _] = A.useState(o);
143
142
  A.useEffect(() => {
144
143
  C(a), _(o), a && N(a);
145
144
  }, [a, o]);
@@ -170,7 +169,7 @@ const Nn = ({
170
169
  };
171
170
  return /* @__PURE__ */ e("div", { className: `mx-cmn-calendar ${g}`, children: /* @__PURE__ */ h(Y, { sx: { boxShadow: "none" }, children: [
172
171
  /* @__PURE__ */ e(
173
- rn,
172
+ on,
174
173
  {
175
174
  copy: n,
176
175
  date: s,
@@ -180,7 +179,7 @@ const Nn = ({
180
179
  ),
181
180
  /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-header-row", children: D[0].map((t, m) => /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ e(G, { bold: !0, variant: "Small", children: y(t, "EEEEE") }) }, m)) }),
182
181
  D.map((t, m) => /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-week", children: t.map((d, O) => /* @__PURE__ */ e(
183
- sn,
182
+ rn,
184
183
  {
185
184
  beginDate: i,
186
185
  date: d,
@@ -192,8 +191,8 @@ const Nn = ({
192
191
  )) }, `w-${m}`)),
193
192
  /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ e(E, { onClick: M, size: "small", variant: "text", children: n.today }) })
194
193
  ] }) });
195
- }, mn = (n) => p({
196
- width: ln,
194
+ }, Cn = (n) => p({
195
+ width: sn,
197
196
  "& .MuiPaper-root": {
198
197
  paddingLeft: 24,
199
198
  paddingRight: 24,
@@ -233,7 +232,7 @@ const Nn = ({
233
232
  marginRight: "auto"
234
233
  }
235
234
  }
236
- }), Bn = Nn, Pn = ({
235
+ }), Bn = ln, Pn = ({
237
236
  children: n,
238
237
  clickEventName: a,
239
238
  onClick: o,
@@ -301,13 +300,15 @@ const Nn = ({
301
300
  ON_TRANSACTION_UNHIDE_CANCEL_CLICK: "onTransactionUnHideCancelClick",
302
301
  ON_TRANSACTION_UNSPLIT: "onTransactionUnsplit",
303
302
  ON_TRANSACTION_UNSPLIT_CANCEL: "onTransactionUnsplitCancel"
304
- }, Un = (n, a) => !!n.find((o) => o.feature_name === a)?.is_enabled;
303
+ };
304
+ var Nn = /* @__PURE__ */ ((n) => (n[n.CREDIT = 1] = "CREDIT", n[n.DEBIT = 2] = "DEBIT", n))(Nn || {}), mn = /* @__PURE__ */ ((n) => (n[n.POSTED = 1] = "POSTED", n[n.PENDING = 2] = "PENDING", n))(mn || {});
305
+ const Un = (n, a) => !!n.find((o) => o.feature_name === a)?.is_enabled;
305
306
  export {
306
307
  Bn as C,
307
308
  Pn as L,
308
309
  $n as O,
309
- on as T,
310
- en as a,
311
- Cn as b,
310
+ Nn as T,
311
+ mn as a,
312
+ Tn as b,
312
313
  Un as i
313
314
  };
@@ -0,0 +1,555 @@
1
+ import { jsxs as C, jsx as e } from "react/jsx-runtime";
2
+ import I from "react";
3
+ import { observer as te } from "mobx-react-lite";
4
+ import X from "@mui/material/Box";
5
+ import W from "@mui/material/Button";
6
+ import ae from "@mui/material/Card";
7
+ import ie from "@mui/material/CardContent";
8
+ import ne from "@mui/material/CardHeader";
9
+ import j from "@mui/material/Divider";
10
+ import H from "@mui/material/IconButton";
11
+ import Y from "@mui/material/Stack";
12
+ import { ChevronLeft as re } from "@mxenabled/mx-icons";
13
+ import { Icon as E, Text as F, DateRangePicker as $, H2 as ce, H3 as se } from "@mxenabled/mxui";
14
+ import { u as oe } from "./useDimensions-27p2evRx.mjs";
15
+ import { G as le } from "./GlobalAccountFilter-DQCPNc95.mjs";
16
+ import { L as Ce } from "./Loader-DUaFpDGv.mjs";
17
+ import { g as de, b as Te, u as Ie, W as Ee } from "./hooks-ZMp65DFz.mjs";
18
+ import { u as _e } from "./useScreenSize-B6JyS_Lj.mjs";
19
+ import { addMonths as Z } from "date-fns/addMonths";
20
+ import { addDays as Re } from "date-fns/addDays";
21
+ import { addYears as q } from "date-fns/addYears";
22
+ import { differenceInCalendarDays as ge } from "date-fns/differenceInCalendarDays";
23
+ import { endOfDay as Ae } from "date-fns/endOfDay";
24
+ import { endOfMonth as V } from "date-fns/endOfMonth";
25
+ import { endOfToday as J } from "date-fns/endOfToday";
26
+ import { endOfYear as Se } from "date-fns/endOfYear";
27
+ import { startOfMonth as Ne } from "date-fns/startOfMonth";
28
+ import { startOfToday as me } from "date-fns/startOfToday";
29
+ import { startOfYear as Le } from "date-fns/startOfYear";
30
+ import { subMonths as z } from "date-fns/subMonths";
31
+ import { subDays as ue } from "date-fns/subDays";
32
+ import { subYears as Q } from "date-fns/subYears";
33
+ import De from "@mui/material/ButtonGroup";
34
+ import ke from "@mui/material/Tab";
35
+ import pe from "@mui/material/Tabs";
36
+ import Oe from "@mui/material/ToggleButton";
37
+ import he from "@mui/material/ToggleButtonGroup";
38
+ import fe from "@mui/material/styles/useTheme";
39
+ import { u as be } from "./useAriaLive-B3_pRUio.mjs";
40
+ import { f as S, D as N, a as Ke } from "./Dialog-B4PI-_bL.mjs";
41
+ import { D as we } from "./Drawer-DV4NTsFg.mjs";
42
+ const Ge = {
43
+ ACCOUNTS_CLICK_ACCOUNT: "accounts_widget_click_account",
44
+ ACCOUNTS_CLICK_CONNECT: "accounts_widget_click_connect_accounts",
45
+ ACCOUNTS_CLICK_FILTER: "accounts_widget_click_filter_accounts",
46
+ ACCOUNTS_CLICK_SYNC: "accounts_widget_click_sync",
47
+ ACCOUNT_DETAILS_CLICK_HIDE: "account_details_click_hide_account",
48
+ ACCOUNT_DETAILS_CLICK_MARK_CLOSED: "account_details_click_mark_as_closed",
49
+ ACCOUNT_DETAILS_CLICK_MARK_DUPLICATE: "account_details_click_mark_as_duplicate",
50
+ ACCOUNT_DETAILS_CLICK_TRANSACTION: "account_details_click_transaction",
51
+ ACCOUNT_DETAILS_VIEW: "account_details",
52
+ ACCOUNT_DETAILS_VIEW_TRANSACTIONS: "account_details_transactions",
53
+ BUDGETS_CLICK_ADD: "budgets_widget_click_add_budget",
54
+ BUDGETS_CLICK_BUDGET_CATEGORY: "budgets_widget_click_budget_category",
55
+ BUDGETS_CLICK_EDIT_INCOME: "budgets_widget_click_edit_income",
56
+ BUDGETS_CLICK_FILTER: "budgets_widget_click_filter_accounts",
57
+ BUDGETS_VIEW: "budgets",
58
+ CASH_FLOW_CLICK_FILTER: "cash_flow_widget_click_filter_accounts",
59
+ CASH_FLOW_CLICK_SETTINGS: "cash_flow_widget_click_settings",
60
+ DEBTS_CLICK_CHART_AREA: "debts_widget_click_chart_area",
61
+ DEBTS_CLICK_FILTER: "debts_widget_click_filter_accounts",
62
+ DEBTS_CLICK_PAYDOWN: "debts_widget_click_paydown",
63
+ DEBTS_CLICK_PRIORITY: "debts_widget_click_priority",
64
+ DEBTS_CLICK_PRIORITIZE: "debts_widget_click_prioritize",
65
+ DEBTS_CLICK_SNOWBALL_CTA: "debts_widget_click_snowball_cta",
66
+ DEBTS_CLICK_TABLE_ROW: "debts_widget_click_table_row",
67
+ DEBTS_CLICK_TABLE_SORT: "debts_widget_click_table_sort",
68
+ DEBTS_SAVE_BALANCE_ACTION: "debts_widget_click_balance_action",
69
+ DEBTS_SAVE_PAYDOWN_ACTION: "debts_widget_click_paydown_action",
70
+ DEBTS_SAVE_PAYMENT_ACTION: "debts_widget_click_payment_action",
71
+ DEBTS_SAVE_RATE_ACTION: "debts_widget_click_rate_action",
72
+ DEBTS_VIEW: "debts",
73
+ DEBT_DETAILS_VIEW: "debt_details",
74
+ DEBT_SCHEDULE_VIEW: "debt_schedule",
75
+ GOALS_CLICK_ADD: "goals_widget_click_add",
76
+ GOALS_CLICK_FILTER: "goals_widget_click_filter_accounts",
77
+ GOALS_VIEW: "goals",
78
+ GOALS_MICRO_WIDGET_CTA: "goals_micro_widget_click_see_details_cta",
79
+ INVESTMENTS: "Investments",
80
+ INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK: "investment_widget_account_filter_click",
81
+ INVESTMENT_WIDGET_ALLOCATION_CLICK: "investment_widget_allocation_click",
82
+ INVESTMENT_WIDGET_ANALYSIS_CLICK: "investment_widget_analysis_click",
83
+ INVESTMENT_WIDGET_DETAILS_CLICK: "investment_widget_details_click",
84
+ NET_WORTH_VIEW: "net_worth",
85
+ NETWORTH_MICRO_WIDGET_CTA: "net_worth_micro_widget_click_see_details_cta",
86
+ NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES: "net_worth_widget_click_view_assets_liabilities",
87
+ NET_WORTH_WIDGET_CLICK_FILTER: "net_worth_widget_click_filter_accounts",
88
+ NET_WORTH_WIDGET_CLICK_TIMEFRAME: "net_worth_widget_click_time_period",
89
+ RECURRING_ACTIVITY_CLICK_ADD_EXPENSE: "recurring_transactions_widget_manage_expenses_click_add_expense",
90
+ RECURRING_ACTIVITY_CLICK_ADD_INCOME: "recurring_transactions_widget_income_details_click_add_income",
91
+ RECURRING_ACTIVITY_CLICK_CALENDAR_RIGHT: "recurring_transactions_widget_click_calendar_right",
92
+ RECURRING_ACTIVITY_CLICK_EXPENSE: "recurring_transactions_widget_manage_expenses_click_expense",
93
+ RECURRING_ACTIVITY_CLICK_FILTER: "recurring_transactions_widget_click_filter_accounts",
94
+ RECURRING_ACTIVITY_CLICK_INCOME: "recurring_transactions_widget_click_income",
95
+ RECURRING_ACTIVITY_CLICK_PAID: "recurring_transactions_widget_click_paid_expense",
96
+ RECURRING_ACTIVITY_CLICK_SETTINGS: "recurring_transactions_widget_click_settings",
97
+ RECURRING_ACTIVITY_CLICK_UPCOMING: "recurring_transactions_widget_click_upcoming_transaction",
98
+ RECURRING_TRANSACTIONS_CLICK_ADD_EXPENSE: "recurring_transactions_widget_manage_expenses_click_add_expense",
99
+ RECURRING_TRANSACTIONS_CLICK_ADD_INCOME: "recurring_transactions_widget_income_details_click_add_income",
100
+ RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT: "recurring_transactions_widget_click_calendar_right",
101
+ RECURRING_TRANSACTIONS_CLICK_EXPENSE: "recurring_transactions_widget_manage_expenses_click_expense",
102
+ RECURRING_TRANSACTIONS_CLICK_FILTER: "recurring_transactions_widget_click_filter_accounts",
103
+ RECURRING_TRANSACTIONS_CLICK_INCOME: "recurring_transactions_widget_click_income",
104
+ RECURRING_TRANSACTIONS_CLICK_PAID: "recurring_transactions_widget_click_paid_expense",
105
+ RECURRING_TRANSACTIONS_CLICK_SETTINGS: "recurring_transactions_widget_click_settings",
106
+ RECURRING_TRANSACTIONS_CLICK_UPCOMING: "recurring_transactions_widget_click_upcoming_transaction",
107
+ RECURRING_TRANSACTIONS_DETAILS_CLICK_DELETE: "recurring_transactions_widget_details_click_delete",
108
+ RECURRING_TRANSACTIONS_DETAILS_CLICK_PAYMENT_SCHEDULE: "recurring_transactions_widget_details_click_payment_schedule",
109
+ RECURRING_TRANSACTIONS_MICRO_WIDGET_CTA: "recurring_transactions_micro_widget_click_view_all_cta",
110
+ SPENDING_CLICK_FILTER: "spending_widget_click_filter_accounts",
111
+ SPENDING_VIEW: "spending",
112
+ TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL: "transactions_add_manual_account_modal",
113
+ TRANSACTIONS_CLICK_ADD: "transactions_click_add_transaction",
114
+ TRANSACTIONS_CLICK_DETAILS: "transactions_click_transaction_details",
115
+ TRANSACTIONS_CLICK_EXPORT: "transactions_click_export_csv",
116
+ TRANSACTIONS_CLICK_FILTER: "transactions_click_filter_accounts",
117
+ TRANSACTIONS_CLICK_SEARCH: "transactions_click_search",
118
+ TRANSACTIONS_VIEW: "transactions",
119
+ TRANSACTION_DETAILS_CLICK_AMOUNT: "transaction_details_click_transaction_amount",
120
+ TRANSACTION_DETAILS_CLICK_CATEGORY: "transaction_details_click_category",
121
+ TRANSACTION_DETAILS_CLICK_DATE: "transaction_details_click_date",
122
+ TRANSACTION_DETAILS_CLICK_DELETE_LOGO: "transaction_details_click_delete_merchant_logo",
123
+ TRANSACTION_DETAILS_CLICK_DESCRIPTION: "transaction_details_click_edit_description",
124
+ TRANSACTION_DETAILS_CLICK_FLAG: "transaction_details_click_flag_transaction",
125
+ TRANSACTION_DETAILS_CLICK_MEMO: "transaction_details_click_memo",
126
+ TRANSACTION_DETAILS_CLICK_SPLIT: "transaction_details_click_split_transaction",
127
+ TRANSACTION_DETAILS_CLICK_TAGS: "transaction_details_click_tags",
128
+ TRANSACTION_DETAILS_CLICK_UNSPLIT: "transaction_details_click_unsplit_transaction",
129
+ TRANSACTION_DETAILS_VIEW: "transaction_details",
130
+ WIDGET_BACK_CLICK: "widget_back_button_click",
131
+ // NEW ANAYTICS EVENT FORMAT
132
+ // widget_action_subject
133
+ GOALS_CLICK_GET_STARTED: "goals_click_getStarted",
134
+ GOALS_CLICK_VIEW_DETAILS: "goals_click_viewDetails",
135
+ GOALS_LOAD_WIDGET: "goals_load_widget",
136
+ NET_WORTH_CLICK_GET_STARTED: "netWorth_click_getStarted",
137
+ NET_WORTH_CLICK_VIEW_DETAILS: "netWorth_click_viewDetails",
138
+ NET_WORTH_LOAD_WIDGET: "netWorth_load_widget",
139
+ RECURRING_TRANSACTIONS_CLICK_GET_STARTED: "recurringTransactions_click_getStarted",
140
+ RECURRING_TRANSACTIONS_CLICK_VIEW_ALL: "recurringTransactions_click_viewAll",
141
+ RECURRING_TRANSACTIONS_LOAD_WIDGET: "recurringTransactions_load_widget",
142
+ TRENDS_CLICK_ALL_CATEGORIES: "trends_click_allCategories",
143
+ TRENDS_CLICK_BACK: "trends_click_back",
144
+ TRENDS_CLICK_CHART: "trends_click_chart",
145
+ TRENDS_CLICK_CONNECT_ACCOUNTS: "trends_click_connectAccounts",
146
+ TRENDS_CLICK_EXPORT_CSV: "trends_click_exportCSV",
147
+ TRENDS_CLICK_FILTER: "trends_click_filter",
148
+ TRENDS_CLICK_GET_STARTED: "trends_click_getStarted",
149
+ TRENDS_CLICK_INSIGHT: "trends_click_insight",
150
+ TRENDS_CLICK_LEGEND: "trends_click_legend",
151
+ TRENDS_CLICK_LIST_ITEM: "trends_click_listItem",
152
+ TRENDS_CLICK_TABLE_SORT: "trends_click_tableSort",
153
+ TRENDS_CLICK_TIME_WINDOW: "trends_click_timeWindow",
154
+ TRENDS_CLICK_TOGGLE_VIEW: "trends_click_toggleView",
155
+ TRENDS_CLICK_VIEW_MORE: "trends_click_viewMore",
156
+ TRENDS_CLICK_VIEW_TRANSACTIONS: "trends_click_viewTransactions",
157
+ TRENDS_HOVER_AREA: "trends_hover_chartArea",
158
+ TRENDS_HOVER_POINT: "trends_hover_chartPoint",
159
+ TRENDS_HOVER_LEGEND: "trends_hover_ChartLegend",
160
+ TRENDS_LOAD_WIDGET: "trends_load_widget",
161
+ TRENDS_VIEW_TRANSACTIONS: "trends_view_transactions"
162
+ }, Me = ({
163
+ calendarActions: r,
164
+ color: m = "primary",
165
+ copy: t,
166
+ range: L = [Ne(me()), V(J())],
167
+ shouldShrinkToIcon: u = !0,
168
+ variant: c = "outlined"
169
+ }) => {
170
+ const x = fe(), { isMobile: D } = _e(), { announce: B, ariaLive: k } = be(), [A, h] = I.useState(L), [d, f] = I.useState(t.dateRangePickerCopy.dateRangeThisMonth), [R, v] = I.useState(A), [p, O] = I.useState(!1), [T, g] = I.useState(!0), [l, y] = I.useState(6), P = {
171
+ buttons: [
172
+ { label: "3M", value: 3 },
173
+ { label: "6M", value: 6 },
174
+ { label: "9M", value: 9 },
175
+ { label: "1Y", value: 12 }
176
+ ],
177
+ tabs: [
178
+ { label: "3 Months", value: 3 },
179
+ { label: "6 Months", value: 6 },
180
+ { label: "9 Months", value: 9 },
181
+ { label: "1 Year", value: 12 }
182
+ ]
183
+ };
184
+ I.useEffect(() => {
185
+ h(L), v(L);
186
+ }, [L]), I.useEffect(() => {
187
+ (c === "timeframebuttons" || c === "timeframetabs") && r.onRangeChanged(a());
188
+ }, [l]);
189
+ const a = () => {
190
+ const _ = V(J());
191
+ return [V(z(_, l)), _];
192
+ }, U = (_) => {
193
+ const [n, i] = A, s = _ === "previous";
194
+ let o;
195
+ if (d === t.dateRangePickerCopy.dateRangeThisMonth || d === t.dateRangePickerCopy.dateRangeLastMonth)
196
+ o = [
197
+ s ? z(n, 1) : Z(n, 1),
198
+ V(s ? z(i, 1) : Z(i, 1))
199
+ ];
200
+ else if (d === t.dateRangePickerCopy.dateRangeYTD || d === t.dateRangePickerCopy.dateRangeLastYear) {
201
+ const G = Le(n), M = Se(n);
202
+ o = [
203
+ s ? Q(G, 1) : q(G, 1),
204
+ s ? Q(M, 1) : q(M, 1)
205
+ ];
206
+ } else {
207
+ const G = ge(i, n), M = s ? ue : Re;
208
+ o = [M(n, G), M(i, G)];
209
+ }
210
+ h(o), r.onRangeChanged(o);
211
+ }, b = () => {
212
+ h(R), g(
213
+ d === t.dateRangePickerCopy.dateRangeThisMonth || d === t.dateRangePickerCopy.dateRangeLastMonth
214
+ ), r.onRangeChanged(R);
215
+ }, K = (_, n) => {
216
+ _[1] = _[1] ?? _[0];
217
+ const i = [_[0], _[1] ? Ae(_[1]) : _[1]], s = S(i[0], N.MONTH_DAY_YEAR), o = S(i[1], N.MONTH_DAY_YEAR);
218
+ v(i), f(n), B(`${t.dateRangePickerCopy}: ${s} - ${o}`);
219
+ }, w = (_) => {
220
+ y(_);
221
+ };
222
+ return /* @__PURE__ */ C(X, { className: "mx-cmn-date-range-selector", m: 4, children: [
223
+ /* @__PURE__ */ C(
224
+ X,
225
+ {
226
+ sx: {
227
+ [x.breakpoints.down("sm")]: {
228
+ display: u ? "none" : "flex",
229
+ justifyContent: "center"
230
+ },
231
+ [x.breakpoints.up("sm")]: { display: "inline-flex" }
232
+ },
233
+ children: [
234
+ c === "readonly" && /* @__PURE__ */ C(Y, { alignItems: "center", direction: "row", gap: 8, children: [
235
+ /* @__PURE__ */ e(E, { name: "calendar_month", size: 24 }),
236
+ /* @__PURE__ */ e(F, { bold: !0, children: S(R[0], N.MONTH_DAY) }),
237
+ /* @__PURE__ */ e(E, { name: "remove" }),
238
+ /* @__PURE__ */ e(F, { bold: !0, children: S(R[1], N.MONTH_DAY_YEAR) })
239
+ ] }),
240
+ c !== "readonly" && c !== "timeframebuttons" && c !== "timeframetabs" && /* @__PURE__ */ C(
241
+ De,
242
+ {
243
+ color: m,
244
+ sx: {
245
+ "& .MuiButtonGroup-grouped": {
246
+ padding: D ? 0 : 12
247
+ },
248
+ "& .MuiButtonGroup-middleButton": {
249
+ px: 24
250
+ },
251
+ height: 44
252
+ },
253
+ variant: c,
254
+ children: [
255
+ /* @__PURE__ */ e(
256
+ W,
257
+ {
258
+ "aria-disabled": r.shouldDisablePrevious,
259
+ "aria-label": t.dateRangePreviousAria,
260
+ color: r.shouldDisablePrevious ? "secondary" : "primary",
261
+ onClick: () => r.shouldDisablePrevious ? null : U("previous"),
262
+ children: /* @__PURE__ */ e(E, { name: "chevron_left", size: 20 })
263
+ }
264
+ ),
265
+ /* @__PURE__ */ e(
266
+ W,
267
+ {
268
+ "aria-disabled": r.shouldDisablePicker,
269
+ color: m,
270
+ onClick: () => r.shouldDisablePicker ? null : O(!0),
271
+ startIcon: /* @__PURE__ */ e(E, { name: "calendar_month", size: 20 }),
272
+ sx: {
273
+ p: D ? 0 : 8
274
+ },
275
+ children: T ? S(A[0], N.MONTH_YEAR) : /* @__PURE__ */ C("span", { children: [
276
+ S(A[0], N.MONTH_DAY_YEAR),
277
+ " -",
278
+ " ",
279
+ S(A[1], N.MONTH_DAY_YEAR)
280
+ ] })
281
+ }
282
+ ),
283
+ /* @__PURE__ */ e(
284
+ W,
285
+ {
286
+ "aria-disabled": r.shouldDisableNext,
287
+ "aria-label": t.dateRangeNextAria,
288
+ color: r.shouldDisableNext ? "secondary" : "primary",
289
+ onClick: () => r.shouldDisableNext ? null : U("next"),
290
+ children: /* @__PURE__ */ e(E, { name: "chevron_right", size: 20 })
291
+ }
292
+ )
293
+ ]
294
+ }
295
+ ),
296
+ c === "timeframebuttons" && /* @__PURE__ */ e(
297
+ he,
298
+ {
299
+ color: m,
300
+ exclusive: !0,
301
+ orientation: "horizontal",
302
+ value: l,
303
+ children: P.buttons.map((_) => /* @__PURE__ */ e(
304
+ Oe,
305
+ {
306
+ onClick: () => w(_.value),
307
+ sx: { width: 56 },
308
+ value: _.value,
309
+ children: _.label
310
+ },
311
+ _.label
312
+ ))
313
+ }
314
+ ),
315
+ c === "timeframetabs" && /* @__PURE__ */ e(
316
+ pe,
317
+ {
318
+ indicatorColor: "primary",
319
+ onChange: (_, n) => w(n),
320
+ textColor: "primary",
321
+ value: l,
322
+ variant: "fullWidth",
323
+ children: P.tabs.map((_) => /* @__PURE__ */ e(
324
+ ke,
325
+ {
326
+ label: /* @__PURE__ */ e(F, { bold: !0, variant: "Body", children: _.label }),
327
+ sx: { minWidth: 80 },
328
+ value: _.value
329
+ },
330
+ _.label
331
+ ))
332
+ }
333
+ )
334
+ ]
335
+ }
336
+ ),
337
+ p && D && /* @__PURE__ */ C(
338
+ we,
339
+ {
340
+ ariaLabelClose: t.dateRangeCloseAria,
341
+ isOpen: p,
342
+ onClose: () => O(!1),
343
+ onPrimaryAction: () => {
344
+ b(), O(!1);
345
+ },
346
+ primaryText: t.dateRangeEditApply,
347
+ title: t.dateRangeEditTitle,
348
+ children: [
349
+ k,
350
+ /* @__PURE__ */ e(
351
+ $,
352
+ {
353
+ copy: t.dateRangePickerCopy,
354
+ dateRange: R,
355
+ onRangeChanged: K,
356
+ selectedShortcut: d,
357
+ sx: { p: 16 }
358
+ }
359
+ )
360
+ ]
361
+ }
362
+ ),
363
+ p && !D && /* @__PURE__ */ C(
364
+ Ke,
365
+ {
366
+ copy: { title: t.dateRangeEditTitle },
367
+ isOpen: !0,
368
+ onClose: () => O(!1),
369
+ onPrimaryAction: () => b(),
370
+ primaryText: t.dateRangeEditApply,
371
+ sx: {
372
+ "& .MuiDialogContent-root": {
373
+ padding: 0
374
+ }
375
+ },
376
+ children: [
377
+ k,
378
+ /* @__PURE__ */ e(
379
+ $,
380
+ {
381
+ copy: t.dateRangePickerCopy,
382
+ dateRange: R,
383
+ onRangeChanged: K,
384
+ selectedShortcut: d,
385
+ sx: {
386
+ pt: 0,
387
+ "& .MuiPickersLayout-toolbar": {
388
+ gridColumn: "1/4"
389
+ }
390
+ }
391
+ }
392
+ )
393
+ ]
394
+ }
395
+ )
396
+ ] });
397
+ }, ee = Me, L_ = te(
398
+ ({
399
+ allowedAccountTypes: r,
400
+ actions: m = [],
401
+ calendarActions: t,
402
+ children: L,
403
+ dateRange: u,
404
+ dateRangeVariant: c,
405
+ className: x = "mx-cmn-widget",
406
+ hasDivider: D = !1,
407
+ onAccountsFilterClick: B,
408
+ onBackClick: k,
409
+ showAccountFilter: A = !0,
410
+ showDividerAboveDateSelector: h = !0,
411
+ sx: d = {},
412
+ title: f = ""
413
+ }) => {
414
+ const [R, { height: v, width: p }] = oe(), { onEvent: O } = de(), { isDesktop: T, isMobile: g, isTablet: l } = _e(p), { displayedDateRange: y, isCopyLoaded: P } = Te(), { common: a } = Ie(), U = () => {
415
+ k && (k(), O(Ge.WIDGET_BACK_CLICK));
416
+ };
417
+ if (!P)
418
+ return /* @__PURE__ */ e(Ce, {});
419
+ const b = {
420
+ dateRangePickerCopy: {
421
+ dateRangeFrom: a.date_range_picker.from,
422
+ dateRangeTo: a.date_range_picker.to,
423
+ dateRangeCustom: a.date_range_picker.custom,
424
+ dateRangeSelectARange: a.date_range_picker.select_range,
425
+ dateRangeThisMonth: a.date_range_picker.this_month,
426
+ dateRangeLastMonth: a.date_range_picker.last_month,
427
+ dateRangeLast30Days: a.date_range_picker.last_30_days,
428
+ dateRangeLast90Days: a.date_range_picker.last_90_days,
429
+ dateRangeYTD: a.date_range_picker.ytd,
430
+ dateRangeLastYear: a.date_range_picker.last_year,
431
+ dateRangeSelect: a.date_range_picker.select
432
+ },
433
+ dateRangeEditApply: a.date_range_picker.edit_apply,
434
+ dateRangeEditTitle: a.date_range_picker.edit_title,
435
+ dateRangeNextAria: a.date_range_picker.next_aria,
436
+ dateRangePreviousAria: a.date_range_picker.previous_aria
437
+ }, K = u ? u.start : y.start, w = u ? u.end : y.end, _ = m?.length > 1;
438
+ return /* @__PURE__ */ C(
439
+ ae,
440
+ {
441
+ className: x,
442
+ sx: {
443
+ ...g && { px: 4 },
444
+ "& .mx-cmn-date-range-selector": {
445
+ ...(g || l) && { textAlign: "center" }
446
+ },
447
+ ...d
448
+ },
449
+ children: [
450
+ f && /* @__PURE__ */ e(
451
+ ne,
452
+ {
453
+ action: /* @__PURE__ */ C(Y, { alignItems: "center", flexDirection: "row", children: [
454
+ T && t && /* @__PURE__ */ e(X, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ e(
455
+ ee,
456
+ {
457
+ calendarActions: t,
458
+ copy: b,
459
+ range: [K, w],
460
+ shouldShrinkToIcon: !1,
461
+ variant: c
462
+ }
463
+ ) }),
464
+ A && /* @__PURE__ */ e(
465
+ le,
466
+ {
467
+ allowedAccountTypes: r,
468
+ onAccountFilterClick: B
469
+ }
470
+ ),
471
+ m?.map((n) => {
472
+ if (I.isValidElement(n)) return n;
473
+ const { iconName: i, onClick: s, label: o } = n;
474
+ return _ ? T || l ? /* @__PURE__ */ e(
475
+ W,
476
+ {
477
+ onClick: s,
478
+ startIcon: /* @__PURE__ */ e(E, { name: i, size: 24 }),
479
+ sx: { my: 4 },
480
+ children: o
481
+ },
482
+ i
483
+ ) : /* @__PURE__ */ e(
484
+ H,
485
+ {
486
+ "aria-label": o,
487
+ color: "primary",
488
+ onClick: s,
489
+ children: /* @__PURE__ */ e(E, { name: i, size: 24 })
490
+ },
491
+ i
492
+ ) : T || l ? /* @__PURE__ */ e(
493
+ W,
494
+ {
495
+ onClick: s,
496
+ startIcon: /* @__PURE__ */ e(E, { name: i, size: 24 }),
497
+ sx: { my: 4 },
498
+ children: o
499
+ },
500
+ i
501
+ ) : /* @__PURE__ */ e(H, { "aria-label": o, color: "primary", onClick: s, children: /* @__PURE__ */ e(E, { name: i, size: 24 }) }, i);
502
+ })
503
+ ] }),
504
+ sx: {
505
+ p: T ? 48 : 24,
506
+ pb: 0,
507
+ "& .MuiCardHeader-action": {
508
+ mr: 0,
509
+ ...t && T && { flexGrow: 1 },
510
+ ...(g || l) && { alignSelf: "center" }
511
+ },
512
+ "& .MuiCardHeader-content": {
513
+ overflow: "hidden"
514
+ }
515
+ },
516
+ title: T || l ? /* @__PURE__ */ e(ce, { variant: "H1", children: f }) : /* @__PURE__ */ C(Y, { alignItems: "center", flexDirection: "row", sx: { overflow: "hidden" }, children: [
517
+ g && k && /* @__PURE__ */ e(
518
+ H,
519
+ {
520
+ "aria-label": a.back_to_dashboard,
521
+ color: "primary",
522
+ onClick: U,
523
+ sx: { p: 12, mr: 4 },
524
+ children: /* @__PURE__ */ e(re, { size: 24 })
525
+ }
526
+ ),
527
+ /* @__PURE__ */ e(se, { children: f })
528
+ ] })
529
+ }
530
+ ),
531
+ D && /* @__PURE__ */ e(j, { sx: { mt: T ? 48 : 24 } }),
532
+ t && (g || l) && /* @__PURE__ */ C(Y, { gap: 24, justifyContent: "center", sx: { mt: g ? 0 : 16 }, children: [
533
+ h && /* @__PURE__ */ e(j, {}),
534
+ /* @__PURE__ */ e(
535
+ ee,
536
+ {
537
+ calendarActions: t,
538
+ copy: b,
539
+ range: [K, w],
540
+ shouldShrinkToIcon: !1,
541
+ variant: c
542
+ }
543
+ )
544
+ ] }),
545
+ /* @__PURE__ */ e(ie, { ref: R, sx: { p: 0 }, children: /* @__PURE__ */ e(Ee, { availableHeight: v, availableWidth: p, children: L }) })
546
+ ]
547
+ }
548
+ );
549
+ }
550
+ );
551
+ export {
552
+ Ge as A,
553
+ ee as D,
554
+ L_ as W
555
+ };