@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
@@ -1,572 +0,0 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import T from "react";
3
- import { observer as ce } from "mobx-react-lite";
4
- import q from "@mui/material/Box";
5
- import M from "@mui/material/Button";
6
- import re from "@mui/material/Card";
7
- import oe from "@mui/material/CardContent";
8
- import se from "@mui/material/CardHeader";
9
- import J from "@mui/material/Divider";
10
- import j from "@mui/material/IconButton";
11
- import F from "@mui/material/Stack";
12
- import { ChevronLeft as le } from "@mxenabled/mx-icons";
13
- import { Icon as R, Text as $, DateRangePicker as Q, H2 as Ce, H3 as de } from "@mxenabled/mxui";
14
- import { u as Te } from "./useDimensions-27p2evRx.mjs";
15
- import { L as Ie } from "./Loader-DUaFpDGv.mjs";
16
- import { g as Ee, b as Re, u as ge, a as Ae, W as ue } from "./hooks-ZMp65DFz.mjs";
17
- import { u as ne } from "./useScreenSize-B6JyS_Lj.mjs";
18
- import { addMonths as ee } from "date-fns/addMonths";
19
- import { addDays as Se } from "date-fns/addDays";
20
- import { addYears as te } from "date-fns/addYears";
21
- import { differenceInCalendarDays as Ne } from "date-fns/differenceInCalendarDays";
22
- import { endOfDay as me } from "date-fns/endOfDay";
23
- import { endOfMonth as H } from "date-fns/endOfMonth";
24
- import { endOfToday as _e } from "date-fns/endOfToday";
25
- import { endOfYear as Le } from "date-fns/endOfYear";
26
- import { startOfMonth as De } from "date-fns/startOfMonth";
27
- import { startOfToday as pe } from "date-fns/startOfToday";
28
- import { startOfYear as ke } from "date-fns/startOfYear";
29
- import { subMonths as Z } from "date-fns/subMonths";
30
- import { subDays as Oe } from "date-fns/subDays";
31
- import { subYears as ae } from "date-fns/subYears";
32
- import he from "@mui/material/ButtonGroup";
33
- import fe from "@mui/material/Tab";
34
- import be from "@mui/material/Tabs";
35
- import we from "@mui/material/ToggleButton";
36
- import Ke from "@mui/material/ToggleButtonGroup";
37
- import Ge from "@mui/material/styles/useTheme";
38
- import { u as Me } from "./useAriaLive-B3_pRUio.mjs";
39
- import { f as L, D, a as We } from "./Dialog-B4PI-_bL.mjs";
40
- import { D as ye } from "./Drawer-DV4NTsFg.mjs";
41
- import { k as xe, l as ve } from "./ConnectDrawer-BOjfI6rz.mjs";
42
- const Pe = {
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
- }, Ue = ({
163
- calendarActions: i,
164
- color: p = "primary",
165
- copy: a,
166
- range: k = [De(pe()), H(_e())],
167
- shouldShrinkToIcon: O = !0,
168
- variant: c = "outlined"
169
- }) => {
170
- const W = Ge(), { isMobile: h } = ne(), { announce: b, ariaLive: y } = Me(), [S, w] = T.useState(k), [r, x] = T.useState(a.dateRangePickerCopy.dateRangeThisMonth), [I, v] = T.useState(S), [K, N] = T.useState(!1), [z, E] = T.useState(!0), [o, g] = T.useState(6), G = {
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
- T.useEffect(() => {
185
- w(k), v(k);
186
- }, [k]), T.useEffect(() => {
187
- (c === "timeframebuttons" || c === "timeframetabs") && i.onRangeChanged(X());
188
- }, [o]);
189
- const X = () => {
190
- const _ = H(_e());
191
- return [H(Z(_, o)), _];
192
- }, P = (_) => {
193
- const [n, l] = S, C = _ === "previous";
194
- let d;
195
- if (r === a.dateRangePickerCopy.dateRangeThisMonth || r === a.dateRangePickerCopy.dateRangeLastMonth)
196
- d = [
197
- C ? Z(n, 1) : ee(n, 1),
198
- H(C ? Z(l, 1) : ee(l, 1))
199
- ];
200
- else if (r === a.dateRangePickerCopy.dateRangeYTD || r === a.dateRangePickerCopy.dateRangeLastYear) {
201
- const A = ke(n), m = Le(n);
202
- d = [
203
- C ? ae(A, 1) : te(A, 1),
204
- C ? ae(m, 1) : te(m, 1)
205
- ];
206
- } else {
207
- const A = Ne(l, n), m = C ? Oe : Se;
208
- d = [m(n, A), m(l, A)];
209
- }
210
- w(d), i.onRangeChanged(d);
211
- }, U = () => {
212
- w(I), E(
213
- r === a.dateRangePickerCopy.dateRangeThisMonth || r === a.dateRangePickerCopy.dateRangeLastMonth
214
- ), i.onRangeChanged(I);
215
- }, t = (_, n) => {
216
- _[1] = _[1] ?? _[0];
217
- const l = [_[0], _[1] ? me(_[1]) : _[1]], C = L(l[0], D.MONTH_DAY_YEAR), d = L(l[1], D.MONTH_DAY_YEAR);
218
- v(l), x(n), b(`${a.dateRangePickerCopy}: ${C} - ${d}`);
219
- }, B = (_) => {
220
- g(_);
221
- };
222
- return /* @__PURE__ */ s(q, { className: "mx-cmn-date-range-selector", m: 4, children: [
223
- /* @__PURE__ */ s(
224
- q,
225
- {
226
- sx: {
227
- [W.breakpoints.down("sm")]: {
228
- display: O ? "none" : "flex",
229
- justifyContent: "center"
230
- },
231
- [W.breakpoints.up("sm")]: { display: "inline-flex" }
232
- },
233
- children: [
234
- c === "readonly" && /* @__PURE__ */ s(F, { alignItems: "center", direction: "row", gap: 8, children: [
235
- /* @__PURE__ */ e(R, { name: "calendar_month", size: 24 }),
236
- /* @__PURE__ */ e($, { bold: !0, children: L(I[0], D.MONTH_DAY) }),
237
- /* @__PURE__ */ e(R, { name: "remove" }),
238
- /* @__PURE__ */ e($, { bold: !0, children: L(I[1], D.MONTH_DAY_YEAR) })
239
- ] }),
240
- c !== "readonly" && c !== "timeframebuttons" && c !== "timeframetabs" && /* @__PURE__ */ s(
241
- he,
242
- {
243
- color: p,
244
- sx: {
245
- "& .MuiButtonGroup-grouped": {
246
- padding: h ? 0 : 12
247
- },
248
- "& .MuiButtonGroup-middleButton": {
249
- px: 24
250
- },
251
- height: 44
252
- },
253
- variant: c,
254
- children: [
255
- /* @__PURE__ */ e(
256
- M,
257
- {
258
- "aria-disabled": i.shouldDisablePrevious,
259
- "aria-label": a.dateRangePreviousAria,
260
- color: i.shouldDisablePrevious ? "secondary" : "primary",
261
- onClick: () => i.shouldDisablePrevious ? null : P("previous"),
262
- children: /* @__PURE__ */ e(R, { name: "chevron_left", size: 20 })
263
- }
264
- ),
265
- /* @__PURE__ */ e(
266
- M,
267
- {
268
- "aria-disabled": i.shouldDisablePicker,
269
- color: p,
270
- onClick: () => i.shouldDisablePicker ? null : N(!0),
271
- startIcon: /* @__PURE__ */ e(R, { name: "calendar_month", size: 20 }),
272
- sx: {
273
- p: h ? 0 : 8
274
- },
275
- children: z ? L(S[0], D.MONTH_YEAR) : /* @__PURE__ */ s("span", { children: [
276
- L(S[0], D.MONTH_DAY_YEAR),
277
- " -",
278
- " ",
279
- L(S[1], D.MONTH_DAY_YEAR)
280
- ] })
281
- }
282
- ),
283
- /* @__PURE__ */ e(
284
- M,
285
- {
286
- "aria-disabled": i.shouldDisableNext,
287
- "aria-label": a.dateRangeNextAria,
288
- color: i.shouldDisableNext ? "secondary" : "primary",
289
- onClick: () => i.shouldDisableNext ? null : P("next"),
290
- children: /* @__PURE__ */ e(R, { name: "chevron_right", size: 20 })
291
- }
292
- )
293
- ]
294
- }
295
- ),
296
- c === "timeframebuttons" && /* @__PURE__ */ e(
297
- Ke,
298
- {
299
- color: p,
300
- exclusive: !0,
301
- orientation: "horizontal",
302
- value: o,
303
- children: G.buttons.map((_) => /* @__PURE__ */ e(
304
- we,
305
- {
306
- onClick: () => B(_.value),
307
- sx: { width: 56 },
308
- value: _.value,
309
- children: _.label
310
- },
311
- _.label
312
- ))
313
- }
314
- ),
315
- c === "timeframetabs" && /* @__PURE__ */ e(
316
- be,
317
- {
318
- indicatorColor: "primary",
319
- onChange: (_, n) => B(n),
320
- textColor: "primary",
321
- value: o,
322
- variant: "fullWidth",
323
- children: G.tabs.map((_) => /* @__PURE__ */ e(
324
- fe,
325
- {
326
- label: /* @__PURE__ */ e($, { bold: !0, variant: "Body", children: _.label }),
327
- sx: { minWidth: 80 },
328
- value: _.value
329
- },
330
- _.label
331
- ))
332
- }
333
- )
334
- ]
335
- }
336
- ),
337
- K && h && /* @__PURE__ */ s(
338
- ye,
339
- {
340
- ariaLabelClose: a.dateRangeCloseAria,
341
- isOpen: K,
342
- onClose: () => N(!1),
343
- onPrimaryAction: () => {
344
- U(), N(!1);
345
- },
346
- primaryText: a.dateRangeEditApply,
347
- title: a.dateRangeEditTitle,
348
- children: [
349
- y,
350
- /* @__PURE__ */ e(
351
- Q,
352
- {
353
- copy: a.dateRangePickerCopy,
354
- dateRange: I,
355
- onRangeChanged: t,
356
- selectedShortcut: r,
357
- sx: { p: 16 }
358
- }
359
- )
360
- ]
361
- }
362
- ),
363
- K && !h && /* @__PURE__ */ s(
364
- We,
365
- {
366
- copy: { title: a.dateRangeEditTitle },
367
- isOpen: !0,
368
- onClose: () => N(!1),
369
- onPrimaryAction: () => U(),
370
- primaryText: a.dateRangeEditApply,
371
- sx: {
372
- "& .MuiDialogContent-root": {
373
- padding: 0
374
- }
375
- },
376
- children: [
377
- y,
378
- /* @__PURE__ */ e(
379
- Q,
380
- {
381
- copy: a.dateRangePickerCopy,
382
- dateRange: I,
383
- onRangeChanged: t,
384
- selectedShortcut: r,
385
- sx: {
386
- pt: 0,
387
- "& .MuiPickersLayout-toolbar": {
388
- gridColumn: "1/4"
389
- }
390
- }
391
- }
392
- )
393
- ]
394
- }
395
- )
396
- ] });
397
- }, ie = Ue, Be = ({
398
- accountOptions: i,
399
- actions: p = [],
400
- calendarActions: a,
401
- children: k,
402
- dateRange: O,
403
- dateRangeVariant: c,
404
- className: W = "mx-cmn-widget",
405
- hasDivider: h = !1,
406
- onBackClick: b,
407
- onAccountsFilterClick: y,
408
- showDividerAboveDateSelector: S = !0,
409
- sx: w = {},
410
- title: r = ""
411
- }) => {
412
- const [x, I] = T.useState(!1), [v, { height: K, width: N }] = Te(), { onEvent: z } = Ee(), { isDesktop: E, isMobile: o, isTablet: g } = ne(N), { displayedDateRange: G, isCopyLoaded: X, selectedAccountGuids: P, setSelectedAccountGuids: U } = Re(), { common: t, connect: B } = ge(), { config: _ } = Ae(), n = () => {
413
- b && (b(), z(Pe.WIDGET_BACK_CLICK));
414
- };
415
- if (!X)
416
- return /* @__PURE__ */ e(Ie, {});
417
- const l = {
418
- accountFilterOptionsCopy: {
419
- accountTypeAccounts: t.account_filter.account_type_accounts,
420
- cancelButton: t.cancel_button,
421
- filterButton: t.filter_button,
422
- filterButtonAria: t.account_filter.filter_button_generic_aria,
423
- selectAllAccounts: t.account_filter.select_all_accounts,
424
- toggleAccountTypeAccounts: t.account_filter.toggle_account_type_accounts,
425
- unselectAllAccounts: t.account_filter.unselect_all_accounts,
426
- zeroStateButton: t.account_filter.zero_state_button,
427
- zeroStateDescription: t.account_filter.zero_state_description,
428
- zeroStateTitle: t.account_filter.zero_state_title
429
- },
430
- title: t.account_filter.title
431
- }, C = {
432
- dateRangePickerCopy: {
433
- dateRangeFrom: t.date_range_picker.from,
434
- dateRangeTo: t.date_range_picker.to,
435
- dateRangeCustom: t.date_range_picker.custom,
436
- dateRangeSelectARange: t.date_range_picker.select_range,
437
- dateRangeThisMonth: t.date_range_picker.this_month,
438
- dateRangeLastMonth: t.date_range_picker.last_month,
439
- dateRangeLast30Days: t.date_range_picker.last_30_days,
440
- dateRangeLast90Days: t.date_range_picker.last_90_days,
441
- dateRangeYTD: t.date_range_picker.ytd,
442
- dateRangeLastYear: t.date_range_picker.last_year,
443
- dateRangeSelect: t.date_range_picker.select
444
- },
445
- dateRangeEditApply: t.date_range_picker.edit_apply,
446
- dateRangeEditTitle: t.date_range_picker.edit_title,
447
- dateRangeNextAria: t.date_range_picker.next_aria,
448
- dateRangePreviousAria: t.date_range_picker.previous_aria
449
- }, d = O ? O.start : G.start, A = O ? O.end : G.end, m = p?.length > 1;
450
- return /* @__PURE__ */ s(
451
- re,
452
- {
453
- className: W,
454
- sx: {
455
- ...o && { px: 4 },
456
- "& .mx-cmn-date-range-selector": {
457
- ...(o || g) && { textAlign: "center" }
458
- },
459
- ...w
460
- },
461
- children: [
462
- r && /* @__PURE__ */ e(
463
- se,
464
- {
465
- action: /* @__PURE__ */ s(F, { alignItems: "center", flexDirection: "row", children: [
466
- E && a && /* @__PURE__ */ e(q, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ e(
467
- ie,
468
- {
469
- calendarActions: a,
470
- copy: C,
471
- range: [d, A],
472
- shouldShrinkToIcon: !1,
473
- variant: c
474
- }
475
- ) }),
476
- i && /* @__PURE__ */ e(
477
- xe,
478
- {
479
- accounts: i,
480
- copy: l,
481
- onConnectAccountClick: _.show_connections_widget_in_master ? () => I(!0) : void 0,
482
- onFilterClick: (f) => {
483
- U(f), y?.(f);
484
- },
485
- selectedAccountGuids: P,
486
- showAccountNumbers: !1,
487
- variant: "text"
488
- }
489
- ),
490
- p?.map((f) => {
491
- if (T.isValidElement(f)) return f;
492
- const { iconName: u, onClick: V, label: Y } = f;
493
- return m ? E || g ? /* @__PURE__ */ e(
494
- M,
495
- {
496
- onClick: V,
497
- startIcon: /* @__PURE__ */ e(R, { name: u, size: 24 }),
498
- sx: { my: 4 },
499
- children: Y
500
- },
501
- u
502
- ) : /* @__PURE__ */ e(j, { "aria-label": Y, color: "primary", onClick: V, children: /* @__PURE__ */ e(R, { name: u, size: 24 }) }, u) : E || g ? /* @__PURE__ */ e(
503
- M,
504
- {
505
- onClick: V,
506
- startIcon: /* @__PURE__ */ e(R, { name: u, size: 24 }),
507
- sx: { my: 4 },
508
- children: Y
509
- },
510
- u
511
- ) : /* @__PURE__ */ e(j, { "aria-label": Y, color: "primary", onClick: V, children: /* @__PURE__ */ e(R, { name: u, size: 24 }) }, u);
512
- })
513
- ] }),
514
- sx: {
515
- p: E ? 48 : 24,
516
- pb: 0,
517
- "& .MuiCardHeader-action": {
518
- mr: 0,
519
- ...a && E && { flexGrow: 1 },
520
- ...(o || g) && { alignSelf: "center" }
521
- },
522
- "& .MuiCardHeader-content": {
523
- overflow: "hidden"
524
- }
525
- },
526
- title: E || g ? /* @__PURE__ */ e(Ce, { variant: "H1", children: r }) : /* @__PURE__ */ s(F, { alignItems: "center", flexDirection: "row", sx: { overflow: "hidden" }, children: [
527
- o && b && /* @__PURE__ */ e(
528
- j,
529
- {
530
- "aria-label": t.back_to_dashboard,
531
- color: "primary",
532
- onClick: n,
533
- sx: { p: 12, mr: 4 },
534
- children: /* @__PURE__ */ e(le, { size: 24 })
535
- }
536
- ),
537
- /* @__PURE__ */ e(de, { children: r })
538
- ] })
539
- }
540
- ),
541
- h && /* @__PURE__ */ e(J, { sx: { mt: E ? 48 : 24 } }),
542
- a && (o || g) && /* @__PURE__ */ s(F, { gap: 24, justifyContent: "center", sx: { mt: o ? 0 : 16 }, children: [
543
- S && /* @__PURE__ */ e(J, {}),
544
- /* @__PURE__ */ e(
545
- ie,
546
- {
547
- calendarActions: a,
548
- copy: C,
549
- range: [d, A],
550
- shouldShrinkToIcon: !1,
551
- variant: c
552
- }
553
- )
554
- ] }),
555
- x && /* @__PURE__ */ e(
556
- ve,
557
- {
558
- onClose: () => I(!1),
559
- showConnectWidget: x,
560
- title: B.mini_title
561
- }
562
- ),
563
- /* @__PURE__ */ e(oe, { ref: v, sx: { p: 0 }, children: /* @__PURE__ */ e(ue, { availableHeight: K, availableWidth: N, children: k }) })
564
- ]
565
- }
566
- );
567
- }, ft = ce(Be);
568
- export {
569
- Pe as A,
570
- ie as D,
571
- ft as W
572
- };
@@ -1,20 +0,0 @@
1
- import { FC } from 'react';
2
- import { SxProps } from '@mui/material/styles';
3
- import { Account } from '../../types';
4
- import { AccountFilterOptionsCopy } from './AccountFilterOptions';
5
- export type AccountFilterCopy = {
6
- accountFilterOptionsCopy: AccountFilterOptionsCopy;
7
- title: string;
8
- };
9
- export interface AccountFilterProps {
10
- accounts: Account[];
11
- copy: AccountFilterCopy;
12
- onFilterClick: (selected: string[]) => void;
13
- onConnectAccountClick?: () => void;
14
- selectedAccountGuids: string[];
15
- showAccountNumbers: boolean;
16
- sx?: SxProps;
17
- variant?: 'outlined' | 'text';
18
- }
19
- declare const AccountFilter: FC<AccountFilterProps>;
20
- export default AccountFilter;
@@ -1,31 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Account } from '../../types/Account';
3
- import { MappedAccount, MappedAccounts, MappedOptions } from '../../utils/AccountFilter';
4
- export type AccountFilterOptionsCopy = {
5
- accountTypeAccounts: string;
6
- cancelButton: string;
7
- filterButton: string;
8
- filterButtonAria: string;
9
- selectAllAccounts: string;
10
- toggleAccountTypeAccounts: string;
11
- unselectAllAccounts: string;
12
- zeroStateButton: string;
13
- zeroStateDescription: string;
14
- zeroStateTitle: string;
15
- };
16
- interface AccountFilterOptionsProps {
17
- accounts: Account[];
18
- copy: AccountFilterOptionsCopy;
19
- accountFilterButtonEl: HTMLButtonElement | null;
20
- onAccountClick: (account: MappedAccount) => void;
21
- onAccountGroupClick: (accountType: string, mappedAccounts: MappedAccounts, allGroupedAccountsSelected: boolean) => void;
22
- onCancelClick: () => void;
23
- onConnectAccountClick?: () => void;
24
- onFilterClick: () => void;
25
- selectedOptions: MappedOptions;
26
- setSelectedOptions: (value: React.SetStateAction<MappedOptions>) => void;
27
- handleClose: () => void;
28
- showAccountNumbers: boolean;
29
- }
30
- export declare const AccountFilterOptions: React.FC<AccountFilterOptionsProps>;
31
- export {};
@@ -1 +0,0 @@
1
- export { default as AccountFilter } from './AccountFilter';
@@ -7,7 +7,6 @@ import x from "@mui/material/Stack";
7
7
  import D from "@mui/material/Switch";
