@mx-cartographer/experiences 7.0.23-alpha.al1 → 7.0.23-alpha.al10

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 (58) hide show
  1. package/dist/{Account-BW3-oYEs.mjs → Account-CVVDlNDC.mjs} +1 -1
  2. package/dist/{AccountDetailsContent-UxSEMBo_.mjs → AccountDetailsContent-bQKVSCZF.mjs} +8 -8
  3. package/dist/{AccountDetailsHeader-Eb3WvBGm.mjs → AccountDetailsHeader-BGQAu0Xm.mjs} +8 -8
  4. package/dist/{AccountFields-CIz-r3gP.mjs → AccountFields-CC7kzfPK.mjs} +2 -2
  5. package/dist/{AccountListItem-B-ZjJ4Gp.mjs → AccountListItem-wgvQjLxW.mjs} +3 -3
  6. package/dist/{AccountStore-BaMynkQT.mjs → AccountStore-DpglOysH.mjs} +19 -19
  7. package/dist/{Accounts-CA-nqAjT.mjs → Accounts-ByViymVi.mjs} +1 -1
  8. package/dist/{BudgetUtil-CeSLAcsl.mjs → BudgetUtil-gzgNEDE7.mjs} +1 -1
  9. package/dist/{CategorySelectorDrawer-BJ9jlCyt.mjs → CategorySelectorDrawer-LpZcwQPa.mjs} +4 -4
  10. package/dist/{ConnectDrawer-phFH6OHt.mjs → ConnectDrawer-C2minBK_.mjs} +1 -1
  11. package/dist/{ConnectionsDrawer-ihxkAi1P.mjs → ConnectionsDrawer-Cd4dZuWL.mjs} +2 -2
  12. package/dist/{CurrencyInput-bEx2Mbd0.mjs → CurrencyInput-Dz4r9Rfe.mjs} +1 -1
  13. package/dist/{DebtsStore-VkyMADzd.mjs → DebtsStore-B51DTXVj.mjs} +1 -1
  14. package/dist/{GoalStore-eSOkI6uE.mjs → GoalStore-DqQ2FMx5.mjs} +2 -2
  15. package/dist/{Help-KAAMEubC.mjs → Help-DVPbIxMM.mjs} +1 -1
  16. package/dist/{LineChart-BWWmmJxV.mjs → LineChart-DLk-bww5.mjs} +1 -1
  17. package/dist/{ListItemAction-DNZZ5fSa.mjs → ListItemAction-DE6S0N5o.mjs} +1 -1
  18. package/dist/{ManageIncome-DbsiKUoO.mjs → ManageIncome-BokhnWOn.mjs} +4 -4
  19. package/dist/{MicroWidgetContainer-Dxz8uBN9.mjs → MicroWidgetContainer-5YscP1xa.mjs} +1 -1
  20. package/dist/{MiniWidgetContainer-CTyjmE1h.mjs → MiniWidgetContainer-BlsgwNew.mjs} +1 -1
  21. package/dist/{NetWorthStore-B6xF9eGH.mjs → NetWorthStore-C0hQSRzt.mjs} +2 -2
  22. package/dist/{NotificationSettings-BJFyyZYE.mjs → NotificationSettings-CWx6H-2z.mjs} +2 -2
  23. package/dist/{OriginalBalanceAction-DepsKiJz.mjs → OriginalBalanceAction-BKsSQVnI.mjs} +3 -3
  24. package/dist/{RecurringSettings-Dj29piAQ.mjs → RecurringSettings-CICRt51C.mjs} +3 -3
  25. package/dist/{TransactionDetails-C-z3HGTT.mjs → TransactionDetails-BXl0m15s.mjs} +37 -37
  26. package/dist/{TransactionStore-0tLtBEIC.mjs → TransactionStore-BElBVYfk.mjs} +248 -209
  27. package/dist/TrendsStore-DRuzsVVE.mjs +505 -0
  28. package/dist/TrendsWidget-CRi8EO04.mjs +6 -0
  29. package/dist/{User-Dq9Qj764.mjs → User-DtwqVm3K.mjs} +1 -1
  30. package/dist/{WidgetContainer-CdBs9WOZ.mjs → WidgetContainer-DK8aZO5l.mjs} +2 -2
  31. package/dist/accounts/index.es.js +12 -12
  32. package/dist/analytics/index.es.js +8 -8
  33. package/dist/budgets/index.es.js +10 -10
  34. package/dist/cashflow/index.es.js +7 -7
  35. package/dist/categories/index.es.js +1 -1
  36. package/dist/common/index.es.js +577 -518
  37. package/dist/dashboard/index.es.js +9 -9
  38. package/dist/debts/index.es.js +9 -9
  39. package/dist/{exportTransactionsToCSV-BDlt8u0n.mjs → exportTransactionsToCSV-Cf5VRYVr.mjs} +1 -1
  40. package/dist/finstrong/index.es.js +6 -6
  41. package/dist/goals/index.es.js +11 -11
  42. package/dist/help/index.es.js +3 -3
  43. package/dist/{hooks-DkUqN6JE.mjs → hooks-DUeXom8C.mjs} +13 -13
  44. package/dist/investments/index.es.js +3 -3
  45. package/dist/merchants/index.es.js +1 -1
  46. package/dist/microinsights/index.es.js +1969 -14
  47. package/dist/networth/index.es.js +7 -7
  48. package/dist/notifications/index.es.js +2 -2
  49. package/dist/recurringtransactions/index.es.js +8 -8
  50. package/dist/settings/index.es.js +24 -24
  51. package/dist/spending/index.es.js +21 -21
  52. package/dist/transactions/index.es.js +270 -259
  53. package/dist/trends/index.es.js +402 -778
  54. package/package.json +1 -1
  55. package/dist/ExportCsvAction-CbMfQ2Wa.mjs +0 -24
  56. package/dist/ResponsiveButton-DZFp78fJ.mjs +0 -45
  57. package/dist/TrendsStore-WrHxzdbQ.mjs +0 -565
  58. package/dist/ViewMoreMicroCard-DFAY0tA8.mjs +0 -1974
