@mx-cartographer/experiences 6.26.32 → 7.0.0-alpha.mega1

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 (98) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Account-DY6nxO7y.mjs +30 -0
  3. package/dist/AccountDetailsContent-DvPs81kL.mjs +677 -0
  4. package/dist/AccountDetailsHeader-W2U7ZVm_.mjs +119 -0
  5. package/dist/AccountFields-DAVcbZy5.mjs +135 -0
  6. package/dist/AccountListItem-DFlbdcmT.mjs +90 -0
  7. package/dist/AccountStore-CU7qV3vg.mjs +230 -0
  8. package/dist/Accounts-BLlrQA5m.mjs +9 -0
  9. package/dist/BeatApi-DLu87ijw.mjs +21 -0
  10. package/dist/BeatStore-By4aGoRM.mjs +81 -0
  11. package/dist/BudgetUtil-Ci1TN0J5.mjs +101 -0
  12. package/dist/CashflowStore-D9Dpuz7X.mjs +91 -0
  13. package/dist/Category-5S6uwuXz.mjs +301 -0
  14. package/dist/CategorySelectorDrawer-rHyHHYuh.mjs +397 -0
  15. package/dist/CategoryStore-B5EW6I1d.mjs +183 -0
  16. package/dist/CategoryUtil-DRyruNgi.mjs +78 -0
  17. package/dist/ConnectDrawer-D9cR5phc.mjs +508 -0
  18. package/dist/ConnectionsDrawer-BzGqljSp.mjs +52 -0
  19. package/dist/CurrencyInput-D74cemI2.mjs +83 -0
  20. package/dist/CurrencyText-YUhH2caW.mjs +20 -0
  21. package/dist/DateUtil-BcuH7ErC.mjs +48 -0
  22. package/dist/DebtsStore-S0l9kr0r.mjs +60 -0
  23. package/dist/Dialog-CWW597AF.mjs +123 -0
  24. package/dist/Donut-1UMNcG67.mjs +57 -0
  25. package/dist/Drawer-kEE73B87.mjs +113 -0
  26. package/dist/EmptyState-Dcb-o2tl.mjs +55 -0
  27. package/dist/Fetch-CkFKy79O.mjs +116 -0
  28. package/dist/FinstrongStore-mkALvztw.mjs +101 -0
  29. package/dist/GoalStore-DioeeL-s.mjs +263 -0
  30. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  31. package/dist/Help-DhcC-C05.mjs +320 -0
  32. package/dist/Help-DpYRO8oA.mjs +3181 -0
  33. package/dist/IconBacking-B9oC6uL2.mjs +39 -0
  34. package/dist/InvestmentUtil-jOyOgzIB.mjs +134 -0
  35. package/dist/LineChart-CcyX38kK.mjs +499 -0
  36. package/dist/ListItemAction-BabpYivr.mjs +69 -0
  37. package/dist/Loader-Dp1P2gNw.mjs +14 -0
  38. package/dist/Localization-2MODESHW.mjs +30 -0
  39. package/dist/ManageIncome-ndMuhJMG.mjs +535 -0
  40. package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
  41. package/dist/MicroWidgetContainer-CsvHLYKX.mjs +45 -0
  42. package/dist/MiniWidgetContainer-BoOp-A05.mjs +39 -0
  43. package/dist/NetWorthStore-PD-RUe09.mjs +150 -0
  44. package/dist/Notification-AMGWM1Al.mjs +78 -0
  45. package/dist/NotificationSettings-VhHuMAFU.mjs +667 -0
  46. package/dist/NotificationStore-DHtSGySy.mjs +67 -0
  47. package/dist/NumberFormatting-CtWHhyBX.mjs +40 -0
  48. package/dist/OriginalBalanceAction-D39mx6uE.mjs +115 -0
  49. package/dist/RecurringSettings-D_HnMYZP.mjs +57 -0
  50. package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +263 -0
  51. package/dist/RepeatingTransaction-BPWfaB3f.mjs +282 -0
  52. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  53. package/dist/SettingsStore-CE7jDVFL.mjs +265 -0
  54. package/dist/SingleSegmentDonut-BgbLgwHi.mjs +69 -0
  55. package/dist/SpendingData-BkrxzHdr.mjs +55 -0
  56. package/dist/StatusBar-BK_uYHAB.mjs +30 -0
  57. package/dist/TabContentContainer-j01JYR_7.mjs +21 -0
  58. package/dist/Transaction-CA0FW2Ij.mjs +312 -0
  59. package/dist/TransactionApi-DbbcjI2L.mjs +86 -0
  60. package/dist/TransactionDetails-WBHFmbxL.mjs +1283 -0
  61. package/dist/TransactionStore-CeLdmVnC.mjs +669 -0
  62. package/dist/TrendsStore-BHJUapXF.mjs +487 -0
  63. package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +1959 -0
  64. package/dist/WidgetContainer-DWCusxYI.mjs +556 -0
  65. package/dist/accounts/index.es.js +752 -0
  66. package/dist/analytics/index.es.js +171 -0
  67. package/dist/budgets/index.es.js +1075 -0
  68. package/dist/cashflow/index.es.js +1098 -0
  69. package/dist/categories/index.es.js +9 -0
  70. package/dist/common/context/hooks.d.ts +13 -13
  71. package/dist/common/index.es.js +1451 -0
  72. package/dist/dashboard/index.es.js +181 -0
  73. package/dist/debts/index.es.js +1460 -0
  74. package/dist/exportTransactionsToCSV-CmwsKl2D.mjs +47 -0
  75. package/dist/finstrong/index.es.js +1455 -0
  76. package/dist/goals/index.es.js +1209 -0
  77. package/dist/help/components/content/section/index.d.ts +15 -15
  78. package/dist/help/index.es.js +14 -0
  79. package/dist/hooks-30y_BLwc.mjs +71 -0
  80. package/dist/index.d.ts +0 -22
  81. package/dist/insights/index.d.ts +1 -0
  82. package/dist/insights/index.es.js +4 -0
  83. package/dist/investments/index.es.js +1638 -0
  84. package/dist/merchants/index.es.js +79 -0
  85. package/dist/microinsights/index.es.js +16 -0
  86. package/dist/networth/index.es.js +576 -0
  87. package/dist/notifications/index.es.js +192 -0
  88. package/dist/recurringtransactions/index.es.js +879 -0
  89. package/dist/settings/index.es.js +879 -0
  90. package/dist/spending/index.es.js +570 -0
  91. package/dist/transactions/index.es.js +587 -0
  92. package/dist/trends/index.es.js +1086 -0
  93. package/dist/useCombineEvents-DaDBSR_1.mjs +92 -0
  94. package/dist/useDimensions-27p2evRx.mjs +36 -0
  95. package/dist/useScreenSize-B6JyS_Lj.mjs +36 -0
  96. package/package.json +155 -3
  97. package/dist/index.es.js +0 -30508
  98. package/dist/index.es.js.map +0 -1
