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

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