@@ -1,65 +1,103 @@
1
- import { jsx as C } from "react/jsx-runtime";
2
- import H from "@mui/material/Box";
3
- import P from "@mui/material/FormControlLabel";
4
- import U from "@mui/material/Radio";
5
- import K from "@mui/material/styles/useTheme";
6
- import V from "@mui/material/Tooltip";
7
- import { makeAutoObservable as y, runInAction as d } from "mobx";
1
+ import { jsxs as U, jsx as C } from "react/jsx-runtime";
2
+ import v from "react";
3
+ import K from "@mui/material/Button";
4
+ import V from "@mui/material/IconButton";
5
+ import y from "@mui/material/Tooltip";
6
+ import b from "@mui/material/styles/useTheme";
7
+ import B from "@mui/material/Box";
8
+ import Y from "@mui/material/FormControlLabel";
9
+ import F from "@mui/material/Radio";
10
+ import { makeAutoObservable as G, runInAction as E } from "mobx";
8
11
  import { endOfToday as D } from "date-fns/endOfToday";
9
- import { formatISO as v } from "date-fns/formatISO";
10
- import { fromUnixTime as u } from "date-fns/fromUnixTime";
11
- import { getUnixTime as h } from "date-fns/getUnixTime";
12
- import { isBefore as B } from "date-fns/isBefore";
12
+ import { formatISO as W } from "date-fns/formatISO";
13
+ import { fromUnixTime as h } from "date-fns/fromUnixTime";
14
+ import { getUnixTime as u } from "date-fns/getUnixTime";
15
+ import { isBefore as z } from "date-fns/isBefore";
13
16
  import { startOfMonth as R } from "date-fns/startOfMonth";
14
- import { startOfToday as b } from "date-fns/startOfToday";
15
- import { subDays as Y } from "date-fns/subDays";
16
- import { O as n, a as G, T as F } from "./User-Dq9Qj764.mjs";
17
+ import { startOfToday as w } from "date-fns/startOfToday";
18
+ import { subDays as k } from "date-fns/subDays";
19
+ import { O as n, a as x, T as $ } from "./User-DtwqVm3K.mjs";
17
20
  import { T as p } from "./TransactionApi-DbbcjI2L.mjs";
18
- import { b as W } from "./Category-CevNQ03n.mjs";
19
- import { f as z } from "./exportTransactionsToCSV-BDlt8u0n.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";
21
+ import { b as X } from "./Category-CevNQ03n.mjs";
22
+ import { f as j } from "./exportTransactionsToCSV-Cf5VRYVr.mjs";
23
+ import { format as Z } from "date-fns/format";
24
+ import { f as g, D as O, O as q } from "./Dialog-CWW597AF.mjs";
25
+ import { endOfMonth as J } from "date-fns/endOfMonth";
23
26
  import { B as f } from "./BeatApi-DLu87ijw.mjs";
