@mx-cartographer/experiences 7.0.20-alpha.mm13 → 7.0.20-alpha.mm14
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/dist/{AccountStore-xRAZ5q8q.mjs → AccountStore-8wYwS2Fb.mjs} +1 -1
- package/dist/{BeatApi-bPKymk9s.mjs → BeatApi-D2Z1q0T7.mjs} +1 -1
- package/dist/{BeatStore-mnrkh3h6.mjs → BeatStore-DkRrMYcr.mjs} +1 -1
- package/dist/{CategoryStore-BlWkDwiZ.mjs → CategoryStore-BXxv_Rm_.mjs} +1 -1
- package/dist/{FinstrongStore-ZIbHKDSr.mjs → FinstrongStore-COSruQ77.mjs} +7 -7
- package/dist/{GoalStore-sMlO3voq.mjs → GoalStore-DpunbhUg.mjs} +1 -1
- package/dist/{MerchantStore-CR5dFLpL.mjs → MerchantStore-UleKHaMr.mjs} +10 -10
- package/dist/{NotificationStore-Bc_r-sfC.mjs → NotificationStore-oq8Kg5Wy.mjs} +11 -11
- package/dist/{RecurringTransactionsStore-DukrsYPV.mjs → RecurringTransactionsStore-CbVh6M8E.mjs} +21 -21
- package/dist/{SettingsStore-C7rj4rLf.mjs → SettingsStore-BkEnt8J1.mjs} +5 -5
- package/dist/{TransactionApi-Dla2CTeC.mjs → TransactionApi-CVmOYZsA.mjs} +1 -1
- package/dist/{TransactionStore-DasHlGBB.mjs → TransactionStore-B8KE_GP4.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-CjPlvt2p.mjs → ViewMoreMicroCard-CPIaoYx7.mjs} +2 -2
- package/dist/accounts/index.es.js +1 -1
- package/dist/cashflow/index.es.js +1 -1
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +88 -88
- package/dist/finstrong/index.es.js +1 -1
- package/dist/goals/index.es.js +2 -2
- package/dist/insights/index.es.js +1 -1
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +2 -2
- package/dist/settings/index.es.js +1 -1
- package/dist/transactions/index.es.js +3 -3
- package/dist/trends/index.es.js +1 -1
- package/dist/{useCombineEvents-DwW81wcc.mjs → useCombineEvents-_pq30PbT.mjs} +20 -20
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { A as n, d as h, E as p, g as y, h as I } from "./ConnectDrawer-BbvIVdYR
|
|
|
5
5
|
class l {
|
|
6
6
|
fetchInstance;
|
|
7
7
|
constructor(t, e, s) {
|
|
8
|
-
this.fetchInstance = new f(t, e
|
|
8
|
+
this.fetchInstance = new f(t, e, void 0, s);
|
|
9
9
|
}
|
|
10
10
|
createAccount = async (t) => this.fetchInstance.post(i.ACCOUNTS, t).then((e) => e.account).catch((e) => e);
|
|
11
11
|
deleteAccount = async (t) => this.fetchInstance.delete(`${i.ACCOUNTS}/${t}`).catch((e) => e);
|
|
@@ -2,7 +2,7 @@ import { F as c, A as s } from "./Fetch-5yMqsiXO.mjs";
|
|
|
2
2
|
class i {
|
|
3
3
|
fetchInstance;
|
|
4
4
|
constructor(t, e, n) {
|
|
5
|
-
this.fetchInstance = new c(t, e
|
|
5
|
+
this.fetchInstance = new c(t, e, void 0, n);
|
|
6
6
|
}
|
|
7
7
|
getBeats = async (t, e) => {
|
|
8
8
|
const n = `page=${t || 1}&per_page=${e || 5}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeAutoObservable as c, runInAction as r } from "mobx";
|
|
2
|
-
import { B as l } from "./BeatApi-
|
|
2
|
+
import { B as l } from "./BeatApi-D2Z1q0T7.mjs";
|
|
3
3
|
function d(t, e, s, i = "asc") {
|
|
4
4
|
const a = i === "desc" ? -1 : 1;
|
|
5
5
|
return [...t, ...e].sort((_, n) => _[s] < n[s] ? -1 * a : _[s] > n[s] ? 1 * a : 0);
|
|
@@ -9,7 +9,7 @@ import { b as f, c as w } from "./Category-CevNQ03n.mjs";
|
|
|
9
9
|
class y {
|
|
10
10
|
fetchInstance;
|
|
11
11
|
constructor(t, e, o) {
|
|
12
|
-
this.fetchInstance = new p(t, e
|
|
12
|
+
this.fetchInstance = new p(t, e, void 0, o);
|
|
13
13
|
}
|
|
14
14
|
addCategory = async (t) => this.fetchInstance.post(i.CATEGORIES, t).then((e) => e.category);
|
|
15
15
|
getCategories = async () => this.fetchInstance.get(i.CATEGORIES).then((t) => t.categories);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { makeAutoObservable as l, runInAction as r } from "mobx";
|
|
2
2
|
import { format as i } from "date-fns/format";
|
|
3
3
|
import { fromUnixTime as g } from "date-fns/fromUnixTime";
|
|
4
|
-
import { getUnixTime as
|
|
4
|
+
import { getUnixTime as s } from "date-fns/getUnixTime";
|
|
5
5
|
import { subMonths as S } from "date-fns/subMonths";
|
|
6
6
|
import { F as m, A as o } from "./Fetch-5yMqsiXO.mjs";
|
|
7
7
|
import { f as p, D as u } from "./Dialog-CWW597AF.mjs";
|
|
8
|
-
class
|
|
8
|
+
class n {
|
|
9
9
|
fetchInstance;
|
|
10
10
|
constructor(e, t, a) {
|
|
11
|
-
this.fetchInstance = new m(e, t
|
|
11
|
+
this.fetchInstance = new m(e, t, void 0, a);
|
|
12
12
|
}
|
|
13
13
|
calculateHealthScore = async () => this.fetchInstance.post(`${o.HEALTH_SCORES}/calculate`).then((e) => e.health_score);
|
|
14
14
|
getAverageHealthScores = async () => this.fetchInstance.get(`${o.HEALTH_SCORES}/monthly_averages`).then((e) => e);
|
|
@@ -25,7 +25,7 @@ const y = (h) => h?.health_scores.map((e) => {
|
|
|
25
25
|
};
|
|
26
26
|
}).sort((e, t) => e.month - t.month).map((e) => ({ x: e.x, y: e.y }));
|
|
27
27
|
class v {
|
|
28
|
-
api = new
|
|
28
|
+
api = new n("/", "");
|
|
29
29
|
augmentedChartData = [];
|
|
30
30
|
averageHealthScores = [];
|
|
31
31
|
globalStore;
|
|
@@ -34,7 +34,7 @@ class v {
|
|
|
34
34
|
healthScoreChangeReports = [];
|
|
35
35
|
peerScore = null;
|
|
36
36
|
constructor(e) {
|
|
37
|
-
this.globalStore = e, this.api = new
|
|
37
|
+
this.globalStore = e, this.api = new n(e.endpoint, e.sessionToken, e.onError), l(this);
|
|
38
38
|
}
|
|
39
39
|
calculateHealthScore = async () => {
|
|
40
40
|
try {
|
|
@@ -60,7 +60,7 @@ class v {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
loadHealthScoreChangeReports = async () => {
|
|
63
|
-
const e =
|
|
63
|
+
const e = s(S(/* @__PURE__ */ new Date(), 2)), t = s(/* @__PURE__ */ new Date());
|
|
64
64
|
try {
|
|
65
65
|
const a = await this.api.getHealthScoreChangeReports(
|
|
66
66
|
e,
|
|
@@ -96,6 +96,6 @@ class v {
|
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
export {
|
|
99
|
-
|
|
99
|
+
n as F,
|
|
100
100
|
v as a
|
|
101
101
|
};
|
|
@@ -62,7 +62,7 @@ var a = /* @__PURE__ */ ((e) => (e[e.DEBT_TRACK = 1] = "DEBT_TRACK", e[e.SAVINGS
|
|
|
62
62
|
class R {
|
|
63
63
|
fetchInstance;
|
|
64
64
|
constructor(t, o, r) {
|
|
65
|
-
this.fetchInstance = new v(t, o
|
|
65
|
+
this.fetchInstance = new v(t, o, void 0, r);
|
|
66
66
|
}
|
|
67
67
|
addGoal = async (t) => this.fetchInstance.post(i.GOALS, t).then((o) => o.goal);
|
|
68
68
|
addRetirementGoal = async (t) => this.fetchInstance.post(i.RETIREMENT_GOALS, t).then((o) => o.retirement_goal);
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { makeAutoObservable as m, runInAction as
|
|
2
|
-
import { F as p, A as
|
|
3
|
-
class
|
|
1
|
+
import { makeAutoObservable as m, runInAction as c } from "mobx";
|
|
2
|
+
import { F as p, A as h } from "./Fetch-5yMqsiXO.mjs";
|
|
3
|
+
class i {
|
|
4
4
|
fetchInstance;
|
|
5
5
|
constructor(t, n, s) {
|
|
6
|
-
this.fetchInstance = new p(t, n
|
|
6
|
+
this.fetchInstance = new p(t, n, void 0, s);
|
|
7
7
|
}
|
|
8
8
|
getMerchants = async (t = [], n = [], s = 1, o = 25) => {
|
|
9
|
-
let a =
|
|
9
|
+
let a = h.MERCHANTS;
|
|
10
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
11
|
};
|
|
12
|
-
getMerchantByGuid = async (t) => this.fetchInstance.get(`${
|
|
12
|
+
getMerchantByGuid = async (t) => this.fetchInstance.get(`${h.MERCHANTS}/${t}`).then((n) => n.merchant);
|
|
13
13
|
}
|
|
14
14
|
class u {
|
|
15
15
|
globalStore;
|
|
16
|
-
api = new
|
|
16
|
+
api = new i("/", "");
|
|
17
17
|
merchant = null;
|
|
18
18
|
merchants = [];
|
|
19
19
|
isLoading = !1;
|
|
20
20
|
constructor(t) {
|
|
21
|
-
this.globalStore = t, this.api = new
|
|
21
|
+
this.globalStore = t, this.api = new i(t.endpoint, t.sessionToken, t.onError), m(this);
|
|
22
22
|
}
|
|
23
23
|
loadMerchants = async (t = "") => {
|
|
24
24
|
this.isLoading = !0;
|
|
25
25
|
const n = await this.api.getMerchants([t]);
|
|
26
|
-
|
|
26
|
+
c(() => {
|
|
27
27
|
this.merchants = n, this.isLoading = !1;
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
loadMerchantByGuid = async (t) => {
|
|
31
31
|
const n = await this.api.getMerchantByGuid(t);
|
|
32
|
-
|
|
32
|
+
c(() => this.merchant = n);
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
export {
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { makeAutoObservable as c, observable as f, runInAction as h } from "mobx";
|
|
2
|
-
import { fromUnixTime as
|
|
3
|
-
import { F as l, A as
|
|
2
|
+
import { fromUnixTime as o, isSameDay as d } from "date-fns";
|
|
3
|
+
import { F as l, A as n } from "./Fetch-5yMqsiXO.mjs";
|
|
4
4
|
class s {
|
|
5
5
|
fetchInstance;
|
|
6
|
-
constructor(t, i,
|
|
7
|
-
this.fetchInstance = new l(t, i
|
|
6
|
+
constructor(t, i, a) {
|
|
7
|
+
this.fetchInstance = new l(t, i, void 0, a);
|
|
8
8
|
}
|
|
9
|
-
getNotifications = () => this.fetchInstance.get(
|
|
9
|
+
getNotifications = () => this.fetchInstance.get(n.NOTIFICATIONS).then(
|
|
10
10
|
(t) => t.notifications.map((i) => i.notification)
|
|
11
11
|
).finally();
|
|
12
|
-
updateNotification = (t) => this.fetchInstance.put(`${
|
|
12
|
+
updateNotification = (t) => this.fetchInstance.put(`${n.NOTIFICATIONS}/${t.guid}`, {
|
|
13
13
|
guid: t.guid,
|
|
14
14
|
has_been_viewed: t.has_been_viewed
|
|
15
15
|
}).then((i) => i.notification).finally();
|
|
16
16
|
// Note: The notifications/mark_all_as_viewed endpoint is broken, but still returns 202.
|
|
17
17
|
// A bug ticket has been filed to fix it, but should not require any changes here.
|
|
18
|
-
markAllAsViewed = (t) => this.fetchInstance.put(`${
|
|
18
|
+
markAllAsViewed = (t) => this.fetchInstance.put(`${n.NOTIFICATIONS}/mark_all_as_viewed`, { channel: t }).finally();
|
|
19
19
|
}
|
|
20
20
|
const w = (e, t) => {
|
|
21
|
-
const i =
|
|
22
|
-
return !d(i,
|
|
21
|
+
const i = o(t[e].delivered_at), a = o(t[e - 1]?.delivered_at);
|
|
22
|
+
return !d(i, a);
|
|
23
23
|
};
|
|
24
24
|
function u(e) {
|
|
25
25
|
const i = Math.floor(Date.now() / 1e3);
|
|
26
|
-
return e.filter((
|
|
27
|
-
const r =
|
|
26
|
+
return e.filter((a) => {
|
|
27
|
+
const r = a.delivered_at;
|
|
28
28
|
return i - r <= 604800;
|
|
29
29
|
});
|
|
30
30
|
}
|
package/dist/{RecurringTransactionsStore-DukrsYPV.mjs → RecurringTransactionsStore-CbVh6M8E.mjs}
RENAMED
|
@@ -7,14 +7,14 @@ import { isWithinInterval as m } from "date-fns/isWithinInterval";
|
|
|
7
7
|
import { startOfMonth as S } from "date-fns/startOfMonth";
|
|
8
8
|
import { startOfToday as c } from "date-fns/startOfToday";
|
|
9
9
|
import { subDays as y } from "date-fns/subDays";
|
|
10
|
-
import { F as
|
|
11
|
-
import { b as
|
|
10
|
+
import { F as x, A as o } from "./Fetch-5yMqsiXO.mjs";
|
|
11
|
+
import { b as E, a, c as d, d as u } from "./RepeatingTransaction-BW4J-jeJ.mjs";
|
|
12
12
|
var A = /* @__PURE__ */ ((r) => (r.Small = "small", r.Medium = "medium", r.Large = "large", r))(A || {});
|
|
13
13
|
const U = 44;
|
|
14
|
-
class
|
|
14
|
+
class h {
|
|
15
15
|
fetchInstance;
|
|
16
16
|
constructor(e, t, n) {
|
|
17
|
-
this.fetchInstance = new
|
|
17
|
+
this.fetchInstance = new x(e, t, void 0, n);
|
|
18
18
|
}
|
|
19
19
|
addRepeatingTransaction = async (e) => this.fetchInstance.post(o.REPEATING_TRANSACTIONS, e).then((t) => t.repeating_transaction);
|
|
20
20
|
getRepeatingTransactions = async () => this.fetchInstance.get(o.REPEATING_TRANSACTIONS).then((e) => e.repeating_transactions);
|
|
@@ -24,17 +24,17 @@ class d {
|
|
|
24
24
|
).then((t) => t.repeating_transaction);
|
|
25
25
|
deleteRepeatingTransaction = async (e) => this.fetchInstance.delete(`${o.REPEATING_TRANSACTIONS}/${e}`).then((t) => t);
|
|
26
26
|
}
|
|
27
|
-
const l = (r, e) => m(e.expectedDate, r),
|
|
27
|
+
const l = (r, e) => m(e.expectedDate, r), s = (r, e) => r + e.amount;
|
|
28
28
|
class C {
|
|
29
29
|
globalStore;
|
|
30
|
-
api = new
|
|
30
|
+
api = new h("/", "");
|
|
31
31
|
transactions = [];
|
|
32
32
|
repeatingTransactions = [];
|
|
33
33
|
selectedDay;
|
|
34
34
|
dateRange = { start: S(c()), end: R(c()) };
|
|
35
35
|
isDataLoaded = !1;
|
|
36
36
|
constructor(e) {
|
|
37
|
-
this.globalStore = e, this.api = new
|
|
37
|
+
this.globalStore = e, this.api = new h(
|
|
38
38
|
e.endpoint,
|
|
39
39
|
e.sessionToken,
|
|
40
40
|
e.onError
|
|
@@ -45,14 +45,14 @@ class C {
|
|
|
45
45
|
*/
|
|
46
46
|
get recurrences() {
|
|
47
47
|
const e = this.globalStore.accountStore.visibleAccounts;
|
|
48
|
-
return
|
|
48
|
+
return E(this.repeatingTransactions, this.dateRange).filter((t) => e.some((n) => n.guid === t.accountGuid && !n.is_excluded_from_accounts)).filter((t) => m(t.expectedDate, this.dateRange));
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Returns all recurrences that have occurred in the past, including those that are paid or missed
|
|
52
52
|
*/
|
|
53
53
|
get pastRecurrences() {
|
|
54
54
|
return this.recurrences.filter(
|
|
55
|
-
(e) => e.status ===
|
|
55
|
+
(e) => e.status === a.Paid || e.status === a.Missed
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -61,7 +61,7 @@ class C {
|
|
|
61
61
|
*/
|
|
62
62
|
get upcomingRecurrences() {
|
|
63
63
|
return this.recurrences.filter(
|
|
64
|
-
(e) => p(e.expectedDate, y(c(), 3)) && I(e.expectedDate, this.dateRange.end) && e.status ===
|
|
64
|
+
(e) => p(e.expectedDate, y(c(), 3)) && I(e.expectedDate, this.dateRange.end) && e.status === a.Upcoming
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
@@ -69,7 +69,7 @@ class C {
|
|
|
69
69
|
*/
|
|
70
70
|
get expenses() {
|
|
71
71
|
return this.recurrences.filter(
|
|
72
|
-
(e) => e.type ===
|
|
72
|
+
(e) => e.type === d.Expense
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
@@ -77,7 +77,7 @@ class C {
|
|
|
77
77
|
*/
|
|
78
78
|
get upcomingExpenses() {
|
|
79
79
|
return this.expenses.filter(
|
|
80
|
-
(e) => e.status ===
|
|
80
|
+
(e) => e.status === a.Upcoming
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
@@ -85,7 +85,7 @@ class C {
|
|
|
85
85
|
*/
|
|
86
86
|
get income() {
|
|
87
87
|
return this.recurrences.filter(
|
|
88
|
-
(e) => e.type ===
|
|
88
|
+
(e) => e.type === d.Income
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
@@ -93,7 +93,7 @@ class C {
|
|
|
93
93
|
*/
|
|
94
94
|
get upcomingIncome() {
|
|
95
95
|
return this.income.filter(
|
|
96
|
-
(e) => e.status ===
|
|
96
|
+
(e) => e.status === a.Upcoming
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
get nextIncomeRecurrence() {
|
|
@@ -119,43 +119,43 @@ class C {
|
|
|
119
119
|
* Calculates the total amount of all expenses for the current month.
|
|
120
120
|
*/
|
|
121
121
|
get expenseTotal() {
|
|
122
|
-
return this.currentMonthExpenses.reduce(
|
|
122
|
+
return this.currentMonthExpenses.reduce(s, 0);
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Calculates the total amount of all paid expenses for the current month.
|
|
126
126
|
*/
|
|
127
127
|
get paidExpenseTotal() {
|
|
128
|
-
return this.currentMonthExpenses.filter((e) => e.status ===
|
|
128
|
+
return this.currentMonthExpenses.filter((e) => e.status === a.Paid).reduce(s, 0);
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
131
|
* Calculates the total amount of all missed expenses for the current month.
|
|
132
132
|
*/
|
|
133
133
|
get missedExpenseTotal() {
|
|
134
|
-
return this.currentMonthExpenses.filter((e) => e.status ===
|
|
134
|
+
return this.currentMonthExpenses.filter((e) => e.status === a.Missed).reduce(s, 0);
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
137
|
* Calculates the total amount of all upcoming expenses for the current month.
|
|
138
138
|
*/
|
|
139
139
|
get upcomingExpenseTotal() {
|
|
140
|
-
return this.currentMonthExpenses.filter((e) => e.status ===
|
|
140
|
+
return this.currentMonthExpenses.filter((e) => e.status === a.Upcoming).reduce(s, 0);
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* Calculates the total amount of all income for the current month.
|
|
144
144
|
*/
|
|
145
145
|
get incomeTotal() {
|
|
146
|
-
return this.currentMonthIncome.reduce(
|
|
146
|
+
return this.currentMonthIncome.reduce(s, 0);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Calculates the total amount of all paid income for the current month.
|
|
150
150
|
*/
|
|
151
151
|
get paidIncomeTotal() {
|
|
152
|
-
return this.currentMonthIncome.filter((e) => e.status ===
|
|
152
|
+
return this.currentMonthIncome.filter((e) => e.status === a.Paid).reduce(s, 0);
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
155
|
* Calculates the total amount of all upcoming income for the current month.
|
|
156
156
|
*/
|
|
157
157
|
get upcomingIncomeTotal() {
|
|
158
|
-
return this.currentMonthIncome.filter((e) => e.status ===
|
|
158
|
+
return this.currentMonthIncome.filter((e) => e.status === a.Upcoming).reduce(s, 0);
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
161
161
|
* Get the recurrences for the currently selected day.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { makeAutoObservable as N, runInAction as l } from "mobx";
|
|
2
2
|
import { F as D, A as r } from "./Fetch-5yMqsiXO.mjs";
|
|
3
3
|
import { B as f, A as n, I as i } from "./Notification-ByMBpJ5u.mjs";
|
|
4
|
-
import { T as m } from "./TransactionApi-
|
|
4
|
+
import { T as m } from "./TransactionApi-CVmOYZsA.mjs";
|
|
5
5
|
class y {
|
|
6
6
|
fetchInstance;
|
|
7
7
|
constructor(e, t, o) {
|
|
8
|
-
this.fetchInstance = new D(e, t
|
|
8
|
+
this.fetchInstance = new D(e, t, void 0, o);
|
|
9
9
|
}
|
|
10
10
|
deleteDevice = async (e) => this.fetchInstance.delete(`${r.DEVICES}/${e}`).then((t) => t);
|
|
11
11
|
generateDeviceToken = async () => this.fetchInstance.get(`${r.USER}/mobile_token`).then((e) => e.mobile_token);
|
|
@@ -59,15 +59,15 @@ const v = "PARENT-ENTITY", C = (s, e) => ({
|
|
|
59
59
|
sms_notifications_enabled: P,
|
|
60
60
|
push_notifications_enabled: T
|
|
61
61
|
} = e, {
|
|
62
|
-
opted_out_of_email_notifications:
|
|
63
|
-
opted_out_of_sms_notifications:
|
|
62
|
+
opted_out_of_email_notifications: b,
|
|
63
|
+
opted_out_of_sms_notifications: E,
|
|
64
64
|
opted_out_of_push_notifications: A
|
|
65
65
|
} = d;
|
|
66
66
|
for (const a of o.filter((u) => u.entity_guid === v)) {
|
|
67
67
|
const u = C(a.notification_type, t), S = o.filter(
|
|
68
68
|
(c) => c.entity_guid !== v && c.notification_type === a.notification_type && s.some((h) => h.guid === c.entity_guid)
|
|
69
69
|
), _ = [];
|
|
70
|
-
I && !
|
|
70
|
+
I && !b && a.email_channel && p.email && _.push(t.delivery_method_email_label), P && !E && a.sms_channel && p.phone && _.push(t.delivery_method_sms_label), T && !A && a.push_channel && _.push(t.delivery_method_push_label), g.push({
|
|
71
71
|
...a,
|
|
72
72
|
children: S.map((c) => ({
|
|
73
73
|
...c,
|
|
@@ -2,7 +2,7 @@ import { F as T, A as e } from "./Fetch-5yMqsiXO.mjs";
|
|
|
2
2
|
class u {
|
|
3
3
|
fetchInstance;
|
|
4
4
|
constructor(t, n, a) {
|
|
5
|
-
this.fetchInstance = new T(t, n
|
|
5
|
+
this.fetchInstance = new T(t, n, void 0, a);
|
|
6
6
|
}
|
|
7
7
|
addTag = async (t) => this.fetchInstance.post(e.TAGS, t).then((n) => n.tag);
|
|
8
8
|
addTagging = async (t) => this.fetchInstance.post(e.TAGGINGS, t).then((n) => n.tagging);
|
|
@@ -14,13 +14,13 @@ import { startOfMonth as R } from "date-fns/startOfMonth";
|
|
|
14
14
|
import { startOfToday as G } from "date-fns/startOfToday";
|
|
15
15
|
import { subDays as Y } from "date-fns/subDays";
|
|
16
16
|
import { O as n, a as b, T as F } from "./User-CcPqTPbo.mjs";
|
|
17
|
-
import { T as p } from "./TransactionApi-
|
|
17
|
+
import { T as p } from "./TransactionApi-CVmOYZsA.mjs";
|
|
18
18
|
import { b as W } from "./Category-CevNQ03n.mjs";
|
|
19
19
|
import { f as z } from "./exportTransactionsToCSV-DsY4Aap_.mjs";
|
|
20
20
|
import { format as k } from "date-fns/format";
|
|
21
21
|
import { f as g, D as O, O as $ } from "./Dialog-CWW597AF.mjs";
|
|
22
22
|
import { endOfMonth as X } from "date-fns/endOfMonth";
|
|
23
|
-
import { B as f } from "./BeatApi-
|
|
23
|
+
import { B as f } from "./BeatApi-D2Z1q0T7.mjs";
|
|
24
24
|
const j = ({
|
|
25
25
|
checked: N = !1,
|
|
26
26
|
label: t,
|
|
@@ -18,8 +18,8 @@ import { css as qe } from "@mxenabled/cssinjs";
|
|
|
18
18
|
import { b as Je } from "./Localization-2MODESHW.mjs";
|
|
19
19
|
import et from "@mui/material/CircularProgress";
|
|
20
20
|
import { makeAutoObservable as ce, runInAction as Te } from "mobx";
|
|
21
|
-
import { G as pe, a as tt, u as it, b as ot } from "./useCombineEvents-
|
|
22
|
-
import { B as _e } from "./BeatApi-
|
|
21
|
+
import { G as pe, a as tt, u as it, b as ot } from "./useCombineEvents-_pq30PbT.mjs";
|
|
22
|
+
import { B as _e } from "./BeatApi-D2Z1q0T7.mjs";
|
|
23
23
|
import rt from "@mui/material/Card";
|
|
24
24
|
import lt from "@mui/material/CardActions";
|
|
25
25
|
import nt from "@mui/material/CardContent";
|
|
@@ -24,7 +24,7 @@ import X from "@mui/material/ListItem";
|
|
|
24
24
|
import { M as U } from "../MiniWidgetContainer-xsVrqac5.mjs";
|
|
25
25
|
import e1 from "@mui/material/Stack";
|
|
26
26
|
import { g as U1, a as j1 } from "../AccountFields-dth_TzXr.mjs";
|
|
27
|
-
import { A as G1, a as K1 } from "../AccountStore-
|
|
27
|
+
import { A as G1, a as K1 } from "../AccountStore-8wYwS2Fb.mjs";
|
|
28
28
|
const t1 = () => {
|
|
29
29
|
const [c, L] = d.useState(""), { accounts: o } = g(), { selectedAccounts: l } = y(), { setSelectedAccount: u, setSelectedMember: r } = K(), { members: s } = O(), { onEvent: p } = N(), a = [...new Set(l.map((t) => t.account_type))], H = l.find((t) => c === t.guid), h = d.useMemo(
|
|
30
30
|
() => l.filter((t) => t.is_hidden),
|
|
@@ -1076,7 +1076,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
1076
1076
|
class kn {
|
|
1077
1077
|
fetchInstance;
|
|
1078
1078
|
constructor(n, t, s) {
|
|
1079
|
-
this.fetchInstance = new pt(n, t
|
|
1079
|
+
this.fetchInstance = new pt(n, t, void 0, s);
|
|
1080
1080
|
}
|
|
1081
1081
|
addCashflowEvent = async (n) => this.fetchInstance.post(B.CASHFLOW_EVENTS, { ...n }).then((t) => t);
|
|
1082
1082
|
addCashflowSequence = async (n) => this.fetchInstance.post(B.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
|
package/dist/common/index.es.js
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { G as M } from "../useCombineEvents-
|
|
2
|
-
import { A as ts, a as es, u as ss, b as rs } from "../useCombineEvents-
|
|
1
|
+
import { G as M } from "../useCombineEvents-_pq30PbT.mjs";
|
|
2
|
+
import { A as ts, a as es, u as ss, b as rs } from "../useCombineEvents-_pq30PbT.mjs";
|
|
3
3
|
import { F as y, A as l } from "../Fetch-5yMqsiXO.mjs";
|
|
4
|
-
import { B as as } from "../BeatApi-
|
|
5
|
-
import { C as et } from "../CategoryStore-
|
|
6
|
-
import { a as is } from "../CategoryStore-
|
|
7
|
-
import { N as st } from "../NotificationStore-
|
|
8
|
-
import { a as ds } from "../NotificationStore-
|
|
4
|
+
import { B as as } from "../BeatApi-D2Z1q0T7.mjs";
|
|
5
|
+
import { C as et } from "../CategoryStore-BXxv_Rm_.mjs";
|
|
6
|
+
import { a as is } from "../CategoryStore-BXxv_Rm_.mjs";
|
|
7
|
+
import { N as st } from "../NotificationStore-oq8Kg5Wy.mjs";
|
|
8
|
+
import { a as ds } from "../NotificationStore-oq8Kg5Wy.mjs";
|
|
9
9
|
import { T as rt } from "../User-CcPqTPbo.mjs";
|
|
10
10
|
import { C as us, b as hs, L as gs, a as ps } from "../User-CcPqTPbo.mjs";
|
|
11
11
|
import { H as ot } from "../Help-DhcC-C05.mjs";
|
|
12
12
|
import { E as _s } from "../Help-DhcC-C05.mjs";
|
|
13
13
|
import { M as fs } from "../MicroWidgetContainer-DNTKJODy.mjs";
|
|
14
14
|
import { M as bs } from "../MiniWidgetContainer-xsVrqac5.mjs";
|
|
15
|
-
import { A as xs, D as Cs, W as
|
|
16
|
-
import { i as
|
|
15
|
+
import { A as xs, D as Cs, W as vs } from "../WidgetContainer-DPzZyq22.mjs";
|
|
16
|
+
import { i as Ds, a as As, e as Ts, l as Bs, A as Is, f as Ns, j as Fs, d as Ms, k as $s, E as Rs, h as Us, N as ks, g as Ls, P as Os, m as Gs, S as Hs } from "../ConnectDrawer-BbvIVdYR.mjs";
|
|
17
17
|
import { C as qs } from "../CurrencyInput-DyWvvUZX.mjs";
|
|
18
18
|
import { L as Qs } from "../Loader-DUaFpDGv.mjs";
|
|
19
19
|
import { R as zs } from "../ResponsiveButton-DZFp78fJ.mjs";
|
|
20
20
|
import { S as Ks } from "../SearchBox-B2_zLv8-.mjs";
|
|
21
|
-
import { T as at } from "../TransactionStore-
|
|
22
|
-
import { S as Vs } from "../TransactionStore-
|
|
21
|
+
import { T as at } from "../TransactionStore-B8KE_GP4.mjs";
|
|
22
|
+
import { S as Vs } from "../TransactionStore-B8KE_GP4.mjs";
|
|
23
23
|
import { T as Js } from "../TabContentContainer-j01JYR_7.mjs";
|
|
24
24
|
import { I as er } from "../IconBacking-B9oC6uL2.mjs";
|
|
25
25
|
import { D as rr, F as or, a as ar, c as nr, R as ir, S as cr } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
26
26
|
import { C as nt } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
27
27
|
import { I as lr } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
28
|
-
import { d as it } from "../GoalStore-
|
|
29
|
-
import { C as hr, G as gr, M as pr, T as mr } from "../GoalStore-
|
|
28
|
+
import { d as it } from "../GoalStore-DpunbhUg.mjs";
|
|
29
|
+
import { C as hr, G as gr, M as pr, T as mr } from "../GoalStore-DpunbhUg.mjs";
|
|
30
30
|
import { C as yr } from "../CurrencyText-YUhH2caW.mjs";
|
|
31
31
|
import { E as Sr } from "../EmptyState-C0lr9E5T.mjs";
|
|
32
32
|
import { L as wr } from "../ListItemAction-CUusHw-p.mjs";
|
|
33
33
|
import { T as ct } from "../TrendsStore-DpyWU-HL.mjs";
|
|
34
|
-
import { L as Cr, S as
|
|
35
|
-
import { A as
|
|
34
|
+
import { L as Cr, S as vr, u as Er } from "../TrendsStore-DpyWU-HL.mjs";
|
|
35
|
+
import { A as Ar, B as Tr, I as Br, N as Ir, T as Nr, a as Fr } from "../Notification-ByMBpJ5u.mjs";
|
|
36
36
|
import { jsxs as _, jsx as c } from "react/jsx-runtime";
|
|
37
37
|
import dt, { useRef as lt, useEffect as ut } from "react";
|
|
38
38
|
import { css as w, keyframes as ht } from "@mxenabled/cssinjs";
|
|
39
|
-
import { useTokens as x, Text as
|
|
39
|
+
import { useTokens as x, Text as B } from "@mxenabled/mxui";
|
|
40
40
|
import { D as $r } from "../Donut-1UMNcG67.mjs";
|
|
41
41
|
import { L as Ur } from "../LineChart-C2Q2Sr1y.mjs";
|
|
42
42
|
import { S as Lr } from "../StatusBar-BK_uYHAB.mjs";
|
|
43
|
-
import { D as
|
|
43
|
+
import { D as Gr, a as Hr, O as Pr, b as qr, f as Wr } from "../Dialog-CWW597AF.mjs";
|
|
44
44
|
import { D as gt, a as pt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
45
45
|
import { S as Yr } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
46
46
|
import { D as Xr } from "../Drawer-kEE73B87.mjs";
|
|
47
47
|
import { I as jr, P as Vr, S as Zr } from "../Account-GFzWnbxA.mjs";
|
|
48
|
-
import { b as
|
|
48
|
+
import { b as A } from "../Category-CevNQ03n.mjs";
|
|
49
49
|
import { C as to, c as eo, a as so, P as ro } from "../Category-CevNQ03n.mjs";
|
|
50
50
|
import { C as ao, f as no, b as io, a as co, g as lo, i as uo } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
51
|
-
import { R as mt } from "../RecurringTransactionsStore-
|
|
52
|
-
import { S as go, T as po } from "../RecurringTransactionsStore-
|
|
53
|
-
import { G as _o, B as yo, C as fo, W as So, c as bo, m as wo, g as xo, t as Co, k as
|
|
51
|
+
import { R as mt } from "../RecurringTransactionsStore-CbVh6M8E.mjs";
|
|
52
|
+
import { S as go, T as po } from "../RecurringTransactionsStore-CbVh6M8E.mjs";
|
|
53
|
+
import { G as _o, B as yo, C as fo, W as So, c as bo, m as wo, g as xo, t as Co, k as vo, x as Eo, y as Do, e as Ao, w as To, u as Bo, l as Io, a as No, j as Fo, z as Mo, s as $o, b as Ro, q as Uo, n as ko, A as Lo, h as Oo, r as Go, f as Ho, v as Po, o as qo, p as Wo } from "../hooks-DP5qvbXf.mjs";
|
|
54
54
|
import { u as Yo } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
55
55
|
import { makeAutoObservable as m, runInAction as p, reaction as _t } from "mobx";
|
|
56
|
-
import { a as yt } from "../AccountStore-
|
|
56
|
+
import { a as yt } from "../AccountStore-8wYwS2Fb.mjs";
|
|
57
57
|
import ft from "posthog-js";
|
|
58
|
-
import { B as St } from "../BeatStore-
|
|
58
|
+
import { B as St } from "../BeatStore-DkRrMYcr.mjs";
|
|
59
59
|
import { endOfMonth as Z } from "date-fns/endOfMonth";
|
|
60
60
|
import { startOfMonth as J } from "date-fns/startOfMonth";
|
|
61
61
|
import { startOfToday as L } from "date-fns/startOfToday";
|
|
62
62
|
import { f as bt, a as wt, b as O } from "../BudgetUtil-BR1sFoz5.mjs";
|
|
63
63
|
import { g as Xo, e as Ko, c as jo, d as Vo, i as Zo } from "../BudgetUtil-BR1sFoz5.mjs";
|
|
64
64
|
import { a as xt } from "../DebtsStore-b4lkfwxB.mjs";
|
|
65
|
-
import { a as Ct } from "../FinstrongStore-
|
|
66
|
-
import { A as
|
|
67
|
-
import { M as Tt } from "../MerchantStore-
|
|
68
|
-
import { N as
|
|
69
|
-
import { a as
|
|
65
|
+
import { a as Ct } from "../FinstrongStore-COSruQ77.mjs";
|
|
66
|
+
import { A as vt, m as Et, a as Dt, b as At } from "../InvestmentUtil-jOyOgzIB.mjs";
|
|
67
|
+
import { M as Tt } from "../MerchantStore-UleKHaMr.mjs";
|
|
68
|
+
import { N as Bt } from "../NetWorthStore-BQiUgOb8.mjs";
|
|
69
|
+
import { a as It } from "../SettingsStore-BkEnt8J1.mjs";
|
|
70
70
|
import { addMonths as Nt } from "date-fns/addMonths";
|
|
71
71
|
import { getMonth as T } from "date-fns/getMonth";
|
|
72
72
|
import { i as ta } from "../DateUtil-BcuH7ErC.mjs";
|
|
73
73
|
import { b as sa, a as ra, g as oa } from "../Localization-2MODESHW.mjs";
|
|
74
|
-
import { alpha as Ft, lighten as
|
|
74
|
+
import { alpha as Ft, lighten as G, darken as H } from "@mui/material";
|
|
75
75
|
var Mt = /* @__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))(Mt || {});
|
|
76
76
|
const qe = [
|
|
77
77
|
{ id: 0, copy: "frequency_unknown" },
|
|
@@ -92,11 +92,11 @@ const Qe = (s, t) => {
|
|
|
92
92
|
const e = s.palette.mode === "dark", r = (d, i) => {
|
|
93
93
|
const n = t?.[d];
|
|
94
94
|
return {
|
|
95
|
-
lighter: n ?
|
|
96
|
-
light: n ?
|
|
95
|
+
lighter: n ? G(n, 0.5) : i.lighter,
|
|
96
|
+
light: n ? G(n, 0.25) : i.light,
|
|
97
97
|
main: n || i.main,
|
|
98
|
-
dark: n ?
|
|
99
|
-
darker: n ?
|
|
98
|
+
dark: n ? H(n, 0.25) : i.dark,
|
|
99
|
+
darker: n ? H(n, 0.5) : i.darker
|
|
100
100
|
};
|
|
101
101
|
}, o = {
|
|
102
102
|
primary: r(e ? "primary_color_dark" : "primary_color", s.palette.primary),
|
|
@@ -220,7 +220,7 @@ const Qe = (s, t) => {
|
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
222
|
};
|
|
223
|
-
class
|
|
223
|
+
class P {
|
|
224
224
|
fetchInstance;
|
|
225
225
|
constructor(t) {
|
|
226
226
|
this.fetchInstance = new y(t, "", {
|
|
@@ -240,7 +240,7 @@ class H {
|
|
|
240
240
|
class Ye {
|
|
241
241
|
fetchInstance;
|
|
242
242
|
constructor(t, e, r) {
|
|
243
|
-
this.fetchInstance = new y(t, e
|
|
243
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
244
244
|
}
|
|
245
245
|
getLocalizedCopy = async (t) => this.fetchInstance.post(l.LOCALIZED_COPY, t).then((e) => e);
|
|
246
246
|
getLocalizedContent = async (t) => this.fetchInstance.post(`${l.LOCALIZED_CONTENT}/${t}`).then((e) => e);
|
|
@@ -248,7 +248,7 @@ class Ye {
|
|
|
248
248
|
class ze {
|
|
249
249
|
fetchInstance;
|
|
250
250
|
constructor(t, e, r) {
|
|
251
|
-
this.fetchInstance = new y(t, e
|
|
251
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
252
252
|
}
|
|
253
253
|
addScheduledPayment = async (t) => this.fetchInstance.post(l.SCHEDULED_PAYMENTS, {
|
|
254
254
|
...t,
|
|
@@ -262,7 +262,7 @@ class ze {
|
|
|
262
262
|
class $ {
|
|
263
263
|
fetchInstance;
|
|
264
264
|
constructor(t, e, r) {
|
|
265
|
-
this.fetchInstance = new y(t, e
|
|
265
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
266
266
|
}
|
|
267
267
|
getUserFeatures = async () => this.fetchInstance.get(l.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
|
|
268
268
|
updateUser = async (t) => this.fetchInstance.put(l.USER, t).then((e) => e.user);
|
|
@@ -284,13 +284,13 @@ const Xe = (s) => {
|
|
|
284
284
|
const r = x(), o = kt(r, s);
|
|
285
285
|
return /* @__PURE__ */ _("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
|
|
286
286
|
/* @__PURE__ */ c("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
|
|
287
|
-
/* @__PURE__ */ c(
|
|
287
|
+
/* @__PURE__ */ c(B, { variant: "XSmall", children: e }),
|
|
288
288
|
/* @__PURE__ */ _("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
|
|
289
289
|
/* @__PURE__ */ c("div", { className: "mx-cmn-dot" }),
|
|
290
290
|
/* @__PURE__ */ c("div", { className: "mx-cmn-dot" }),
|
|
291
291
|
/* @__PURE__ */ c("div", { className: "mx-cmn-dot" })
|
|
292
292
|
] }),
|
|
293
|
-
/* @__PURE__ */ c(
|
|
293
|
+
/* @__PURE__ */ c(B, { variant: "XSmall", children: t })
|
|
294
294
|
] });
|
|
295
295
|
}, kt = (s, t) => w({
|
|
296
296
|
alignItems: "center",
|
|
@@ -331,7 +331,7 @@ const Xe = (s) => {
|
|
|
331
331
|
const n = x(), u = Lt(n, t, e), h = (S) => {
|
|
332
332
|
a && (S.key === " " || S.key === "Enter") && a(r);
|
|
333
333
|
}, f = d === void 0 || d === r ? "primary" : "secondary", g = () => /* @__PURE__ */ c(
|
|
334
|
-
|
|
334
|
+
B,
|
|
335
335
|
{
|
|
336
336
|
"aria-hidden": !0,
|
|
337
337
|
bold: d === r,
|
|
@@ -405,14 +405,14 @@ const Xe = (s) => {
|
|
|
405
405
|
width: f,
|
|
406
406
|
xAxisLabel: g = ""
|
|
407
407
|
}) => {
|
|
408
|
-
const S = x(), C = Ot(S, f),
|
|
408
|
+
const S = x(), C = Ot(S, f), v = u / d * n, E = Math.abs(u) / d * e, D = i === void 0 || i === o ? "primary" : "secondary";
|
|
409
409
|
return /* @__PURE__ */ _("div", { className: `mx-cmn-barchart-bar-column ${C}`, children: [
|
|
410
410
|
/* @__PURE__ */ c("div", { style: { height: n }, children: u >= 0 && /* @__PURE__ */ c(
|
|
411
411
|
W,
|
|
412
412
|
{
|
|
413
413
|
ariaLabel: s,
|
|
414
414
|
color: r,
|
|
415
|
-
height:
|
|
415
|
+
height: v,
|
|
416
416
|
index: o,
|
|
417
417
|
label: h,
|
|
418
418
|
onClick: a,
|
|
@@ -427,7 +427,7 @@ const Xe = (s) => {
|
|
|
427
427
|
{
|
|
428
428
|
ariaLabel: s,
|
|
429
429
|
color: r,
|
|
430
|
-
height:
|
|
430
|
+
height: E,
|
|
431
431
|
index: o,
|
|
432
432
|
label: h,
|
|
433
433
|
onClick: a,
|
|
@@ -439,7 +439,7 @@ const Xe = (s) => {
|
|
|
439
439
|
{
|
|
440
440
|
className: `mx-cmn-bar-label ${a ? "mx-cmn-clickable" : ""}`,
|
|
441
441
|
onClick: a ? () => a(o) : void 0,
|
|
442
|
-
children: /* @__PURE__ */ c(
|
|
442
|
+
children: /* @__PURE__ */ c(B, { bold: i === o, color: D, variant: "Small", children: g })
|
|
443
443
|
}
|
|
444
444
|
)
|
|
445
445
|
] });
|
|
@@ -468,7 +468,7 @@ const Xe = (s) => {
|
|
|
468
468
|
"& .mx-cmn-clickable": {
|
|
469
469
|
cursor: "pointer"
|
|
470
470
|
}
|
|
471
|
-
}),
|
|
471
|
+
}), Gt = (s, t) => s + t, Ht = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, Pt = (s, t) => [...s, t.value], Y = (s, t, e) => {
|
|
472
472
|
const r = s && t ? e / 2 : e;
|
|
473
473
|
return s ? r : 0;
|
|
474
474
|
}, qt = (s, t, e, r) => s / (t < 0 ? -e : t) * r || 0, Wt = ({
|
|
@@ -483,14 +483,14 @@ const Xe = (s) => {
|
|
|
483
483
|
selectedIndex: n,
|
|
484
484
|
valueFormatter: u = (h) => `${h}`
|
|
485
485
|
}) => {
|
|
486
|
-
const h = x(), f = Qt(h), g = r.reduce(
|
|
486
|
+
const h = x(), f = Qt(h), g = r.reduce(Pt, []), S = s !== void 0 ? s : g.reduce(Gt, 0) / g.length, C = Math.max(...g), v = Math.min(...g), E = g.reduce(Ht, 0), D = C >= 0, R = v < 0, I = Y(D, R, o), N = Y(R, D, o), U = qt(S, C, v, I || N), tt = (b) => n === void 0 || b === n ? e : `${e}80`, k = () => /* @__PURE__ */ c(
|
|
487
487
|
Q,
|
|
488
488
|
{
|
|
489
489
|
averageLineHeight: U,
|
|
490
490
|
bottomHeight: N,
|
|
491
491
|
color: "",
|
|
492
|
-
range:
|
|
493
|
-
topHeight:
|
|
492
|
+
range: E,
|
|
493
|
+
topHeight: I,
|
|
494
494
|
value: 0,
|
|
495
495
|
width: void 0
|
|
496
496
|
}
|
|
@@ -508,9 +508,9 @@ const Xe = (s) => {
|
|
|
508
508
|
color: tt(F),
|
|
509
509
|
index: F,
|
|
510
510
|
onClick: i,
|
|
511
|
-
range:
|
|
511
|
+
range: E,
|
|
512
512
|
selectedIndex: n,
|
|
513
|
-
topHeight:
|
|
513
|
+
topHeight: I,
|
|
514
514
|
value: b.value,
|
|
515
515
|
valueLabel: u(b.value),
|
|
516
516
|
width: t,
|
|
@@ -669,7 +669,7 @@ class Kt {
|
|
|
669
669
|
class z {
|
|
670
670
|
fetchInstance;
|
|
671
671
|
constructor(t, e, r) {
|
|
672
|
-
this.fetchInstance = new y(t, e
|
|
672
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
673
673
|
}
|
|
674
674
|
addBudget = async (t, e, r = null) => this.fetchInstance.post(l.BUDGETS, {
|
|
675
675
|
amount: e,
|
|
@@ -720,7 +720,7 @@ class jt {
|
|
|
720
720
|
get detailedBudgets() {
|
|
721
721
|
return O(
|
|
722
722
|
this.budgets.filter(
|
|
723
|
-
(t) => t.category_guid !==
|
|
723
|
+
(t) => t.category_guid !== A.INCOME && t.category_guid !== A.TRANSFER && t.category_guid !== A.INVESTMENTS
|
|
724
724
|
),
|
|
725
725
|
this.globalStore.categoryStore.detailedCategories,
|
|
726
726
|
this.globalStore.copyStore.copy.budgets,
|
|
@@ -734,7 +734,7 @@ class jt {
|
|
|
734
734
|
this.globalStore.copyStore.copy.budgets,
|
|
735
735
|
this.theme
|
|
736
736
|
).reduce(
|
|
737
|
-
(r, o) => o.category_guid !==
|
|
737
|
+
(r, o) => o.category_guid !== A.INCOME ? r : !r || o.percentage > r.percentage ? o : r,
|
|
738
738
|
void 0
|
|
739
739
|
)?.amount;
|
|
740
740
|
}
|
|
@@ -820,7 +820,7 @@ var Vt = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1]
|
|
|
820
820
|
class X {
|
|
821
821
|
fetchInstance;
|
|
822
822
|
constructor(t, e, r) {
|
|
823
|
-
this.fetchInstance = new y(t, e
|
|
823
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
824
824
|
}
|
|
825
825
|
createSupportTicket = async (t) => this.fetchInstance.post(l.SUPPORT_TICKETS, t).then((e) => e);
|
|
826
826
|
}
|
|
@@ -880,13 +880,13 @@ class re {
|
|
|
880
880
|
class K {
|
|
881
881
|
fetchInstance;
|
|
882
882
|
constructor(t, e, r) {
|
|
883
|
-
this.fetchInstance = new y(t, e
|
|
883
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
884
884
|
}
|
|
885
885
|
getHoldings = async () => this.fetchInstance.get(l.HOLDINGS).then((t) => t.holdings);
|
|
886
886
|
updateHoldings = async (t) => this.fetchInstance.put(`${l.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
|
|
887
887
|
}
|
|
888
888
|
class oe {
|
|
889
|
-
analysisType =
|
|
889
|
+
analysisType = vt.Stocks;
|
|
890
890
|
api = new K("/", "");
|
|
891
891
|
holdings = [];
|
|
892
892
|
holdingsLoaded = !1;
|
|
@@ -896,10 +896,10 @@ class oe {
|
|
|
896
896
|
this.globalStore = t, this.api = new K(t.endpoint, t.sessionToken, t.onError), m(this);
|
|
897
897
|
}
|
|
898
898
|
get analysisChartData() {
|
|
899
|
-
return Dt(
|
|
899
|
+
return Et(Dt(this.visibleHoldings), this.analysisType);
|
|
900
900
|
}
|
|
901
901
|
get analysisDetails() {
|
|
902
|
-
return
|
|
902
|
+
return At(this.visibleHoldings)[this.analysisType] || {};
|
|
903
903
|
}
|
|
904
904
|
get visibleHoldings() {
|
|
905
905
|
return this.holdings.filter(
|
|
@@ -1042,14 +1042,14 @@ const j = {
|
|
|
1042
1042
|
class V {
|
|
1043
1043
|
fetchInstance;
|
|
1044
1044
|
constructor(t, e, r) {
|
|
1045
|
-
this.fetchInstance = new y(t, e
|
|
1045
|
+
this.fetchInstance = new y(t, e, void 0, r);
|
|
1046
1046
|
}
|
|
1047
1047
|
getAppData = async () => this.fetchInstance.get(l.APP_DATA).then((t) => t);
|
|
1048
1048
|
}
|
|
1049
1049
|
class ae {
|
|
1050
1050
|
globalStore;
|
|
1051
1051
|
api = new V("/", "");
|
|
1052
|
-
bannerApi = new
|
|
1052
|
+
bannerApi = new P("/");
|
|
1053
1053
|
appData = {};
|
|
1054
1054
|
banner = {};
|
|
1055
1055
|
constructor(t) {
|
|
@@ -1077,7 +1077,7 @@ class ae {
|
|
|
1077
1077
|
try {
|
|
1078
1078
|
const e = t || await this.api.getAppData();
|
|
1079
1079
|
p(() => {
|
|
1080
|
-
this.appData = e, this.bannerApi = new
|
|
1080
|
+
this.appData = e, this.bannerApi = new P(e.address?.bullseye || "/");
|
|
1081
1081
|
});
|
|
1082
1082
|
} catch (e) {
|
|
1083
1083
|
console.error(`Error loading app data: ${e}`);
|
|
@@ -1231,7 +1231,7 @@ class Ve {
|
|
|
1231
1231
|
globalUiStore;
|
|
1232
1232
|
constructor(t = j, e = "/", r) {
|
|
1233
1233
|
try {
|
|
1234
|
-
this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, console.info("GlobalStore onError:", this.onError?.toString()), this.accountStore = new yt(this), this.appDataStore = new ae(this), this.analyticsStore = new Kt(this), this.beatStore = new St(this), this.budgetsStore = new jt(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new ne({ ...this, onError: void 0 }), this.copyStore = new Xt(
|
|
1234
|
+
this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, console.info("GlobalStore onError:", this.onError?.toString()), this.accountStore = new yt(this), this.appDataStore = new ae(this), this.analyticsStore = new Kt({ ...this, onError: void 0 }), this.beatStore = new St(this), this.budgetsStore = new jt(this), this.cashflowStore = new nt({ ...this, onError: void 0 }), this.categoryStore = new et(this), this.connectStore = new ne({ ...this, onError: void 0 }), this.copyStore = new Xt(this), this.debtsStore = new xt({ ...this, onError: void 0 }), this.finstrongStore = new Ct(this), this.goalStore = new it(this), this.helpStore = new re(this), this.holdingStore = new oe(this), this.merchantStore = new Tt(this), this.netWorthStore = new Bt({ ...this, onError: void 0 }), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new It(this), this.transactionStore = new at(this), this.trendsStore = new ct({ ...this, onError: void 0 }), this.userStore = new ce(this), this.globalUiStore = new ie({ ...this, onError: void 0 });
|
|
1235
1235
|
} catch (o) {
|
|
1236
1236
|
throw console.error("GlobalStore constructor error:", o), o;
|
|
1237
1237
|
}
|
|
@@ -1268,16 +1268,16 @@ class Ve {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
export {
|
|
1270
1270
|
xs as ANALYTICS_EVENTS,
|
|
1271
|
-
|
|
1272
|
-
|
|
1271
|
+
Ds as AccountFilter,
|
|
1272
|
+
As as AccountIcon,
|
|
1273
1273
|
Ts as AccountIconVariants,
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1274
|
+
Ar as AccountNotificationTypes,
|
|
1275
|
+
Bs as AccountSubType,
|
|
1276
|
+
Is as AccountType,
|
|
1277
1277
|
Ns as AccountTypeName,
|
|
1278
1278
|
ts as AnalyticsApi,
|
|
1279
1279
|
l as ApiEndpoints,
|
|
1280
|
-
|
|
1280
|
+
P as BannerApi,
|
|
1281
1281
|
Ke as BarChart,
|
|
1282
1282
|
as as BeatApi,
|
|
1283
1283
|
Tr as BudgetNotificationTypes,
|
|
@@ -1286,7 +1286,7 @@ export {
|
|
|
1286
1286
|
is as CategoryApi,
|
|
1287
1287
|
to as CategoryColors,
|
|
1288
1288
|
eo as CategoryGuidToName,
|
|
1289
|
-
|
|
1289
|
+
A as CategoryGuids,
|
|
1290
1290
|
so as CategoryIcon,
|
|
1291
1291
|
hr as ConnectCard,
|
|
1292
1292
|
Fs as ConnectDrawer,
|
|
@@ -1295,12 +1295,12 @@ export {
|
|
|
1295
1295
|
ao as CurrencyCodes,
|
|
1296
1296
|
qs as CurrencyInput,
|
|
1297
1297
|
yr as CurrencyText,
|
|
1298
|
-
|
|
1298
|
+
Gr as DATE_FORMATS_INTL,
|
|
1299
1299
|
gt as DEFAULT_DONUT_SIZE,
|
|
1300
1300
|
pt as DEFAULT_STROKE_WIDTH,
|
|
1301
1301
|
rr as DataRow,
|
|
1302
1302
|
Cs as DateRangeSelector,
|
|
1303
|
-
|
|
1303
|
+
Hr as Dialog,
|
|
1304
1304
|
$r as Donut,
|
|
1305
1305
|
Xr as Drawer,
|
|
1306
1306
|
Sr as EmptyState,
|
|
@@ -1318,7 +1318,7 @@ export {
|
|
|
1318
1318
|
jr as INCOME_ACCOUNT_TYPES,
|
|
1319
1319
|
er as IconBacking,
|
|
1320
1320
|
lr as InformationTooltip,
|
|
1321
|
-
|
|
1321
|
+
Br as InsightNotificationTypes,
|
|
1322
1322
|
Rt as IterationItemTypes,
|
|
1323
1323
|
We as LOADING_STATUS,
|
|
1324
1324
|
Ur as LineChart,
|
|
@@ -1334,15 +1334,15 @@ export {
|
|
|
1334
1334
|
je as MultiSegmentDonut,
|
|
1335
1335
|
ks as NonConnectedStatuses,
|
|
1336
1336
|
ds as NotificationApi,
|
|
1337
|
-
|
|
1338
|
-
|
|
1337
|
+
Ir as NotificationTypes,
|
|
1338
|
+
Pr as ORDINAL_DATE_FORMAT,
|
|
1339
1339
|
qr as ORDINAL_MONTH_DAY_YEAR_FORMAT,
|
|
1340
1340
|
Vr as PAYMENT_ACCOUNT_TYPES,
|
|
1341
1341
|
ro as PaymentCategories,
|
|
1342
1342
|
$t as PlanTypes,
|
|
1343
1343
|
Ls as ProcessingStatuses,
|
|
1344
1344
|
Os as PropertyType,
|
|
1345
|
-
|
|
1345
|
+
Gs as PropertyTypeName,
|
|
1346
1346
|
qe as RECURRENCE_COPY,
|
|
1347
1347
|
ar as RecurrenceStatus,
|
|
1348
1348
|
nr as RecurrenceType,
|
|
@@ -1358,9 +1358,9 @@ export {
|
|
|
1358
1358
|
Vs as SelectionBox,
|
|
1359
1359
|
Yr as SingleSegmentDonut,
|
|
1360
1360
|
go as Sizes,
|
|
1361
|
-
|
|
1361
|
+
vr as StackedLineChart,
|
|
1362
1362
|
Lr as StatusBar,
|
|
1363
|
-
|
|
1363
|
+
Hs as StatusName,
|
|
1364
1364
|
po as TOUCH_TARGET,
|
|
1365
1365
|
Js as TabContentContainer,
|
|
1366
1366
|
Nr as ToggleButtonListItem,
|
|
@@ -1372,7 +1372,7 @@ export {
|
|
|
1372
1372
|
ce as UserStore,
|
|
1373
1373
|
Vt as UserVerification,
|
|
1374
1374
|
q as WidgetApi,
|
|
1375
|
-
|
|
1375
|
+
vs as WidgetContainer,
|
|
1376
1376
|
fo as WidgetContainerContext,
|
|
1377
1377
|
So as WidgetContainerProvider,
|
|
1378
1378
|
es as analyticsSession,
|
|
@@ -1396,20 +1396,20 @@ export {
|
|
|
1396
1396
|
wo as useAppConfig,
|
|
1397
1397
|
xo as useBudgetsStore,
|
|
1398
1398
|
Co as useCashflowStore,
|
|
1399
|
-
|
|
1399
|
+
vo as useCategoryStore,
|
|
1400
1400
|
ss as useCombineEvents,
|
|
1401
1401
|
rs as useCombinePageviews,
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1402
|
+
Eo as useDebtStore,
|
|
1403
|
+
Do as useError,
|
|
1404
|
+
Ao as useEvent,
|
|
1405
1405
|
To as useFinstrongStore,
|
|
1406
|
-
|
|
1407
|
-
|
|
1406
|
+
Bo as useGlobalCopyStore,
|
|
1407
|
+
Io as useGlobalStore,
|
|
1408
1408
|
No as useGlobalUiStore,
|
|
1409
1409
|
Fo as useGoalStore,
|
|
1410
1410
|
Mo as useHelpStore,
|
|
1411
1411
|
$o as useHoldingStore,
|
|
1412
|
-
|
|
1412
|
+
Er as useInsightsEnabled,
|
|
1413
1413
|
Ro as useMerchantStore,
|
|
1414
1414
|
Uo as useNetWorthStore,
|
|
1415
1415
|
ko as useNotificationStore,
|
|
@@ -1417,9 +1417,9 @@ export {
|
|
|
1417
1417
|
Xe as usePrevious,
|
|
1418
1418
|
Oo as useRecurringTransactionsStore,
|
|
1419
1419
|
Yo as useScreenSize,
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1420
|
+
Go as useSettingsStore,
|
|
1421
|
+
Ho as useTransactionStore,
|
|
1422
|
+
Po as useTrendsStore,
|
|
1423
1423
|
qo as useUserStore,
|
|
1424
1424
|
Wo as useWidgetContainerProvider
|
|
1425
1425
|
};
|
|
@@ -19,7 +19,7 @@ import * as ce from "d3";
|
|
|
19
19
|
import { observer as I } from "mobx-react-lite";
|
|
20
20
|
import { u as S, a as z, w as $, o as Y, c as fe, g as ye, k as Ke } from "../hooks-DP5qvbXf.mjs";
|
|
21
21
|
import { L as N } from "../Loader-DUaFpDGv.mjs";
|
|
22
|
-
import { F as No, a as Ko } from "../FinstrongStore-
|
|
22
|
+
import { F as No, a as Ko } from "../FinstrongStore-COSruQ77.mjs";
|
|
23
23
|
import q from "@mui/material/Button";
|
|
24
24
|
import J from "@mui/material/Card";
|
|
25
25
|
import { L as be } from "../LineChart-C2Q2Sr1y.mjs";
|
package/dist/goals/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as ye, T as d, a as We, M as q, C as Ae, b as Ve, G as he } from "../GoalStore-
|
|
2
|
-
import { c as Un, d as Yn } from "../GoalStore-
|
|
1
|
+
import { g as ye, T as d, a as We, M as q, C as Ae, b as Ve, G as he } from "../GoalStore-DpunbhUg.mjs";
|
|
2
|
+
import { c as Un, d as Yn } from "../GoalStore-DpunbhUg.mjs";
|
|
3
3
|
import { jsxs as i, jsx as e, Fragment as U } from "react/jsx-runtime";
|
|
4
4
|
import y from "react";
|
|
5
5
|
import { observer as D } from "mobx-react-lite";
|
|
@@ -15,7 +15,7 @@ import { MerchantLogo as V, Text as R } from "@mxenabled/mxui";
|
|
|
15
15
|
import { b as v, u as w, a as C } from "../hooks-DP5qvbXf.mjs";
|
|
16
16
|
import { L as p } from "../Loader-DUaFpDGv.mjs";
|
|
17
17
|
import { S as N } from "../SearchBox-B2_zLv8-.mjs";
|
|
18
|
-
import { M as ne } from "../MerchantStore-
|
|
18
|
+
import { M as ne } from "../MerchantStore-UleKHaMr.mjs";
|
|
19
19
|
const B = /^[ a-zA-ZÀ-ÿ0-9]+$/, H = 50, u = 65, P = ({
|
|
20
20
|
height: f = "calc(100dvh - 120px)",
|
|
21
21
|
onSelect: g
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, B as e, C as o, c as t, b as i, I as d, M as n, a as C, d as c, N as I, V as M, Z as g, e as h } from "../ViewMoreMicroCard-
|
|
1
|
+
import { A as s, B as e, C as o, c as t, b as i, I as d, M as n, a as C, d as c, N as I, V as M, Z as g, e as h } from "../ViewMoreMicroCard-CPIaoYx7.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as AppStore,
|
|
4
4
|
e as BeatCard,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as f, B as C } from "../Notification-ByMBpJ5u.mjs";
|
|
2
2
|
import { A as _ } from "../Fetch-5yMqsiXO.mjs";
|
|
3
|
-
import { s as L } from "../NotificationStore-
|
|
4
|
-
import { N as Nt, f as St } from "../NotificationStore-
|
|
3
|
+
import { s as L } from "../NotificationStore-oq8Kg5Wy.mjs";
|
|
4
|
+
import { N as Nt, f as St } from "../NotificationStore-oq8Kg5Wy.mjs";
|
|
5
5
|
import { jsx as t, jsxs as d, Fragment as x } from "react/jsx-runtime";
|
|
6
6
|
import k, { useEffect as A } from "react";
|
|
7
7
|
import { observer as p } from "mobx-react-lite";
|
|
@@ -30,8 +30,8 @@ import { PickersDay as it } from "@mui/x-date-pickers/PickersDay";
|
|
|
30
30
|
import { I as Y } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
31
|
import { u as D, a as V, h as v, e as X, c as pe, f as ge, p as rt } from "../hooks-DP5qvbXf.mjs";
|
|
32
32
|
import { c as M, a as R, g as De, f as ot } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
33
|
-
import { T as P } from "../RecurringTransactionsStore-
|
|
34
|
-
import { R as Gn } from "../RecurringTransactionsStore-
|
|
33
|
+
import { T as P } from "../RecurringTransactionsStore-CbVh6M8E.mjs";
|
|
34
|
+
import { R as Gn } from "../RecurringTransactionsStore-CbVh6M8E.mjs";
|
|
35
35
|
import { A as _, W as at } from "../WidgetContainer-DPzZyq22.mjs";
|
|
36
36
|
import st from "@mui/material/Button";
|
|
37
37
|
import se from "@mui/material/Divider";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Jt, a as Kt } from "../SettingsStore-
|
|
1
|
+
import { S as Jt, a as Kt } from "../SettingsStore-BkEnt8J1.mjs";
|
|
2
2
|
import { jsxs as c, Fragment as q, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import h from "react";
|
|
4
4
|
import { observer as D } from "mobx-react-lite";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { T as fa } from "../TransactionApi-
|
|
1
|
+
import { T as fa } from "../TransactionApi-CVmOYZsA.mjs";
|
|
2
2
|
import { u as B, C as Re, D as He, M as Be, c as Pe, T as $e, a as Ve } from "../TransactionDetails-CGLeSsaa.mjs";
|
|
3
3
|
import { B as ya, d as ba, b as Ta } from "../TransactionDetails-CGLeSsaa.mjs";
|
|
4
4
|
import { T as M } from "../User-CcPqTPbo.mjs";
|
|
5
5
|
import { O as Sa } from "../User-CcPqTPbo.mjs";
|
|
6
|
-
import { S as ee, D as We } from "../TransactionStore-
|
|
7
|
-
import { T as wa } from "../TransactionStore-
|
|
6
|
+
import { S as ee, D as We } from "../TransactionStore-B8KE_GP4.mjs";
|
|
7
|
+
import { T as wa } from "../TransactionStore-B8KE_GP4.mjs";
|
|
8
8
|
import { e as Ge } from "../exportTransactionsToCSV-DsY4Aap_.mjs";
|
|
9
9
|
import { E as va } from "../ExportCsvAction-Bu6bbxPc.mjs";
|
|
10
10
|
import { jsxs as _, jsx as e } from "react/jsx-runtime";
|
package/dist/trends/index.es.js
CHANGED
|
@@ -20,7 +20,7 @@ import { C as rt } from "../CurrencyText-YUhH2caW.mjs";
|
|
|
20
20
|
import { c as Me } from "../Category-CevNQ03n.mjs";
|
|
21
21
|
import { b as at } from "../Localization-2MODESHW.mjs";
|
|
22
22
|
import { H as be } from "../HeaderCell-DjuifqHJ.mjs";
|
|
23
|
-
import { T as A, b as it } from "../ViewMoreMicroCard-
|
|
23
|
+
import { T as A, b as it } from "../ViewMoreMicroCard-CPIaoYx7.mjs";
|
|
24
24
|
import { A as y, W as Ae } from "../WidgetContainer-DPzZyq22.mjs";
|
|
25
25
|
import { a as Re, T as ke } from "../TransactionDetails-CGLeSsaa.mjs";
|
|
26
26
|
import { D as fe } from "../Drawer-kEE73B87.mjs";
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { getUnixTime as l } from "date-fns/getUnixTime";
|
|
2
|
-
import
|
|
3
|
-
import { F as u, A as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
2
|
+
import A from "bowser";
|
|
3
|
+
import { F as u, A as r } from "./Fetch-5yMqsiXO.mjs";
|
|
4
|
+
import y from "react";
|
|
5
|
+
const g = async (o, t, n = "1.0.0", s = "Experiences") => {
|
|
6
6
|
const a = new _(o, t), { analytics_session: i } = await a.initializeAnalyticsSession(
|
|
7
7
|
n,
|
|
8
8
|
s
|
|
9
9
|
), e = window.location.hostname;
|
|
10
10
|
return {
|
|
11
|
-
sendAnalyticEvent: async (
|
|
11
|
+
sendAnalyticEvent: async (c) => await a.sendAnalyticEvent({
|
|
12
12
|
analytics_event: {
|
|
13
|
-
...
|
|
13
|
+
...c,
|
|
14
14
|
app_version: "widgets-v2",
|
|
15
15
|
created_at: l(/* @__PURE__ */ new Date()).toString(),
|
|
16
16
|
host: e,
|
|
17
|
-
name:
|
|
17
|
+
name: c?.label || "",
|
|
18
18
|
session_id: i.guid,
|
|
19
19
|
user_agent: navigator.userAgent || "",
|
|
20
20
|
version: 2
|
|
21
21
|
}
|
|
22
22
|
}),
|
|
23
|
-
sendAnalyticsPageview: async (
|
|
23
|
+
sendAnalyticsPageview: async (c) => await a.sendAnalyticsPageview({
|
|
24
24
|
analytics_pageview: {
|
|
25
|
-
...
|
|
25
|
+
...c,
|
|
26
26
|
app_version: "widgets-v2",
|
|
27
27
|
created_at: l(/* @__PURE__ */ new Date()).toString(),
|
|
28
28
|
host: e,
|
|
29
|
-
name:
|
|
29
|
+
name: c.name,
|
|
30
30
|
session_id: i.guid,
|
|
31
31
|
user_agent: navigator.userAgent || ""
|
|
32
32
|
}
|
|
@@ -36,17 +36,17 @@ const d = async (o, t, n = "1.0.0", s = "Experiences") => {
|
|
|
36
36
|
class _ {
|
|
37
37
|
fetchInstance;
|
|
38
38
|
constructor(t, n, s) {
|
|
39
|
-
this.fetchInstance = new u(t, n
|
|
39
|
+
this.fetchInstance = new u(t, n, void 0, s);
|
|
40
40
|
}
|
|
41
41
|
initializeAnalyticsSession = async (t, n) => {
|
|
42
|
-
const s =
|
|
42
|
+
const s = A.getParser(window.navigator.userAgent), { analytics_session: a } = await this.fetchInstance.post(r.ANALYTICS_SESSION, {
|
|
43
43
|
browser_name: s.getBrowserName() || "Unknown",
|
|
44
44
|
browser_version: s.getBrowserVersion() || "0.0.0",
|
|
45
45
|
is_first_visit: !1,
|
|
46
46
|
product_name: "Individual Widget",
|
|
47
47
|
product_version: t
|
|
48
48
|
});
|
|
49
|
-
return a ? (this.fetchInstance.post(
|
|
49
|
+
return a ? (this.fetchInstance.post(r.ANALYTICS_FEATURE_VISITS, {
|
|
50
50
|
feature_visit: {
|
|
51
51
|
analytics_session_guid: a.guid,
|
|
52
52
|
feature_name: n || "Experiences",
|
|
@@ -54,30 +54,30 @@ class _ {
|
|
|
54
54
|
}
|
|
55
55
|
}), { analytics_session: a }) : { analytics_session: null };
|
|
56
56
|
};
|
|
57
|
-
sendAnalyticEvent = async (t) => this.fetchInstance.post(
|
|
57
|
+
sendAnalyticEvent = async (t) => this.fetchInstance.post(r.ANALYTICS_EVENTS, t).catch((n) => {
|
|
58
58
|
throw n;
|
|
59
59
|
});
|
|
60
|
-
sendAnalyticsPageview = async (t) => this.fetchInstance.post(
|
|
60
|
+
sendAnalyticsPageview = async (t) => this.fetchInstance.post(r.ANALYTICS_PAGEVIEWS, t).catch((n) => {
|
|
61
61
|
throw n;
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
class h {
|
|
65
65
|
fetchInstance;
|
|
66
66
|
constructor(t, n, s) {
|
|
67
|
-
this.fetchInstance = new u(t, n
|
|
67
|
+
this.fetchInstance = new u(t, n, void 0, s);
|
|
68
68
|
}
|
|
69
|
-
getGlobalCopy = async (t, n) => this.fetchInstance.post(`${
|
|
69
|
+
getGlobalCopy = async (t, n) => this.fetchInstance.post(`${r.LOCALIZED_CONTENT}/${t}`, { translation_key: n }).then((s) => s);
|
|
70
70
|
}
|
|
71
71
|
const p = (o, t) => {
|
|
72
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
|
|
73
|
+
return y.useMemo(() => (i) => {
|
|
74
74
|
a.forEach((e) => {
|
|
75
75
|
n ? e(i, n) : e(i);
|
|
76
76
|
});
|
|
77
77
|
}, [o, n]);
|
|
78
78
|
}, E = (o, t) => {
|
|
79
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
|
|
80
|
+
return y.useMemo(() => (i) => {
|
|
81
81
|
a.forEach((e) => {
|
|
82
82
|
n ? e(i, n) : e(i);
|
|
83
83
|
});
|
|
@@ -86,7 +86,7 @@ const p = (o, t) => {
|
|
|
86
86
|
export {
|
|
87
87
|
_ as A,
|
|
88
88
|
h as G,
|
|
89
|
-
|
|
89
|
+
g as a,
|
|
90
90
|
E as b,
|
|
91
91
|
p as u
|
|
92
92
|
};
|