@mx-cartographer/experiences 7.7.2 → 7.8.0-alpha-ram-goal-bug
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/Account-BiB1F8lL.mjs +118 -0
- package/dist/{Account-BfkKlfsW.mjs → Account-DuOz1a27.mjs} +1 -1
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/{AccountDetailsHeader-DqYIuhOs.mjs → AccountDetailsHeader-Cf2TUJnM.mjs} +4 -4
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-yP8QdgPd.mjs → AccountFields-UdOvbQ5H.mjs} +7 -6
- package/dist/{AccountListItem-DMbu9ehd.mjs → AccountListItem-BPVxmNT_.mjs} +7 -7
- package/dist/AccountStore-BbPWe2C9.mjs +244 -0
- package/dist/Accounts-M-LTzStv.mjs +27 -0
- package/dist/{CategoryStore-Cnw9yUys.mjs → CategoryStore-BYICdb9m.mjs} +73 -73
- package/dist/CategoryUtil-meuejJqP.mjs +80 -0
- package/dist/{ConnectionsDrawer-BqR6FWJO.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +1 -1
- package/dist/{DebtsStore-DuSdXM1k.mjs → DebtsStore-BIbOVCPe.mjs} +12 -12
- package/dist/{ExportCsvAction-HK5CeZWR.mjs → ExportCsvAction-CDuzTva1.mjs} +2 -2
- package/dist/GlobalAccountFilter-DQCPNc95.mjs +316 -0
- package/dist/GoalStore-B4LVt_kH.mjs +422 -0
- package/dist/{ManageIncome-BrTrlplL.mjs → ManageIncome-CL3hv8i9.mjs} +44 -44
- package/dist/NetWorthStore-yV43kJro.mjs +168 -0
- package/dist/{NotificationSettings-D4Vh3z8I.mjs → NotificationSettings-SPg3pwbX.mjs} +171 -169
- package/dist/{NotificationStore-CDX_kqHa.mjs → NotificationStore-Ck2KdNmT.mjs} +22 -14
- package/dist/{RecurringSettings-D2V6l77l.mjs → RecurringSettings-Bmnnpb48.mjs} +16 -16
- package/dist/{RecurringTransactionsStore-Caf1cq4v.mjs → RecurringTransactionsStore-BQBEJOPP.mjs} +91 -81
- package/dist/{RecurringTransactions-Bf4lX0Cn.mjs → RepeatingTransaction-miZVnk_A.mjs} +4 -4
- package/dist/{SettingsStore-krIRNwHK.mjs → SettingsStore-BHpuyujx.mjs} +1 -1
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingLegend-gTCJLLkV.mjs → SpendingLegend-CD60HCYS.mjs} +33 -33
- package/dist/{TransactionDetails-7MHOshKQ.mjs → TransactionDetails-BDhz3DLT.mjs} +2 -2
- package/dist/TransactionStore-BSp5bOKg.mjs +705 -0
- package/dist/{User-LJpEwPtn.mjs → User-B0LnmiKO.mjs} +21 -20
- package/dist/WidgetContainer-BbPS3Yxz.mjs +555 -0
- package/dist/accounts/index.es.js +421 -391
- package/dist/accounts/stores/AccountStore.d.ts +30 -23
- package/dist/accounts/utils/Accounts.d.ts +2 -1
- package/dist/budgets/index.es.js +546 -540
- package/dist/budgets/store/BudgetsStore.d.ts +1 -0
- package/dist/cashflow/index.es.js +444 -457
- package/dist/categories/index.es.js +1 -1
- package/dist/categories/stores/CategoryStore.d.ts +10 -5
- package/dist/categories/util/CategoryUtil.d.ts +3 -2
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +459 -445
- package/dist/common/stores/AppDataStore.d.ts +3 -1
- package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
- package/dist/common/stores/GlobalStore.d.ts +3 -3
- package/dist/common/stores/GlobalUiStore.d.ts +10 -6
- package/dist/common/stores/UserStore.d.ts +3 -2
- package/dist/common/types/Account.d.ts +9 -6
- package/dist/dashboard/index.es.js +84 -116
- package/dist/debts/index.es.js +417 -413
- package/dist/{exportTransactionsToCSV-BrTYdSgJ.mjs → exportTransactionsToCSV-DtQ7ovAR.mjs} +1 -1
- package/dist/finstrong/index.es.js +1167 -1110
- package/dist/goals/index.es.js +618 -598
- package/dist/goals/stores/GoalStore.d.ts +19 -4
- package/dist/help/index.es.js +13 -13
- package/dist/investments/index.es.js +330 -325
- package/dist/investments/stores/HoldingStore.d.ts +1 -0
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +423 -433
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +90 -91
- package/dist/notifications/stores/NotificationStore.d.ts +3 -1
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +543 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +4 -2
- package/dist/settings/index.es.js +253 -248
- package/dist/spending/index.es.js +282 -301
- package/dist/transactions/index.es.js +269 -263
- package/dist/transactions/stores/TransactionStore.d.ts +26 -77
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +708 -699
- package/dist/{useAccountDisplayName-BTvP_pw6.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
- package/package.json +3 -3
- package/dist/AccountStore-CWFzg8-E.mjs +0 -260
- package/dist/Accounts-CWt-NRq8.mjs +0 -9
- package/dist/CategoryUtil-DZflYFam.mjs +0 -78
- package/dist/ConnectDrawer-BOjfI6rz.mjs +0 -563
- package/dist/GoalStore-C7ahxxLi.mjs +0 -364
- package/dist/NetWorthStore-xWIo9CYU.mjs +0 -150
- package/dist/TransactionStore-DJwPaZuM.mjs +0 -677
- package/dist/WidgetContainer-CrK6tyHr.mjs +0 -572
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
package/dist/common/index.es.js
CHANGED
|
@@ -1,79 +1,80 @@
|
|
|
1
|
-
import { G as
|
|
2
|
-
import { A as rs, a as os, u as as, b as
|
|
3
|
-
import { F as
|
|
1
|
+
import { G as R } from "../useCombineEvents-CRwX-qWE.mjs";
|
|
2
|
+
import { A as rs, a as os, u as as, b as is } from "../useCombineEvents-CRwX-qWE.mjs";
|
|
3
|
+
import { F as y, A as h } from "../Fetch-DecPFeGU.mjs";
|
|
4
4
|
import { B as cs } from "../BeatApi-De2IaqH2.mjs";
|
|
5
|
-
import { C as
|
|
6
|
-
import { a as
|
|
7
|
-
import { N as
|
|
8
|
-
import { a as hs } from "../NotificationStore-
|
|
9
|
-
import { T as
|
|
10
|
-
import { C as ps, b as ms, L as _s, a as fs } from "../User-
|
|
11
|
-
import { H as
|
|
5
|
+
import { C as st } from "../CategoryStore-BYICdb9m.mjs";
|
|
6
|
+
import { a as us } from "../CategoryStore-BYICdb9m.mjs";
|
|
7
|
+
import { N as rt } from "../NotificationStore-Ck2KdNmT.mjs";
|
|
8
|
+
import { a as hs } from "../NotificationStore-Ck2KdNmT.mjs";
|
|
9
|
+
import { T as ot } from "../User-B0LnmiKO.mjs";
|
|
10
|
+
import { C as ps, b as ms, L as _s, a as fs } from "../User-B0LnmiKO.mjs";
|
|
11
|
+
import { H as at } from "../Help-DhcC-C05.mjs";
|
|
12
12
|
import { E as Ss } from "../Help-DhcC-C05.mjs";
|
|
13
13
|
import { M as ws } from "../MicroWidgetContainer-B2hO9rOG.mjs";
|
|
14
|
-
import { M as
|
|
15
|
-
import { A as
|
|
16
|
-
import {
|
|
17
|
-
import { C as
|
|
18
|
-
import { L as
|
|
19
|
-
import { R as
|
|
20
|
-
import { S as
|
|
21
|
-
import { T as
|
|
22
|
-
import { S as
|
|
23
|
-
import { T as
|
|
24
|
-
import { I as
|
|
25
|
-
import { D as
|
|
14
|
+
import { M as xs } from "../MiniWidgetContainer-98-hKFqm.mjs";
|
|
15
|
+
import { A as As, D as vs, W as Es } from "../WidgetContainer-BbPS3Yxz.mjs";
|
|
16
|
+
import { b as Bs, G as Is } from "../GlobalAccountFilter-DQCPNc95.mjs";
|
|
17
|
+
import { C as Ms } from "../CurrencyInput-itK0R3wV.mjs";
|
|
18
|
+
import { L as Us } from "../Loader-DUaFpDGv.mjs";
|
|
19
|
+
import { R as Rs } from "../ResponsiveButton-DZFp78fJ.mjs";
|
|
20
|
+
import { S as Os } from "../SearchBox-B2_zLv8-.mjs";
|
|
21
|
+
import { T as it } from "../TransactionStore-BSp5bOKg.mjs";
|
|
22
|
+
import { S as Fs } from "../TransactionStore-BSp5bOKg.mjs";
|
|
23
|
+
import { T as Gs } from "../TabContentContainer-j01JYR_7.mjs";
|
|
24
|
+
import { I as qs } from "../IconBacking-B9oC6uL2.mjs";
|
|
25
|
+
import { D as Qs, F as Xs, c as js, d as Ks, R as zs, S as Vs } from "../RepeatingTransaction-miZVnk_A.mjs";
|
|
26
26
|
import { C as nt } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
27
|
-
import { I as
|
|
28
|
-
import { d as
|
|
29
|
-
import { C as
|
|
30
|
-
import { C as
|
|
31
|
-
import { E as
|
|
32
|
-
import { L as
|
|
33
|
-
import { T as
|
|
34
|
-
import { L as
|
|
35
|
-
import { A as
|
|
36
|
-
import { jsxs as
|
|
37
|
-
import
|
|
38
|
-
import { css as
|
|
39
|
-
import { useTokens as
|
|
40
|
-
import { S as
|
|
41
|
-
import { D as
|
|
42
|
-
import { D as
|
|
43
|
-
import { S as
|
|
44
|
-
import { D as
|
|
45
|
-
import { I as
|
|
27
|
+
import { I as Js } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
28
|
+
import { d as ct } from "../GoalStore-B4LVt_kH.mjs";
|
|
29
|
+
import { C as er, G as sr, M as rr, T as or } from "../GoalStore-B4LVt_kH.mjs";
|
|
30
|
+
import { C as ir } from "../CurrencyText-C-85TnUF.mjs";
|
|
31
|
+
import { E as cr } from "../EmptyState-DoxNUae-.mjs";
|
|
32
|
+
import { L as ur } from "../ListItemAction-CU42h39I.mjs";
|
|
33
|
+
import { T as dt } from "../TrendsStore-DXQnmdc8.mjs";
|
|
34
|
+
import { L as hr } from "../TrendsStore-DXQnmdc8.mjs";
|
|
35
|
+
import { A as pr, B as mr, I as _r, N as fr, T as yr, a as Sr } from "../Notification-Bs1fdbzI.mjs";
|
|
36
|
+
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
37
|
+
import ut, { useRef as lt, useEffect as ht } from "react";
|
|
38
|
+
import { css as C, keyframes as gt } from "@mxenabled/cssinjs";
|
|
39
|
+
import { useTokens as x, Text as B } from "@mxenabled/mxui";
|
|
40
|
+
import { S as wr } from "../StatusBar-BK_uYHAB.mjs";
|
|
41
|
+
import { D as xr, a as Dr, O as Ar, b as vr, f as Er } from "../Dialog-B4PI-_bL.mjs";
|
|
42
|
+
import { D as pt, a as mt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
43
|
+
import { S as Br } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
44
|
+
import { D as Nr } from "../Drawer-DV4NTsFg.mjs";
|
|
45
|
+
import { I as Lr, P as Ur, S as $r } from "../Account-DuOz1a27.mjs";
|
|
46
46
|
import { b as E } from "../Category-CevNQ03n.mjs";
|
|
47
|
-
import { C as
|
|
48
|
-
import { C as
|
|
49
|
-
import { R as
|
|
50
|
-
import { S as
|
|
51
|
-
import { G as
|
|
52
|
-
import { u as
|
|
53
|
-
import { u as
|
|
54
|
-
import { u as
|
|
55
|
-
import { u as
|
|
56
|
-
import { makeAutoObservable as
|
|
57
|
-
import {
|
|
47
|
+
import { C as kr, c as Or, a as Pr, P as Fr } from "../Category-CevNQ03n.mjs";
|
|
48
|
+
import { C as Gr, f as Wr, b as qr, a as Yr, g as Qr, i as Xr } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
49
|
+
import { R as _t } from "../RecurringTransactionsStore-BQBEJOPP.mjs";
|
|
50
|
+
import { S as Kr, T as zr } from "../RecurringTransactionsStore-BQBEJOPP.mjs";
|
|
51
|
+
import { G as Zr, C as Jr, D as to, W as eo, d as so, a as ro, i as oo, t as ao, m as io, w as no, x as co, g as uo, z as lo, u as ho, f as go, b as po, l as mo, A as _o, s as fo, y as yo, c as So, q as bo, n as wo, B as Co, j as xo, r as Do, h as Ao, v as vo, o as Eo, p as To } from "../hooks-ZMp65DFz.mjs";
|
|
52
|
+
import { u as Io } from "../useAccountDisplayName-Bot2tb4n.mjs";
|
|
53
|
+
import { u as Mo } from "../useInsightsEnabled-B7dxpDrX.mjs";
|
|
54
|
+
import { u as Uo } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
55
|
+
import { u as Ro } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
56
|
+
import { makeAutoObservable as _, runInAction as S, reaction as Z, autorun as ft } from "mobx";
|
|
57
|
+
import { A as yt } from "../AccountStore-BbPWe2C9.mjs";
|
|
58
58
|
import St from "posthog-js";
|
|
59
59
|
import { B as bt } from "../BeatStore-D_NYuBSz.mjs";
|
|
60
|
-
import { endOfMonth as
|
|
61
|
-
import { startOfMonth as
|
|
62
|
-
import { startOfToday as
|
|
63
|
-
import { f as wt, a as
|
|
64
|
-
import { g as
|
|
65
|
-
import { a as
|
|
66
|
-
import { F as
|
|
67
|
-
import { A as
|
|
60
|
+
import { endOfMonth as J } from "date-fns/endOfMonth";
|
|
61
|
+
import { startOfMonth as tt } from "date-fns/startOfMonth";
|
|
62
|
+
import { startOfToday as k } from "date-fns/startOfToday";
|
|
63
|
+
import { f as wt, a as Ct, b as O } from "../BudgetUtil-BmZXkL0C.mjs";
|
|
64
|
+
import { g as Oo, e as Po, c as Fo, d as Ho, i as Go } from "../BudgetUtil-BmZXkL0C.mjs";
|
|
65
|
+
import { a as xt } from "../DebtsStore-BIbOVCPe.mjs";
|
|
66
|
+
import { F as Dt } from "../FinstrongStore-bEn_im_e.mjs";
|
|
67
|
+
import { A as At, m as vt, a as Et, b as Tt } from "../InvestmentUtil-jOyOgzIB.mjs";
|
|
68
68
|
import { M as Bt } from "../MerchantStore-WvZ4gnQe.mjs";
|
|
69
|
-
import { N as It } from "../NetWorthStore-
|
|
70
|
-
import { a as Nt } from "../SettingsStore-
|
|
69
|
+
import { N as It } from "../NetWorthStore-yV43kJro.mjs";
|
|
70
|
+
import { a as Nt } from "../SettingsStore-BHpuyujx.mjs";
|
|
71
71
|
import { addMonths as Mt } from "date-fns/addMonths";
|
|
72
72
|
import { getMonth as T } from "date-fns/getMonth";
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
|
|
73
|
+
import { a as qo, e as Yo, d as Qo, A as Xo, f as jo, C as Ko, g as zo, E as Vo, M as Zo, N as Jo, c as ta, P as ea, h as sa, S as ra } from "../Account-BiB1F8lL.mjs";
|
|
74
|
+
import { i as aa } from "../DateUtil-D7U-nc1Y.mjs";
|
|
75
|
+
import { b as na, a as ca, g as da } from "../Localization-2MODESHW.mjs";
|
|
76
|
+
import { alpha as Lt, lighten as P, darken as F } from "@mui/material";
|
|
77
|
+
var Ut = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.EveryWeek = 1] = "EveryWeek", s[s.EveryOtherWeek = 2] = "EveryOtherWeek", s[s.EveryMonth = 3] = "EveryMonth", s[s.EveryOtherMonth = 4] = "EveryOtherMonth", s[s.EveryQuarter = 5] = "EveryQuarter", s[s.EveryOtherQuarter = 6] = "EveryOtherQuarter", s[s.EveryYear = 7] = "EveryYear", s))(Ut || {});
|
|
77
78
|
const Qe = [
|
|
78
79
|
{ id: 0, copy: "frequency_unknown" },
|
|
79
80
|
{ id: 1, copy: "frequency_every_week" },
|
|
@@ -83,13 +84,13 @@ const Qe = [
|
|
|
83
84
|
{ id: 5, copy: "frequency_every_quarter" },
|
|
84
85
|
{ id: 6, copy: "frequency_every_other_quarter" },
|
|
85
86
|
{ id: 7, copy: "frequency_every_year" }
|
|
86
|
-
],
|
|
87
|
+
], Xe = {
|
|
87
88
|
ERROR: "ERROR",
|
|
88
89
|
LOADING: "LOADING",
|
|
89
90
|
SUCCESS: "SUCCESS"
|
|
90
91
|
};
|
|
91
|
-
var
|
|
92
|
-
const
|
|
92
|
+
var $t = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))($t || {}), Rt = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))(Rt || {});
|
|
93
|
+
const kt = [
|
|
93
94
|
"fontFamily",
|
|
94
95
|
"H1",
|
|
95
96
|
"h1",
|
|
@@ -118,42 +119,42 @@ const Pt = [
|
|
|
118
119
|
{ key: "warning", light: "warning_color", dark: "warning_color_dark" },
|
|
119
120
|
{ key: "info", light: "info_color", dark: "info_color_dark" },
|
|
120
121
|
{ key: "success", light: "success_color", dark: "success_color_dark" }
|
|
121
|
-
],
|
|
122
|
-
const r = s.palette.mode === "dark", o = (e?.master?.style?.font_name || t?.system_font) ?? s.typography.fontFamily, a = (
|
|
123
|
-
lighter:
|
|
124
|
-
light:
|
|
125
|
-
main:
|
|
126
|
-
dark:
|
|
127
|
-
darker:
|
|
128
|
-
} :
|
|
129
|
-
Ot.map(({ key:
|
|
130
|
-
|
|
122
|
+
], je = (s, t, e) => {
|
|
123
|
+
const r = s.palette.mode === "dark", o = (e?.master?.style?.font_name || t?.system_font) ?? s.typography.fontFamily, a = (n, m) => n ? {
|
|
124
|
+
lighter: P(n, 0.5),
|
|
125
|
+
light: P(n, 0.25),
|
|
126
|
+
main: n,
|
|
127
|
+
dark: F(n, 0.25),
|
|
128
|
+
darker: F(n, 0.5)
|
|
129
|
+
} : m, u = Object.fromEntries(
|
|
130
|
+
Ot.map(({ key: n, light: m, dark: b }) => [
|
|
131
|
+
n,
|
|
131
132
|
a(
|
|
132
|
-
t?.[r ? b :
|
|
133
|
-
s.palette[
|
|
133
|
+
t?.[r ? b : m],
|
|
134
|
+
s.palette[n]
|
|
134
135
|
)
|
|
135
136
|
])
|
|
136
|
-
),
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
), c = Object.fromEntries(
|
|
138
|
+
kt.map((n) => [
|
|
139
|
+
n,
|
|
140
|
+
n === "fontFamily" ? o : { fontFamily: o }
|
|
140
141
|
])
|
|
141
|
-
),
|
|
142
|
+
), d = {
|
|
142
143
|
MuiTabs: {
|
|
143
144
|
styleOverrides: {
|
|
144
|
-
indicator: { backgroundColor:
|
|
145
|
+
indicator: { backgroundColor: u.primary.light }
|
|
145
146
|
}
|
|
146
147
|
},
|
|
147
148
|
MuiPickersCalendarHeader: {
|
|
148
149
|
styleOverrides: {
|
|
149
150
|
switchViewButton: {
|
|
150
|
-
color:
|
|
151
|
-
"&:hover": { backgroundColor:
|
|
151
|
+
color: u.primary.lighter,
|
|
152
|
+
"&:hover": { backgroundColor: Lt(u.primary.light, 0.1) }
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
|
-
}, l = t?.button_corner_radius, g = t?.card_corner_radius,
|
|
156
|
-
...
|
|
156
|
+
}, l = t?.button_corner_radius, g = t?.card_corner_radius, p = {
|
|
157
|
+
...d,
|
|
157
158
|
...l && {
|
|
158
159
|
MuiButton: {
|
|
159
160
|
styleOverrides: {
|
|
@@ -184,12 +185,12 @@ const Pt = [
|
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
};
|
|
187
|
-
return { typography:
|
|
188
|
+
return { typography: c, palette: u, components: p };
|
|
188
189
|
};
|
|
189
|
-
class
|
|
190
|
+
class H {
|
|
190
191
|
fetchInstance;
|
|
191
192
|
constructor(t) {
|
|
192
|
-
this.fetchInstance = new
|
|
193
|
+
this.fetchInstance = new y(t, "", {
|
|
193
194
|
Accept: "application/json",
|
|
194
195
|
"Content-Type": "application/json"
|
|
195
196
|
});
|
|
@@ -203,32 +204,32 @@ class F {
|
|
|
203
204
|
}
|
|
204
205
|
};
|
|
205
206
|
}
|
|
206
|
-
class
|
|
207
|
+
class Ke {
|
|
207
208
|
fetchInstance;
|
|
208
209
|
constructor(t, e, r) {
|
|
209
|
-
this.fetchInstance = new
|
|
210
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
210
211
|
}
|
|
211
212
|
getLocalizedCopy = async (t) => this.fetchInstance.post(h.LOCALIZED_COPY, t).then((e) => e);
|
|
212
213
|
getLocalizedContent = async (t) => this.fetchInstance.post(`${h.LOCALIZED_CONTENT}/${t}`).then((e) => e);
|
|
213
214
|
}
|
|
214
|
-
class
|
|
215
|
+
class ze {
|
|
215
216
|
fetchInstance;
|
|
216
217
|
constructor(t, e, r) {
|
|
217
|
-
this.fetchInstance = new
|
|
218
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
218
219
|
}
|
|
219
220
|
addScheduledPayment = async (t) => this.fetchInstance.post(h.SCHEDULED_PAYMENTS, {
|
|
220
221
|
...t,
|
|
221
222
|
is_recurring: "true",
|
|
222
|
-
transaction_type:
|
|
223
|
+
transaction_type: ot.DEBIT
|
|
223
224
|
}).then((e) => e.scheduled_payment);
|
|
224
225
|
getScheduledPayments = async () => this.fetchInstance.get(h.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
|
|
225
226
|
updateScheduledPayment = async (t) => this.fetchInstance.put(`${h.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
|
|
226
227
|
deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${h.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
|
|
227
228
|
}
|
|
228
|
-
class
|
|
229
|
+
class G {
|
|
229
230
|
fetchInstance;
|
|
230
231
|
constructor(t, e, r) {
|
|
231
|
-
this.fetchInstance = new
|
|
232
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
232
233
|
}
|
|
233
234
|
getUserFeatures = async () => this.fetchInstance.get(h.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
|
|
234
235
|
updateUser = async (t) => this.fetchInstance.put(h.USER, t).then((e) => e.user);
|
|
@@ -237,29 +238,23 @@ class k {
|
|
|
237
238
|
class W {
|
|
238
239
|
fetchInstance;
|
|
239
240
|
constructor(t, e) {
|
|
240
|
-
this.fetchInstance = new
|
|
241
|
+
this.fetchInstance = new y(t, e);
|
|
241
242
|
}
|
|
242
243
|
requestWidgetUrl = async (t) => this.fetchInstance.post(h.WIDGET_URLS, t).then((e) => e.widget_url);
|
|
243
244
|
}
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
/* @__PURE__ */ n("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
|
|
254
|
-
/* @__PURE__ */ n(B, { variant: "XSmall", children: e }),
|
|
255
|
-
/* @__PURE__ */ y("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
|
|
256
|
-
/* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
|
|
257
|
-
/* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
|
|
258
|
-
/* @__PURE__ */ n("div", { className: "mx-cmn-dot" })
|
|
245
|
+
const Pt = ({ color: s, labelAverage: t, labelMain: e }) => {
|
|
246
|
+
const r = x(), o = Ft(r, s);
|
|
247
|
+
return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
|
|
248
|
+
/* @__PURE__ */ i("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
|
|
249
|
+
/* @__PURE__ */ i(B, { variant: "XSmall", children: e }),
|
|
250
|
+
/* @__PURE__ */ f("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
|
|
251
|
+
/* @__PURE__ */ i("div", { className: "mx-cmn-dot" }),
|
|
252
|
+
/* @__PURE__ */ i("div", { className: "mx-cmn-dot" }),
|
|
253
|
+
/* @__PURE__ */ i("div", { className: "mx-cmn-dot" })
|
|
259
254
|
] }),
|
|
260
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ i(B, { variant: "XSmall", children: t })
|
|
261
256
|
] });
|
|
262
|
-
},
|
|
257
|
+
}, Ft = (s, t) => C({
|
|
263
258
|
alignItems: "center",
|
|
264
259
|
display: "flex",
|
|
265
260
|
gap: s.Spacing.XSmall,
|
|
@@ -292,41 +287,41 @@ const Ve = (s) => {
|
|
|
292
287
|
index: r,
|
|
293
288
|
label: o,
|
|
294
289
|
onClick: a,
|
|
295
|
-
selectedIndex:
|
|
296
|
-
value:
|
|
290
|
+
selectedIndex: u,
|
|
291
|
+
value: c
|
|
297
292
|
}) => {
|
|
298
|
-
const
|
|
299
|
-
a && (
|
|
300
|
-
},
|
|
293
|
+
const d = x(), l = Ht(d, t, e), g = (m) => {
|
|
294
|
+
a && (m.key === " " || m.key === "Enter") && a(r);
|
|
295
|
+
}, p = u === void 0 || u === r ? "primary" : "secondary", n = () => /* @__PURE__ */ i(
|
|
301
296
|
B,
|
|
302
297
|
{
|
|
303
298
|
"aria-hidden": !0,
|
|
304
|
-
bold:
|
|
299
|
+
bold: u === r,
|
|
305
300
|
className: "mx-cmn-bar-text",
|
|
306
|
-
color:
|
|
301
|
+
color: p,
|
|
307
302
|
component: "div",
|
|
308
303
|
variant: "Small",
|
|
309
304
|
children: o
|
|
310
305
|
}
|
|
311
306
|
);
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
|
|
314
|
-
/* @__PURE__ */
|
|
307
|
+
return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-container ${l} ${c < 0 ? "mx-cmn-negative" : ""}`, children: [
|
|
308
|
+
c >= 0 && /* @__PURE__ */ i(n, {}),
|
|
309
|
+
/* @__PURE__ */ i(
|
|
315
310
|
"div",
|
|
316
311
|
{
|
|
317
312
|
"aria-label": s,
|
|
318
|
-
className: `mx-cmn-bar ${a ? "mx-cmn-clickable" : ""} ${
|
|
313
|
+
className: `mx-cmn-bar ${a ? "mx-cmn-clickable" : ""} ${c < 0 ? "mx-cmn-bar-negative" : ""}`,
|
|
319
314
|
onClick: a ? () => a?.(r) : void 0,
|
|
320
315
|
onKeyDown: g,
|
|
321
316
|
role: s ? "button" : void 0,
|
|
322
317
|
tabIndex: s ? 0 : void 0
|
|
323
318
|
}
|
|
324
319
|
),
|
|
325
|
-
|
|
320
|
+
c < 0 && /* @__PURE__ */ i(n, {})
|
|
326
321
|
] });
|
|
327
|
-
},
|
|
328
|
-
const r = `expandBar-${Math.round(e)}`, o =
|
|
329
|
-
return
|
|
322
|
+
}, Ht = (s, t, e) => {
|
|
323
|
+
const r = `expandBar-${Math.round(e)}`, o = gt(r, { from: { height: 0 }, to: { height: e } });
|
|
324
|
+
return C({
|
|
330
325
|
display: "flex",
|
|
331
326
|
flexDirection: "column",
|
|
332
327
|
justifyContent: "flex-end",
|
|
@@ -364,53 +359,53 @@ const Ve = (s) => {
|
|
|
364
359
|
color: r,
|
|
365
360
|
index: o = -1,
|
|
366
361
|
onClick: a,
|
|
367
|
-
range:
|
|
368
|
-
selectedIndex:
|
|
369
|
-
topHeight:
|
|
362
|
+
range: u,
|
|
363
|
+
selectedIndex: c,
|
|
364
|
+
topHeight: d,
|
|
370
365
|
value: l,
|
|
371
366
|
valueLabel: g = "",
|
|
372
|
-
width:
|
|
373
|
-
xAxisLabel:
|
|
367
|
+
width: p,
|
|
368
|
+
xAxisLabel: n = ""
|
|
374
369
|
}) => {
|
|
375
|
-
const
|
|
376
|
-
return /* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
370
|
+
const m = x(), b = Gt(m, p), D = l / u * d, A = Math.abs(l) / u * e, v = c === void 0 || c === o ? "primary" : "secondary";
|
|
371
|
+
return /* @__PURE__ */ f("div", { className: `mx-cmn-barchart-bar-column ${b}`, children: [
|
|
372
|
+
/* @__PURE__ */ i("div", { style: { height: d }, children: l >= 0 && /* @__PURE__ */ i(
|
|
378
373
|
q,
|
|
379
374
|
{
|
|
380
375
|
ariaLabel: s,
|
|
381
376
|
color: r,
|
|
382
|
-
height:
|
|
377
|
+
height: D,
|
|
383
378
|
index: o,
|
|
384
379
|
label: g,
|
|
385
380
|
onClick: a,
|
|
386
|
-
selectedIndex:
|
|
381
|
+
selectedIndex: c,
|
|
387
382
|
value: l
|
|
388
383
|
}
|
|
389
384
|
) }),
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
t !== 0 && /* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ i("div", { className: "mx-cmn-zero-line" }),
|
|
386
|
+
t !== 0 && /* @__PURE__ */ i("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
|
|
387
|
+
/* @__PURE__ */ i("div", { style: { height: e }, children: l < 0 && /* @__PURE__ */ i(
|
|
393
388
|
q,
|
|
394
389
|
{
|
|
395
390
|
ariaLabel: s,
|
|
396
391
|
color: r,
|
|
397
|
-
height:
|
|
392
|
+
height: A,
|
|
398
393
|
index: o,
|
|
399
394
|
label: g,
|
|
400
395
|
onClick: a,
|
|
401
396
|
value: l
|
|
402
397
|
}
|
|
403
398
|
) }),
|
|
404
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ i(
|
|
405
400
|
"div",
|
|
406
401
|
{
|
|
407
402
|
className: `mx-cmn-bar-label ${a ? "mx-cmn-clickable" : ""}`,
|
|
408
403
|
onClick: a ? () => a(o) : void 0,
|
|
409
|
-
children: /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ i(B, { bold: c === o, color: v, variant: "Small", children: n })
|
|
410
405
|
}
|
|
411
406
|
)
|
|
412
407
|
] });
|
|
413
|
-
},
|
|
408
|
+
}, Gt = (s, t) => C({
|
|
414
409
|
display: "flex",
|
|
415
410
|
flexDirection: "column",
|
|
416
411
|
flexGrow: t === void 0 ? 1 : 0,
|
|
@@ -435,48 +430,48 @@ const Ve = (s) => {
|
|
|
435
430
|
"& .mx-cmn-clickable": {
|
|
436
431
|
cursor: "pointer"
|
|
437
432
|
}
|
|
438
|
-
}),
|
|
433
|
+
}), Wt = (s, t) => s + t, qt = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, Yt = (s, t) => [...s, t.value], Q = (s, t, e) => {
|
|
439
434
|
const r = s && t ? e / 2 : e;
|
|
440
435
|
return s ? r : 0;
|
|
441
|
-
},
|
|
436
|
+
}, Qt = (s, t, e, r) => s / (t < 0 ? -e : t) * r || 0, Xt = ({
|
|
442
437
|
average: s,
|
|
443
438
|
barWidth: t = "8%",
|
|
444
439
|
color: e,
|
|
445
440
|
data: r,
|
|
446
441
|
height: o,
|
|
447
442
|
legendLabelAverage: a,
|
|
448
|
-
legendLabelMain:
|
|
449
|
-
onBarClick:
|
|
450
|
-
selectedIndex:
|
|
443
|
+
legendLabelMain: u,
|
|
444
|
+
onBarClick: c,
|
|
445
|
+
selectedIndex: d,
|
|
451
446
|
valueFormatter: l = (g) => `${g}`
|
|
452
447
|
}) => {
|
|
453
|
-
const g =
|
|
448
|
+
const g = x(), p = jt(g), n = r.reduce(Yt, []), m = s !== void 0 ? s : n.reduce(Wt, 0) / n.length, b = Math.max(...n), D = Math.min(...n), A = n.reduce(qt, 0), v = b >= 0, L = D < 0, I = Q(v, L, o), N = Q(L, v, o), U = Qt(m, b, D, I || N), et = (w) => d === void 0 || w === d ? e : `${e}80`, $ = () => /* @__PURE__ */ i(
|
|
454
449
|
Y,
|
|
455
450
|
{
|
|
456
451
|
averageLineHeight: U,
|
|
457
452
|
bottomHeight: N,
|
|
458
453
|
color: "",
|
|
459
|
-
range:
|
|
454
|
+
range: A,
|
|
460
455
|
topHeight: I,
|
|
461
456
|
value: 0,
|
|
462
457
|
width: void 0
|
|
463
458
|
}
|
|
464
459
|
);
|
|
465
|
-
return /* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
-
r.map((w, M) => /* @__PURE__ */
|
|
469
|
-
/* @__PURE__ */
|
|
460
|
+
return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-chart ${p}`, children: [
|
|
461
|
+
/* @__PURE__ */ f("div", { className: "mx-cmn-chart-container", children: [
|
|
462
|
+
/* @__PURE__ */ i($, {}),
|
|
463
|
+
r.map((w, M) => /* @__PURE__ */ f(ut.Fragment, { children: [
|
|
464
|
+
/* @__PURE__ */ i(
|
|
470
465
|
Y,
|
|
471
466
|
{
|
|
472
467
|
ariaLabel: w.ariaLabel,
|
|
473
468
|
averageLineHeight: U,
|
|
474
469
|
bottomHeight: N,
|
|
475
|
-
color:
|
|
470
|
+
color: et(M),
|
|
476
471
|
index: M,
|
|
477
|
-
onClick:
|
|
478
|
-
range:
|
|
479
|
-
selectedIndex:
|
|
472
|
+
onClick: c,
|
|
473
|
+
range: A,
|
|
474
|
+
selectedIndex: d,
|
|
480
475
|
topHeight: I,
|
|
481
476
|
value: w.value,
|
|
482
477
|
valueLabel: l(w.value),
|
|
@@ -484,12 +479,12 @@ const Ve = (s) => {
|
|
|
484
479
|
xAxisLabel: w.label
|
|
485
480
|
}
|
|
486
481
|
),
|
|
487
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ i($, {})
|
|
488
483
|
] }, `column-${M}`))
|
|
489
484
|
] }),
|
|
490
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ i(Pt, { color: e, labelAverage: a, labelMain: u })
|
|
491
486
|
] });
|
|
492
|
-
},
|
|
487
|
+
}, jt = (s) => C({
|
|
493
488
|
"& .mx-cmn-chart-container": {
|
|
494
489
|
alignItems: "flex-end",
|
|
495
490
|
display: "flex",
|
|
@@ -497,47 +492,52 @@ const Ve = (s) => {
|
|
|
497
492
|
marginTop: s.Spacing.Large,
|
|
498
493
|
marginBottom: s.Spacing.Medium
|
|
499
494
|
}
|
|
500
|
-
}),
|
|
495
|
+
}), Ve = Xt, Ze = (s) => {
|
|
496
|
+
const t = lt();
|
|
497
|
+
return ht(() => {
|
|
498
|
+
t.current = s;
|
|
499
|
+
}, [s]), t.current;
|
|
500
|
+
}, Kt = ({
|
|
501
501
|
hasGap: s = !1,
|
|
502
502
|
segments: t,
|
|
503
|
-
size: e =
|
|
504
|
-
strokeWidth: r =
|
|
503
|
+
size: e = pt,
|
|
504
|
+
strokeWidth: r = mt,
|
|
505
505
|
children: o
|
|
506
506
|
}) => {
|
|
507
|
-
const a =
|
|
507
|
+
const a = x(), u = zt(a, e), c = (e - r) / 2, d = e / 2;
|
|
508
508
|
let l = -90 - (s ? 1 : 0), g = 0;
|
|
509
|
-
return /* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
/* @__PURE__ */
|
|
509
|
+
return /* @__PURE__ */ f("div", { className: `mx-cmn-multi-segment-donut ${u}`, children: [
|
|
510
|
+
/* @__PURE__ */ f("svg", { height: e, width: e, children: [
|
|
511
|
+
/* @__PURE__ */ i(
|
|
512
512
|
"circle",
|
|
513
513
|
{
|
|
514
|
-
cx:
|
|
515
|
-
cy:
|
|
514
|
+
cx: d,
|
|
515
|
+
cy: d,
|
|
516
516
|
fill: "none",
|
|
517
|
-
r:
|
|
517
|
+
r: c,
|
|
518
518
|
stroke: a.Color.Neutral300,
|
|
519
519
|
strokeWidth: r
|
|
520
520
|
}
|
|
521
521
|
),
|
|
522
|
-
t.map((
|
|
522
|
+
t.map((p, n) => (l += 360 * g + (s ? 1 : 0), g = (p.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ i(
|
|
523
523
|
"circle",
|
|
524
524
|
{
|
|
525
|
-
cx:
|
|
526
|
-
cy:
|
|
525
|
+
cx: d,
|
|
526
|
+
cy: d,
|
|
527
527
|
fill: "none",
|
|
528
|
-
r:
|
|
529
|
-
stroke:
|
|
530
|
-
strokeDasharray: 2 * Math.PI *
|
|
531
|
-
strokeDashoffset: 2 * Math.PI *
|
|
528
|
+
r: c,
|
|
529
|
+
stroke: p.color,
|
|
530
|
+
strokeDasharray: 2 * Math.PI * c,
|
|
531
|
+
strokeDashoffset: 2 * Math.PI * c * (1 - g),
|
|
532
532
|
strokeWidth: r,
|
|
533
|
-
transform: `rotate(${l}, ${
|
|
533
|
+
transform: `rotate(${l}, ${d}, ${d})`
|
|
534
534
|
},
|
|
535
|
-
|
|
535
|
+
n
|
|
536
536
|
)))
|
|
537
537
|
] }),
|
|
538
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ i("div", { className: "mx-cmn-multi-segment-donut-children", children: o })
|
|
539
539
|
] });
|
|
540
|
-
},
|
|
540
|
+
}, zt = (s, t) => C({
|
|
541
541
|
height: t,
|
|
542
542
|
marginTop: `-${s.Spacing.XSmall}px`,
|
|
543
543
|
position: "relative",
|
|
@@ -549,34 +549,29 @@ const Ve = (s) => {
|
|
|
549
549
|
top: "50%",
|
|
550
550
|
transform: "translate(-50%, -50%)"
|
|
551
551
|
}
|
|
552
|
-
}), Je =
|
|
553
|
-
class
|
|
552
|
+
}), Je = Kt;
|
|
553
|
+
class Vt {
|
|
554
554
|
globalStore;
|
|
555
|
-
api = new
|
|
555
|
+
api = new R("/", "");
|
|
556
556
|
copy = {};
|
|
557
557
|
featureNamespace = "experiences";
|
|
558
558
|
isInitialized = !1;
|
|
559
559
|
constructor(t) {
|
|
560
|
-
this.globalStore = t, this.api = new
|
|
560
|
+
this.globalStore = t, this.api = new R(
|
|
561
561
|
t.endpoint,
|
|
562
562
|
t.sessionToken,
|
|
563
563
|
t.onError
|
|
564
|
-
),
|
|
564
|
+
), _(this);
|
|
565
565
|
}
|
|
566
|
-
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
567
|
-
// TODO: Remove this function
|
|
568
|
-
initialize = async (t, e) => {
|
|
569
|
-
this.api = new $(t, e), await this.loadCopy();
|
|
570
|
-
};
|
|
571
566
|
loadCopy = async () => {
|
|
572
|
-
await this.getCopy(this.featureNamespace),
|
|
567
|
+
await this.getCopy(this.featureNamespace), S(() => {
|
|
573
568
|
this.isInitialized = !0;
|
|
574
569
|
});
|
|
575
570
|
};
|
|
576
571
|
getCopy = async (t, e = "") => {
|
|
577
572
|
try {
|
|
578
573
|
const r = await this.api.getGlobalCopy(t, e);
|
|
579
|
-
|
|
574
|
+
S(() => {
|
|
580
575
|
this.copy = r[t];
|
|
581
576
|
});
|
|
582
577
|
} catch (r) {
|
|
@@ -584,7 +579,7 @@ class ee {
|
|
|
584
579
|
}
|
|
585
580
|
};
|
|
586
581
|
}
|
|
587
|
-
class
|
|
582
|
+
class Zt {
|
|
588
583
|
globalStore;
|
|
589
584
|
survey = null;
|
|
590
585
|
currentQuestionIndex = 0;
|
|
@@ -592,7 +587,7 @@ class se {
|
|
|
592
587
|
response = null;
|
|
593
588
|
responses = {};
|
|
594
589
|
constructor(t) {
|
|
595
|
-
this.globalStore = t,
|
|
590
|
+
this.globalStore = t, _(this);
|
|
596
591
|
}
|
|
597
592
|
get isLastQuestion() {
|
|
598
593
|
return this.currentQuestionIndex === this.surveyQuestions.length - 1;
|
|
@@ -615,7 +610,7 @@ class se {
|
|
|
615
610
|
}
|
|
616
611
|
loadSurvey = (t = !1) => {
|
|
617
612
|
St.getActiveMatchingSurveys((e) => {
|
|
618
|
-
|
|
613
|
+
S(() => {
|
|
619
614
|
if (e.length > 0) {
|
|
620
615
|
const r = e.find((o) => o.id === this.surveyId);
|
|
621
616
|
r && (this.survey = r, this.currentQuestionIndex = 0, this.question = r.questions[0], this.response = null, this.responses = {});
|
|
@@ -633,10 +628,10 @@ class se {
|
|
|
633
628
|
this.response = t, this.question && (this.responses[`$survey_response_${this.question.id}`] = t);
|
|
634
629
|
};
|
|
635
630
|
}
|
|
636
|
-
class
|
|
631
|
+
class X {
|
|
637
632
|
fetchInstance;
|
|
638
633
|
constructor(t, e, r) {
|
|
639
|
-
this.fetchInstance = new
|
|
634
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
640
635
|
}
|
|
641
636
|
addBudget = async (t, e, r = null) => this.fetchInstance.post(h.BUDGETS, {
|
|
642
637
|
amount: e,
|
|
@@ -654,28 +649,28 @@ class z {
|
|
|
654
649
|
throw e;
|
|
655
650
|
});
|
|
656
651
|
}
|
|
657
|
-
class
|
|
658
|
-
api = new
|
|
652
|
+
class Jt {
|
|
653
|
+
api = new X("/", "");
|
|
659
654
|
globalStore;
|
|
660
655
|
alert = "";
|
|
661
|
-
dateRange = { start:
|
|
656
|
+
dateRange = { start: tt(k()), end: J(k()) };
|
|
662
657
|
budgets = [];
|
|
663
658
|
selectedBudget;
|
|
664
659
|
selectedSubBudget;
|
|
665
660
|
isDataLoaded = !1;
|
|
666
661
|
theme = {};
|
|
667
662
|
constructor(t) {
|
|
668
|
-
this.globalStore = t, this.api = new
|
|
663
|
+
this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken, t.onError), _(this);
|
|
669
664
|
}
|
|
670
665
|
loadBudgetData = async () => {
|
|
671
|
-
await this.loadBudgets(),
|
|
666
|
+
this.globalStore.recurringTransactionsStore.isDataLoaded || await this.globalStore.recurringTransactionsStore.loadRepeatingTransactionData(), await this.loadBudgets(), Z(
|
|
672
667
|
() => this.detailedBudgets,
|
|
673
668
|
(t) => {
|
|
674
669
|
if (t) {
|
|
675
670
|
const e = this.selectedBudget;
|
|
676
671
|
e && (this.selectedBudget = wt(t, e.guid));
|
|
677
672
|
const r = this.selectedSubBudget;
|
|
678
|
-
r && r.parent_guid && (this.selectedSubBudget =
|
|
673
|
+
r && r.parent_guid && (this.selectedSubBudget = Ct(
|
|
679
674
|
t,
|
|
680
675
|
r.guid,
|
|
681
676
|
r.parent_guid
|
|
@@ -685,7 +680,7 @@ class re {
|
|
|
685
680
|
);
|
|
686
681
|
};
|
|
687
682
|
get detailedBudgets() {
|
|
688
|
-
return
|
|
683
|
+
return O(
|
|
689
684
|
this.budgets.filter(
|
|
690
685
|
(t) => t.category_guid !== E.INCOME && t.category_guid !== E.TRANSFER && t.category_guid !== E.INVESTMENTS
|
|
691
686
|
),
|
|
@@ -694,8 +689,9 @@ class re {
|
|
|
694
689
|
this.theme
|
|
695
690
|
).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
|
|
696
691
|
}
|
|
692
|
+
// TODO: Replace this with income from recurring transactions. Income budgets are deprecated.
|
|
697
693
|
get incomeBudget() {
|
|
698
|
-
return
|
|
694
|
+
return O(
|
|
699
695
|
this.budgets.filter((r) => !r.parent_guid),
|
|
700
696
|
this.globalStore.categoryStore.detailedCategories,
|
|
701
697
|
this.globalStore.copyStore.copy.budgets,
|
|
@@ -716,7 +712,7 @@ class re {
|
|
|
716
712
|
addBudget = async (t, e, r = null) => {
|
|
717
713
|
try {
|
|
718
714
|
const o = await this.api.addBudget(t, e, r);
|
|
719
|
-
|
|
715
|
+
S(() => {
|
|
720
716
|
this.budgets.push(o);
|
|
721
717
|
});
|
|
722
718
|
} catch (o) {
|
|
@@ -725,7 +721,7 @@ class re {
|
|
|
725
721
|
};
|
|
726
722
|
deleteBudget = async (t) => {
|
|
727
723
|
try {
|
|
728
|
-
await this.api.deleteBudget(t),
|
|
724
|
+
await this.api.deleteBudget(t), S(() => {
|
|
729
725
|
const e = this.budgets.findIndex((r) => r.guid === t);
|
|
730
726
|
e >= 0 && this.budgets.splice(e, 1);
|
|
731
727
|
});
|
|
@@ -736,14 +732,15 @@ class re {
|
|
|
736
732
|
loadBudgets = async () => {
|
|
737
733
|
try {
|
|
738
734
|
const t = await this.api.getBudgets();
|
|
739
|
-
|
|
740
|
-
this.budgets = t, this.isDataLoaded = !0;
|
|
741
|
-
});
|
|
735
|
+
this.setBudgets(t);
|
|
742
736
|
} catch (t) {
|
|
743
737
|
throw console.error(`Error occurred while loading budgets: ${t}`), t;
|
|
744
738
|
}
|
|
745
739
|
};
|
|
746
740
|
setAlert = (t) => this.alert = t;
|
|
741
|
+
setBudgets = (t) => {
|
|
742
|
+
this.budgets = t, this.isDataLoaded = !0;
|
|
743
|
+
};
|
|
747
744
|
setDateRange = (t) => this.dateRange = t;
|
|
748
745
|
setSelectedBudget = (t) => this.selectedBudget = t;
|
|
749
746
|
setSelectedSubBudget = (t) => this.selectedSubBudget = t;
|
|
@@ -774,7 +771,7 @@ class re {
|
|
|
774
771
|
updateBudget = async (t) => {
|
|
775
772
|
try {
|
|
776
773
|
const e = await this.api.updateBudget(t);
|
|
777
|
-
|
|
774
|
+
S(() => {
|
|
778
775
|
const r = this.budgets.findIndex((o) => o.guid === t.guid);
|
|
779
776
|
r >= 0 && (this.budgets[r] = e);
|
|
780
777
|
});
|
|
@@ -783,38 +780,39 @@ class re {
|
|
|
783
780
|
}
|
|
784
781
|
};
|
|
785
782
|
}
|
|
786
|
-
|
|
783
|
+
var te = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(te || {}), ee = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(ee || {}), se = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(se || {}), re = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(re || {});
|
|
784
|
+
class j {
|
|
787
785
|
fetchInstance;
|
|
788
786
|
constructor(t, e, r) {
|
|
789
|
-
this.fetchInstance = new
|
|
787
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
790
788
|
}
|
|
791
789
|
createSupportTicket = async (t) => this.fetchInstance.post(h.SUPPORT_TICKETS, t).then((e) => e);
|
|
792
790
|
}
|
|
793
791
|
const oe = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, ae = (s, t) => {
|
|
794
792
|
const e = [];
|
|
795
|
-
for (const r of
|
|
793
|
+
for (const r of at) {
|
|
796
794
|
const o = t[r.guid];
|
|
797
795
|
if (!o) continue;
|
|
798
796
|
const a = {
|
|
799
797
|
...r,
|
|
800
798
|
title: o.label,
|
|
801
|
-
topics: r.topics.map(({ topicKey:
|
|
802
|
-
topicKey:
|
|
803
|
-
label: o.topics[
|
|
799
|
+
topics: r.topics.map(({ topicKey: u }, c) => ({
|
|
800
|
+
topicKey: u,
|
|
801
|
+
label: o.topics[c]
|
|
804
802
|
}))
|
|
805
803
|
};
|
|
806
804
|
oe(a, s) && e.push(a);
|
|
807
805
|
}
|
|
808
806
|
return e;
|
|
809
807
|
};
|
|
810
|
-
class
|
|
808
|
+
class ie {
|
|
811
809
|
alert = { message: "", severity: void 0 };
|
|
812
|
-
api = new
|
|
810
|
+
api = new j("/", "");
|
|
813
811
|
appConfig;
|
|
814
812
|
globalStore;
|
|
815
813
|
isLoading = !1;
|
|
816
814
|
constructor(t) {
|
|
817
|
-
this.globalStore = t, this.api = new
|
|
815
|
+
this.globalStore = t, this.api = new j(t.endpoint, t.sessionToken, t.onError), _(this);
|
|
818
816
|
}
|
|
819
817
|
createSupportTicket = async (t) => {
|
|
820
818
|
try {
|
|
@@ -843,26 +841,26 @@ class ne {
|
|
|
843
841
|
);
|
|
844
842
|
}
|
|
845
843
|
}
|
|
846
|
-
class
|
|
844
|
+
class K {
|
|
847
845
|
fetchInstance;
|
|
848
846
|
constructor(t, e, r) {
|
|
849
|
-
this.fetchInstance = new
|
|
847
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
850
848
|
}
|
|
851
849
|
getHoldings = async () => this.fetchInstance.get(h.HOLDINGS).then((t) => t.holdings);
|
|
852
850
|
updateHoldings = async (t) => this.fetchInstance.put(`${h.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
|
|
853
851
|
}
|
|
854
|
-
class
|
|
855
|
-
analysisType =
|
|
856
|
-
api = new
|
|
852
|
+
class ne {
|
|
853
|
+
analysisType = At.Stocks;
|
|
854
|
+
api = new K("/", "");
|
|
857
855
|
holdings = [];
|
|
858
856
|
holdingsLoaded = !1;
|
|
859
857
|
globalStore;
|
|
860
858
|
showConnectionsWidget = !1;
|
|
861
859
|
constructor(t) {
|
|
862
|
-
this.globalStore = t, this.api = new
|
|
860
|
+
this.globalStore = t, this.api = new K(t.endpoint, t.sessionToken, t.onError), _(this);
|
|
863
861
|
}
|
|
864
862
|
get analysisChartData() {
|
|
865
|
-
return
|
|
863
|
+
return vt(Et(this.visibleHoldings), this.analysisType);
|
|
866
864
|
}
|
|
867
865
|
get analysisDetails() {
|
|
868
866
|
return Tt(this.visibleHoldings)[this.analysisType] || {};
|
|
@@ -872,15 +870,16 @@ class ie {
|
|
|
872
870
|
(t) => this.globalStore.globalUiStore.selectedAccountGuids.includes(t.account_guid)
|
|
873
871
|
);
|
|
874
872
|
}
|
|
873
|
+
setHoldings = (t) => {
|
|
874
|
+
this.holdings = t, this.holdingsLoaded = !0;
|
|
875
|
+
};
|
|
875
876
|
setShowConnectionsWidget = (t) => {
|
|
876
877
|
this.showConnectionsWidget = t;
|
|
877
878
|
};
|
|
878
879
|
loadHoldings = async () => {
|
|
879
880
|
try {
|
|
880
881
|
const t = await this.api.getHoldings();
|
|
881
|
-
|
|
882
|
-
this.holdings = [...t], this.holdingsLoaded = !0;
|
|
883
|
-
});
|
|
882
|
+
this.setHoldings(t);
|
|
884
883
|
} catch (t) {
|
|
885
884
|
console.error(`Error occured while getting holdings: ${t}`);
|
|
886
885
|
}
|
|
@@ -894,7 +893,7 @@ class ie {
|
|
|
894
893
|
const e = await this.api.updateHoldings(t), r = this.holdings.findIndex(({ guid: o }) => o === t.guid);
|
|
895
894
|
if (r >= 0) {
|
|
896
895
|
const o = [...this.holdings];
|
|
897
|
-
o[r] = e,
|
|
896
|
+
o[r] = e, S(() => {
|
|
898
897
|
this.holdings = o, this.holdingsLoaded = !0;
|
|
899
898
|
});
|
|
900
899
|
}
|
|
@@ -903,7 +902,7 @@ class ie {
|
|
|
903
902
|
}
|
|
904
903
|
};
|
|
905
904
|
}
|
|
906
|
-
const
|
|
905
|
+
const z = {
|
|
907
906
|
clientConfig: {},
|
|
908
907
|
clientStyleProfile: {},
|
|
909
908
|
config: {
|
|
@@ -1010,18 +1009,19 @@ const K = {
|
|
|
1010
1009
|
class V {
|
|
1011
1010
|
fetchInstance;
|
|
1012
1011
|
constructor(t, e, r) {
|
|
1013
|
-
this.fetchInstance = new
|
|
1012
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
1014
1013
|
}
|
|
1015
1014
|
getAppData = async () => this.fetchInstance.get(h.APP_DATA).then((t) => t);
|
|
1016
1015
|
}
|
|
1017
1016
|
class ce {
|
|
1018
1017
|
globalStore;
|
|
1019
1018
|
api = new V("/", "");
|
|
1020
|
-
bannerApi = new
|
|
1019
|
+
bannerApi = new H("/");
|
|
1021
1020
|
appData = {};
|
|
1021
|
+
isAppDataLoaded = !1;
|
|
1022
1022
|
banner = {};
|
|
1023
1023
|
constructor(t) {
|
|
1024
|
-
this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken, t.onError),
|
|
1024
|
+
this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken, t.onError), _(this);
|
|
1025
1025
|
}
|
|
1026
1026
|
get appConfig() {
|
|
1027
1027
|
return this.globalStore.appConfig;
|
|
@@ -1041,20 +1041,21 @@ class ce {
|
|
|
1041
1041
|
get userProfile() {
|
|
1042
1042
|
return this.appData.user_profile;
|
|
1043
1043
|
}
|
|
1044
|
-
|
|
1044
|
+
setAppData = (t) => {
|
|
1045
|
+
this.appData = t, this.bannerApi = new H(t.address?.bullseye || "/"), this.isAppDataLoaded = !0;
|
|
1046
|
+
};
|
|
1047
|
+
loadAppData = async () => {
|
|
1045
1048
|
try {
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
});
|
|
1050
|
-
} catch (e) {
|
|
1051
|
-
console.error(`Error loading app data: ${e}`);
|
|
1049
|
+
const t = await this.api.getAppData();
|
|
1050
|
+
this.setAppData(t);
|
|
1051
|
+
} catch (t) {
|
|
1052
|
+
console.error(`Error loading app data: ${t}`);
|
|
1052
1053
|
}
|
|
1053
1054
|
};
|
|
1054
1055
|
loadBanner = async () => {
|
|
1055
1056
|
try {
|
|
1056
1057
|
const t = this.user?.guid ?? null, e = t ? await this.bannerApi.getBanner(t) : {};
|
|
1057
|
-
|
|
1058
|
+
S(() => {
|
|
1058
1059
|
this.banner = e;
|
|
1059
1060
|
});
|
|
1060
1061
|
} catch (t) {
|
|
@@ -1069,42 +1070,63 @@ class de {
|
|
|
1069
1070
|
globalStore;
|
|
1070
1071
|
widgetApi = new W("/", "");
|
|
1071
1072
|
constructor(t) {
|
|
1072
|
-
this.globalStore = t, this.widgetApi = new W(t.endpoint, t.sessionToken),
|
|
1073
|
+
this.globalStore = t, this.widgetApi = new W(t.endpoint, t.sessionToken), _(this);
|
|
1073
1074
|
}
|
|
1074
1075
|
loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...r }) => await this.widgetApi.requestWidgetUrl({
|
|
1075
1076
|
widget_url: { widget_type: t, color_scheme: e, ...r }
|
|
1076
1077
|
});
|
|
1077
1078
|
}
|
|
1078
|
-
class
|
|
1079
|
+
class ue {
|
|
1079
1080
|
globalStore;
|
|
1080
|
-
|
|
1081
|
-
selectedAccounts = [];
|
|
1082
|
-
selectedAccountGuids = this.selectedAccounts.map((t) => t.guid);
|
|
1081
|
+
accountFilterMap = /* @__PURE__ */ new Map();
|
|
1083
1082
|
displayedDate = /* @__PURE__ */ new Date();
|
|
1084
1083
|
displayedDateRange = {
|
|
1085
|
-
start:
|
|
1086
|
-
end:
|
|
1084
|
+
start: tt(this.displayedDate),
|
|
1085
|
+
end: J(this.displayedDate)
|
|
1087
1086
|
};
|
|
1088
1087
|
constructor(t) {
|
|
1089
|
-
|
|
1088
|
+
_(this), this.globalStore = t, Z(
|
|
1089
|
+
() => this.globalStore.accountStore.visibleAccounts,
|
|
1090
|
+
(e) => {
|
|
1091
|
+
this.populateAccountFilterMap(e);
|
|
1092
|
+
}
|
|
1093
|
+
);
|
|
1094
|
+
}
|
|
1095
|
+
get allSelectedAccounts() {
|
|
1096
|
+
return this.globalStore.accountStore.detailedAccounts.filter(
|
|
1097
|
+
(t) => !t.is_excluded_from_accounts
|
|
1098
|
+
);
|
|
1099
|
+
}
|
|
1100
|
+
get selectedAccounts() {
|
|
1101
|
+
return this.globalStore.accountStore.visibleAccounts.filter(
|
|
1102
|
+
(t) => !t.is_excluded_from_accounts
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
get selectedAccountGuids() {
|
|
1106
|
+
return this.selectedAccounts.map((t) => t.guid);
|
|
1090
1107
|
}
|
|
1091
1108
|
get isCopyLoaded() {
|
|
1092
1109
|
return this.globalStore.copyStore.isInitialized;
|
|
1093
1110
|
}
|
|
1094
|
-
|
|
1095
|
-
this.
|
|
1111
|
+
get isConfigLoaded() {
|
|
1112
|
+
return this.globalStore.appDataStore.isAppDataLoaded;
|
|
1113
|
+
}
|
|
1114
|
+
get areUserFeaturesLoaded() {
|
|
1115
|
+
return this.globalStore.userStore.userFeaturesLoaded;
|
|
1116
|
+
}
|
|
1117
|
+
get isInitialized() {
|
|
1118
|
+
return this.isCopyLoaded && this.isConfigLoaded && this.areUserFeaturesLoaded;
|
|
1119
|
+
}
|
|
1120
|
+
populateAccountFilterMap = (t) => {
|
|
1121
|
+
t && t.forEach((e) => {
|
|
1122
|
+
this.accountFilterMap.set(e.guid, !e.is_excluded_from_accounts);
|
|
1123
|
+
});
|
|
1096
1124
|
};
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
setSelectedAccounts = (t) => {
|
|
1100
|
-
this.selectedAccounts = t.filter(
|
|
1101
|
-
(e) => !(e.is_excluded_from_accounts || e.is_excluded_from_budgets || e.is_excluded_from_cash_flow || e.is_excluded_from_debts || e.is_excluded_from_goals || e.is_excluded_from_investments || e.is_excluded_from_net_worth || e.is_excluded_from_spending || e.is_excluded_from_transactions || e.is_excluded_from_trends)
|
|
1102
|
-
), this.selectedAccountGuids = this.selectedAccounts.map((e) => e.guid);
|
|
1125
|
+
resetAccountFilterMap = () => {
|
|
1126
|
+
this.accountFilterMap.clear(), this.populateAccountFilterMap(this.globalStore.accountStore.visibleAccounts);
|
|
1103
1127
|
};
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
const e = new Set(this.selectedAccountGuids), r = new Set(t), o = [...r].filter((c) => !e.has(c)), a = [...e].filter((c) => !r.has(c));
|
|
1107
|
-
o.length > 0 && this.globalStore.accountStore.updateAccountFiltering(o, !1), a.length > 0 && this.globalStore.accountStore.updateAccountFiltering(a, !0), this.selectedAccountGuids = t;
|
|
1128
|
+
updateAccountFilterMap = (t, e) => {
|
|
1129
|
+
this.accountFilterMap.set(t, e);
|
|
1108
1130
|
};
|
|
1109
1131
|
setDisplayedDate = (t, e) => {
|
|
1110
1132
|
this.displayedDate = e, this.displayedDateRange = {
|
|
@@ -1121,32 +1143,29 @@ class le {
|
|
|
1121
1143
|
return t === e;
|
|
1122
1144
|
}
|
|
1123
1145
|
}
|
|
1124
|
-
class
|
|
1146
|
+
class le {
|
|
1125
1147
|
globalStore;
|
|
1126
|
-
api = new
|
|
1148
|
+
api = new G("/", "");
|
|
1127
1149
|
userFeatures = [];
|
|
1150
|
+
userFeaturesLoaded = !1;
|
|
1128
1151
|
constructor(t) {
|
|
1129
|
-
this.globalStore = t, this.api = new
|
|
1152
|
+
this.globalStore = t, this.api = new G(t.endpoint, t.sessionToken, t.onError), _(this);
|
|
1130
1153
|
}
|
|
1131
|
-
// DEPRECATED: Initialize api in constructor and use loadUserFeatures instead
|
|
1132
|
-
// TODO: Remove this function
|
|
1133
|
-
initialize = async (t, e) => {
|
|
1134
|
-
this.api = new k(t, e), await this.loadUserFeatures();
|
|
1135
|
-
};
|
|
1136
1154
|
get userProfile() {
|
|
1137
1155
|
return this.globalStore.appDataStore.userProfile;
|
|
1138
1156
|
}
|
|
1139
1157
|
get user() {
|
|
1140
1158
|
return this.globalStore.appDataStore.user;
|
|
1141
1159
|
}
|
|
1142
|
-
|
|
1160
|
+
setUserFeatures = (t) => {
|
|
1161
|
+
this.userFeatures = t, this.userFeaturesLoaded = !0;
|
|
1162
|
+
};
|
|
1163
|
+
loadUserFeatures = async () => {
|
|
1143
1164
|
try {
|
|
1144
|
-
const
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
});
|
|
1148
|
-
} catch (e) {
|
|
1149
|
-
console.error(`Error occurred while loading user features: ${e}`);
|
|
1165
|
+
const t = await this.api.getUserFeatures();
|
|
1166
|
+
this.setUserFeatures(t);
|
|
1167
|
+
} catch (t) {
|
|
1168
|
+
console.error(`Error occurred while loading user features: ${t}`);
|
|
1150
1169
|
}
|
|
1151
1170
|
};
|
|
1152
1171
|
updateUser = async (t) => {
|
|
@@ -1168,7 +1187,7 @@ class ue {
|
|
|
1168
1187
|
}
|
|
1169
1188
|
class ts {
|
|
1170
1189
|
// Global properties
|
|
1171
|
-
appConfig =
|
|
1190
|
+
appConfig = z;
|
|
1172
1191
|
endpoint = "/";
|
|
1173
1192
|
sessionToken = "";
|
|
1174
1193
|
onError;
|
|
@@ -1198,8 +1217,8 @@ class ts {
|
|
|
1198
1217
|
userStore;
|
|
1199
1218
|
// UI Stores
|
|
1200
1219
|
globalUiStore;
|
|
1201
|
-
constructor(t =
|
|
1202
|
-
this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.onStoreUpdate = o, this.accountStore = new yt(this), this.appDataStore = new ce(this), this.analyticsStore = new
|
|
1220
|
+
constructor(t = z, e = "/", r, o) {
|
|
1221
|
+
this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.onStoreUpdate = o, this.accountStore = new yt(this), this.appDataStore = new ce(this), this.analyticsStore = new Zt(this), this.beatStore = new bt(this), this.budgetsStore = new Jt(this), this.cashflowStore = new nt(this), this.categoryStore = new st(this), this.connectStore = new de(this), this.copyStore = new Vt(this), this.debtsStore = new xt(this), this.finstrongStore = new Dt(this), this.goalStore = new ct(this), this.helpStore = new ie(this), this.holdingStore = new ne(this), this.merchantStore = new Bt(this), this.netWorthStore = new It(this), this.notificationStore = new rt(this), this.recurringTransactionsStore = new _t(this), this.settingsStore = new Nt(this), this.transactionStore = new it(this), this.trendsStore = new dt(this), this.userStore = new le(this), this.globalUiStore = new ue(this), _(this), ft(() => {
|
|
1203
1222
|
const { transactions: a } = this.transactionStore;
|
|
1204
1223
|
this.emitUpdate({
|
|
1205
1224
|
transactions: a
|
|
@@ -1213,186 +1232,181 @@ class ts {
|
|
|
1213
1232
|
emitUpdate = (t) => {
|
|
1214
1233
|
this.onStoreUpdate?.(t);
|
|
1215
1234
|
};
|
|
1235
|
+
loadConfigData = async () => {
|
|
1236
|
+
await Promise.all([
|
|
1237
|
+
// Load copy, config and user data
|
|
1238
|
+
this.copyStore.loadCopy(),
|
|
1239
|
+
this.appDataStore.loadAppData(),
|
|
1240
|
+
this.userStore.loadUserFeatures()
|
|
1241
|
+
]);
|
|
1242
|
+
};
|
|
1216
1243
|
loadData = async ({
|
|
1217
1244
|
accounts: t,
|
|
1218
1245
|
appData: e,
|
|
1219
1246
|
associatedBeats: r,
|
|
1220
1247
|
categories: o,
|
|
1221
1248
|
institutions: a,
|
|
1222
|
-
transactionRules:
|
|
1223
|
-
transactions:
|
|
1224
|
-
userFeatures:
|
|
1249
|
+
transactionRules: u,
|
|
1250
|
+
transactions: c,
|
|
1251
|
+
userFeatures: d
|
|
1225
1252
|
} = {}) => {
|
|
1226
|
-
await
|
|
1227
|
-
// Load copy, config and quser data
|
|
1228
|
-
this.copyStore.loadCopy(),
|
|
1229
|
-
this.appDataStore.loadAppData(e),
|
|
1230
|
-
this.userStore.loadUserFeatures(u)
|
|
1231
|
-
]), await Promise.all([
|
|
1232
|
-
this.accountStore.loadAccountData({ accounts: t, institutions: a }),
|
|
1233
|
-
this.categoryStore.loadCategories(o),
|
|
1234
|
-
this.transactionStore.loadTransactionData({
|
|
1235
|
-
associatedBeats: r,
|
|
1236
|
-
transactionRules: c,
|
|
1237
|
-
transactions: d
|
|
1238
|
-
})
|
|
1239
|
-
]), this.globalUiStore.setInitialized(!0);
|
|
1253
|
+
(!e || !d) && await this.loadConfigData(), e && this.appDataStore.setAppData(e), d && this.userStore.setUserFeatures(d), t && (await this.accountStore.loadMembers(), a && this.accountStore.setInstitutions(a), this.accountStore.setAccounts(t)), r && this.transactionStore.setAssociatedBeats(r), o && this.categoryStore.setCategories(o), c && this.transactionStore.setTransactions(c), u && this.transactionStore.setTransactionRules(u);
|
|
1240
1254
|
};
|
|
1241
1255
|
}
|
|
1242
1256
|
export {
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
ks as AccountTypeName,
|
|
1257
|
+
As as ANALYTICS_EVENTS,
|
|
1258
|
+
qo as AccountIcon,
|
|
1259
|
+
Yo as AccountIconVariants,
|
|
1260
|
+
pr as AccountNotificationTypes,
|
|
1261
|
+
Qo as AccountSubType,
|
|
1262
|
+
Xo as AccountType,
|
|
1263
|
+
jo as AccountTypeName,
|
|
1251
1264
|
rs as AnalyticsApi,
|
|
1252
1265
|
h as ApiEndpoints,
|
|
1253
|
-
|
|
1254
|
-
|
|
1266
|
+
H as BannerApi,
|
|
1267
|
+
Ve as BarChart,
|
|
1255
1268
|
cs as BeatApi,
|
|
1256
|
-
|
|
1269
|
+
mr as BudgetNotificationTypes,
|
|
1257
1270
|
ps as Calendar,
|
|
1258
1271
|
ms as CalendarSelectionTypes,
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1272
|
+
us as CategoryApi,
|
|
1273
|
+
kr as CategoryColors,
|
|
1274
|
+
Or as CategoryGuidToName,
|
|
1262
1275
|
E as CategoryGuids,
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1276
|
+
Pr as CategoryIcon,
|
|
1277
|
+
er as ConnectCard,
|
|
1278
|
+
Bs as ConnectDrawer,
|
|
1279
|
+
Ko as ConnectionStatus,
|
|
1280
|
+
zo as ConnectionStatusEnums,
|
|
1281
|
+
Gr as CurrencyCodes,
|
|
1282
|
+
Ms as CurrencyInput,
|
|
1283
|
+
ir as CurrencyText,
|
|
1284
|
+
xr as DATE_FORMATS_INTL,
|
|
1285
|
+
pt as DEFAULT_DONUT_SIZE,
|
|
1286
|
+
mt as DEFAULT_STROKE_WIDTH,
|
|
1287
|
+
Qs as DataRow,
|
|
1288
|
+
vs as DateRangeSelector,
|
|
1289
|
+
Dr as Dialog,
|
|
1290
|
+
Nr as Drawer,
|
|
1291
|
+
cr as EmptyState,
|
|
1279
1292
|
Ss as ErrorBoundary,
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1293
|
+
Vo as ErrorStatuses,
|
|
1294
|
+
ee as ExpenseStatus,
|
|
1295
|
+
y as Fetch,
|
|
1296
|
+
Xs as Frequency,
|
|
1297
|
+
Is as GlobalAccountFilter,
|
|
1298
|
+
R as GlobalCopyApi,
|
|
1299
|
+
Vt as GlobalCopyStore,
|
|
1300
|
+
Zr as GlobalDataContext,
|
|
1301
|
+
Jr as GlobalDataProvider,
|
|
1288
1302
|
ts as GlobalStore,
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1303
|
+
sr as GoalType,
|
|
1304
|
+
Lr as INCOME_ACCOUNT_TYPES,
|
|
1305
|
+
qs as IconBacking,
|
|
1306
|
+
Js as InformationTooltip,
|
|
1307
|
+
_r as InsightNotificationTypes,
|
|
1308
|
+
Rt as IterationItemTypes,
|
|
1309
|
+
Xe as LOADING_STATUS,
|
|
1310
|
+
ur as ListItemAction,
|
|
1311
|
+
hr as ListItemRow,
|
|
1298
1312
|
_s as ListItemWrapper,
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1313
|
+
Us as Loader,
|
|
1314
|
+
Ke as LocalizedCopyApi,
|
|
1315
|
+
rr as MetaType,
|
|
1316
|
+
Zo as MfaStatuses,
|
|
1303
1317
|
ws as MicroWidgetContainer,
|
|
1304
|
-
|
|
1318
|
+
xs as MiniWidgetContainer,
|
|
1305
1319
|
Je as MultiSegmentDonut,
|
|
1306
|
-
|
|
1320
|
+
Jo as NonConnectedStatuses,
|
|
1307
1321
|
hs as NotificationApi,
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1322
|
+
fr as NotificationTypes,
|
|
1323
|
+
Ar as ORDINAL_DATE_FORMAT,
|
|
1324
|
+
vr as ORDINAL_MONTH_DAY_YEAR_FORMAT,
|
|
1325
|
+
Ur as PAYMENT_ACCOUNT_TYPES,
|
|
1326
|
+
Fr as PaymentCategories,
|
|
1327
|
+
$t as PlanTypes,
|
|
1328
|
+
ta as ProcessingStatuses,
|
|
1329
|
+
ea as PropertyType,
|
|
1330
|
+
sa as PropertyTypeName,
|
|
1317
1331
|
Qe as RECURRENCE_COPY,
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1332
|
+
js as RecurrenceStatus,
|
|
1333
|
+
Ks as RecurrenceType,
|
|
1334
|
+
Ut as RecurrenceTypes,
|
|
1335
|
+
zs as RepeatingType,
|
|
1336
|
+
Rs as ResponsiveButton,
|
|
1337
|
+
$r as SPENDING_ACCOUNT_TYPES,
|
|
1338
|
+
se as ScheduledPaymentTypes,
|
|
1339
|
+
ze as ScheduledPaymentsApi,
|
|
1340
|
+
re as ScreenSize,
|
|
1341
|
+
Os as SearchBox,
|
|
1342
|
+
Vs as Select,
|
|
1343
|
+
Fs as SelectionBox,
|
|
1344
|
+
Br as SingleSegmentDonut,
|
|
1345
|
+
Kr as Sizes,
|
|
1346
|
+
wr as StatusBar,
|
|
1347
|
+
ra as StatusName,
|
|
1348
|
+
zr as TOUCH_TARGET,
|
|
1349
|
+
Gs as TabContentContainer,
|
|
1350
|
+
yr as ToggleButtonListItem,
|
|
1351
|
+
Sr as ToggleListItem,
|
|
1352
|
+
or as TrackType,
|
|
1339
1353
|
fs as TransactionStatus,
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1354
|
+
ot as TransactionType,
|
|
1355
|
+
G as UserApi,
|
|
1356
|
+
le as UserStore,
|
|
1357
|
+
te as UserVerification,
|
|
1344
1358
|
W as WidgetApi,
|
|
1345
1359
|
Es as WidgetContainer,
|
|
1346
|
-
|
|
1347
|
-
|
|
1360
|
+
to as WidgetContainerContext,
|
|
1361
|
+
eo as WidgetContainerProvider,
|
|
1348
1362
|
os as analyticsSession,
|
|
1349
1363
|
na as buildDynamicCopy,
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1364
|
+
ca as buildPluralCopy,
|
|
1365
|
+
Wr as formatCurrency,
|
|
1366
|
+
Er as formatDate,
|
|
1367
|
+
qr as formatOrdinal,
|
|
1368
|
+
Yr as formatPercentage,
|
|
1369
|
+
aa as fromTimestampToMonthYear,
|
|
1370
|
+
Oo as getCategory,
|
|
1371
|
+
Po as getCategoryTotalsByParent,
|
|
1372
|
+
je as getClientTheme,
|
|
1373
|
+
Qr as getCurrencyCodes,
|
|
1374
|
+
Fo as getDetailedCategory,
|
|
1375
|
+
Ho as getDetailedSubCategory,
|
|
1376
|
+
da as getLocale,
|
|
1377
|
+
Go as isIncome,
|
|
1378
|
+
Xr as isValidNumber,
|
|
1379
|
+
Io as useAccountDisplayName,
|
|
1380
|
+
so as useAccountStore,
|
|
1381
|
+
ro as useAppConfig,
|
|
1382
|
+
oo as useBudgetsStore,
|
|
1383
|
+
ao as useCashflowStore,
|
|
1384
|
+
io as useCategoryStore,
|
|
1371
1385
|
as as useCombineEvents,
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1386
|
+
is as useCombinePageviews,
|
|
1387
|
+
no as useDebtStore,
|
|
1388
|
+
co as useError,
|
|
1389
|
+
uo as useEvent,
|
|
1390
|
+
lo as useFinstrongStore,
|
|
1391
|
+
ho as useGlobalCopyStore,
|
|
1392
|
+
go as useGlobalStore,
|
|
1393
|
+
po as useGlobalUiStore,
|
|
1394
|
+
mo as useGoalStore,
|
|
1395
|
+
_o as useHelpStore,
|
|
1396
|
+
fo as useHoldingStore,
|
|
1397
|
+
Mo as useInsightsEnabled,
|
|
1398
|
+
yo as useLoad,
|
|
1399
|
+
So as useMerchantStore,
|
|
1400
|
+
bo as useNetWorthStore,
|
|
1401
|
+
wo as useNotificationStore,
|
|
1402
|
+
Co as usePageView,
|
|
1403
|
+
Ze as usePrevious,
|
|
1404
|
+
xo as useRecurringTransactionsStore,
|
|
1405
|
+
Uo as useScreenSize,
|
|
1406
|
+
Do as useSettingsStore,
|
|
1407
|
+
Ao as useTransactionStore,
|
|
1408
|
+
vo as useTrendsStore,
|
|
1409
|
+
Eo as useUserStore,
|
|
1410
|
+
To as useWidgetContainerProvider,
|
|
1411
|
+
Ro as useWidgetLoadTimer
|
|
1398
1412
|
};
|