@@ -0,0 +1,55 @@
1
+ import { addMonths as u } from "date-fns/addMonths";
2
+ import { isBefore as d } from "date-fns/isBefore";
3
+ import { startOfMonth as _ } from "date-fns/startOfMonth";
4
+ import { subMonths as y } from "date-fns/subMonths";
5
+ import { endOfMonth as M } from "date-fns/endOfMonth";
6
+ import { c as n, P as l } from "./Category-5S6uwuXz.mjs";
7
+ import { f as m, D as T } from "./Dialog-CWW597AF.mjs";
8
+ const i = (e) => (e.top_level_category_guid === n.INCOME || e.category_guid === n.INCOME) && !h(e), C = (e) => !i(e) && !f(e), p = (e) => l.includes(e.top_level_category_guid) || l.includes(e.category_guid), f = (e) => e.top_level_category_guid === n.TRANSFER || e.category_guid === n.TRANSFER, h = (e) => e.top_level_category_guid === n.INVESTMENTS || e.category_guid === n.INVESTMENTS, N = (e) => !i(e) && !p(e) && !f(e) && !h(e), w = (e) => e.filter((r) => r.category_guid === r.top_level_category_guid), F = (e, r) => {
9
+ if (r === 0) return 0;
10
+ const o = (e - r) / r;
11
+ return isNaN(o) ? 0 : o;
12
+ }, g = (e, r) => {
13
+ const o = [];
14
+ let t = _(r?.start ?? y(/* @__PURE__ */ new Date(), 5));
15
+ const s = r?.end ?? /* @__PURE__ */ new Date();
16
+ for (; d(t, s); )
17
+ o.push({
18
+ x: m(t, T.MONTH_SHORT),
19
+ y: e.filter((a) => a.year === t.getFullYear() && a.month === t.getMonth() + 1).reduce((a, c) => a + c.total, 0)
20
+ }), t = u(t, 1);
21
+ return o;
22
+ }, A = (e, r) => {
23
+ const o = e.filter(i);
24
+ return g(o, r).map((t) => ({ ...t, y: Math.abs(t.y) }));
25
+ }, b = (e, r) => {
26
+ const o = e.filter(p);
27
+ return g(o, r).map((t) => ({ ...t, y: Math.abs(t.y) }));
28
+ }, x = (e, r) => {
29
+ const o = e.filter(N);
30
+ return g(o, r);
31
+ }, H = (e) => {
32
+ const r = [], o = e.filter(
33
+ (a) => a.top_level_category_guid !== n.INCOME && a.top_level_category_guid !== n.TRANSFER && a.total > 0
34
+ );
35
+ let t = _(y(/* @__PURE__ */ new Date(), 5));
36
+ const s = M(/* @__PURE__ */ new Date());
37
+ for (; d(t, s); )
38
+ r.push({
39
+ x: m(t, T.MONTH_SHORT),
40
+ y: o.filter((a) => a.year === t.getFullYear() && a.month === t.getMonth() + 1).reduce((a, c) => a + c.total, 0)
41
+ }), t = u(t, 1);
42
+ return r;
43
+ };
44
+ export {
45
+ b as a,
46
+ x as b,
47
+ f as c,
48
+ w as d,
49
+ C as e,
50
+ i as f,
51
+ A as g,
52
+ H as h,
53
+ h as i,
54
+ F as j
55
+ };
@@ -0,0 +1,30 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import i from "@mui/material/Box";
3
+ import p from "@mui/material/Stack";
4
+ const s = ({ data: c, height: r = 8 }) => {
5
+ const o = `${r / 4}px`;
6
+ return /* @__PURE__ */ a(
7
+ p,
8
+ {
9
+ bgcolor: "divider",
10
+ borderRadius: o,
11
+ direction: "row",
12
+ gap: 2,
13
+ height: r,
14
+ width: "100%",
15
+ children: c.map((t, d) => /* @__PURE__ */ a(
16
+ i,
17
+ {
18
+ bgcolor: t.color,
19
+ borderRadius: o,
20
+ height: r,
21
+ width: t.percentage
22
+ },
23
+ d
24
+ ))
25
+ }
26
+ );
27
+ }, l = s;
28
+ export {
29
+ l as S
30
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ const b = ({
3
+ children: o,
4
+ index: t,
5
+ name: a,
6
+ value: n,
7
+ ...r
8
+ }) => /* @__PURE__ */ e(
9
+ "div",
10
+ {
11
+ "aria-labelledby": `${a}-tab-${t}`,
12
+ hidden: n !== t,
13
+ id: `${a}-tabpanel-${t}`,
14
+ role: "tabpanel",
15
+ ...r,
16
+ children: n === t && o
17
+ }
18
+ ), i = b;
19
+ export {
20
+ i as T
21
+ };
@@ -0,0 +1,312 @@
1
+ import { jsxs as h, jsx as o } from "react/jsx-runtime";
2
+ import A from "react";
3
+ import { css as p } from "@mxenabled/cssinjs";
4
+ import { addDays as b } from "date-fns/addDays";
5
+ import { addMonths as B } from "date-fns/addMonths";
6
+ import { eachDayOfInterval as P } from "date-fns/eachDayOfInterval";
7
+ import { eachWeekOfInterval as $ } from "date-fns/eachWeekOfInterval";
8
+ import { endOfMonth as U } from "date-fns/endOfMonth";
9
+ import { format as y } from "date-fns/format";
10
+ import { isBefore as j } from "date-fns/isBefore";
11
+ import { isSameMonth as W } from "date-fns/isSameMonth";
12
+ import { startOfMonth as V } from "date-fns/startOfMonth";
13
+ import { startOfToday as f } from "date-fns/startOfToday";
14
+ import { subMonths as Y } from "date-fns/subMonths";
15
+ import E from "@mui/material/Button";
16
+ import z from "@mui/material/Paper";
17
+ import { useTokens as v, H2 as F, Text as G } from "@mxenabled/mxui";
18
+ import { ChevronLeft as X, ChevronRight as Z } from "@mxenabled/mx-icons";
19
+ import { f as q, D as J } from "./Dialog-CWW597AF.mjs";
20
+ import { isSameDay as T } from "date-fns/isSameDay";
21
+ import { isWithinInterval as Q } from "date-fns/isWithinInterval";
22
+ import nn from "@mui/material/styles/useTheme";
23
+ import k from "@mui/material/ListItem";
24
+ import an from "@mui/material/ListItemButton";
25
+ import { g as tn } from "./hooks-30y_BLwc.mjs";
26
+ const on = ({ copy: n, date: t, onNextClick: e, onPreviousClick: r }) => {
27
+ const c = v(), l = en(c);
28
+ return /* @__PURE__ */ h("div", { className: `mx-cmn-calendar-header ${l}`, children: [
29
+ /* @__PURE__ */ o(F, { className: "mx-cmn-calendar-header-title", variant: "H3", children: q(t, J.MONTH_YEAR) }),
30
+ /* @__PURE__ */ h("div", { className: "mx-cmn-calendar-header-button-container", children: [
31
+ /* @__PURE__ */ o(E, { "aria-label": n.prevAria, onClick: r, children: /* @__PURE__ */ o(X, { size: 24 }) }),
32
+ /* @__PURE__ */ o(E, { "aria-label": n.nextAria, onClick: e, children: /* @__PURE__ */ o(Z, { size: 24 }) })
33
+ ] })
34
+ ] });
35
+ }, en = (n) => p({
36
+ alignItems: "center",
37
+ display: "flex",
38
+ marginBottom: n.Spacing.Medium,
39
+ marginRight: -n.Spacing.Medium,
40
+ paddingLeft: n.Spacing.XSmall,
41
+ "& .mx-cmn-calendar-header-title": {
42
+ flexGrow: 1
43
+ },
44
+ "& .mx-cmn-calendar-header-button-container": {
45
+ display: "flex",
46
+ gap: 4
47
+ }
48
+ }), rn = ({ beginDate: n, date: t, endDate: e, isInMonth: r, onClick: c }) => {
49
+ const l = nn(), S = cn(l), g = n && e && Q(t, { start: n, end: e }) && !T(t, n) && !T(t, e), s = n && e && T(n, t) && !T(n, e), N = e && n && T(e, t) && !T(n, e), i = n && T(n, t) || e && T(e, t), C = T(t, f());
50
+ return /* @__PURE__ */ o(
51
+ "div",
52
+ {
53
+ className: `
54
+ mx-cmn-calendar-day
55
+ ${S}
56
+ ${r ? "" : "mx-cmn-out-of-month"}
57
+ ${g ? "mx-cmn-date-interval" : ""}
58
+ `,
59
+ children: /* @__PURE__ */ o(
60
+ E,
61
+ {
62
+ className: `
63
+ mx-cmn-calendar-day-button
64
+ ${s ? "mx-cmn-range-start" : ""}
65
+ ${N ? "mx-cmn-range-end" : ""}
66
+ `,
67
+ color: i ? "primary" : "secondary",
68
+ onClick: () => c(t),
69
+ variant: i ? "contained" : "text",
70
+ children: /* @__PURE__ */ o(
71
+ G,
72
+ {
73
+ className: `
74
+ mx-cmn-calendar-day-text
75
+ ${i ? "mx-cmn-day-selected" : ""}
76
+ ${C ? "mx-cmn-today" : ""}`,
77
+ variant: "Small",
78
+ children: y(t, "d")
79
+ }
80
+ )
81
+ }
82
+ )
83
+ }
84
+ );
85
+ }, cn = (n) => p({
86
+ height: I,
87
+ width: I,
88
+ display: "flex",
89
+ justifyContent: "center",
90
+ "&.mx-cmn-out-of-month": {
91
+ backgroundColor: n.palette.background.default
92
+ },
93
+ "&.mx-cmn-date-interval": {
94
+ backgroundColor: n.palette.secondary.light
95
+ },
96
+ "& .MuiButton-root": {
97
+ maxWidth: 44,
98
+ minWidth: 44,
99
+ height: 44,
100
+ padding: 0,
101
+ width: 44,
102
+ "&.mx-cmn-range-start": {
103
+ borderTopRightRadius: 0,
104
+ borderBottomRightRadius: 0,
105
+ "&:focus": {
106
+ boxShadow: "none"
107
+ }
108
+ },
109
+ "&.mx-cmn-range-end": {
110
+ borderTopLeftRadius: 0,
111
+ borderBottomLeftRadius: 0,
112
+ "&:focus": {
113
+ boxShadow: "none"
114
+ }
115
+ }
116
+ },
117
+ "& .mx-cmn-calendar-day-text": {
118
+ "&.mx-cmn-day-selected": {
119
+ color: n.palette.primary,
120
+ "&.mx-cmn-day-selected": {
121
+ borderColor: n.palette.common.white
122
+ }
123
+ },
124
+ "&.mx-cmn-today": {
125
+ borderBottom: `solid 2px ${n.palette.primary.main}`,
126
+ marginBottom: -6,
127
+ paddingBottom: 5
128
+ }
129
+ }
130
+ }), sn = 340, I = 44;
131
+ var Tn = /* @__PURE__ */ ((n) => (n.None = "None", n.Single = "Single", n.Range = "Range", n))(Tn || {});
132
+ const ln = ({
133
+ copy: n,
134
+ beginDate: t = void 0,
135
+ endDate: e = void 0,
136
+ onDateSelected: r,
137
+ onRangeSelected: c,
138
+ selectionType: l = "Single"
139
+ /* Single */
140
+ }) => {
141
+ const S = v(), g = Cn(S), [s, N] = A.useState(f), [i, C] = A.useState(t), [R, d] = A.useState(e);
142
+ A.useEffect(() => {
143
+ C(t), d(e), t && N(t);
144
+ }, [t, e]);
145
+ const D = A.useMemo(() => {
146
+ const a = $({ start: V(s), end: U(s) }), m = [];
147
+ for (let _ = 0; _ < a.length; _++) {
148
+ const O = a[_], x = P({ start: O, end: b(O, 6) }), u = [];
149
+ for (let L = 0; L < x.length; L++)
150
+ u.push(x[L]);
151
+ m.push(u);
152
+ }
153
+ return m;
154
+ }, [s]), K = (a) => {
155
+ if (l !== "None") {
156
+ if (l === "Single") {
157
+ C(a), r?.(a);
158
+ return;
159
+ }
160
+ !i || R ? (C(a), d(void 0)) : j(a, i) ? (d(i), C(a), c?.(a, i)) : (d(a), c?.(i, a));
161
+ }
162
+ }, M = () => {
163
+ const a = f();
164
+ N(a), l !== "None" && (C(a), l === "Single" ? r?.(a) : (d(a), c?.(a, a)));
165
+ }, w = () => {
166
+ N(B(s, 1));
167
+ }, H = () => {
168
+ N(Y(s, 1));
169
+ };
170
+ return /* @__PURE__ */ o("div", { className: `mx-cmn-calendar ${g}`, children: /* @__PURE__ */ h(z, { sx: { boxShadow: "none" }, children: [
171
+ /* @__PURE__ */ o(
172
+ on,
173
+ {
174
+ copy: n,
175
+ date: s,
176
+ onNextClick: w,
177
+ onPreviousClick: H
178
+ }
179
+ ),
180
+ /* @__PURE__ */ o("div", { className: "mx-cmn-calendar-header-row", children: D[0].map((a, m) => /* @__PURE__ */ o("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ o(G, { bold: !0, variant: "Small", children: y(a, "EEEEE") }) }, m)) }),
181
+ D.map((a, m) => /* @__PURE__ */ o("div", { className: "mx-cmn-calendar-week", children: a.map((_, O) => /* @__PURE__ */ o(
182
+ rn,
183
+ {
184
+ beginDate: i,
185
+ date: _,
186
+ endDate: R,
187
+ isInMonth: W(_, s),
188
+ onClick: K
189
+ },
190
+ O
191
+ )) }, `w-${m}`)),
192
+ /* @__PURE__ */ o("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ o(E, { onClick: M, size: "small", variant: "text", children: n.today }) })
193
+ ] }) });
194
+ }, Cn = (n) => p({
195
+ width: sn,
196
+ "& .MuiPaper-root": {
197
+ paddingLeft: 24,
198
+ paddingRight: 24,
199
+ paddingTop: 4,
200
+ paddingBottom: 4
201
+ },
202
+ "& .mx-cmn-calendar-header-row": {
203
+ display: "flex",
204
+ justifyContent: "center",
205
+ textAlign: "center",
206
+ "& .mx-cmn-calendar-header-cell": {
207
+ height: I,
208
+ width: I,
209
+ minWidth: I,
210
+ "& .kmui-text": {
211
+ alignItems: "center",
212
+ display: "flex",
213
+ height: "100%",
214
+ justifyContent: "center",
215
+ width: "100%"
216
+ }
217
+ }
218
+ },
219
+ "& .mx-cmn-calendar-week": {
220
+ display: "flex",
221
+ justifyContent: "center",
222
+ textAlign: "center"
223
+ },
224
+ "& .mx-cmn-calendar-today-container": {
225
+ display: "block",
226
+ marginTop: n.Spacing.Medium,
227
+ textAlign: "center",
228
+ width: "100%",
229
+ "& > .MuiButton-root": {
230
+ display: "inline-block",
231
+ marginLeft: "auto",
232
+ marginRight: "auto"
233
+ }
234
+ }
235
+ }), Bn = ln, Pn = ({
236
+ children: n,
237
+ clickEventName: t,
238
+ onClick: e,
239
+ sx: r = {}
240
+ }) => {
241
+ const { onEvent: c } = tn();
242
+ return e ? /* @__PURE__ */ o(k, { sx: { bgcolor: "background.paper", ...r }, children: /* @__PURE__ */ o(
243
+ an,
244
+ {
245
+ onClick: () => {
246
+ t && c(t), e();
247
+ },
248
+ children: n
249
+ }
250
+ ) }) : /* @__PURE__ */ o(
251
+ k,
252
+ {
253
+ disableGutters: !1,
254
+ disablePadding: !1,
255
+ sx: { bgcolor: "background.paper", ...r },
256
+ children: n
257
+ }
258
+ );
259
+ }, $n = {
260
+ ON_TRANSACTION_CATEGORY_CLICK: "onTransactionCategoryClick",
261
+ ON_TRANSACTION_CATEGORY_CHANGED: "onTransactionCategoryChanged",
262
+ ON_TRANSACTION_MANUAL_ADD_CLICK: "onTransactionManualAddClick",
263
+ ON_TRANSACTION_MANUAL_ADD_ADDED: "onTransactionManualAddAdded",
264
+ ON_TRANSACTION_DATE_CHANGED: "onTransactionDateChanged",
265
+ ON_TRANSACTION_DATE_CLICK: "onTransactionDateClick",
266
+ ON_TRANSACTION_DELETE_CANCEL: "onTransactionDeleteCancel",
267
+ ON_TRANSACTION_DELETE_CLICK: "onTransactionDeleteClick",
268
+ ON_TRANSACTION_DELETE_DELETED: "onTransactionDeleted",
269
+ ON_TRANSACTION_DELETE_LOGO_CANCEL: "onTransactionDeleteLogoCancel",
270
+ ON_TRANSACTION_DELETE_LOGO_CLICK: "onTransactionDeleteLogoClick",
271
+ ON_TRANSACTION_DELETE_LOGO_DELETED: "onTransactionDeletedLogo",
272
+ ON_TRANSACTION_DESCRIPTION_EDIT_CLICK: "onTransactionDescriptionEditClick",
273
+ ON_TRANSACTION_DESCRIPTION_SAVE_CLICK: "onTransactionDescriptionSaveClick",
274
+ ON_TRANSACTION_EXPORT_CSV_CLICK: "onTransactionExportCsvClick",
275
+ ON_TRANSACTION_HIDDEN: "onTransactionHidden",
276
+ ON_TRANSACTION_HIDE_CLICK: "onTransactionHideClick",
277
+ ON_TRANSACTION_HIDE_CANCEL_CLICK: "onTransactionHideCancelClick",
278
+ ON_TRANSACTION_LIST_ITEM_CLICK: "onTransactionListItemClick",
279
+ ON_TRANSACTION_MEMO_CHANGED: "onTransactionMemoChanged",
280
+ ON_TRANSACTION_MEMO_CLICK: "onTransactionMemoClick",
281
+ ON_TRANSACTION_SPLIT_ADD_CLICK: "onTransactionSplitAddClick",
282
+ ON_TRANSACTION_SPLIT_CANCEL_CLICK: "onTransactionSplitCancelClick",
283
+ ON_TRANSACTION_SPLIT_CATEGORY_CLICK: "onTransactionSplitCategoryClick",
284
+ ON_TRANSACTION_SPLIT_CLICK: "onTransactionSplitClick",
285
+ ON_TRANSACTION_SPLIT_DELETE_CLICK: "onTransactionSplitDeleteClick",
286
+ ON_TRANSACTION_SPLIT_SAVE_CLICK: "onTransactionSplitSaveClick",
287
+ ON_TRANSACTION_TAGS_CHANGED: "onTransactionTagsChanged",
288
+ ON_TRANSACTION_TAGS_CLICK: "onTransactionTagsClick",
289
+ ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK: "onTransactionTagsTagAddCancelClick",
290
+ ON_TRANSACTION_TAGS_TAG_ADD_CLICK: "onTransactionTagsTagAddClick",
291
+ ON_TRANSACTION_TAGS_TAG_ADDED: "onTransactionTagsTagAdded",
292
+ ON_TRANSACTION_TAGS_TAG_DELETE_CLICK: "onTransactionTagsTagDeleteClick",
293
+ ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK: "onTransactionTagsTagDeleteCancelClick",
294
+ ON_TRANSACTION_TAGS_TAG_DELETED: "onTransactionTagsTagDeleted",
295
+ ON_TRANSACTION_TAGS_TAG_EDIT_CLICK: "onTransactionTagsTagEditClick",
296
+ ON_TRANSACTION_TAGS_TAG_EDIT_SAVED: "onTransactionTagsTagEditSavedClick",
297
+ ON_TRANSACTION_TOGGLE_FLAG_CLICK: "onTransactionToggleFlagClick",
298
+ ON_TRANSACTION_UNHIDDEN: "onTransactionUnHidden",
299
+ ON_TRANSACTION_UNHIDE_CLICK: "onTransactionUnHideClick",
300
+ ON_TRANSACTION_UNHIDE_CANCEL_CLICK: "onTransactionUnHideCancelClick",
301
+ ON_TRANSACTION_UNSPLIT: "onTransactionUnsplit",
302
+ ON_TRANSACTION_UNSPLIT_CANCEL: "onTransactionUnsplitCancel"
303
+ };
304
+ var Nn = /* @__PURE__ */ ((n) => (n[n.CREDIT = 1] = "CREDIT", n[n.DEBIT = 2] = "DEBIT", n))(Nn || {}), mn = /* @__PURE__ */ ((n) => (n[n.POSTED = 1] = "POSTED", n[n.PENDING = 2] = "PENDING", n))(mn || {});
305
+ export {
306
+ Bn as C,
307
+ Pn as L,
308
+ $n as O,
309
+ Nn as T,
310
+ mn as a,
311
+ Tn as b
312
+ };
@@ -0,0 +1,86 @@
1
+ import { F as T, A as e } from "./Fetch-CkFKy79O.mjs";
2
+ class u {
3
+ fetchInstance;
4
+ constructor(t, n) {
5
+ this.fetchInstance = new T(t, n);
6
+ }
7
+ addTag = async (t) => this.fetchInstance.post(e.TAGS, t).then((n) => n.tag);
8
+ addTagging = async (t) => this.fetchInstance.post(e.TAGGINGS, t).then((n) => n.tagging);
9
+ addTransaction = async (t) => this.fetchInstance.post(e.TRANSACTIONS, t).then((n) => n.transaction);
10
+ addTransactionRule = async (t) => this.fetchInstance.post(e.TRANSACTION_RULES, t).then((n) => n);
11
+ getTaggings = async () => this.fetchInstance.get(e.TAGGINGS).then((t) => t.map((n) => n.tagging));
12
+ getTags = async () => this.fetchInstance.get(e.TAGS).then((t) => t.map((n) => n.tag));
13
+ getTransactionRules = async () => this.fetchInstance.get(e.TRANSACTION_RULES).then((t) => t.transaction_rules);
14
+ getTransactionsByDateRange = async (t, n) => this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${t}/${n}`).then((c) => c.map((a) => a.transaction));
15
+ // DEPRECATED
16
+ getTransactionsByAccountsAndDateRange = async (t, n, c) => {
17
+ console.warn("DEPRECATED: getTransactionsByAccountsAndDateRange will be removed");
18
+ const a = t.reduce(
19
+ (o, s, r) => `${o}account_guids[]=${s}${r !== t.length - 1 ? "&" : ""}`,
20
+ ""
21
+ );
22
+ return this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${n}/${c}?${a}`).then((o) => o.map((s) => s.transaction));
23
+ };
24
+ // DEPRECATED
25
+ getTransactionsByGuids = async (t) => (console.warn("DEPRECATED: getTransactionsByGuids will be removed"), this.fetchInstance.post(`${e.TRANSACTIONS}/by_guids`, { guids: t.join("+") }).then((n) => n.map((c) => c.transaction)));
26
+ // DEPRECATED
27
+ getTransactionsByCategoryAndDate = async (t, n, c) => (console.warn("DEPRECATED: getTransactionsByCategoryAndDate will be removed"), this.fetchInstance.get(
28
+ `${e.TRANSACTIONS}/by_category_guid/${t}/by_date/${n}/${c}`
29
+ ).then((a) => a.map((o) => o.transaction)));
30
+ // DEPRECATED
31
+ getTransactionsByCategoryDateAndAccounts = async (t, n, c, a) => {
32
+ console.warn("DEPRECATED: getTransactionsByCategoryDateAndAccounts will be removed");
33
+ const o = a.reduce(
34
+ (s, r, i) => `${s}account_guids[]=${r}${i !== a.length - 1 ? "&" : ""}`,
35
+ ""
36
+ );
37
+ return this.fetchInstance.get(
38
+ `${e.TRANSACTIONS}/by_category_guid/${t}/by_date/${n}/${c}?${o}`
39
+ ).then((s) => s.map((r) => r.transaction));
40
+ };
41
+ // DEPRECATED
42
+ getTransactionsByCategoriesDateAndAccounts = async (t, n, c, a) => {
43
+ console.warn("DEPRECATED: getTransactionsByCategoriesDateAndAccounts will be removed");
44
+ const o = a.reduce(
45
+ (s, r, i) => `${s}account_guids[]=${r}${i !== a.length - 1 ? "&" : ""}`,
46
+ ""
47
+ );
48
+ return this.fetchInstance.get(
49
+ `${e.TRANSACTIONS}/by_category_guids/${t.join(
50
+ "+"
51
+ )}/by_date/${n}/${c}?${o}`
52
+ ).then((s) => s.map((r) => r.transaction));
53
+ };
54
+ /**
55
+ * DEPRECATED
56
+ * Get all transactions by the top level category, between begin date and end date, and optionally
57
+ * filtered by accounts
58
+ * @param categoryGuid The top level category guid
59
+ * @param beginDate the start date
60
+ * @param endDate the end date
61
+ * @param accountGuids an optional list of account guids
62
+ */
63
+ getTransactionsByTopLevelCategoryAndDate = async (t, n, c, a = []) => {
64
+ console.warn("DEPRECATED: getTransactionsByTopLevelCategoryAndDate will be removed");
65
+ let o = `${e.TRANSACTIONS}/by_top_level_category_guid/${t}/by_date/${n}/${c}`;
66
+ if (a.length > 0) {
67
+ const s = a.reduce(
68
+ (r, i, g) => `${r}account_guids[]=${i}${g !== a.length - 1 ? "&" : ""}`,
69
+ ""
70
+ );
71
+ o += `?${s}`;
72
+ }
73
+ return this.fetchInstance.get(o).then((s) => s.map((r) => r.transaction));
74
+ };
75
+ removeTag = async (t) => this.fetchInstance.delete(`${e.TAGS}/${t}`).then((n) => n);
76
+ removeTagging = async (t) => this.fetchInstance.delete(`${e.TAGGINGS}/${t}`).then((n) => n);
77
+ removeTransaction = async (t) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${t}`).then((n) => n);
78
+ removeTransactionRule = async (t) => this.fetchInstance.delete(`${e.TRANSACTION_RULES}/${t}`);
79
+ removeTransactionSplit = async (t) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${t}/unsplit`).then((n) => n);
80
+ updateTransactionRule = async (t) => this.fetchInstance.put(`${e.TRANSACTION_RULES}/${t.guid}`, t).then((n) => n);
81
+ updateTag = async (t) => this.fetchInstance.put(`${e.TAGS}/${t.guid}`, t).then((n) => n.tag);
82
+ updateTransaction = async (t) => this.fetchInstance.put(`${e.TRANSACTIONS}/${t.guid}`, t).then((n) => n.transaction);
83
+ }
84
+ export {
85
+ u as T
86
+ };