@mx-cartographer/experiences 8.0.24 → 8.1.0
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 +8 -9
- package/dist/{AccountApi-ChQr5PAZ.mjs → AccountApi-WEM2M9tg.mjs} +1 -1
- package/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-IPRH6Wja.mjs} +2 -2
- package/dist/{AccountFields-CxqONzjY.mjs → AccountFields-BbPSfzru.mjs} +3 -3
- package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-qpACFl6i.mjs} +2 -2
- package/dist/{AccountStore-B7zfcad7.mjs → AccountStore-BeEiLNhW.mjs} +2 -2
- package/dist/Analytics-CjZ0emfs.mjs +53 -0
- package/dist/{Fetch-B6tMJC1r.mjs → ApiEndpoints-C5IA97i7.mjs} +48 -50
- package/dist/{BeatApi-EFHXULDx.mjs → BeatApi-C6pBa0Rb.mjs} +1 -1
- package/dist/{BeatStore-C6CAT-ce.mjs → BeatStore-DuvvrljY.mjs} +1 -1
- package/dist/{BudgetUtil-DZpOoZQa.mjs → BudgetUtil-CLh4xtj4.mjs} +60 -60
- package/dist/CategoryApi-CogDFScz.mjs +29 -0
- package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-BG04ByUx.mjs} +1 -1
- package/dist/CategoryStore-Bp1kO9Z-.mjs +160 -0
- package/dist/{CategoryUtil-BVixr0d5.mjs → CategoryUtil-DKRCegQv.mjs} +1 -1
- package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-BkNVHxSV.mjs} +14 -13
- package/dist/{CurrencyText-CA-E5N_y.mjs → CurrencyText-oqd6cX3M.mjs} +1 -1
- package/dist/{DateFormats-BMpMrZpW.mjs → DateFormats-CaOj_4eI.mjs} +1 -1
- package/dist/{DateUtil-wcYTmDRD.mjs → DateUtil-C57sqxn4.mjs} +1 -1
- package/dist/{EmbeddedCard-qwIhF1VP.mjs → EmbeddedCard-j7IGx3s1.mjs} +5 -5
- package/dist/{ExportCsvAction-CHCmCCqf.mjs → ExportCsvAction-7sjz7AXQ.mjs} +1 -1
- package/dist/FinstrongApi-FpmsS_sy.mjs +19 -0
- package/dist/{FinstrongStore-BQxXxxYD.mjs → FinstrongStore-DgyDJTEP.mjs} +121 -137
- package/dist/GlobalCopyApi-DkS-2Zf_.mjs +41 -0
- package/dist/Goal-MFBpoOIC.mjs +29 -0
- package/dist/{GoalStore-fgXt--2Y.mjs → GoalStore-DcaT4fM6.mjs} +81 -104
- package/dist/{Help-BkmSY96v.mjs → Help-cTsMzSQh.mjs} +1 -1
- package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DkD_s9NN.mjs} +1 -1
- package/dist/Localization-C_HZg9tJ.mjs +15 -0
- package/dist/Localization-CkQ49EKr.mjs +26 -0
- package/dist/{ManageIncome-DqqI9HB1.mjs → ManageIncome-DwSE_a8L.mjs} +20 -20
- package/dist/MerchantApi-D8ahYxiG.mjs +15 -0
- package/dist/MerchantStore-CyZTv-BM.mjs +26 -0
- package/dist/{NetWorthStore-BqZ44-4M.mjs → NetWorthStore-Ba3q3VcH.mjs} +1 -1
- package/dist/NotificationApi-DF0obHoR.mjs +20 -0
- package/dist/{NotificationSettings-DBT37CVB.mjs → NotificationSettings-DB-eNgSv.mjs} +3 -3
- package/dist/NotificationStore-DlAM5Ue0.mjs +69 -0
- package/dist/{NumberFormatting-QCaNwbjv.mjs → NumberFormatting-CyrvFgfd.mjs} +1 -1
- package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-AB1TGb5P.mjs} +2 -2
- package/dist/{RecurringSettings-OBGLelZQ.mjs → RecurringSettings-CZKeZC4m.mjs} +8 -8
- package/dist/{RecurringTransactions-BbZ6MQsX.mjs → RecurringTransactions-kzlU8OFY.mjs} +5 -5
- package/dist/{RecurringTransactionsStore-BE_eUfTC.mjs → RecurringTransactionsStore-D62Dt2BF.mjs} +76 -90
- package/dist/{RepeatingTransaction-DF4vJn_v.mjs → RepeatingTransaction-D2gmBTd0.mjs} +3 -3
- package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +17 -0
- package/dist/SettingsApi-D9d7SLhB.mjs +22 -0
- package/dist/{SettingsStore-BoIoiRLj.mjs → SettingsStore-Dsz1mvd3.mjs} +41 -60
- package/dist/{SpendingData-Bz1bCWAs.mjs → SpendingData-CoZOmlZD.mjs} +1 -1
- package/dist/{SpendingLegend-CypdabwS.mjs → SpendingLegend-DljKEG69.mjs} +2 -2
- package/dist/{Transaction-C3Pg9TKf.mjs → Transaction-Cn5_iFm0.mjs} +2 -2
- package/dist/{TransactionApi-Ck5Ua-7F.mjs → TransactionApi-CLG2eSNe.mjs} +1 -1
- package/dist/{TransactionDetails-I1ny1ecc.mjs → TransactionDetails-CN-yZkin.mjs} +9 -9
- package/dist/{TransactionStore-BUsgGRL1.mjs → TransactionStore-6ovFO8P1.mjs} +10 -10
- package/dist/{TrendsStore-CYdTo7cN.mjs → TrendsStore-DZa6cyQC.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-BJOZcYnB.mjs → ViewMoreMicroCard-BsEitNRJ.mjs} +10 -9
- package/dist/WidgetApi-C0BA2cFX.mjs +102 -0
- package/dist/{WidgetContainer-DYKMArWw.mjs → WidgetContainer-Bc75FqK7.mjs} +1 -1
- package/dist/accounts/index.d.ts +0 -1
- package/dist/accounts/index.es.js +63 -65
- package/dist/accounts/stores/AccountStore.d.ts +1 -1
- package/dist/budgets/index.es.js +11 -11
- package/dist/budgets/store/BudgetsStore.d.ts +1 -1
- package/dist/cashflow/index.d.ts +0 -1
- package/dist/cashflow/index.es.js +428 -449
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -1
- package/dist/common/components/Error.d.ts +11 -0
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/constants/index.d.ts +0 -1
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.es.js +391 -492
- package/dist/common/stores/AppDataStore.d.ts +2 -2
- package/dist/common/stores/ConnectStore.d.ts +1 -1
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
- package/dist/common/stores/UserStore.d.ts +1 -1
- package/dist/common/utils/Localization.d.ts +0 -9
- package/dist/common/utils/index.d.ts +1 -2
- package/dist/{accounts → core}/api/AccountApi.d.ts +2 -2
- package/dist/{common → core}/api/AnalyticsApi.d.ts +1 -1
- package/dist/{common → core}/api/AppDataApi.d.ts +2 -2
- package/dist/{common → core}/api/BannerApi.d.ts +1 -1
- package/dist/{common → core}/api/BeatApi.d.ts +2 -2
- package/dist/{budgets → core}/api/BudgetsApi.d.ts +2 -2
- package/dist/{common → core}/api/CategoryApi.d.ts +2 -2
- package/dist/{finstrong → core}/api/FinstrongApi.d.ts +2 -2
- package/dist/{common → core}/api/GlobalCopyApi.d.ts +2 -2
- package/dist/{goals → core}/api/GoalApi.d.ts +2 -2
- package/dist/{help → core}/api/HelpApi.d.ts +2 -2
- package/dist/{investments → core}/api/HoldingApi.d.ts +2 -2
- package/dist/{merchants → core}/api/MerchantApi.d.ts +2 -2
- package/dist/{common → core}/api/NotificationApi.d.ts +2 -2
- package/dist/{recurringtransactions → core}/api/RepeatingTransactionsApi.d.ts +2 -2
- package/dist/{common → core}/api/ScheduledPaymentsApi.d.ts +2 -2
- package/dist/{settings → core}/api/SettingsApi.d.ts +2 -2
- package/dist/{transactions → core}/api/TransactionApi.d.ts +2 -2
- package/dist/{common → core}/api/UserApi.d.ts +2 -2
- package/dist/{common → core}/api/WidgetApi.d.ts +1 -1
- package/dist/core/api/index.d.ts +20 -0
- package/dist/{common → core}/constants/ApiEndpoints.d.ts +0 -2
- package/dist/core/constants/index.d.ts +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.es.js +90 -38
- package/dist/{common → core}/utils/Fetch.d.ts +1 -1
- package/dist/core/utils/Localization.d.ts +9 -0
- package/dist/core/utils/index.d.ts +2 -0
- package/dist/debts/index.es.js +7 -7
- package/dist/{exportTransactionsToCSV-DgdB3TBt.mjs → exportTransactionsToCSV-Dnd5lVq7.mjs} +2 -2
- package/dist/finstrong/index.d.ts +0 -1
- package/dist/finstrong/index.es.js +16 -17
- package/dist/finstrong/stores/FinstrongStore.d.ts +1 -1
- package/dist/goals/index.d.ts +0 -1
- package/dist/goals/index.es.js +50 -51
- package/dist/goals/stores/GoalStore.d.ts +1 -1
- package/dist/help/index.es.js +2 -2
- package/dist/help/store/HelpStore.d.ts +1 -1
- package/dist/insights/index.es.js +6 -6
- package/dist/insights/store/BeatStore.d.ts +1 -1
- package/dist/investments/index.es.js +2 -2
- package/dist/investments/stores/HoldingStore.d.ts +1 -1
- package/dist/merchants/index.es.js +1 -1
- package/dist/merchants/stores/MerchantStore.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/stores/CopyStore.d.ts +1 -1
- package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
- package/dist/networth/index.es.js +8 -8
- package/dist/networth/stores/NetWorthStore.d.ts +1 -1
- package/dist/notifications/index.es.js +5 -5
- package/dist/notifications/stores/NotificationStore.d.ts +2 -1
- package/dist/recurringtransactions/index.es.js +26 -25
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -1
- package/dist/settings/index.d.ts +0 -1
- package/dist/settings/index.es.js +65 -66
- package/dist/settings/stores/SettingsStore.d.ts +2 -2
- package/dist/spending/index.es.js +6 -6
- package/dist/transactions/index.d.ts +0 -1
- package/dist/transactions/index.es.js +22 -24
- package/dist/transactions/stores/TransactionStore.d.ts +3 -2
- package/dist/trends/index.es.js +14 -14
- package/package.json +1 -1
- package/dist/CategoryStore-FTxUbn0f.mjs +0 -186
- package/dist/Goal-0loDagc5.mjs +0 -6
- package/dist/Localization-CPkpIwIx.mjs +0 -37
- package/dist/MerchantStore-BzGi4JAZ.mjs +0 -37
- package/dist/NotificationStore-D_e8zo5M.mjs +0 -86
- package/dist/cashflow/api/CashflowApi.d.ts +0 -13
- package/dist/common/api/LocalizedCopyApi.d.ts +0 -8
- package/dist/common/api/index.d.ts +0 -10
- package/dist/repeatingTransactions-DHIG94pi.mjs +0 -4
- package/dist/useCombineEvents-Bqojlv8q.mjs +0 -92
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable as y } from "mobx";
|
|
2
|
-
import { getUnixTime as n } from "date-fns/getUnixTime";
|
|
3
|
-
import { subMonths as c } from "date-fns/subMonths";
|
|
4
|
-
import { startOfMonth as C } from "date-fns/startOfMonth";
|
|
5
|
-
import { endOfMonth as h } from "date-fns/endOfMonth";
|
|
6
|
-
import { a as T, g as m } from "./CategoryUtil-BVixr0d5.mjs";
|
|
7
|
-
import { F as f, A as i } from "./Fetch-B6tMJC1r.mjs";
|
|
8
|
-
import { b as l, c as p } from "./Category-CevNQ03n.mjs";
|
|
9
|
-
class d {
|
|
10
|
-
fetchInstance;
|
|
11
|
-
constructor(t, e, o) {
|
|
12
|
-
this.fetchInstance = new f(t, e, void 0, o);
|
|
13
|
-
}
|
|
14
|
-
addCategory = async (t) => this.fetchInstance.post(i.CATEGORIES, t).then((e) => e.category);
|
|
15
|
-
getCategories = async () => this.fetchInstance.get(i.CATEGORIES).then((t) => t.categories);
|
|
16
|
-
getDateRangeCategoryTotals = async (t, e, o) => o.length === 0 ? [] : this.fetchInstance.post(`${i.DATE_RANGE_CATEGORY_TOTALS}/from/${t}/to/${e}`, {
|
|
17
|
-
account_guid: o.map((a) => a.guid)
|
|
18
|
-
}).then((a) => a.date_range_category_totals);
|
|
19
|
-
getMonthlyCategoryTotals = async (t, e, o) => {
|
|
20
|
-
try {
|
|
21
|
-
const a = `${i.MONTHLY_CATEGORY_TOTALS}/from/${t}/to/${e}`;
|
|
22
|
-
if (o) {
|
|
23
|
-
const r = o.length === 0 ? [""] : o.map((u) => u.guid);
|
|
24
|
-
return (await this.fetchInstance.post(a, { account_guid: r })).monthly_category_totals;
|
|
25
|
-
} else
|
|
26
|
-
return (await this.fetchInstance.get(a)).monthly_category_totals;
|
|
27
|
-
} catch (a) {
|
|
28
|
-
throw console.error("Error fetching monthly category totals:", a), a;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
removeCategory = async (t) => this.fetchInstance.delete(`${i.CATEGORIES}/${t}`);
|
|
32
|
-
updateCategory = async (t) => this.fetchInstance.put(`${i.CATEGORIES}/${t.guid}`, t).then((e) => e.category);
|
|
33
|
-
}
|
|
34
|
-
class S {
|
|
35
|
-
expandedGuid = null;
|
|
36
|
-
selectedGuid = null;
|
|
37
|
-
searchValue = "";
|
|
38
|
-
showSelected = !0;
|
|
39
|
-
shouldDisableDrawerScroll = !1;
|
|
40
|
-
unselectable = [];
|
|
41
|
-
unselectableText = "";
|
|
42
|
-
savedOnSelect;
|
|
43
|
-
// todo
|
|
44
|
-
constructor() {
|
|
45
|
-
y(this);
|
|
46
|
-
}
|
|
47
|
-
setExpandedGuid = (t) => this.expandedGuid = t;
|
|
48
|
-
setSelectedGuid = (t) => this.selectedGuid = t;
|
|
49
|
-
setSearchValue = (t) => this.searchValue = t;
|
|
50
|
-
setShouldDisableDrawerScroll = (t) => this.shouldDisableDrawerScroll = t;
|
|
51
|
-
setShowSelected = (t) => this.showSelected = t;
|
|
52
|
-
setUnselectable = (t) => this.unselectable = t;
|
|
53
|
-
setUnselectableText = (t) => this.unselectableText = t;
|
|
54
|
-
onSelect = (t) => this.savedOnSelect(t);
|
|
55
|
-
setOnSelect = (t) => this.savedOnSelect = t;
|
|
56
|
-
}
|
|
57
|
-
class $ {
|
|
58
|
-
globalStore;
|
|
59
|
-
uiStore;
|
|
60
|
-
api = new d("/", "");
|
|
61
|
-
categories = [];
|
|
62
|
-
categoriesLoaded = !1;
|
|
63
|
-
categoriesLoading = !1;
|
|
64
|
-
dateRangeCategoryTotals = [];
|
|
65
|
-
monthlyCategoryTotals = [];
|
|
66
|
-
dateRangeTotalsLoaded = !1;
|
|
67
|
-
dateRangeTotalsLoading = !1;
|
|
68
|
-
monthlyTotalsLoaded = !1;
|
|
69
|
-
monthlyTotalsLoading = !1;
|
|
70
|
-
constructor(t) {
|
|
71
|
-
this.globalStore = t, this.uiStore = new S(), this.api = new d(t.endpoint, t.sessionToken, t.onError), y(this);
|
|
72
|
-
}
|
|
73
|
-
get detailedCategories() {
|
|
74
|
-
return this.globalStore.isInitialized ? T(
|
|
75
|
-
this.categories,
|
|
76
|
-
this.globalStore.copyStore.copy.categories,
|
|
77
|
-
this.dateRangeCategoryTotals,
|
|
78
|
-
this.monthlyCategoryTotals
|
|
79
|
-
) : [];
|
|
80
|
-
}
|
|
81
|
-
get detailedCategoriesWithTransactions() {
|
|
82
|
-
return m(
|
|
83
|
-
this.detailedCategories,
|
|
84
|
-
this.globalStore.transactionStore.sortedTransactions
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
get incomeCategories() {
|
|
88
|
-
return this.detailedCategories.filter((t) => t.is_income);
|
|
89
|
-
}
|
|
90
|
-
get spendCategories() {
|
|
91
|
-
return this.detailedCategories.filter(
|
|
92
|
-
(t) => !t.is_income && !t.isTransfer && t.guid !== l.INVESTMENTS
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
get transferCategories() {
|
|
96
|
-
return this.detailedCategories.filter((t) => t.isTransfer);
|
|
97
|
-
}
|
|
98
|
-
setCategories = (t) => {
|
|
99
|
-
this.categories = t, this.categoriesLoading = !1, this.categoriesLoaded = !0;
|
|
100
|
-
};
|
|
101
|
-
setMonthlyCategoryTotals = (t) => {
|
|
102
|
-
this.monthlyCategoryTotals = t, this.monthlyTotalsLoading = !1, this.monthlyTotalsLoaded = !0;
|
|
103
|
-
};
|
|
104
|
-
setDateRangeCategoryTotals = (t) => {
|
|
105
|
-
this.dateRangeCategoryTotals = t, this.dateRangeTotalsLoading = !1, this.dateRangeTotalsLoaded = !0;
|
|
106
|
-
};
|
|
107
|
-
get trendsCategories() {
|
|
108
|
-
return this.detailedCategories.filter((t) => t.totalAmount !== 0).filter((t) => t.guid !== l.INVESTMENTS && t.guid !== l.TRANSFER);
|
|
109
|
-
}
|
|
110
|
-
addCategory = async (t, e) => {
|
|
111
|
-
const o = { name: t, parent_guid: e };
|
|
112
|
-
try {
|
|
113
|
-
await this.api.addCategory(o), await this.loadCategories();
|
|
114
|
-
} catch (a) {
|
|
115
|
-
console.error(`Error occurred while adding category: ${a}`);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
loadCategories = async () => {
|
|
119
|
-
if (!this.categoriesLoading) {
|
|
120
|
-
this.categoriesLoading = !0;
|
|
121
|
-
try {
|
|
122
|
-
const t = await this.api.getCategories();
|
|
123
|
-
this.setCategories(t);
|
|
124
|
-
} catch (t) {
|
|
125
|
-
console.error(`Error occurred while getting categories: ${t}`);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
loadDateRangeCategoryTotals = async (t, e, o) => {
|
|
130
|
-
if (!this.dateRangeTotalsLoading) {
|
|
131
|
-
this.dateRangeTotalsLoading = !0;
|
|
132
|
-
try {
|
|
133
|
-
const a = await this.api.getDateRangeCategoryTotals(
|
|
134
|
-
n(e),
|
|
135
|
-
n(o),
|
|
136
|
-
t
|
|
137
|
-
);
|
|
138
|
-
this.setDateRangeCategoryTotals(a);
|
|
139
|
-
} catch (a) {
|
|
140
|
-
console.error(`Error occurred while getting date range category totals: ${a}`);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
loadMonthlyCategoryTotals = async (t = this.globalStore.globalUiStore.selectedAccounts, e, o) => {
|
|
145
|
-
if (this.monthlyTotalsLoading) return;
|
|
146
|
-
this.monthlyTotalsLoading = !0;
|
|
147
|
-
const a = n(C(e ?? c(/* @__PURE__ */ new Date(), 11))), r = n(h(o ?? /* @__PURE__ */ new Date()));
|
|
148
|
-
try {
|
|
149
|
-
const s = await this.api.getMonthlyCategoryTotals(a, r, t);
|
|
150
|
-
this.setMonthlyCategoryTotals(s);
|
|
151
|
-
} catch (s) {
|
|
152
|
-
console.error(`Error occurred while getting monthly category totals: ${s}`);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
reloadCategoryTotals = async (t, e, o) => {
|
|
156
|
-
const a = e ?? c(/* @__PURE__ */ new Date(), 11), r = o ?? h(/* @__PURE__ */ new Date());
|
|
157
|
-
try {
|
|
158
|
-
await Promise.all([
|
|
159
|
-
this.loadMonthlyCategoryTotals(t, a, r),
|
|
160
|
-
this.loadDateRangeCategoryTotals(t, a, r)
|
|
161
|
-
]);
|
|
162
|
-
} catch (s) {
|
|
163
|
-
console.error(`Error occurred while getting category totals: ${s}`);
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
removeCategory = async (t) => {
|
|
167
|
-
try {
|
|
168
|
-
await this.api.removeCategory(t), await this.loadCategories();
|
|
169
|
-
} catch (e) {
|
|
170
|
-
console.error(`Error occurred while removing category: ${e}`);
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
updateCategory = async (t) => {
|
|
174
|
-
try {
|
|
175
|
-
await this.api.updateCategory(t), await this.loadCategories();
|
|
176
|
-
} catch (e) {
|
|
177
|
-
console.error(`Error occurred while updating category: ${e}`);
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
// TODO: Remove this after refactoring Trends components to use detailedCategories
|
|
181
|
-
getCategoryName = (t) => this.categories.find((o) => o.guid === t)?.name ?? p[t];
|
|
182
|
-
}
|
|
183
|
-
export {
|
|
184
|
-
$ as C,
|
|
185
|
-
d as a
|
|
186
|
-
};
|
package/dist/Goal-0loDagc5.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
var A = /* @__PURE__ */ ((E) => (E[E.DEBT_TRACK = 1] = "DEBT_TRACK", E[E.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", E[E.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", E[E.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", E))(A || {}), N = /* @__PURE__ */ ((E) => (E[E.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", E[E.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", E[E.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", E[E.ACTION = 4] = "ACTION", E))(N || {}), C = /* @__PURE__ */ ((E) => (E[E.AUTOMOBILE = 1] = "AUTOMOBILE", E[E.COLLEGE = 2] = "COLLEGE", E[E.HOUSE = 3] = "HOUSE", E[E.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", E[E.VACATION = 5] = "VACATION", E[E.ELECTRONIC = 6] = "ELECTRONIC", E[E.OTHER = 7] = "OTHER", E[E.RETIREMENT = 8] = "RETIREMENT", E[E.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", E[E.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", E[E.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", E[E.CREDIT_CARD = 12] = "CREDIT_CARD", E[E.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", E[E.LOANS = 14] = "LOANS", E))(C || {});
|
|
2
|
-
export {
|
|
3
|
-
N as G,
|
|
4
|
-
C as M,
|
|
5
|
-
A as T
|
|
6
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import u from "react";
|
|
2
|
-
const h = /(?<static>.*?)(?<dynamic>(?:_\d+{(?:.*?)}))|(?<staticEnd>.+)/g, m = {
|
|
3
|
-
EN_US: "en-us",
|
|
4
|
-
EN_CA: "en-ca",
|
|
5
|
-
FR: "fr",
|
|
6
|
-
FR_CA: "fr-ca",
|
|
7
|
-
ES: "es"
|
|
8
|
-
}, d = Object.values(m), b = (n, ...e) => {
|
|
9
|
-
if (!n) return "";
|
|
10
|
-
const s = e.some((a) => typeof a != "string"), o = [...n.matchAll(h)].reduce(
|
|
11
|
-
(a, p, f) => {
|
|
12
|
-
const c = [...a], t = p.groups;
|
|
13
|
-
if (t?.static && c.push(t.static), t?.dynamic) {
|
|
14
|
-
const l = t.dynamic.indexOf("{"), g = t.dynamic.substring(l + 1, t.dynamic.length - 1), r = Number(t.dynamic.substring(1, l));
|
|
15
|
-
if (u.isValidElement(e[r - 1])) {
|
|
16
|
-
const y = e[r - 1], E = u.cloneElement(y, {
|
|
17
|
-
key: `${g}-${f}`
|
|
18
|
-
});
|
|
19
|
-
c.push(E);
|
|
20
|
-
} else
|
|
21
|
-
c.push(e[r - 1]);
|
|
22
|
-
}
|
|
23
|
-
return t?.staticEnd && c.push(t.staticEnd), c;
|
|
24
|
-
},
|
|
25
|
-
[]
|
|
26
|
-
);
|
|
27
|
-
return s ? o : o.join("");
|
|
28
|
-
}, w = (n, e, s, ...i) => !n || !e ? "" : b(s === 1 ? n : e, ...i), C = () => {
|
|
29
|
-
const n = m.EN_US, e = window?.app?.options?.language?.toLowerCase() ?? "", s = window.navigator.language.toLowerCase();
|
|
30
|
-
return e === "browser" && d.includes(s) ? s : d.includes(e) ? e : n;
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
m as L,
|
|
34
|
-
w as a,
|
|
35
|
-
b,
|
|
36
|
-
C as g
|
|
37
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable as m, runInAction as c } from "mobx";
|
|
2
|
-
import { F as p, A as h } from "./Fetch-B6tMJC1r.mjs";
|
|
3
|
-
class i {
|
|
4
|
-
fetchInstance;
|
|
5
|
-
constructor(t, n, s) {
|
|
6
|
-
this.fetchInstance = new p(t, n, void 0, s);
|
|
7
|
-
}
|
|
8
|
-
getMerchants = async (t = [], n = [], s = 1, o = 25) => {
|
|
9
|
-
let a = h.MERCHANTS;
|
|
10
|
-
return a += `?page=${s}&per_page=${o}`, t.length && t.forEach((e) => a += `&fuzzy_name[]=${e}`), n.length && n.forEach((e) => a += `&guid[]=${e}`), this.fetchInstance.get(a).then((e) => e.merchants);
|
|
11
|
-
};
|
|
12
|
-
getMerchantByGuid = async (t) => this.fetchInstance.get(`${h.MERCHANTS}/${t}`).then((n) => n.merchant);
|
|
13
|
-
}
|
|
14
|
-
class u {
|
|
15
|
-
globalStore;
|
|
16
|
-
api = new i("/", "");
|
|
17
|
-
merchant = null;
|
|
18
|
-
merchants = [];
|
|
19
|
-
isLoading = !1;
|
|
20
|
-
constructor(t) {
|
|
21
|
-
this.globalStore = t, this.api = new i(t.endpoint, t.sessionToken, t.onError), m(this);
|
|
22
|
-
}
|
|
23
|
-
loadMerchants = async (t = "") => {
|
|
24
|
-
this.isLoading = !0;
|
|
25
|
-
const n = await this.api.getMerchants([t]);
|
|
26
|
-
c(() => {
|
|
27
|
-
this.merchants = n, this.isLoading = !1;
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
loadMerchantByGuid = async (t) => {
|
|
31
|
-
const n = await this.api.getMerchantByGuid(t);
|
|
32
|
-
c(() => this.merchant = n);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export {
|
|
36
|
-
u as M
|
|
37
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable as f, observable as l, runInAction as h } from "mobx";
|
|
2
|
-
import { fromUnixTime as s, isSameDay as u } from "date-fns";
|
|
3
|
-
import { I as d } from "./Notification-DTNYSd8P.mjs";
|
|
4
|
-
import { F as N, A as o } from "./Fetch-B6tMJC1r.mjs";
|
|
5
|
-
class r {
|
|
6
|
-
fetchInstance;
|
|
7
|
-
constructor(t, i, n) {
|
|
8
|
-
this.fetchInstance = new N(t, i, void 0, n);
|
|
9
|
-
}
|
|
10
|
-
getNotifications = () => this.fetchInstance.get(o.NOTIFICATIONS).then(
|
|
11
|
-
(t) => t.notifications.map((i) => i.notification)
|
|
12
|
-
).finally();
|
|
13
|
-
updateNotification = (t) => this.fetchInstance.put(`${o.NOTIFICATIONS}/${t.guid}`, {
|
|
14
|
-
guid: t.guid,
|
|
15
|
-
has_been_viewed: t.has_been_viewed
|
|
16
|
-
}).then((i) => i.notification).finally();
|
|
17
|
-
// Note: The notifications/mark_all_as_viewed endpoint is broken, but still returns 202.
|
|
18
|
-
// A bug ticket has been filed to fix it, but should not require any changes here.
|
|
19
|
-
markAllAsViewed = (t) => this.fetchInstance.put(`${o.NOTIFICATIONS}/mark_all_as_viewed`, { channel: t }).finally();
|
|
20
|
-
}
|
|
21
|
-
let a = null;
|
|
22
|
-
const A = () => (a || (a = new Set(
|
|
23
|
-
Object.values(d).filter(
|
|
24
|
-
(e) => typeof e == "number"
|
|
25
|
-
)
|
|
26
|
-
)), a), g = (e, t) => {
|
|
27
|
-
const i = s(t[e].delivered_at), n = s(t[e - 1]?.delivered_at);
|
|
28
|
-
return !u(i, n);
|
|
29
|
-
};
|
|
30
|
-
function p(e) {
|
|
31
|
-
const i = Math.floor(Date.now() / 1e3);
|
|
32
|
-
return e.filter((n) => {
|
|
33
|
-
const c = n.delivered_at;
|
|
34
|
-
return i - c <= 2592e3;
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
class T {
|
|
38
|
-
globalStore;
|
|
39
|
-
api = new r("/", "");
|
|
40
|
-
isLoading = !0;
|
|
41
|
-
notifications = [];
|
|
42
|
-
notificationsLoaded = !1;
|
|
43
|
-
constructor(t) {
|
|
44
|
-
this.globalStore = t, this.api = new r(
|
|
45
|
-
t.endpoint,
|
|
46
|
-
t.sessionToken,
|
|
47
|
-
t.onError
|
|
48
|
-
), f(this, { notifications: l });
|
|
49
|
-
}
|
|
50
|
-
// Used in Money Dashboard
|
|
51
|
-
get newNotifications() {
|
|
52
|
-
return this.recentNotifications.filter((t) => !t.has_been_viewed);
|
|
53
|
-
}
|
|
54
|
-
get recentNotifications() {
|
|
55
|
-
return p(this.notifications);
|
|
56
|
-
}
|
|
57
|
-
setNotifications = (t) => {
|
|
58
|
-
this.notifications = t, this.notificationsLoaded = !0;
|
|
59
|
-
};
|
|
60
|
-
loadNotifications = async () => {
|
|
61
|
-
this.isLoading = !0;
|
|
62
|
-
try {
|
|
63
|
-
const t = await this.api.getNotifications();
|
|
64
|
-
this.setNotifications(t);
|
|
65
|
-
} catch (t) {
|
|
66
|
-
console.error(`Error occurred while loading notifications: ${t}`);
|
|
67
|
-
} finally {
|
|
68
|
-
h(() => {
|
|
69
|
-
this.isLoading = !1;
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
markAllAsViewed = async () => {
|
|
74
|
-
await this.api.markAllAsViewed();
|
|
75
|
-
};
|
|
76
|
-
updateNotification = async (t) => {
|
|
77
|
-
t.has_been_viewed = !0, await this.api.updateNotification(t);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
export {
|
|
81
|
-
T as N,
|
|
82
|
-
r as a,
|
|
83
|
-
p as f,
|
|
84
|
-
A as g,
|
|
85
|
-
g as s
|
|
86
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Fetch } from '../../common';
|
|
2
|
-
import { GlobalErrorHandler, CashflowEvent, CashflowSequence } from '../../core';
|
|
3
|
-
export declare class CashflowApi {
|
|
4
|
-
fetchInstance: Fetch;
|
|
5
|
-
constructor(endpoint: string, token: string, onError?: GlobalErrorHandler);
|
|
6
|
-
addCashflowEvent: (cashflowEvent: CashflowEvent) => Promise<any>;
|
|
7
|
-
addCashflowSequence: (cashflowSequence: CashflowSequence) => Promise<any>;
|
|
8
|
-
getCashflowSequences: () => Promise<CashflowSequence[]>;
|
|
9
|
-
getCashflowEventsByDateRange: (beginDate: Date, endDate: Date) => Promise<CashflowEvent[]>;
|
|
10
|
-
deleteCashflowSequence: (guid: string) => Promise<any>;
|
|
11
|
-
getProjectedCashflowEvents: (beginDate: Date, endDate: Date) => Promise<CashflowEvent[]>;
|
|
12
|
-
updateCashflowSequence: (cashflowSequence: CashflowSequence) => Promise<any>;
|
|
13
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { default as Fetch } from '../utils/Fetch';
|
|
2
|
-
import { GlobalErrorHandler } from '../../core';
|
|
3
|
-
export declare class LocalizedCopyApi {
|
|
4
|
-
fetchInstance: Fetch;
|
|
5
|
-
constructor(endpoint: string, token: string, onError?: GlobalErrorHandler);
|
|
6
|
-
getLocalizedCopy: (req: any) => Promise<any>;
|
|
7
|
-
getLocalizedContent: (namespace: string) => Promise<any>;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { AnalyticsApi } from './AnalyticsApi';
|
|
2
|
-
export { BannerApi } from './BannerApi';
|
|
3
|
-
export { BeatApi } from './BeatApi';
|
|
4
|
-
export { CategoryApi } from './CategoryApi';
|
|
5
|
-
export { GlobalCopyApi } from './GlobalCopyApi';
|
|
6
|
-
export { LocalizedCopyApi } from './LocalizedCopyApi';
|
|
7
|
-
export { NotificationApi } from './NotificationApi';
|
|
8
|
-
export { ScheduledPaymentsApi } from './ScheduledPaymentsApi';
|
|
9
|
-
export { UserApi } from './UserApi';
|
|
10
|
-
export { WidgetApi } from './WidgetApi';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var v = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.EveryWeek = 1] = "EveryWeek", t[t.EveryOtherWeek = 2] = "EveryOtherWeek", t[t.EveryMonth = 3] = "EveryMonth", t[t.EveryOtherMonth = 4] = "EveryOtherMonth", t[t.EveryQuarter = 5] = "EveryQuarter", t[t.EveryOtherQuarter = 6] = "EveryOtherQuarter", t[t.EveryYear = 7] = "EveryYear", t))(v || {});
|
|
2
|
-
export {
|
|
3
|
-
v as R
|
|
4
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { getUnixTime as l } from "date-fns/getUnixTime";
|
|
2
|
-
import y from "bowser";
|
|
3
|
-
import { F as u, A as r } from "./Fetch-B6tMJC1r.mjs";
|
|
4
|
-
import _ from "react";
|
|
5
|
-
const g = async (o, t, n = "1.0.0", s = "Experiences") => {
|
|
6
|
-
const a = new A(o, t), { analytics_session: i } = await a.initializeAnalyticsSession(
|
|
7
|
-
n,
|
|
8
|
-
s
|
|
9
|
-
), e = window.location.hostname;
|
|
10
|
-
return {
|
|
11
|
-
sendAnalyticEvent: async (c) => await a.sendAnalyticEvent({
|
|
12
|
-
analytics_event: {
|
|
13
|
-
...c,
|
|
14
|
-
app_version: "widgets-v2",
|
|
15
|
-
created_at: l(/* @__PURE__ */ new Date()).toString(),
|
|
16
|
-
host: e,
|
|
17
|
-
name: c?.label || "",
|
|
18
|
-
session_id: i.guid,
|
|
19
|
-
user_agent: navigator.userAgent || "",
|
|
20
|
-
version: 2
|
|
21
|
-
}
|
|
22
|
-
}),
|
|
23
|
-
sendAnalyticsPageview: async (c) => await a.sendAnalyticsPageview({
|
|
24
|
-
analytics_pageview: {
|
|
25
|
-
...c,
|
|
26
|
-
app_version: "widgets-v2",
|
|
27
|
-
created_at: l(/* @__PURE__ */ new Date()).toString(),
|
|
28
|
-
host: e,
|
|
29
|
-
name: c.name,
|
|
30
|
-
session_id: i.guid,
|
|
31
|
-
user_agent: navigator.userAgent || ""
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
class A {
|
|
37
|
-
fetchInstance;
|
|
38
|
-
constructor(t, n, s) {
|
|
39
|
-
this.fetchInstance = new u(t, n, void 0, s);
|
|
40
|
-
}
|
|
41
|
-
initializeAnalyticsSession = async (t, n) => {
|
|
42
|
-
const s = y.getParser(window.navigator.userAgent), { analytics_session: a } = await this.fetchInstance.post(r.ANALYTICS_SESSION, {
|
|
43
|
-
browser_name: s.getBrowserName() || "Unknown",
|
|
44
|
-
browser_version: s.getBrowserVersion() || "0.0.0",
|
|
45
|
-
is_first_visit: !1,
|
|
46
|
-
product_name: "Individual Widget",
|
|
47
|
-
product_version: t
|
|
48
|
-
});
|
|
49
|
-
return a ? (this.fetchInstance.post(r.ANALYTICS_FEATURE_VISITS, {
|
|
50
|
-
feature_visit: {
|
|
51
|
-
analytics_session_guid: a.guid,
|
|
52
|
-
feature_name: n || "Experiences",
|
|
53
|
-
is_first_visit: a.is_first_visit
|
|
54
|
-
}
|
|
55
|
-
}), { analytics_session: a }) : { analytics_session: null };
|
|
56
|
-
};
|
|
57
|
-
sendAnalyticEvent = async (t) => this.fetchInstance.post(r.ANALYTICS_EVENTS, t).catch((n) => {
|
|
58
|
-
throw n;
|
|
59
|
-
});
|
|
60
|
-
sendAnalyticsPageview = async (t) => this.fetchInstance.post(r.ANALYTICS_PAGEVIEWS, t).catch((n) => {
|
|
61
|
-
throw n;
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
class h {
|
|
65
|
-
fetchInstance;
|
|
66
|
-
constructor(t, n, s) {
|
|
67
|
-
this.fetchInstance = new u(t, n, void 0, s);
|
|
68
|
-
}
|
|
69
|
-
getGlobalCopy = async (t, n) => this.fetchInstance.post(`${r.LOCALIZED_CONTENT}/${t}`, { translation_key: n }).then((s) => s);
|
|
70
|
-
}
|
|
71
|
-
const p = (o, t) => {
|
|
72
|
-
const { session: n } = t, s = Object.values(t).reduce((i, e) => n && e?.onAnalyticEvent && typeof e?.onAnalyticEvent == "function" ? [...i, e.onAnalyticEvent] : i, []), a = [...o, ...s];
|
|
73
|
-
return _.useMemo(() => (i) => {
|
|
74
|
-
a.forEach((e) => {
|
|
75
|
-
n ? e(i, n) : e(i);
|
|
76
|
-
});
|
|
77
|
-
}, [o, n]);
|
|
78
|
-
}, E = (o, t) => {
|
|
79
|
-
const { session: n } = t, s = Object.values(t).reduce((i, e) => n && e?.onAnalyticPageView && typeof e?.onAnalyticPageView == "function" ? [...i, e.onAnalyticPageView] : i, []), a = [...o, ...s];
|
|
80
|
-
return _.useMemo(() => (i) => {
|
|
81
|
-
a.forEach((e) => {
|
|
82
|
-
n ? e(i, n) : e(i);
|
|
83
|
-
});
|
|
84
|
-
}, [o, n]);
|
|
85
|
-
};
|
|
86
|
-
export {
|
|
87
|
-
A,
|
|
88
|
-
h as G,
|
|
89
|
-
E as a,
|
|
90
|
-
g as b,
|
|
91
|
-
p as u
|
|
92
|
-
};
|