24
- const j = ({
25
- checked: S = !1,
27
+ const Q = ({
28
+ icon: _,
29
+ label: t,
30
+ onClick: a,
31
+ placement: e = "bottom",
32
+ tooltipText: c,
33
+ variant: l = "text"
34
+ }) => {
35
+ const i = b();
36
+ return /* @__PURE__ */ U(v.Fragment, { children: [
37
+ /* @__PURE__ */ C(
38
+ K,
39
+ {
40
+ onClick: a,
41
+ startIcon: _,
42
+ sx: {
43
+ [i.breakpoints.down("lg")]: { display: "none" },
44
+ [i.breakpoints.up("lg")]: { display: "inline-flex" }
45
+ },
46
+ title: c,
47
+ variant: l,
48
+ children: t
49
+ }
50
+ ),
51
+ /* @__PURE__ */ C(
52
+ y,
53
+ {
54
+ describeChild: !0,
55
+ placement: e,
56
+ sx: { display: { xs: "inline-flex", lg: "none" } },
57
+ title: c,
58
+ children: /* @__PURE__ */ C(V, { onClick: a, children: _ })
59
+ }
60
+ )
61
+ ] });
62
+ }, Ht = Q, tt = ({
63
+ checked: _ = !1,
26
64
  label: t,
27
65
  sx: a = {},
28
66
  tooltip: e = "",
29
- value: A
67
+ value: c
30
68
  }) => {
31
- const _ = K(), i = _.palette.mode === "light" ? _.palette.grey[400] : _.palette.grey[700], c = S ? _.palette.action.active : i;
69
+ const l = b(), i = l.palette.mode === "light" ? l.palette.grey[400] : l.palette.grey[700], A = _ ? l.palette.action.active : i;
32
70
  return /* @__PURE__ */ C(
33
- H,
71
+ B,
34
72
  {
35
73
  bgcolor: "background.paper",
36
- border: `${S ? 3 : 1}px solid`,
37
- borderColor: c,
74
+ border: `${_ ? 3 : 1}px solid`,
75
+ borderColor: A,
38
76
  borderRadius: 2,
39
77
  mt: -2,
40
78
  mx: 8,
41
79
  pr: 8,
42
80
  py: 4,
43
- sx: { "&:hover": { borderColor: _.palette.action.active }, ...a },
44
- children: /* @__PURE__ */ C(V, { title: e, children: /* @__PURE__ */ C(
45
- P,
81
+ sx: { "&:hover": { borderColor: l.palette.action.active }, ...a },
82
+ children: /* @__PURE__ */ C(y, { title: e, children: /* @__PURE__ */ C(
83
+ Y,
46
84
  {
47
85
  control: /* @__PURE__ */ C(
48
- U,
86
+ F,
49
87
  {
50
88
  disableRipple: !0,
51
- sx: { "&.Mui-checked": { color: _.palette.action.active } }
89
+ sx: { "&.Mui-checked": { color: l.palette.action.active } }
52
90
  }
53
91
  ),
54
92
  label: t,
55
93
  labelPlacement: "start",
56
94
  sx: { ml: 0, pl: 8 },
57
- value: A
95
+ value: c
58
96
  }
59
97
  ) })
60
98
  }
61
99
  );
62
- }, ft = j, w = {
100
+ }, Pt = tt, M = {
63
101
  ASC: "ASC",
64
102
  DESC: "DESC",
65
103
  DIRECTION: {
@@ -71,7 +109,7 @@ const j = ({
71
109
  left: "flex-start",
72
110
  right: "flex-end"
73
111
  }
74
- }, T = {
112
+ }, o = {
75
113
  ADD: "Add",
76
114
  ADD_CATEGORY: "Add Category",
77
115
  CHANGE_CATEGORY: "Change Category",
@@ -85,7 +123,7 @@ const j = ({
85
123
  SELECT: "Select",
86
124
  UNHIDE: "Unhide",
87
125
  UNSPLIT: "Unsplit"
88
- }, o = {
126
+ }, T = {
89
127
  TRANSACTION_DETAILS: "Transaction Details",
90
128
  TRANSACTIONS_LIST: "Transactions List",
91
129
  TRANSACTIONS_WIDGET: "Transactions Widget"
@@ -111,285 +149,285 @@ const j = ({
111
149
  }, m = {
112
150
  // splits
113
151
  [n.ON_TRANSACTION_SPLIT_CLICK]: {
114
- action: T.SELECT,
115
- category: o.TRANSACTION_DETAILS,
152
+ action: o.SELECT,
153
+ category: T.TRANSACTION_DETAILS,
116
154
  label: r.SPLITS
117
155
  },
118
156
  [n.ON_TRANSACTION_SPLIT_CATEGORY_CLICK]: {
119
- action: T.ADD_CATEGORY,
120
- category: o.TRANSACTION_DETAILS,
157
+ action: o.ADD_CATEGORY,
158
+ category: T.TRANSACTION_DETAILS,
121
159
  label: r.SPLITS
122
160
  },
123
161
  [n.ON_TRANSACTION_SPLIT_DELETE_CLICK]: {
124
- action: T.DELETE,
125
- category: o.TRANSACTION_DETAILS,
162
+ action: o.DELETE,
163
+ category: T.TRANSACTION_DETAILS,
126
164
  label: r.SPLITS
127
165
  },
128
166
  [n.ON_TRANSACTION_SPLIT_SAVE_CLICK]: {
129
- action: T.SPLIT,
130
- category: o.TRANSACTION_DETAILS,
167
+ action: o.SPLIT,
168
+ category: T.TRANSACTION_DETAILS,
131
169
  label: r.SPLITS
132
170
  },
133
171
  [n.ON_TRANSACTION_UNSPLIT]: {
134
- action: T.UNSPLIT,
135
- category: o.TRANSACTION_DETAILS,
172
+ action: o.UNSPLIT,
173
+ category: T.TRANSACTION_DETAILS,
136
174
  label: r.SPLITS
137
175
  },
138
176
  // category
139
177
  [n.ON_TRANSACTION_CATEGORY_CLICK]: {
140
- action: T.SELECT,
141
- category: o.TRANSACTIONS_LIST,
178
+ action: o.SELECT,
179
+ category: T.TRANSACTIONS_LIST,
142
180
  label: r.CATEGORY
143
181
  },
144
182
  [n.ON_TRANSACTION_CATEGORY_CHANGED]: {
145
- action: T.CHANGE_CATEGORY,
146
- category: o.TRANSACTION_DETAILS,
183
+ action: o.CHANGE_CATEGORY,
184
+ category: T.TRANSACTION_DETAILS,
147
185
  label: r.CATEGORY
148
186
  },
149
187
  // date
150
188
  [n.ON_TRANSACTION_DATE_CHANGED]: {
151
- action: T.SAVE,
152
- category: o.TRANSACTION_DETAILS,
189
+ action: o.SAVE,
190
+ category: T.TRANSACTION_DETAILS,
153
191
  label: r.DATE
154
192
  },
155
193
  [n.ON_TRANSACTION_DATE_CLICK]: {
156
- action: T.SELECT,
157
- category: o.TRANSACTION_DETAILS,
194
+ action: o.SELECT,
195
+ category: T.TRANSACTION_DETAILS,
158
196
  label: r.DATE
159
197
  },
160
198
  // merchant logo
161
199
  [n.ON_TRANSACTION_DELETE_LOGO_CANCEL]: {
162
- action: T.CLOSE,
163
- category: o.TRANSACTION_DETAILS,
200
+ action: o.CLOSE,
201
+ category: T.TRANSACTION_DETAILS,
164
202
  label: r.DELETE_MERCHANT_LOGO
165
203
  },
166
204
  [n.ON_TRANSACTION_DELETE_LOGO_CLICK]: {
167
- action: T.SELECT,
168
- category: o.TRANSACTION_DETAILS,
205
+ action: o.SELECT,
206
+ category: T.TRANSACTION_DETAILS,
169
207
  label: r.DELETE_MERCHANT_LOGO
170
208
  },
171
209
  [n.ON_TRANSACTION_DELETE_LOGO_DELETED]: {
172
- action: T.DELETE,
173
- category: o.TRANSACTION_DETAILS,
210
+ action: o.DELETE,
211
+ category: T.TRANSACTION_DETAILS,
174
212
  label: r.DELETE_MERCHANT_LOGO
175
213
  },
176
214
  // description
177
215
  [n.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK]: {
178
- action: T.EDIT,
179
- category: o.TRANSACTION_DETAILS,
216
+ action: o.EDIT,
217
+ category: T.TRANSACTION_DETAILS,
180
218
  label: r.DESCRIPTION
181
219
  },
182
220
  [n.ON_TRANSACTION_DESCRIPTION_SAVE_CLICK]: {
183
- action: T.SAVE,
184
- category: o.TRANSACTION_DETAILS,
221
+ action: o.SAVE,
222
+ category: T.TRANSACTION_DETAILS,
185
223
  label: r.DESCRIPTION
186
224
  },
187
225
  // hide transactions
188
226
  [n.ON_TRANSACTION_HIDDEN]: {
189
- action: T.SAVE,
190
- category: o.TRANSACTION_DETAILS,
227
+ action: o.SAVE,
228
+ category: T.TRANSACTION_DETAILS,
191
229
  label: r.HIDE_TRANSACTION
192
230
  },
193
231
  [n.ON_TRANSACTION_HIDE_CLICK]: {
194
- action: T.SELECT,
195
- category: o.TRANSACTION_DETAILS,
232
+ action: o.SELECT,
233
+ category: T.TRANSACTION_DETAILS,
196
234
  label: r.HIDE_TRANSACTION
197
235
  },
198
236
  [n.ON_TRANSACTION_HIDE_CANCEL_CLICK]: {
199
- action: T.CLOSE,
200
- category: o.TRANSACTION_DETAILS,
237
+ action: o.CLOSE,
238
+ category: T.TRANSACTION_DETAILS,
201
239
  label: r.HIDE_TRANSACTION
202
240
  },
203
241
  // transaction list
204
242
  [n.ON_TRANSACTION_LIST_ITEM_CLICK]: {
205
- action: T.SELECT,
206
- category: o.TRANSACTIONS_LIST,
243
+ action: o.SELECT,
244
+ category: T.TRANSACTIONS_LIST,
207
245
  label: r.TRANSACTION
208
246
  },
209
247
  // memo
210
248
  [n.ON_TRANSACTION_MEMO_CHANGED]: {
211
- action: T.SAVE,
212
- category: o.TRANSACTION_DETAILS,
249
+ action: o.SAVE,
250
+ category: T.TRANSACTION_DETAILS,
213
251
  label: r.MEMO
214
252
  },
215
253
  [n.ON_TRANSACTION_MEMO_CLICK]: {
216
- action: T.SELECT,
217
- category: o.TRANSACTION_DETAILS,
254
+ action: o.SELECT,
255
+ category: T.TRANSACTION_DETAILS,
218
256
  label: r.MEMO
219
257
  },
220
258
  // tags
221
259
  [n.ON_TRANSACTION_TAGS_CHANGED]: {
222
- action: T.SAVE,
223
- category: o.TRANSACTION_DETAILS,
260
+ action: o.SAVE,
261
+ category: T.TRANSACTION_DETAILS,
224
262
  label: r.TAGS
225
263
  },
226
264
  [n.ON_TRANSACTION_TAGS_CLICK]: {
227
- action: T.SELECT,
228
- category: o.TRANSACTION_DETAILS,
265
+ action: o.SELECT,
266
+ category: T.TRANSACTION_DETAILS,
229
267
  label: r.TAGS
230
268
  },
231
269
  [n.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK]: {
232
- action: T.CLOSE,
233
- category: o.TRANSACTION_DETAILS,
270
+ action: o.CLOSE,
271
+ category: T.TRANSACTION_DETAILS,
234
272
  label: r.TAGS
235
273
  },
236
274
  [n.ON_TRANSACTION_TAGS_TAG_ADD_CLICK]: {
237
- action: T.ADD,
238
- category: o.TRANSACTION_DETAILS,
275
+ action: o.ADD,
276
+ category: T.TRANSACTION_DETAILS,
239
277
  label: r.TAG_ADD
240
278
  },
241
279
  [n.ON_TRANSACTION_TAGS_TAG_ADDED]: {
242
- action: T.SAVE,
243
- category: o.TRANSACTION_DETAILS,
280
+ action: o.SAVE,
281
+ category: T.TRANSACTION_DETAILS,
244
282
  label: r.TAG_ADD
245
283
  },
246
284
  [n.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK]: {
247
- action: T.SELECT,
248
- category: o.TRANSACTION_DETAILS,
285
+ action: o.SELECT,
286
+ category: T.TRANSACTION_DETAILS,
249
287
  label: r.TAG_DELETE
250
288
  },
251
289
  [n.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK]: {
252
- action: T.CLOSE,
253
- category: o.TRANSACTION_DETAILS,
290
+ action: o.CLOSE,
291
+ category: T.TRANSACTION_DETAILS,
254
292
  label: r.TAG_DELETE
255
293
  },
256
294
  [n.ON_TRANSACTION_TAGS_TAG_DELETED]: {
257
- action: T.SAVE,
258
- category: o.TRANSACTION_DETAILS,
295
+ action: o.SAVE,
296
+ category: T.TRANSACTION_DETAILS,
259
297
  label: r.TAG_DELETE
260
298
  },
261
299
  [n.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK]: {
262
- action: T.EDIT,
263
- category: o.TRANSACTION_DETAILS,
300
+ action: o.EDIT,
301
+ category: T.TRANSACTION_DETAILS,
264
302
  label: r.TAG_EDIT
265
303
  },
266
304
  [n.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED]: {
267
- action: T.SAVE,
268
- category: o.TRANSACTION_DETAILS,
305
+ action: o.SAVE,
306
+ category: T.TRANSACTION_DETAILS,
269
307
  label: r.TAG_EDIT
270
308
  },
271
309
  // flag
272
310
  [n.ON_TRANSACTION_TOGGLE_FLAG_CLICK]: {
273
- action: T.SELECT,
274
- category: o.TRANSACTION_DETAILS,
311
+ action: o.SELECT,
312
+ category: T.TRANSACTION_DETAILS,
275
313
  label: r.FLAG
276
314
  },
277
315
  // hide
278
316
  [n.ON_TRANSACTION_UNHIDDEN]: {
279
- action: T.SAVE,
280
- category: o.TRANSACTION_DETAILS,
317
+ action: o.SAVE,
318
+ category: T.TRANSACTION_DETAILS,
281
319
  label: r.UNHIDE_TRANSACTION
282
320
  },
283
321
  [n.ON_TRANSACTION_UNHIDE_CLICK]: {
284
- action: T.SELECT,
285
- category: o.TRANSACTION_DETAILS,
322
+ action: o.SELECT,
323
+ category: T.TRANSACTION_DETAILS,
286
324
  label: r.UNHIDE_TRANSACTION
287
325
  },
288
326
  [n.ON_TRANSACTION_UNHIDE_CANCEL_CLICK]: {
289
- action: T.CLOSE,
290
- category: o.TRANSACTION_DETAILS,
327
+ action: o.CLOSE,
328
+ category: T.TRANSACTION_DETAILS,
291
329
  label: r.UNHIDE_TRANSACTION
292
330
  },
293
331
  // export CSV
294
332
  [n.ON_TRANSACTION_EXPORT_CSV_CLICK]: {
295
- action: T.SELECT,
296
- category: o.TRANSACTIONS_WIDGET,
333
+ action: o.SELECT,
334
+ category: T.TRANSACTIONS_WIDGET,
297
335
  label: r.EXPORT_CSV
298
336
  },
299
337
  // add transaction
300
338
  [n.ON_TRANSACTION_MANUAL_ADD_CLICK]: {
301
- action: T.SELECT,
302
- category: o.TRANSACTIONS_WIDGET,
339
+ action: o.SELECT,
340
+ category: T.TRANSACTIONS_WIDGET,
303
341
  label: r.ADD_TRANSACTION
304
342
  },
305
343
  [n.ON_TRANSACTION_MANUAL_ADD_ADDED]: {
306
- action: T.ADD,
307
- category: o.TRANSACTIONS_WIDGET,
344
+ action: o.ADD,
345
+ category: T.TRANSACTIONS_WIDGET,
308
346
  label: r.ADD_TRANSACTION
309
347
  },
310
348
  [n.ON_TRANSACTION_DELETE_CLICK]: {
311
- action: T.SELECT,
312
- category: o.TRANSACTIONS_WIDGET,
349
+ action: o.SELECT,
350
+ category: T.TRANSACTIONS_WIDGET,
313
351
  label: r.DELETE_TRANSACTION
314
352
  },
315
353
  [n.ON_TRANSACTION_DELETE_CANCEL]: {
316
- action: T.CLOSE,
317
- category: o.TRANSACTIONS_WIDGET,
354
+ action: o.CLOSE,
355
+ category: T.TRANSACTIONS_WIDGET,
318
356
  label: r.DELETE_TRANSACTION
319
357
  },
320
358
  [n.ON_TRANSACTION_DELETE_DELETED]: {
321
- action: T.DELETE,
322
- category: o.TRANSACTIONS_WIDGET,
359
+ action: o.DELETE,
360
+ category: T.TRANSACTIONS_WIDGET,
323
361
  label: r.DELETE_TRANSACTION
324
362
  }
325
- }, Z = async (S, t) => !t || !m[S] ? null : t.sendAnalyticEvent(m[S]), L = {
363
+ }, at = async (_, t) => !t || !m[_] ? null : t.sendAnalyticEvent(m[_]), L = {
326
364
  FLAG: "flag",
327
365
  DATE: "date",
328
366
  PAYEE: "payee",
329
367
  CATEGORY: "category",
330
368
  ACCOUNT: "account",
331
369
  AMOUNT: "amount"
332
- }, q = (S, t, a, e = []) => {
333
- const A = t.reduce((c, s) => ({ ...c, [s.guid]: s }), {}), _ = a.reduce((c, s) => ({ ...c, [s.guid]: s }), {}), i = e.reduce((c, s) => {
334
- const { transaction_guid: l, tag_guid: I } = s;
335
- if (!c[l])
370
+ }, et = (_, t, a, e = []) => {
371
+ const c = t.reduce((A, s) => ({ ...A, [s.guid]: s }), {}), l = a.reduce((A, s) => ({ ...A, [s.guid]: s }), {}), i = e.reduce((A, s) => {
372
+ const { transaction_guid: N, tag_guid: I } = s;
373
+ if (!A[N])
336
374
  return {
337
- ...c,
338
- [l]: [I]
375
+ ...A,
376
+ [N]: [I]
339
377
  };
340
- const E = [...c[l], I];
378
+ const d = [...A[N], I];
341
379
  return {
342
- ...c,
343
- [l]: E
380
+ ...A,
381
+ [N]: d
344
382
  };
345
383
  }, {});
346
- return S.map((c) => {
347
- const s = A[c.account_guid], l = c.category_guid ? _[c.category_guid] : null, I = i[c.guid] ?? [];
384
+ return _.map((A) => {
385
+ const s = c[A.account_guid], N = A.category_guid ? l[A.category_guid] : null, I = i[A.guid] ?? [];
348
386
  return {
349
- ...c,
387
+ ...A,
350
388
  account: s?.user_name || "Unknown",
351
389
  accountIsClosed: s?.is_closed,
352
390
  accountIsHidden: s?.is_hidden,
353
- category: l?.name || "Uncategorized",
354
- isIncome: c.top_level_category_guid === W.INCOME,
355
- isPending: c.feed_status === G.PENDING,
391
+ category: N?.name || "Uncategorized",
392
+ isIncome: A.top_level_category_guid === X.INCOME,
393
+ isPending: A.feed_status === x.PENDING,
356
394
  number: s?.account_number || "",
357
- payee: c.description,
395
+ payee: A.description,
358
396
  tags: I
359
397
  };
360
398
  });
361
- }, J = "uncategorized", Q = (S, t, a, e, A, _) => {
362
- const i = tt(S, A, _), c = at(i, a, e);
399
+ }, it = "uncategorized", st = (_, t, a, e, c, l) => {
400
+ const i = nt(_, c, l), A = ot(i, a, e);
363
401
  return t.forEach((s) => {
364
- const l = c.findIndex((E) => E.guid === s), I = _.filter((E) => E.parent_guid === s);
365
- c.splice(l + 1, 0, ...I);
366
- }), c;
367
- }, tt = (S, t, a) => {
402
+ const N = A.findIndex((d) => d.guid === s), I = l.filter((d) => d.parent_guid === s);
403
+ A.splice(N + 1, 0, ...I);
404
+ }), A;
405
+ }, nt = (_, t, a) => {
368
406
  const {
369
407
  accounts: e = [],
370
- dateRange: A = { start: R(b()), end: D() },
371
- custom: _ = () => !0,
408
+ dateRange: c = { start: R(w()), end: D() },
409
+ custom: l = () => !0,
372
410
  searchTerm: i = "",
373
- showSplits: c = !1
374
- } = S;
375
- return a.filter((s) => c ? !s.has_been_split : !s.parent_guid).filter((s) => !!e.find((l) => l === s.account_guid)).filter((s) => s.date >= h(A.start) && s.date <= h(A.end)).filter(_).filter((s) => {
376
- if (i === J && s.has_been_split)
411
+ showSplits: A = !1
412
+ } = _;
413
+ 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(l).filter((s) => {
414
+ if (i === it && s.has_been_split)
377
415
  return !1;
378
416
  if (/^spl/i.test(i) && (s.has_been_split || s.parent_guid))
379
417
  return !0;
380
418
  const I = s.tags.some(
381
- (x) => N(i, t.find((M) => M.guid === x)?.name)
382
- ), E = u(s.date);
383
- return N(i, s.payee) || N(i, s.feed_description) || N(i, s.category) || N(i, g(E, O.MONTH)) || N(i, g(E, O.DAY)) || N(i, g(E, O.FULL_MONTH_DAY)) || N(i, g(E, O.MONTH_DAY_YEAR)) || N(i, k(E, $)) || N(i, s.account) || N(i, `${s.amount}`) || N(i, s.memo) || I;
419
+ (H) => S(i, t.find((P) => P.guid === H)?.name)
420
+ ), d = h(s.date);
421
+ return S(i, s.payee) || S(i, s.feed_description) || S(i, s.category) || S(i, g(d, O.MONTH)) || S(i, g(d, O.DAY)) || S(i, g(d, O.FULL_MONTH_DAY)) || S(i, g(d, O.MONTH_DAY_YEAR)) || S(i, Z(d, q)) || S(i, s.account) || S(i, `${s.amount}`) || S(i, s.memo) || I;
384
422
  });
385
- }, at = (S, t, a) => [...S].sort((e, A) => {
386
- const _ = t, i = (e[_] || "") > (A[_] || "");
387
- let c = i ? -1 : 1, s = i ? 1 : -1;
388
- return (t === L.DATE || t === L.AMOUNT) && (c = i ? 1 : -1, s = i ? -1 : 1), a === w.ASC ? c : s;
389
- }), N = (S, t) => {
390
- const a = S.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
391
- return a.every((A) => e.indexOf(A) > -1);
392
- }, et = {
423
+ }, ot = (_, t, a) => [..._].sort((e, c) => {
424
+ const l = t, i = (e[l] || "") > (c[l] || "");
425
+ let A = i ? -1 : 1, s = i ? 1 : -1;
426
+ return (t === L.DATE || t === L.AMOUNT) && (A = i ? 1 : -1, s = i ? -1 : 1), a === M.ASC ? A : s;
427
+ }), S = (_, t) => {
428
+ const a = _.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
429
+ return a.every((c) => e.indexOf(c) > -1);
430
+ }, Tt = {
393
431
  account_guid: "",
394
432
  amount: 0,
395
433
  currency_code: "",
@@ -397,7 +435,7 @@ const j = ({
397
435
  description: "",
398
436
  duplicate: !1,
399
437
  feed_description: "",
400
- feed_status: G.POSTED,
438
+ feed_status: x.POSTED,
401
439
  feed_transaction_date: 0,
402
440
  has_been_split: !1,
403
441
  has_been_viewed: !1,
@@ -410,7 +448,7 @@ const j = ({
410
448
  is_subscription: !1,
411
449
  is_void: !1,
412
450
  revision: 1,
413
- transaction_type: F.DEBIT,
451
+ transaction_type: $.DEBIT,
414
452
  user_guid: "",
415
453
  is_duplicate: !1,
416
454
  feed_transacted_at: 0,
@@ -418,9 +456,9 @@ const j = ({
418
456
  memo: void 0,
419
457
  tags: []
420
458
  };
421
- class it {
459
+ class rt {
422
460
  beginDate = R(/* @__PURE__ */ new Date());
423
- endDate = X(/* @__PURE__ */ new Date());
461
+ endDate = J(/* @__PURE__ */ new Date());
424
462
  expandedSplits = [];
425
463
  isInitialized = !1;
426
464
  height = 550;
@@ -428,11 +466,11 @@ class it {
428
466
  shouldDisableDrawerScroll = !1;
429
467
  searchValue = "";
430
468
  selectedAccountGuids = [];
431
- manualTransaction = et;
469
+ manualTransaction = Tt;
432
470
  isAmountValid = !1;
433
471
  showInsights = !1;
434
472
  constructor() {
435
- y(this);
473
+ G(this);
436
474
  }
437
475
  setDateRange = (t, a) => {
438
476
  this.beginDate = t, this.endDate = a;
@@ -449,7 +487,7 @@ class it {
449
487
  this.height = t, this.width = a;
450
488
  };
451
489
  toggleSplit = (t) => {
452
- const a = [...this.expandedSplits], e = this.expandedSplits.findIndex((A) => A === t);
490
+ const a = [...this.expandedSplits], e = this.expandedSplits.findIndex((c) => c === t);
453
491
  e >= 0 ? a.splice(e, 1) : a.push(t), this.expandedSplits = a;
454
492
  };
455
493
  clearExpandedSplits = () => {
@@ -459,24 +497,24 @@ class it {
459
497
  this.manualTransaction = t;
460
498
  };
461
499
  }
462
- class mt {
500
+ class Ut {
463
501
  globalStore;
464
502
  uiStore;
465
503
  api = new p("/", "");
466
504
  beatApi = new f("/", "");
467
505
  associatedBeats = [];
468
- cachedStartDate = Y(b(), 90);
506
+ cachedStartDate = k(w(), 90);
469
507
  filter = {};
470
508
  isLoading = !0;
471
509
  rawTransactions = [];
472
510
  sortColumn = L.DATE;
473
- sortDirection = w.DESC;
511
+ sortDirection = M.DESC;
474
512
  taggings = [];
475
513
  tags = [];
476
514
  transactionRules = [];
477
- onAnalyticEvent = Z;
515
+ onAnalyticEvent = at;
478
516
  constructor(t) {
479
- this.globalStore = t, this.uiStore = new it(), this.api = new p(t.endpoint, t.sessionToken), this.beatApi = new f(t.endpoint, t.sessionToken), y(this);
517
+ this.globalStore = t, this.uiStore = new rt(), this.api = new p(t.endpoint, t.sessionToken), this.beatApi = new f(t.endpoint, t.sessionToken), G(this);
480
518
  }
481
519
  loadTransactionData = async ({
482
520
  associatedBeats: t,
@@ -490,12 +528,12 @@ class mt {
490
528
  this.loadTransactionRules(a),
491
529
  // By default loads 90 days of transactions
492
530
  this.loadTransactions(this.cachedStartDate, D(), e)
493
- ]), d(() => {
531
+ ]), E(() => {
494
532
  this.uiStore.setIsInitialized(!0);
495
533
  });
496
534
  };
497
535
  get sortedTransactions() {
498
- return Q(
536
+ return st(
499
537
  this.filter,
500
538
  this.uiStore.expandedSplits,
501
539
  this.sortColumn,
@@ -505,7 +543,7 @@ class mt {
505
543
  );
506
544
  }
507
545
  get sortedTransactionsWithSplits() {
508
- return z(this.sortedTransactions, this.transactions);
546
+ return j(this.sortedTransactions, this.transactions);
509
547
  }
510
548
  get transactions() {
511
549
  return this.augmentTransactions(this.rawTransactions);
@@ -521,7 +559,7 @@ class mt {
521
559
  };
522
560
  addOrUpdateTransactionRule = async (t, a) => {
523
561
  const e = this.transactionRules.find(
524
- (A) => A.guid === a.user_transaction_rule_guid
562
+ (c) => c.guid === a.user_transaction_rule_guid
525
563
  );
526
564
  e ? await this.api.updateTransactionRule({
527
565
  ...e,
@@ -535,9 +573,9 @@ class mt {
535
573
  };
536
574
  addTransaction = async (t) => {
537
575
  const a = await this.api.addTransaction(t);
538
- a && d(() => this.rawTransactions = [a, ...this.transactions]);
576
+ a && E(() => this.rawTransactions = [a, ...this.transactions]);
539
577
  };
540
- augmentTransactions = (t) => q(
578
+ augmentTransactions = (t) => et(
541
579
  t,
542
580
  this.globalStore.accountStore.visibleAccounts,
543
581
  this.globalStore.categoryStore.categories,
@@ -545,30 +583,30 @@ class mt {
545
583
  );
546
584
  getTransactionData = () => ({});
547
585
  loadAssociatedBeats = async (t, a) => {
548
- const e = t ? v(t, { representation: "date" }) : void 0, A = a ?? await this.beatApi.getBeatsWithAssociatedTransaction(e);
549
- d(() => this.associatedBeats = A);
586
+ const e = t ? W(t, { representation: "date" }) : void 0, c = a ?? await this.beatApi.getBeatsWithAssociatedTransaction(e);
587
+ E(() => this.associatedBeats = c);
550
588
  };
551
589
  loadTags = async () => {
552
590
  const t = await this.api.getTags();
553
- d(() => this.tags = t);
591
+ E(() => this.tags = t);
554
592
  };
555
593
  loadTaggings = async () => {
556
594
  const t = await this.api.getTaggings();
557
- d(() => this.taggings = t);
595
+ E(() => this.taggings = t);
558
596
  };
559
597
  loadTransactionRules = async (t) => {
560
598
  const a = t ?? await this.api.getTransactionRules();
561
- d(() => this.transactionRules = a);
599
+ E(() => this.transactionRules = a);
562
600
  };
563
601
  loadTransactions = async (t = this.cachedStartDate, a = D(), e) => {
564
602
  this.setIsLoading(!0), this.rawTransactions = [];
565
603
  try {
566
- const A = e ?? await this.api.getTransactionsByDateRange(h(t), h(a));
567
- d(() => {
568
- this.rawTransactions = A;
604
+ const c = e ?? await this.api.getTransactionsByDateRange(u(t), u(a));
605
+ E(() => {
606
+ this.rawTransactions = c;
569
607
  });
570
- } catch (A) {
571
- console.error(`Error occurred while loading transactions: ${A}`);
608
+ } catch (c) {
609
+ console.error(`Error occurred while loading transactions: ${c}`);
572
610
  }
573
611
  this.setIsLoading(!1);
574
612
  };
@@ -576,7 +614,7 @@ class mt {
576
614
  loadTransactionsByDateRange = async (t, a) => {
577
615
  console.warn("DEPRECATED: loadTransactionsByDateRange will be removed"), this.setFilter({
578
616
  ...this.filter,
579
- dateRange: { start: u(a), end: u(t) }
617
+ dateRange: { start: h(a), end: h(t) }
580
618
  });
581
619
  };
582
620
  modifyTransactionByAccountGuid = (t, a) => {
@@ -595,11 +633,11 @@ class mt {
595
633
  const a = this.transactions.findIndex((e) => e.guid === t);
596
634
  if (a >= 0) {
597
635
  const e = [...this.transactions];
598
- e.splice(a, 1), d(() => this.rawTransactions = e);
636
+ e.splice(a, 1), E(() => this.rawTransactions = e);
599
637
  }
600
638
  };
601
639
  setFilter = (t) => {
602
- this.filter = t, t.dateRange && B(t.dateRange.start, this.cachedStartDate) && this.loadTransactions(t.dateRange.start, D()).then(() => {
640
+ this.filter = t, t.dateRange && z(t.dateRange.start, this.cachedStartDate) && this.loadTransactions(t.dateRange.start, D()).then(() => {
603
641
  t.dateRange && (this.cachedStartDate = t.dateRange.start);
604
642
  });
605
643
  };
@@ -608,18 +646,18 @@ class mt {
608
646
  this.sortColumn = t, this.sortDirection = a;
609
647
  };
610
648
  splitTransaction = async (t, a) => {
611
- const e = await this.api.updateTransaction(t), A = [];
649
+ const e = await this.api.updateTransaction(t), c = [];
612
650
  for (let i = 0; i < a.length; i++) {
613
- const c = await this.api.addTransaction(a[i]);
614
- A.push(c);
651
+ const A = await this.api.addTransaction(a[i]);
652
+ c.push(A);
615
653
  }
616
- const _ = this.transactions.findIndex((i) => i.guid === t.guid);
617
- _ >= 0 && d(
654
+ const l = this.transactions.findIndex((i) => i.guid === t.guid);
655
+ l >= 0 && E(
618
656
  () => this.rawTransactions = [
619
- ...this.transactions.slice(0, _),
657
+ ...this.transactions.slice(0, l),
620
658
  e,
621
- ...this.transactions.slice(_ + 1),
622
- ...A
659
+ ...this.transactions.slice(l + 1),
660
+ ...c
623
661
  ]
624
662
  );
625
663
  };
@@ -628,32 +666,32 @@ class mt {
628
666
  await this.api.removeTransactionSplit(t);
629
667
  const e = [...this.transactions];
630
668
  a.forEach((i) => {
631
- const c = e.findIndex((s) => s.guid === i.guid);
632
- c >= 0 && e.splice(c, 1);
669
+ const A = e.findIndex((s) => s.guid === i.guid);
670
+ A >= 0 && e.splice(A, 1);
633
671
  });
634
- const A = e.findIndex((i) => i.guid === t), _ = e[A];
635
- _.has_been_split = !1, A >= 0 && d(
672
+ const c = e.findIndex((i) => i.guid === t), l = e[c];
673
+ l.has_been_split = !1, c >= 0 && E(
636
674
  () => this.rawTransactions = [
637
- ...e.slice(0, A),
638
- _,
639
- ...e.slice(A + 1)
675
+ ...e.slice(0, c),
676
+ l,
677
+ ...e.slice(c + 1)
640
678
  ]
641
679
  );
642
680
  };
643
681
  updateTaggings = async (t, a) => {
644
- const e = this.taggings.filter((i) => i.transaction_guid === a), A = new Set(e.map((i) => i.tag_guid)), _ = new Set(t);
682
+ const e = this.taggings.filter((i) => i.transaction_guid === a), c = new Set(e.map((i) => i.tag_guid)), l = new Set(t);
645
683
  for (const i of t)
646
- A.has(i) || await this.addTagging(i, a);
684
+ c.has(i) || await this.addTagging(i, a);
647
685
  for (const i of e)
648
- _.has(i.tag_guid) || await this.removeTagging(i.guid);
686
+ l.has(i.tag_guid) || await this.removeTagging(i.guid);
649
687
  await this.loadTaggings();
650
688
  };
651
689
  updateTag = async (t) => {
652
690
  await this.api.updateTag(t), await this.loadTags();
653
691
  };
654
692
  updateTransaction = async (t) => {
655
- const a = await this.api.updateTransaction(t), e = this.transactions.findIndex((A) => A.guid === t.guid);
656
- e >= 0 && d(
693
+ const a = await this.api.updateTransaction(t), e = this.transactions.findIndex((c) => c.guid === t.guid);
694
+ e >= 0 && E(
657
695
  () => this.rawTransactions = [
658
696
  ...this.transactions.slice(0, e),
659
697
  a,
@@ -663,7 +701,8 @@ class mt {
663
701
  };
664
702
  }
665
703
  export {
666
- et as D,
667
- ft as S,
668
- mt as T
704
+ Tt as D,
705
+ Ht as R,
706
+ Pt as S,
707
+ Ut as T
669
708
  };