8
8
  import { Text as L } from "@mxenabled/mxui";
9
9
  import w from "@mui/material/ListItemAvatar";
10
- var B = /* @__PURE__ */ ((r) => (r.Accounts = "accounts", r.Budgets = "budgets", r.Insights = "insights", r.Personal = "personal", r))(B || {}), P = /* @__PURE__ */ ((r) => (r[r.DebtPaymentReminder = 3] = "DebtPaymentReminder", r[r.AccountBalanceLow = 6] = "AccountBalanceLow", r[r.AccountDepositLarge = 7] = "AccountDepositLarge", r[r.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", r[r.TransactionFeeCharge = 9] = "TransactionFeeCharge", r[r.InternationalTransaction = 23] = "InternationalTransaction", r[r.AccountDepositLargePosted = 48] = "AccountDepositLargePosted", r))(P || {}), b = /* @__PURE__ */ ((r) => (r[r.BudgetExceeded = 1] = "BudgetExceeded", r[r.BudgetOffTarget = 2] = "BudgetOffTarget", r))(b || {}), A = /* @__PURE__ */ ((r) => (r[r.AccountBalanceLow = 33] = "AccountBalanceLow", r[r.BillAmountNotStandard = 49] = "BillAmountNotStandard", r[r.CategorySpending = 50] = "CategorySpending", r[r.CreditCardCloseToLimit = 51] = "CreditCardCloseToLimit", r[r.DebtPaymentReminder = 37] = "DebtPaymentReminder", r[r.DuplicatePayment = 42] = "DuplicatePayment", r[r.MonthlySpendComparison = 53] = "MonthlySpendComparison", r[r.MonthlySpendToIncomeComparison = 54] = "MonthlySpendToIncomeComparison", r[r.MonthlySubscriptionAggregate = 55] = "MonthlySubscriptionAggregate", r[r.MonthlyTopMerchantSpending = 56] = "MonthlyTopMerchantSpending", r[r.SaveAnExtra100Dollars = 57] = "SaveAnExtra100Dollars", r[r.SavingsOpportunity = 58] = "SavingsOpportunity", r[r.SetUpDirectDeposit = 59] = "SetUpDirectDeposit", r[r.SwitchDirectDeposit = 60] = "SwitchDirectDeposit", r[r.UncategorizedTransactions = 61] = "UncategorizedTransactions", r[r.UnifiedDeposit = 62] = "UnifiedDeposit", r[r.UpcomingBill = 63] = "UpcomingBill", r[r.WeekendSpendingSummary = 64] = "WeekendSpendingSummary", r[r.WeeklyNewMerchants = 65] = "WeeklyNewMerchants", r[r.DiscoveredAccounts = 52] = "DiscoveredAccounts", r[r.TransactionExpenseLarge = 39] = "TransactionExpenseLarge", r[r.PromotionalCampaignMessages = 67] = "PromotionalCampaignMessages", r[r.TransparentOverdraft = 68] = "TransparentOverdraft", r))(A || {});
11
10
  const z = ({
12
11
  avatar: r,
13
12
  endIcon: a,
@@ -85,6 +84,7 @@ const z = ({
85
84
  )
86
85
  }
87
86
  );
87
+ var B = /* @__PURE__ */ ((r) => (r.Accounts = "accounts", r.Budgets = "budgets", r.Insights = "insights", r.Personal = "personal", r))(B || {}), P = /* @__PURE__ */ ((r) => (r[r.DebtPaymentReminder = 3] = "DebtPaymentReminder", r[r.AccountBalanceLow = 6] = "AccountBalanceLow", r[r.AccountDepositLarge = 7] = "AccountDepositLarge", r[r.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", r[r.TransactionFeeCharge = 9] = "TransactionFeeCharge", r[r.InternationalTransaction = 23] = "InternationalTransaction", r[r.AccountDepositLargePosted = 48] = "AccountDepositLargePosted", r))(P || {}), b = /* @__PURE__ */ ((r) => (r[r.BudgetExceeded = 1] = "BudgetExceeded", r[r.BudgetOffTarget = 2] = "BudgetOffTarget", r))(b || {}), A = /* @__PURE__ */ ((r) => (r[r.AccountBalanceLow = 33] = "AccountBalanceLow", r[r.BillAmountNotStandard = 49] = "BillAmountNotStandard", r[r.CategorySpending = 50] = "CategorySpending", r[r.CreditCardCloseToLimit = 51] = "CreditCardCloseToLimit", r[r.DebtPaymentReminder = 37] = "DebtPaymentReminder", r[r.DuplicatePayment = 42] = "DuplicatePayment", r[r.MonthlySpendComparison = 53] = "MonthlySpendComparison", r[r.MonthlySpendToIncomeComparison = 54] = "MonthlySpendToIncomeComparison", r[r.MonthlySubscriptionAggregate = 55] = "MonthlySubscriptionAggregate", r[r.MonthlyTopMerchantSpending = 56] = "MonthlyTopMerchantSpending", r[r.SaveAnExtra100Dollars = 57] = "SaveAnExtra100Dollars", r[r.SavingsOpportunity = 58] = "SavingsOpportunity", r[r.SetUpDirectDeposit = 59] = "SetUpDirectDeposit", r[r.SwitchDirectDeposit = 60] = "SwitchDirectDeposit", r[r.UncategorizedTransactions = 61] = "UncategorizedTransactions", r[r.UnifiedDeposit = 62] = "UnifiedDeposit", r[r.UpcomingBill = 63] = "UpcomingBill", r[r.WeekendSpendingSummary = 64] = "WeekendSpendingSummary", r[r.WeeklyNewMerchants = 65] = "WeeklyNewMerchants", r[r.DiscoveredAccounts = 52] = "DiscoveredAccounts", r[r.TransactionExpenseLarge = 39] = "TransactionExpenseLarge", r[r.PromotionalCampaignMessages = 67] = "PromotionalCampaignMessages", r[r.TransparentOverdraft = 68] = "TransparentOverdraft", r))(A || {});
88
88
  export {
89
89
  P as A,
90
90
  b as B,