@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.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.
- package/CHANGELOG.md +217 -0
- package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/Account-CMjOp7S2.mjs +118 -0
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
- package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
- package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
- package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
- package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
- package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
- package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
- package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
- package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
- package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
- package/dist/Drawer-Bet2ZPJo.mjs +176 -0
- package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
- package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
- package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
- package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
- package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
- package/dist/LineChart-DHj-Bufi.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
- package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
- package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
- package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
- package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
- package/dist/NotificationSettings-e789PcRb.mjs +676 -0
- package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
- package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
- package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
- package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
- package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
- package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
- package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
- package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
- package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
- package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
- package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
- package/dist/accounts/index.es.js +933 -232
- package/dist/accounts/stores/AccountStore.d.ts +6 -2
- package/dist/accounts/utils/AccountDetails.d.ts +5 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +561 -522
- package/dist/cashflow/index.es.js +397 -396
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
- package/dist/categories/components/SubcategoryRow.d.ts +1 -0
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +5 -3
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +325 -306
- package/dist/common/stores/GlobalUiStore.d.ts +7 -4
- package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
- package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
- package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
- package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
- package/dist/dashboard/index.es.js +95 -125
- package/dist/debts/index.es.js +466 -460
- package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +1660 -1553
- package/dist/goals/index.es.js +716 -677
- package/dist/goals/stores/GoalStore.d.ts +2 -0
- package/dist/help/index.es.js +14 -10
- package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
- package/dist/investments/index.es.js +464 -457
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/cards/InsightCard.d.ts +0 -2
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
- package/dist/microinsights/index.d.ts +2 -2
- package/dist/microinsights/index.es.js +824 -14
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +433 -438
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +331 -325
- package/dist/settings/index.es.js +293 -285
- package/dist/spending/components/SpendingChart.d.ts +1 -1
- package/dist/spending/components/SpendingList.d.ts +1 -1
- package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
- package/dist/spending/index.es.js +250 -235
- package/dist/transactions/index.es.js +288 -281
- package/dist/transactions/stores/TransactionStore.d.ts +5 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +876 -802
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/trends/utils/TrendsTable.d.ts +12 -0
- package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
- package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
- package/package.json +26 -21
- package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
- package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
- package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
- package/dist/Drawer-Dqe5EqvA.mjs +0 -163
- package/dist/LineChart-bc1D9xBE.mjs +0 -581
- package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
- package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
- package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
- package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
- 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/microinsights/cards/BaseCard.d.ts +0 -13
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
import { makeAutoObservable as
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
4
|
-
import { d as m } from "./Accounts-
|
|
5
|
-
import { A as
|
|
6
|
-
class d {
|
|
7
|
-
fetchInstance;
|
|
8
|
-
constructor(t, e, s) {
|
|
9
|
-
this.fetchInstance = new g(t, e, void 0, s);
|
|
10
|
-
}
|
|
11
|
-
createAccount = async (t) => this.fetchInstance.post(i.ACCOUNTS, t).then((e) => e.account).catch((e) => e);
|
|
12
|
-
deleteAccount = async (t) => this.fetchInstance.delete(`${i.ACCOUNTS}/${t}`).catch((e) => e);
|
|
13
|
-
getAccounts = async () => this.fetchInstance.get(i.ACCOUNTS).then((t) => t.accounts).catch((t) => t);
|
|
14
|
-
getInstitutions = async () => this.fetchInstance.get(i.INSTITUTIONS).then((t) => t).catch((t) => t);
|
|
15
|
-
getMembers = async () => this.fetchInstance.get(i.MEMBERS).then((t) => t.members).catch((t) => t);
|
|
16
|
-
getMonthlyAccountBalances = async (t) => this.fetchInstance.get(`${i.ACCOUNTS}/${t}/monthly_account_balances`).then((e) => e.monthly_account_balances).catch((e) => e);
|
|
17
|
-
mergeAccounts = async (t) => this.fetchInstance.put(`${i.ACCOUNTS}/merge`, { accounts: t }).then((e) => e).catch((e) => e);
|
|
18
|
-
refreshAllMembers = async () => this.fetchInstance.get(`${i.MEMBERS}/refresh_all`).then((t) => t).catch((t) => t);
|
|
19
|
-
updateAccount = async (t) => this.fetchInstance.put(`${i.ACCOUNTS}/${t.guid}`, t).then((e) => e.account).catch((e) => e);
|
|
20
|
-
}
|
|
1
|
+
import { makeAutoObservable as h, runInAction as a } from "mobx";
|
|
2
|
+
import { i as g } from "./User-CulNdZUr.mjs";
|
|
3
|
+
import { A as d } from "./AccountApi-DgZ8ILj1.mjs";
|
|
4
|
+
import { d as m } from "./Accounts-CuE8aSZN.mjs";
|
|
5
|
+
import { A as s, d as u } from "./Account-CMjOp7S2.mjs";
|
|
21
6
|
class p {
|
|
22
7
|
isLoading = !1;
|
|
23
8
|
selectedAccount = {};
|
|
24
9
|
selectedMember = {};
|
|
25
10
|
constructor() {
|
|
26
|
-
|
|
11
|
+
h(this);
|
|
27
12
|
}
|
|
28
13
|
setIsLoading = (t) => this.isLoading = t;
|
|
29
14
|
setSelectedAccount = (t) => this.selectedAccount = t;
|
|
@@ -34,13 +19,16 @@ class E {
|
|
|
34
19
|
api = new d("/", "");
|
|
35
20
|
accounts = [];
|
|
36
21
|
accountsLoaded = !1;
|
|
22
|
+
accountsLoading = !1;
|
|
37
23
|
institutions = [];
|
|
38
24
|
institutionsLoaded = !1;
|
|
25
|
+
institutionsLoading = !1;
|
|
39
26
|
members = [];
|
|
40
27
|
membersLoaded = !1;
|
|
28
|
+
membersLoading = !1;
|
|
41
29
|
uiStore;
|
|
42
30
|
constructor(t) {
|
|
43
|
-
this.globalStore = t, this.uiStore = new p(), this.api = new d(t.endpoint, t.sessionToken, t.onError),
|
|
31
|
+
this.globalStore = t, this.uiStore = new p(), this.api = new d(t.endpoint, t.sessionToken, t.onError), h(this);
|
|
44
32
|
}
|
|
45
33
|
loadAccountData = async () => {
|
|
46
34
|
await Promise.all([this.loadAccounts(), this.loadMembers(), this.loadInstitutions()]);
|
|
@@ -49,45 +37,52 @@ class E {
|
|
|
49
37
|
return this.accountsLoaded && this.membersLoaded && this.institutionsLoaded;
|
|
50
38
|
}
|
|
51
39
|
get detailedAccounts() {
|
|
52
|
-
const t = this.globalStore.userStore.userFeatures, e =
|
|
40
|
+
const t = this.globalStore.userStore.userFeatures, e = g(t, "MD_EXCLUDE_EXTERNAL_ACCOUNTS");
|
|
53
41
|
return m(this.accounts, this.institutions, this.members, e);
|
|
54
42
|
}
|
|
43
|
+
get accountsByTypeMap() {
|
|
44
|
+
return this.detailedAccounts.reduce((t, e) => {
|
|
45
|
+
const c = e.account_type;
|
|
46
|
+
let n = t.get(c);
|
|
47
|
+
return n || (n = []), n.push(e), t.set(c, n), t;
|
|
48
|
+
}, /* @__PURE__ */ new Map());
|
|
49
|
+
}
|
|
55
50
|
get cashAccounts() {
|
|
56
51
|
return this.detailedAccounts.filter(
|
|
57
|
-
(t) => t.account_type ===
|
|
52
|
+
(t) => t.account_type === s.CASH || t.account_type === s.CHECKING || t.account_type === s.PREPAID || t.account_type === s.SAVINGS || t.account_type === s.CHECKING_LINE_OF_CREDIT
|
|
58
53
|
);
|
|
59
54
|
}
|
|
60
55
|
get cashBalance() {
|
|
61
56
|
return this.cashAccounts.reduce((t, e) => t + (e?.balance || 0), 0);
|
|
62
57
|
}
|
|
63
58
|
get checkingAccounts() {
|
|
64
|
-
return this.detailedAccounts.filter((t) => t.account_type ===
|
|
59
|
+
return this.detailedAccounts.filter((t) => t.account_type === s.CHECKING);
|
|
65
60
|
}
|
|
66
61
|
get debtAccounts() {
|
|
67
62
|
return this.detailedAccounts.filter(
|
|
68
|
-
(t) => t.account_type ===
|
|
63
|
+
(t) => t.account_type === s.CREDIT_CARD || t.account_type === s.LOAN || t.account_type === s.MORTGAGE || t.account_type === s.LINE_OF_CREDIT || t.account_type === s.CHECKING_LINE_OF_CREDIT
|
|
69
64
|
);
|
|
70
65
|
}
|
|
71
66
|
get finstrongAccounts() {
|
|
72
67
|
const t = /* @__PURE__ */ new Set([
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
s.CHECKING,
|
|
69
|
+
s.SAVINGS,
|
|
70
|
+
s.CREDIT_CARD,
|
|
71
|
+
s.INVESTMENT
|
|
77
72
|
]);
|
|
78
73
|
return this.detailedAccounts.filter((e) => t.has(e.account_type));
|
|
79
74
|
}
|
|
80
75
|
get investmentAccounts() {
|
|
81
76
|
return this.detailedAccounts.filter(
|
|
82
|
-
(t) => t.account_type ===
|
|
77
|
+
(t) => t.account_type === s.INVESTMENT
|
|
83
78
|
);
|
|
84
79
|
}
|
|
85
80
|
get savingsAccounts() {
|
|
86
|
-
return this.detailedAccounts.filter((t) => t.account_type ===
|
|
81
|
+
return this.detailedAccounts.filter((t) => t.account_type === s.SAVINGS);
|
|
87
82
|
}
|
|
88
83
|
get retirementAccounts() {
|
|
89
84
|
return this.detailedAccounts.filter(
|
|
90
|
-
(t) => t.account_type ===
|
|
85
|
+
(t) => t.account_type === s.INVESTMENT || t.account_type === s.SAVINGS || t.account_type === s.CHECKING || t.account_type === s.CASH || t.account_type === s.PROPERTY || t.account_type === s.INSURANCE && (t.account_subtype === u.WHOLE_LIFE || t.account_subtype === u.UNIVERSAL_LIFE || t.account_subtype === u.VARIABLE_UNIVERSAL_LIFE)
|
|
91
86
|
);
|
|
92
87
|
}
|
|
93
88
|
get visibleAccounts() {
|
|
@@ -121,23 +116,23 @@ class E {
|
|
|
121
116
|
}
|
|
122
117
|
get savingsAndCheckingAccountsBalance() {
|
|
123
118
|
return this.savingsAndCheckingAccounts.reduce(
|
|
124
|
-
(e,
|
|
119
|
+
(e, c) => e + (c?.balance || 0),
|
|
125
120
|
0
|
|
126
121
|
);
|
|
127
122
|
}
|
|
128
123
|
get savingsAndCheckingAccounts() {
|
|
129
124
|
return this.accounts.filter(
|
|
130
|
-
(e) => e.account_type ===
|
|
125
|
+
(e) => e.account_type === s.SAVINGS || e.account_type === s.CHECKING
|
|
131
126
|
);
|
|
132
127
|
}
|
|
133
128
|
setAccounts = (t) => {
|
|
134
|
-
this.accounts = t, this.accountsLoaded = !0;
|
|
129
|
+
this.accounts = t, this.accountsLoading = !1, this.accountsLoaded = !0;
|
|
135
130
|
};
|
|
136
131
|
setMembers = (t) => {
|
|
137
|
-
this.members = t, this.membersLoaded = !0;
|
|
132
|
+
this.members = t, this.membersLoading = !1, this.membersLoaded = !0;
|
|
138
133
|
};
|
|
139
134
|
setInstitutions = (t) => {
|
|
140
|
-
this.institutions = t, this.institutionsLoaded = !0;
|
|
135
|
+
this.institutions = t, this.institutionsLoading = !1, this.institutionsLoaded = !0;
|
|
141
136
|
};
|
|
142
137
|
addAccount = async (t) => {
|
|
143
138
|
try {
|
|
@@ -150,37 +145,46 @@ class E {
|
|
|
150
145
|
}
|
|
151
146
|
};
|
|
152
147
|
loadAccounts = async () => {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
148
|
+
if (!this.accountsLoading) {
|
|
149
|
+
this.accountsLoading = !0;
|
|
150
|
+
try {
|
|
151
|
+
const t = await this.api.getAccounts();
|
|
152
|
+
this.setAccounts(t);
|
|
153
|
+
} catch (t) {
|
|
154
|
+
console.error(`Error occurred while loading accounts: ${t}`);
|
|
155
|
+
}
|
|
158
156
|
}
|
|
159
157
|
};
|
|
160
158
|
loadInstitutions = async () => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
if (!this.institutionsLoading) {
|
|
160
|
+
this.institutionsLoading = !0;
|
|
161
|
+
try {
|
|
162
|
+
const t = await this.api.getInstitutions();
|
|
163
|
+
this.setInstitutions(t);
|
|
164
|
+
} catch (t) {
|
|
165
|
+
console.error(`Error occurred while loading institutions: ${t}`);
|
|
166
|
+
}
|
|
166
167
|
}
|
|
167
168
|
};
|
|
168
169
|
loadMembers = async () => {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
if (!this.membersLoading) {
|
|
171
|
+
this.membersLoading = !0;
|
|
172
|
+
try {
|
|
173
|
+
const t = await this.api.getMembers();
|
|
174
|
+
this.setMembers(t);
|
|
175
|
+
} catch (t) {
|
|
176
|
+
console.error(`Error occurred while loading members: ${t}`);
|
|
177
|
+
}
|
|
174
178
|
}
|
|
175
179
|
};
|
|
176
180
|
mergeAccounts = async (t) => {
|
|
177
181
|
try {
|
|
178
|
-
const e = await this.api.mergeAccounts(t),
|
|
182
|
+
const e = await this.api.mergeAccounts(t), c = e[Object.keys(e)[0]];
|
|
179
183
|
a(() => {
|
|
180
|
-
const n = this.accounts.findIndex((
|
|
184
|
+
const n = this.accounts.findIndex((i) => i.guid === t[1]);
|
|
181
185
|
this.accounts.splice(n, 1);
|
|
182
|
-
const o = this.accounts.findIndex((
|
|
183
|
-
this.accounts.splice(o, 1,
|
|
186
|
+
const o = this.accounts.findIndex((i) => i.guid === t[0]);
|
|
187
|
+
this.accounts.splice(o, 1, c);
|
|
184
188
|
});
|
|
185
189
|
} catch (e) {
|
|
186
190
|
console.error(`Error occurred while merging accounts: ${e}`);
|
|
@@ -199,7 +203,7 @@ class E {
|
|
|
199
203
|
removeAccount = async (t) => {
|
|
200
204
|
try {
|
|
201
205
|
await this.api.deleteAccount(t);
|
|
202
|
-
const e = this.accounts.findIndex((
|
|
206
|
+
const e = this.accounts.findIndex((c) => c.guid === t);
|
|
203
207
|
this.accounts.splice(e, 1);
|
|
204
208
|
} catch (e) {
|
|
205
209
|
console.error(`Error occurred while removing an account: ${e}`);
|
|
@@ -207,28 +211,34 @@ class E {
|
|
|
207
211
|
};
|
|
208
212
|
updateAccount = async (t) => {
|
|
209
213
|
try {
|
|
210
|
-
const e = await this.api.updateAccount(t),
|
|
214
|
+
const e = await this.api.updateAccount(t), c = this.accounts.findIndex(
|
|
211
215
|
(n) => n.guid === e.guid
|
|
212
216
|
);
|
|
213
|
-
this.accounts.splice(
|
|
217
|
+
this.accounts.splice(c, 1, e);
|
|
214
218
|
} catch (e) {
|
|
215
219
|
console.error(`Error occurred while updating account: ${e}`);
|
|
216
220
|
}
|
|
217
221
|
};
|
|
218
222
|
updateAccountBalance = (t, e) => {
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
223
|
+
const c = this.accounts.find((n) => n.guid === t);
|
|
224
|
+
c && a(() => {
|
|
225
|
+
c.balance = (c.balance || 0) + e;
|
|
222
226
|
});
|
|
223
227
|
};
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
+
updateAccountFilter = async (t) => {
|
|
229
|
+
const e = [];
|
|
230
|
+
for (const [o, i] of t.entries()) {
|
|
231
|
+
const r = this.accounts.find((A) => A.guid === o);
|
|
232
|
+
r && r.is_excluded_from_accounts === i && (r.is_excluded_from_accounts = !i, e.push(this.api.updateAccount(r)));
|
|
233
|
+
}
|
|
234
|
+
const c = await Promise.all(e), n = [...this.accounts];
|
|
235
|
+
for (const o of c) {
|
|
236
|
+
const i = n.findIndex((r) => r.guid === o.guid);
|
|
237
|
+
i !== -1 && n.splice(i, 1, o);
|
|
228
238
|
}
|
|
239
|
+
this.setAccounts(n);
|
|
229
240
|
};
|
|
230
241
|
}
|
|
231
242
|
export {
|
|
232
|
-
|
|
233
|
-
E as a
|
|
243
|
+
E as A
|
|
234
244
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, C as u, E as r, c as p, M as y } from "./
|
|
1
|
+
import { A as e, C as u, E as r, c as p, M as y } from "./Account-CMjOp7S2.mjs";
|
|
2
2
|
const l = (t) => t && (t.account_type === e.CREDIT_CARD || t.account_type === e.LOAN || t.account_type === e.MORTGAGE || t.account_type === e.LINE_OF_CREDIT || t.account_type === e.CHECKING_LINE_OF_CREDIT), I = (t) => t.is_manual || !t.guid, R = (t) => t.account_type === e.LINE_OF_CREDIT || t.account_type === e.CREDIT_CARD || t.account_type === e.CHECKING_LINE_OF_CREDIT, f = (t) => t.account_type === e.SAVINGS || t.account_type === e.CHECKING || t.account_type === e.LINE_OF_CREDIT || t.account_type === e.CREDIT_CARD || t.account_type === e.LOAN || t.account_type === e.MORTGAGE, m = (t) => t.account_type === e.LOAN || t.account_type === e.MORTGAGE, A = (t, n, s, _) => t.filter((i) => !(i.member_is_managed_by_user && _)).sort(d).map((i) => {
|
|
3
3
|
const c = n.find((a) => a.guid === i.institution_guid), o = s.find((a) => a.guid === i.member_guid);
|
|
4
4
|
return E(i, c, o);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as _ } from "./hooks-
|
|
1
|
+
import { i as _ } from "./hooks-fY_n74f7.mjs";
|
|
2
2
|
import { b as d } from "./Category-Ccoew_sA.mjs";
|
|
3
3
|
import { b as f } from "./Localization-2MODESHW.mjs";
|
|
4
4
|
import { f as l } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
@@ -91,9 +91,9 @@ const p = (n, e) => n.find((t) => t.guid === e), B = (n, e) => n.find((t) => t.g
|
|
|
91
91
|
export {
|
|
92
92
|
S as a,
|
|
93
93
|
I as b,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
k as c,
|
|
95
|
+
B as d,
|
|
96
|
+
T as e,
|
|
97
97
|
m as f,
|
|
98
98
|
p as g,
|
|
99
99
|
w as i,
|