@mx-cartographer/experiences 7.2.15-alpha.sms27 → 7.2.15-alpha.sms29
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.
- package/dist/{Account-vp_TAbGt.mjs → Account-D8_xcOve.mjs} +1 -1
- package/dist/{AccountDetailsContent-CoXcIoZf.mjs → AccountDetailsContent-BWNwFDe8.mjs} +8 -8
- package/dist/{AccountDetailsHeader-Df1JkzYi.mjs → AccountDetailsHeader-LjielyTa.mjs} +6 -6
- package/dist/{AccountFields-DUToRRqW.mjs → AccountFields-DtW_bYuN.mjs} +2 -2
- package/dist/{AccountListItem-CeY_WIpj.mjs → AccountListItem-BK0K0YlB.mjs} +4 -4
- package/dist/{AccountStore-BkoLK9Tq.mjs → AccountStore-BZ1CezOa.mjs} +2 -2
- package/dist/{Accounts-C1QxUB-e.mjs → Accounts-Bk0adkZI.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-DsFw1yw9.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-onIHfBx0.mjs} +1 -1
- package/dist/{ConnectDrawer-Bw5s6Dw1.mjs → ConnectDrawer-BMCNkK6D.mjs} +1 -1
- package/dist/{ConnectionsDrawer-BDvVuJQf.mjs → ConnectionsDrawer-BnVPJoTH.mjs} +2 -2
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-eEYKPrQ6.mjs} +1 -1
- package/dist/{DebtsStore-BD_XwsI7.mjs → DebtsStore-CIDWqL0A.mjs} +1 -1
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-C4RpczZk.mjs} +3 -3
- package/dist/{GoalStore-DZ_Jvsa_.mjs → GoalStore-CR2aOvb_.mjs} +2 -2
- package/dist/{Help-B6dIcujh.mjs → Help-Jwr6bbkP.mjs} +1 -1
- package/dist/{LineChart-D4GI7nVh.mjs → LineChart-CTpS4Y61.mjs} +1 -1
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-DTiJk1t_.mjs} +1 -1
- package/dist/{ManageIncome-uIZwg1-O.mjs → ManageIncome-AIbTCb_I.mjs} +4 -4
- package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-DNgaK0ak.mjs} +1 -1
- package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-BdOme5JY.mjs} +1 -1
- package/dist/{NetWorthStore-D1NiDUcc.mjs → NetWorthStore-BLyvqhEl.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-CYBJk9rF.mjs} +3 -3
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-C8aFD-xo.mjs} +3 -3
- package/dist/{RecurringSettings-6qo4-whb.mjs → RecurringSettings-BHrCHHHz.mjs} +3 -3
- package/dist/{TransactionDetails-dRfjqJ3s.mjs → TransactionDetails-8AR47aM0.mjs} +5 -5
- package/dist/{TransactionStore-CdycC8sN.mjs → TransactionStore-BwlO9c_x.mjs} +159 -175
- package/dist/{TrendsStore-DCYbpXPO.mjs → TrendsStore-CZ4g_NRT.mjs} +1 -1
- package/dist/{User-BQUxBeZV.mjs → User-DZI8rVQ6.mjs} +1 -1
- package/dist/{WidgetContainer-EbrN1oIo.mjs → WidgetContainer-u6xa7Lhc.mjs} +2 -2
- package/dist/accounts/index.es.js +13 -13
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/index.es.js +7 -7
- package/dist/categories/index.es.js +1 -1
- package/dist/common/context/GlobalDataProvider.d.ts +1 -0
- package/dist/common/index.es.js +49 -47
- package/dist/common/stores/GlobalStore.d.ts +7 -3
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +9 -9
- package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-BJCTuJjJ.mjs} +1 -1
- package/dist/finstrong/index.es.js +6 -6
- package/dist/goals/index.es.js +12 -12
- package/dist/help/index.es.js +3 -3
- package/dist/hooks-Ws5qcl3x.mjs +79 -0
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +8 -8
- package/dist/settings/index.es.js +6 -6
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/index.es.js +13 -13
- package/dist/transactions/stores/TransactionStore.d.ts +0 -3
- package/dist/trends/index.es.js +11 -11
- package/dist/{useAccountDisplayName-jS05A6-6.mjs → useAccountDisplayName-COInIZyb.mjs} +2 -2
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-DRKd0OV2.mjs} +1 -1
- package/package.json +1 -1
- package/dist/hooks-D6XlXHf4.mjs +0 -77
|
@@ -4,36 +4,36 @@ import U from "@mui/material/FormControlLabel";
|
|
|
4
4
|
import K from "@mui/material/Radio";
|
|
5
5
|
import V from "@mui/material/styles/useTheme";
|
|
6
6
|
import v from "@mui/material/Tooltip";
|
|
7
|
-
import { makeAutoObservable as y,
|
|
7
|
+
import { makeAutoObservable as y, runInAction as d } from "mobx";
|
|
8
8
|
import { endOfToday as D } from "date-fns/endOfToday";
|
|
9
|
-
import { formatISO as
|
|
10
|
-
import { fromUnixTime as
|
|
11
|
-
import { getUnixTime as
|
|
12
|
-
import { isBefore as
|
|
9
|
+
import { formatISO as B } from "date-fns/formatISO";
|
|
10
|
+
import { fromUnixTime as h } from "date-fns/fromUnixTime";
|
|
11
|
+
import { getUnixTime as u } from "date-fns/getUnixTime";
|
|
12
|
+
import { isBefore as Y } from "date-fns/isBefore";
|
|
13
13
|
import { startOfMonth as R } from "date-fns/startOfMonth";
|
|
14
14
|
import { startOfToday as b } from "date-fns/startOfToday";
|
|
15
|
-
import { subDays as
|
|
16
|
-
import { O as n, a as G, T as w } from "./User-
|
|
15
|
+
import { subDays as F } from "date-fns/subDays";
|
|
16
|
+
import { O as n, a as G, T as w } from "./User-DZI8rVQ6.mjs";
|
|
17
17
|
import { T as p } from "./TransactionApi-B3Tksf7L.mjs";
|
|
18
|
-
import { b as
|
|
19
|
-
import { f as
|
|
20
|
-
import { format as
|
|
21
|
-
import { f as g, D as O, O as
|
|
22
|
-
import { endOfMonth as
|
|
18
|
+
import { b as W } from "./Category-CevNQ03n.mjs";
|
|
19
|
+
import { f as z } from "./exportTransactionsToCSV-BJCTuJjJ.mjs";
|
|
20
|
+
import { format as k } from "date-fns/format";
|
|
21
|
+
import { f as g, D as O, O as $ } from "./Dialog-CWW597AF.mjs";
|
|
22
|
+
import { endOfMonth as X } from "date-fns/endOfMonth";
|
|
23
23
|
import { B as f } from "./BeatApi-DhJpgCLz.mjs";
|
|
24
|
-
const
|
|
25
|
-
checked:
|
|
24
|
+
const j = ({
|
|
25
|
+
checked: S = !1,
|
|
26
26
|
label: t,
|
|
27
27
|
sx: a = {},
|
|
28
28
|
tooltip: e = "",
|
|
29
29
|
value: c
|
|
30
30
|
}) => {
|
|
31
|
-
const _ = V(),
|
|
31
|
+
const _ = V(), i = _.palette.mode === "light" ? _.palette.grey[400] : _.palette.grey[700], A = S ? _.palette.action.active : i;
|
|
32
32
|
return /* @__PURE__ */ C(
|
|
33
33
|
P,
|
|
34
34
|
{
|
|
35
35
|
bgcolor: "background.paper",
|
|
36
|
-
border: `${
|
|
36
|
+
border: `${S ? 3 : 1}px solid`,
|
|
37
37
|
borderColor: A,
|
|
38
38
|
borderRadius: 2,
|
|
39
39
|
mt: -2,
|
|
@@ -59,7 +59,7 @@ const Z = ({
|
|
|
59
59
|
) })
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
},
|
|
62
|
+
}, ft = j, x = {
|
|
63
63
|
ASC: "ASC",
|
|
64
64
|
DESC: "DESC",
|
|
65
65
|
DIRECTION: {
|
|
@@ -71,7 +71,7 @@ const Z = ({
|
|
|
71
71
|
left: "flex-start",
|
|
72
72
|
right: "flex-end"
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, T = {
|
|
75
75
|
ADD: "Add",
|
|
76
76
|
ADD_CATEGORY: "Add Category",
|
|
77
77
|
CHANGE_CATEGORY: "Change Category",
|
|
@@ -85,7 +85,7 @@ const Z = ({
|
|
|
85
85
|
SELECT: "Select",
|
|
86
86
|
UNHIDE: "Unhide",
|
|
87
87
|
UNSPLIT: "Unsplit"
|
|
88
|
-
},
|
|
88
|
+
}, o = {
|
|
89
89
|
TRANSACTION_DETAILS: "Transaction Details",
|
|
90
90
|
TRANSACTIONS_LIST: "Transactions List",
|
|
91
91
|
TRANSACTIONS_WIDGET: "Transactions Widget"
|
|
@@ -111,227 +111,227 @@ const Z = ({
|
|
|
111
111
|
}, m = {
|
|
112
112
|
// splits
|
|
113
113
|
[n.ON_TRANSACTION_SPLIT_CLICK]: {
|
|
114
|
-
action:
|
|
115
|
-
category:
|
|
114
|
+
action: T.SELECT,
|
|
115
|
+
category: o.TRANSACTION_DETAILS,
|
|
116
116
|
label: r.SPLITS
|
|
117
117
|
},
|
|
118
118
|
[n.ON_TRANSACTION_SPLIT_CATEGORY_CLICK]: {
|
|
119
|
-
action:
|
|
120
|
-
category:
|
|
119
|
+
action: T.ADD_CATEGORY,
|
|
120
|
+
category: o.TRANSACTION_DETAILS,
|
|
121
121
|
label: r.SPLITS
|
|
122
122
|
},
|
|
123
123
|
[n.ON_TRANSACTION_SPLIT_DELETE_CLICK]: {
|
|
124
|
-
action:
|
|
125
|
-
category:
|
|
124
|
+
action: T.DELETE,
|
|
125
|
+
category: o.TRANSACTION_DETAILS,
|
|
126
126
|
label: r.SPLITS
|
|
127
127
|
},
|
|
128
128
|
[n.ON_TRANSACTION_SPLIT_SAVE_CLICK]: {
|
|
129
|
-
action:
|
|
130
|
-
category:
|
|
129
|
+
action: T.SPLIT,
|
|
130
|
+
category: o.TRANSACTION_DETAILS,
|
|
131
131
|
label: r.SPLITS
|
|
132
132
|
},
|
|
133
133
|
[n.ON_TRANSACTION_UNSPLIT]: {
|
|
134
|
-
action:
|
|
135
|
-
category:
|
|
134
|
+
action: T.UNSPLIT,
|
|
135
|
+
category: o.TRANSACTION_DETAILS,
|
|
136
136
|
label: r.SPLITS
|
|
137
137
|
},
|
|
138
138
|
// category
|
|
139
139
|
[n.ON_TRANSACTION_CATEGORY_CLICK]: {
|
|
140
|
-
action:
|
|
141
|
-
category:
|
|
140
|
+
action: T.SELECT,
|
|
141
|
+
category: o.TRANSACTIONS_LIST,
|
|
142
142
|
label: r.CATEGORY
|
|
143
143
|
},
|
|
144
144
|
[n.ON_TRANSACTION_CATEGORY_CHANGED]: {
|
|
145
|
-
action:
|
|
146
|
-
category:
|
|
145
|
+
action: T.CHANGE_CATEGORY,
|
|
146
|
+
category: o.TRANSACTION_DETAILS,
|
|
147
147
|
label: r.CATEGORY
|
|
148
148
|
},
|
|
149
149
|
// date
|
|
150
150
|
[n.ON_TRANSACTION_DATE_CHANGED]: {
|
|
151
|
-
action:
|
|
152
|
-
category:
|
|
151
|
+
action: T.SAVE,
|
|
152
|
+
category: o.TRANSACTION_DETAILS,
|
|
153
153
|
label: r.DATE
|
|
154
154
|
},
|
|
155
155
|
[n.ON_TRANSACTION_DATE_CLICK]: {
|
|
156
|
-
action:
|
|
157
|
-
category:
|
|
156
|
+
action: T.SELECT,
|
|
157
|
+
category: o.TRANSACTION_DETAILS,
|
|
158
158
|
label: r.DATE
|
|
159
159
|
},
|
|
160
160
|
// merchant logo
|
|
161
161
|
[n.ON_TRANSACTION_DELETE_LOGO_CANCEL]: {
|
|
162
|
-
action:
|
|
163
|
-
category:
|
|
162
|
+
action: T.CLOSE,
|
|
163
|
+
category: o.TRANSACTION_DETAILS,
|
|
164
164
|
label: r.DELETE_MERCHANT_LOGO
|
|
165
165
|
},
|
|
166
166
|
[n.ON_TRANSACTION_DELETE_LOGO_CLICK]: {
|
|
167
|
-
action:
|
|
168
|
-
category:
|
|
167
|
+
action: T.SELECT,
|
|
168
|
+
category: o.TRANSACTION_DETAILS,
|
|
169
169
|
label: r.DELETE_MERCHANT_LOGO
|
|
170
170
|
},
|
|
171
171
|
[n.ON_TRANSACTION_DELETE_LOGO_DELETED]: {
|
|
172
|
-
action:
|
|
173
|
-
category:
|
|
172
|
+
action: T.DELETE,
|
|
173
|
+
category: o.TRANSACTION_DETAILS,
|
|
174
174
|
label: r.DELETE_MERCHANT_LOGO
|
|
175
175
|
},
|
|
176
176
|
// description
|
|
177
177
|
[n.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK]: {
|
|
178
|
-
action:
|
|
179
|
-
category:
|
|
178
|
+
action: T.EDIT,
|
|
179
|
+
category: o.TRANSACTION_DETAILS,
|
|
180
180
|
label: r.DESCRIPTION
|
|
181
181
|
},
|
|
182
182
|
[n.ON_TRANSACTION_DESCRIPTION_SAVE_CLICK]: {
|
|
183
|
-
action:
|
|
184
|
-
category:
|
|
183
|
+
action: T.SAVE,
|
|
184
|
+
category: o.TRANSACTION_DETAILS,
|
|
185
185
|
label: r.DESCRIPTION
|
|
186
186
|
},
|
|
187
187
|
// hide transactions
|
|
188
188
|
[n.ON_TRANSACTION_HIDDEN]: {
|
|
189
|
-
action:
|
|
190
|
-
category:
|
|
189
|
+
action: T.SAVE,
|
|
190
|
+
category: o.TRANSACTION_DETAILS,
|
|
191
191
|
label: r.HIDE_TRANSACTION
|
|
192
192
|
},
|
|
193
193
|
[n.ON_TRANSACTION_HIDE_CLICK]: {
|
|
194
|
-
action:
|
|
195
|
-
category:
|
|
194
|
+
action: T.SELECT,
|
|
195
|
+
category: o.TRANSACTION_DETAILS,
|
|
196
196
|
label: r.HIDE_TRANSACTION
|
|
197
197
|
},
|
|
198
198
|
[n.ON_TRANSACTION_HIDE_CANCEL_CLICK]: {
|
|
199
|
-
action:
|
|
200
|
-
category:
|
|
199
|
+
action: T.CLOSE,
|
|
200
|
+
category: o.TRANSACTION_DETAILS,
|
|
201
201
|
label: r.HIDE_TRANSACTION
|
|
202
202
|
},
|
|
203
203
|
// transaction list
|
|
204
204
|
[n.ON_TRANSACTION_LIST_ITEM_CLICK]: {
|
|
205
|
-
action:
|
|
206
|
-
category:
|
|
205
|
+
action: T.SELECT,
|
|
206
|
+
category: o.TRANSACTIONS_LIST,
|
|
207
207
|
label: r.TRANSACTION
|
|
208
208
|
},
|
|
209
209
|
// memo
|
|
210
210
|
[n.ON_TRANSACTION_MEMO_CHANGED]: {
|
|
211
|
-
action:
|
|
212
|
-
category:
|
|
211
|
+
action: T.SAVE,
|
|
212
|
+
category: o.TRANSACTION_DETAILS,
|
|
213
213
|
label: r.MEMO
|
|
214
214
|
},
|
|
215
215
|
[n.ON_TRANSACTION_MEMO_CLICK]: {
|
|
216
|
-
action:
|
|
217
|
-
category:
|
|
216
|
+
action: T.SELECT,
|
|
217
|
+
category: o.TRANSACTION_DETAILS,
|
|
218
218
|
label: r.MEMO
|
|
219
219
|
},
|
|
220
220
|
// tags
|
|
221
221
|
[n.ON_TRANSACTION_TAGS_CHANGED]: {
|
|
222
|
-
action:
|
|
223
|
-
category:
|
|
222
|
+
action: T.SAVE,
|
|
223
|
+
category: o.TRANSACTION_DETAILS,
|
|
224
224
|
label: r.TAGS
|
|
225
225
|
},
|
|
226
226
|
[n.ON_TRANSACTION_TAGS_CLICK]: {
|
|
227
|
-
action:
|
|
228
|
-
category:
|
|
227
|
+
action: T.SELECT,
|
|
228
|
+
category: o.TRANSACTION_DETAILS,
|
|
229
229
|
label: r.TAGS
|
|
230
230
|
},
|
|
231
231
|
[n.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK]: {
|
|
232
|
-
action:
|
|
233
|
-
category:
|
|
232
|
+
action: T.CLOSE,
|
|
233
|
+
category: o.TRANSACTION_DETAILS,
|
|
234
234
|
label: r.TAGS
|
|
235
235
|
},
|
|
236
236
|
[n.ON_TRANSACTION_TAGS_TAG_ADD_CLICK]: {
|
|
237
|
-
action:
|
|
238
|
-
category:
|
|
237
|
+
action: T.ADD,
|
|
238
|
+
category: o.TRANSACTION_DETAILS,
|
|
239
239
|
label: r.TAG_ADD
|
|
240
240
|
},
|
|
241
241
|
[n.ON_TRANSACTION_TAGS_TAG_ADDED]: {
|
|
242
|
-
action:
|
|
243
|
-
category:
|
|
242
|
+
action: T.SAVE,
|
|
243
|
+
category: o.TRANSACTION_DETAILS,
|
|
244
244
|
label: r.TAG_ADD
|
|
245
245
|
},
|
|
246
246
|
[n.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK]: {
|
|
247
|
-
action:
|
|
248
|
-
category:
|
|
247
|
+
action: T.SELECT,
|
|
248
|
+
category: o.TRANSACTION_DETAILS,
|
|
249
249
|
label: r.TAG_DELETE
|
|
250
250
|
},
|
|
251
251
|
[n.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK]: {
|
|
252
|
-
action:
|
|
253
|
-
category:
|
|
252
|
+
action: T.CLOSE,
|
|
253
|
+
category: o.TRANSACTION_DETAILS,
|
|
254
254
|
label: r.TAG_DELETE
|
|
255
255
|
},
|
|
256
256
|
[n.ON_TRANSACTION_TAGS_TAG_DELETED]: {
|
|
257
|
-
action:
|
|
258
|
-
category:
|
|
257
|
+
action: T.SAVE,
|
|
258
|
+
category: o.TRANSACTION_DETAILS,
|
|
259
259
|
label: r.TAG_DELETE
|
|
260
260
|
},
|
|
261
261
|
[n.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK]: {
|
|
262
|
-
action:
|
|
263
|
-
category:
|
|
262
|
+
action: T.EDIT,
|
|
263
|
+
category: o.TRANSACTION_DETAILS,
|
|
264
264
|
label: r.TAG_EDIT
|
|
265
265
|
},
|
|
266
266
|
[n.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED]: {
|
|
267
|
-
action:
|
|
268
|
-
category:
|
|
267
|
+
action: T.SAVE,
|
|
268
|
+
category: o.TRANSACTION_DETAILS,
|
|
269
269
|
label: r.TAG_EDIT
|
|
270
270
|
},
|
|
271
271
|
// flag
|
|
272
272
|
[n.ON_TRANSACTION_TOGGLE_FLAG_CLICK]: {
|
|
273
|
-
action:
|
|
274
|
-
category:
|
|
273
|
+
action: T.SELECT,
|
|
274
|
+
category: o.TRANSACTION_DETAILS,
|
|
275
275
|
label: r.FLAG
|
|
276
276
|
},
|
|
277
277
|
// hide
|
|
278
278
|
[n.ON_TRANSACTION_UNHIDDEN]: {
|
|
279
|
-
action:
|
|
280
|
-
category:
|
|
279
|
+
action: T.SAVE,
|
|
280
|
+
category: o.TRANSACTION_DETAILS,
|
|
281
281
|
label: r.UNHIDE_TRANSACTION
|
|
282
282
|
},
|
|
283
283
|
[n.ON_TRANSACTION_UNHIDE_CLICK]: {
|
|
284
|
-
action:
|
|
285
|
-
category:
|
|
284
|
+
action: T.SELECT,
|
|
285
|
+
category: o.TRANSACTION_DETAILS,
|
|
286
286
|
label: r.UNHIDE_TRANSACTION
|
|
287
287
|
},
|
|
288
288
|
[n.ON_TRANSACTION_UNHIDE_CANCEL_CLICK]: {
|
|
289
|
-
action:
|
|
290
|
-
category:
|
|
289
|
+
action: T.CLOSE,
|
|
290
|
+
category: o.TRANSACTION_DETAILS,
|
|
291
291
|
label: r.UNHIDE_TRANSACTION
|
|
292
292
|
},
|
|
293
293
|
// export CSV
|
|
294
294
|
[n.ON_TRANSACTION_EXPORT_CSV_CLICK]: {
|
|
295
|
-
action:
|
|
296
|
-
category:
|
|
295
|
+
action: T.SELECT,
|
|
296
|
+
category: o.TRANSACTIONS_WIDGET,
|
|
297
297
|
label: r.EXPORT_CSV
|
|
298
298
|
},
|
|
299
299
|
// add transaction
|
|
300
300
|
[n.ON_TRANSACTION_MANUAL_ADD_CLICK]: {
|
|
301
|
-
action:
|
|
302
|
-
category:
|
|
301
|
+
action: T.SELECT,
|
|
302
|
+
category: o.TRANSACTIONS_WIDGET,
|
|
303
303
|
label: r.ADD_TRANSACTION
|
|
304
304
|
},
|
|
305
305
|
[n.ON_TRANSACTION_MANUAL_ADD_ADDED]: {
|
|
306
|
-
action:
|
|
307
|
-
category:
|
|
306
|
+
action: T.ADD,
|
|
307
|
+
category: o.TRANSACTIONS_WIDGET,
|
|
308
308
|
label: r.ADD_TRANSACTION
|
|
309
309
|
},
|
|
310
310
|
[n.ON_TRANSACTION_DELETE_CLICK]: {
|
|
311
|
-
action:
|
|
312
|
-
category:
|
|
311
|
+
action: T.SELECT,
|
|
312
|
+
category: o.TRANSACTIONS_WIDGET,
|
|
313
313
|
label: r.DELETE_TRANSACTION
|
|
314
314
|
},
|
|
315
315
|
[n.ON_TRANSACTION_DELETE_CANCEL]: {
|
|
316
|
-
action:
|
|
317
|
-
category:
|
|
316
|
+
action: T.CLOSE,
|
|
317
|
+
category: o.TRANSACTIONS_WIDGET,
|
|
318
318
|
label: r.DELETE_TRANSACTION
|
|
319
319
|
},
|
|
320
320
|
[n.ON_TRANSACTION_DELETE_DELETED]: {
|
|
321
|
-
action:
|
|
322
|
-
category:
|
|
321
|
+
action: T.DELETE,
|
|
322
|
+
category: o.TRANSACTIONS_WIDGET,
|
|
323
323
|
label: r.DELETE_TRANSACTION
|
|
324
324
|
}
|
|
325
|
-
},
|
|
325
|
+
}, Z = async (S, t) => !t || !m[S] ? null : t.sendAnalyticEvent(m[S]), L = {
|
|
326
326
|
FLAG: "flag",
|
|
327
327
|
DATE: "date",
|
|
328
328
|
PAYEE: "payee",
|
|
329
329
|
CATEGORY: "category",
|
|
330
330
|
ACCOUNT: "account",
|
|
331
331
|
AMOUNT: "amount"
|
|
332
|
-
},
|
|
333
|
-
const c = t.reduce((A,
|
|
334
|
-
const { transaction_guid: N, tag_guid: I } =
|
|
332
|
+
}, q = (S, t, a, e = []) => {
|
|
333
|
+
const c = t.reduce((A, s) => ({ ...A, [s.guid]: s }), {}), _ = a.reduce((A, s) => ({ ...A, [s.guid]: s }), {}), i = e.reduce((A, s) => {
|
|
334
|
+
const { transaction_guid: N, tag_guid: I } = s;
|
|
335
335
|
if (!A[N])
|
|
336
336
|
return {
|
|
337
337
|
...A,
|
|
@@ -343,53 +343,53 @@ const Z = ({
|
|
|
343
343
|
[N]: E
|
|
344
344
|
};
|
|
345
345
|
}, {});
|
|
346
|
-
return
|
|
347
|
-
const
|
|
346
|
+
return S.map((A) => {
|
|
347
|
+
const s = c[A.account_guid], N = A.category_guid ? _[A.category_guid] : null, I = i[A.guid] ?? [];
|
|
348
348
|
return {
|
|
349
349
|
...A,
|
|
350
|
-
account:
|
|
351
|
-
accountIsClosed:
|
|
352
|
-
accountIsHidden:
|
|
350
|
+
account: s?.user_name || "Unknown",
|
|
351
|
+
accountIsClosed: s?.is_closed,
|
|
352
|
+
accountIsHidden: s?.is_hidden,
|
|
353
353
|
category: N?.name || "Uncategorized",
|
|
354
|
-
isIncome: A.top_level_category_guid ===
|
|
354
|
+
isIncome: A.top_level_category_guid === W.INCOME,
|
|
355
355
|
isPending: A.feed_status === G.PENDING,
|
|
356
|
-
number:
|
|
356
|
+
number: s?.account_number || "",
|
|
357
357
|
payee: A.description,
|
|
358
358
|
tags: I
|
|
359
359
|
};
|
|
360
360
|
});
|
|
361
|
-
},
|
|
362
|
-
const
|
|
363
|
-
return t.forEach((
|
|
364
|
-
const N = A.findIndex((E) => E.guid ===
|
|
361
|
+
}, J = "uncategorized", Q = (S, t, a, e, c, _) => {
|
|
362
|
+
const i = tt(S, c, _), A = at(i, a, e);
|
|
363
|
+
return t.forEach((s) => {
|
|
364
|
+
const N = A.findIndex((E) => E.guid === s), I = _.filter((E) => E.parent_guid === s);
|
|
365
365
|
A.splice(N + 1, 0, ...I);
|
|
366
366
|
}), A;
|
|
367
|
-
},
|
|
367
|
+
}, tt = (S, t, a) => {
|
|
368
368
|
const {
|
|
369
369
|
accounts: e = [],
|
|
370
370
|
dateRange: c = { start: R(b()), end: D() },
|
|
371
371
|
custom: _ = () => !0,
|
|
372
|
-
searchTerm:
|
|
372
|
+
searchTerm: i = "",
|
|
373
373
|
showSplits: A = !1
|
|
374
|
-
} =
|
|
375
|
-
return a.filter((
|
|
376
|
-
if (
|
|
374
|
+
} = S;
|
|
375
|
+
return a.filter((s) => A ? !s.has_been_split : !s.parent_guid).filter((s) => !!e.find((N) => N === s.account_guid)).filter((s) => s.date >= u(c.start) && s.date <= u(c.end)).filter(_).filter((s) => {
|
|
376
|
+
if (i === J && s.has_been_split)
|
|
377
377
|
return !1;
|
|
378
|
-
if (/^spl/i.test(
|
|
378
|
+
if (/^spl/i.test(i) && (s.has_been_split || s.parent_guid))
|
|
379
379
|
return !0;
|
|
380
|
-
const I =
|
|
381
|
-
(M) =>
|
|
382
|
-
), E =
|
|
383
|
-
return
|
|
380
|
+
const I = s.tags.some(
|
|
381
|
+
(M) => l(i, t.find((H) => H.guid === M)?.name)
|
|
382
|
+
), E = h(s.date);
|
|
383
|
+
return l(i, s.payee) || l(i, s.feed_description) || l(i, s.category) || l(i, g(E, O.MONTH)) || l(i, g(E, O.DAY)) || l(i, g(E, O.FULL_MONTH_DAY)) || l(i, g(E, O.MONTH_DAY_YEAR)) || l(i, k(E, $)) || l(i, s.account) || l(i, `${s.amount}`) || l(i, s.memo) || I;
|
|
384
384
|
});
|
|
385
|
-
},
|
|
386
|
-
const _ = t,
|
|
387
|
-
let A =
|
|
388
|
-
return (t === L.DATE || t === L.AMOUNT) && (A =
|
|
389
|
-
}),
|
|
390
|
-
const a =
|
|
385
|
+
}, at = (S, t, a) => [...S].sort((e, c) => {
|
|
386
|
+
const _ = t, i = (e[_] || "") > (c[_] || "");
|
|
387
|
+
let A = i ? -1 : 1, s = i ? 1 : -1;
|
|
388
|
+
return (t === L.DATE || t === L.AMOUNT) && (A = i ? 1 : -1, s = i ? -1 : 1), a === x.ASC ? A : s;
|
|
389
|
+
}), l = (S, t) => {
|
|
390
|
+
const a = S.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
|
|
391
391
|
return a.every((c) => e.indexOf(c) > -1);
|
|
392
|
-
},
|
|
392
|
+
}, et = {
|
|
393
393
|
account_guid: "",
|
|
394
394
|
amount: 0,
|
|
395
395
|
currency_code: "",
|
|
@@ -420,7 +420,7 @@ const Z = ({
|
|
|
420
420
|
};
|
|
421
421
|
class it {
|
|
422
422
|
beginDate = R(/* @__PURE__ */ new Date());
|
|
423
|
-
endDate =
|
|
423
|
+
endDate = X(/* @__PURE__ */ new Date());
|
|
424
424
|
expandedSplits = [];
|
|
425
425
|
isInitialized = !1;
|
|
426
426
|
height = 550;
|
|
@@ -428,7 +428,7 @@ class it {
|
|
|
428
428
|
shouldDisableDrawerScroll = !1;
|
|
429
429
|
searchValue = "";
|
|
430
430
|
selectedAccountGuids = [];
|
|
431
|
-
manualTransaction =
|
|
431
|
+
manualTransaction = et;
|
|
432
432
|
isAmountValid = !1;
|
|
433
433
|
showInsights = !1;
|
|
434
434
|
constructor() {
|
|
@@ -459,13 +459,13 @@ class it {
|
|
|
459
459
|
this.manualTransaction = t;
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
|
-
class
|
|
462
|
+
class mt {
|
|
463
463
|
globalStore;
|
|
464
464
|
uiStore;
|
|
465
465
|
api = new p("/", "");
|
|
466
466
|
beatApi = new f("/", "");
|
|
467
467
|
associatedBeats = [];
|
|
468
|
-
cachedStartDate =
|
|
468
|
+
cachedStartDate = F(b(), 90);
|
|
469
469
|
filter = {};
|
|
470
470
|
isLoading = !0;
|
|
471
471
|
rawTransactions = [];
|
|
@@ -475,21 +475,13 @@ class yt {
|
|
|
475
475
|
tags = [];
|
|
476
476
|
transactionRules = [];
|
|
477
477
|
listeners = [];
|
|
478
|
-
onAnalyticEvent =
|
|
478
|
+
onAnalyticEvent = Z;
|
|
479
479
|
constructor(t) {
|
|
480
480
|
this.globalStore = t, this.uiStore = new it(), this.api = new p(
|
|
481
481
|
t.endpoint,
|
|
482
482
|
t.sessionToken,
|
|
483
483
|
t.onError
|
|
484
|
-
), this.beatApi = new f(t.endpoint, t.sessionToken, t.onError), y(this)
|
|
485
|
-
const a = this.transactions, e = this.associatedBeats, c = this.taggings, _ = this.tags;
|
|
486
|
-
return this.emitChange(), {
|
|
487
|
-
transactions: a,
|
|
488
|
-
associatedBeats: e,
|
|
489
|
-
taggings: c,
|
|
490
|
-
tags: _
|
|
491
|
-
};
|
|
492
|
-
});
|
|
484
|
+
), this.beatApi = new f(t.endpoint, t.sessionToken, t.onError), y(this);
|
|
493
485
|
}
|
|
494
486
|
loadTransactionData = async ({
|
|
495
487
|
associatedBeats: t,
|
|
@@ -507,16 +499,8 @@ class yt {
|
|
|
507
499
|
this.uiStore.setIsInitialized(!0);
|
|
508
500
|
});
|
|
509
501
|
};
|
|
510
|
-
subscribe = (t) => (this.listeners = [...this.listeners, t], () => {
|
|
511
|
-
this.listeners = this.listeners.filter((a) => a !== t);
|
|
512
|
-
});
|
|
513
|
-
getTransactionsSnapshot = () => this.transactions;
|
|
514
|
-
emitChange = () => {
|
|
515
|
-
for (const t of this.listeners)
|
|
516
|
-
t();
|
|
517
|
-
};
|
|
518
502
|
get sortedTransactions() {
|
|
519
|
-
return
|
|
503
|
+
return Q(
|
|
520
504
|
this.filter,
|
|
521
505
|
this.uiStore.expandedSplits,
|
|
522
506
|
this.sortColumn,
|
|
@@ -526,7 +510,7 @@ class yt {
|
|
|
526
510
|
);
|
|
527
511
|
}
|
|
528
512
|
get sortedTransactionsWithSplits() {
|
|
529
|
-
return
|
|
513
|
+
return z(this.sortedTransactions, this.transactions);
|
|
530
514
|
}
|
|
531
515
|
get transactions() {
|
|
532
516
|
return this.augmentTransactions(this.rawTransactions);
|
|
@@ -562,7 +546,7 @@ class yt {
|
|
|
562
546
|
this.globalStore.accountStore.updateAccountBalance(a.account_guid, e);
|
|
563
547
|
}
|
|
564
548
|
};
|
|
565
|
-
augmentTransactions = (t) =>
|
|
549
|
+
augmentTransactions = (t) => q(
|
|
566
550
|
t,
|
|
567
551
|
this.globalStore.accountStore.visibleAccounts,
|
|
568
552
|
this.globalStore.categoryStore.categories,
|
|
@@ -570,7 +554,7 @@ class yt {
|
|
|
570
554
|
);
|
|
571
555
|
getTransactionData = () => ({});
|
|
572
556
|
loadAssociatedBeats = async (t, a) => {
|
|
573
|
-
const e = t ?
|
|
557
|
+
const e = t ? B(t, { representation: "date" }) : void 0, c = a ?? await this.beatApi.getBeatsWithAssociatedTransaction(e);
|
|
574
558
|
d(() => this.associatedBeats = c);
|
|
575
559
|
};
|
|
576
560
|
loadTags = async () => {
|
|
@@ -588,7 +572,7 @@ class yt {
|
|
|
588
572
|
loadTransactions = async (t = this.cachedStartDate, a = D(), e) => {
|
|
589
573
|
this.setIsLoading(!0), this.rawTransactions = [];
|
|
590
574
|
try {
|
|
591
|
-
const c = e ?? await this.api.getTransactionsByDateRange(
|
|
575
|
+
const c = e ?? await this.api.getTransactionsByDateRange(u(t), u(a));
|
|
592
576
|
d(() => {
|
|
593
577
|
this.rawTransactions = c;
|
|
594
578
|
});
|
|
@@ -601,7 +585,7 @@ class yt {
|
|
|
601
585
|
loadTransactionsByDateRange = async (t, a) => {
|
|
602
586
|
console.warn("DEPRECATED: loadTransactionsByDateRange will be removed"), this.setFilter({
|
|
603
587
|
...this.filter,
|
|
604
|
-
dateRange: { start:
|
|
588
|
+
dateRange: { start: h(a), end: h(t) }
|
|
605
589
|
});
|
|
606
590
|
};
|
|
607
591
|
modifyTransactionByAccountGuid = (t, a) => {
|
|
@@ -624,7 +608,7 @@ class yt {
|
|
|
624
608
|
}
|
|
625
609
|
};
|
|
626
610
|
setFilter = (t) => {
|
|
627
|
-
this.filter = t, t.dateRange &&
|
|
611
|
+
this.filter = t, t.dateRange && Y(t.dateRange.start, this.cachedStartDate) && this.loadTransactions(t.dateRange.start, D()).then(() => {
|
|
628
612
|
t.dateRange && (this.cachedStartDate = t.dateRange.start);
|
|
629
613
|
});
|
|
630
614
|
};
|
|
@@ -634,11 +618,11 @@ class yt {
|
|
|
634
618
|
};
|
|
635
619
|
splitTransaction = async (t, a) => {
|
|
636
620
|
const e = await this.api.updateTransaction(t), c = [];
|
|
637
|
-
for (let
|
|
638
|
-
const A = await this.api.addTransaction(a[
|
|
621
|
+
for (let i = 0; i < a.length; i++) {
|
|
622
|
+
const A = await this.api.addTransaction(a[i]);
|
|
639
623
|
c.push(A);
|
|
640
624
|
}
|
|
641
|
-
const _ = this.transactions.findIndex((
|
|
625
|
+
const _ = this.transactions.findIndex((i) => i.guid === t.guid);
|
|
642
626
|
_ >= 0 && d(
|
|
643
627
|
() => this.rawTransactions = [
|
|
644
628
|
...this.transactions.slice(0, _),
|
|
@@ -649,14 +633,14 @@ class yt {
|
|
|
649
633
|
);
|
|
650
634
|
};
|
|
651
635
|
unSplitTransaction = async (t) => {
|
|
652
|
-
const a = this.transactions.filter((
|
|
636
|
+
const a = this.transactions.filter((i) => i.parent_guid === t);
|
|
653
637
|
await this.api.removeTransactionSplit(t);
|
|
654
638
|
const e = [...this.transactions];
|
|
655
|
-
a.forEach((
|
|
656
|
-
const A = e.findIndex((
|
|
639
|
+
a.forEach((i) => {
|
|
640
|
+
const A = e.findIndex((s) => s.guid === i.guid);
|
|
657
641
|
A >= 0 && e.splice(A, 1);
|
|
658
642
|
});
|
|
659
|
-
const c = e.findIndex((
|
|
643
|
+
const c = e.findIndex((i) => i.guid === t), _ = e[c];
|
|
660
644
|
_.has_been_split = !1, c >= 0 && d(
|
|
661
645
|
() => this.rawTransactions = [
|
|
662
646
|
...e.slice(0, c),
|
|
@@ -666,11 +650,11 @@ class yt {
|
|
|
666
650
|
);
|
|
667
651
|
};
|
|
668
652
|
updateTaggings = async (t, a) => {
|
|
669
|
-
const e = this.taggings.filter((
|
|
670
|
-
for (const
|
|
671
|
-
c.has(
|
|
672
|
-
for (const
|
|
673
|
-
_.has(
|
|
653
|
+
const e = this.taggings.filter((i) => i.transaction_guid === a), c = new Set(e.map((i) => i.tag_guid)), _ = new Set(t);
|
|
654
|
+
for (const i of t)
|
|
655
|
+
c.has(i) || await this.addTagging(i, a);
|
|
656
|
+
for (const i of e)
|
|
657
|
+
_.has(i.tag_guid) || await this.removeTagging(i.guid);
|
|
674
658
|
await this.loadTaggings();
|
|
675
659
|
};
|
|
676
660
|
updateTag = async (t) => {
|
|
@@ -688,7 +672,7 @@ class yt {
|
|
|
688
672
|
};
|
|
689
673
|
}
|
|
690
674
|
export {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
675
|
+
et as D,
|
|
676
|
+
ft as S,
|
|
677
|
+
mt as T
|
|
694
678
|
};
|
|
@@ -12,7 +12,7 @@ import Dt from "@mui/material/CardContent";
|
|
|
12
12
|
import P from "@mui/material/Divider";
|
|
13
13
|
import X from "@mui/material/Grid";
|
|
14
14
|
import { CategoryIcon as At, Text as S } from "@mxenabled/mxui";
|
|
15
|
-
import { u as Lt, m as Q } from "./hooks-
|
|
15
|
+
import { u as Lt, m as Q } from "./hooks-Ws5qcl3x.mjs";
|
|
16
16
|
import { b as Rt } from "./Localization-2MODESHW.mjs";
|
|
17
17
|
import { C as O } from "./CurrencyText-kyC1aseI.mjs";
|
|
18
18
|
import { useTheme as wt, Card as Ht, CardContent as It, Box as kt } from "@mui/material";
|