@mx-cartographer/experiences 7.0.20-alpha.al0 → 7.0.20-alpha.mm0
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 +0 -4
- package/dist/{Account-BW3-oYEs.mjs → Account-DY2axAET.mjs} +1 -1
- package/dist/{AccountDetailsContent-BzD6CDIm.mjs → AccountDetailsContent-Jsg4ZDC1.mjs} +8 -8
- package/dist/{AccountDetailsHeader-Eb3WvBGm.mjs → AccountDetailsHeader-EU_2u2Iq.mjs} +5 -5
- package/dist/{AccountFields-CIz-r3gP.mjs → AccountFields-CSUS7pGn.mjs} +2 -2
- package/dist/{AccountListItem-B-ZjJ4Gp.mjs → AccountListItem-CMYZQg8M.mjs} +3 -3
- package/dist/{AccountStore-BaMynkQT.mjs → AccountStore-CIX2RAmG.mjs} +26 -26
- package/dist/{Accounts-CA-nqAjT.mjs → Accounts-xi9RGRIU.mjs} +1 -1
- package/dist/{BeatApi-DLu87ijw.mjs → BeatApi-D0WcLW3O.mjs} +3 -3
- package/dist/{BeatStore-By4aGoRM.mjs → BeatStore-y6WVs07e.mjs} +17 -17
- package/dist/{BudgetUtil-CeSLAcsl.mjs → BudgetUtil-DmWvHV7C.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-BJ9jlCyt.mjs → CategorySelectorDrawer-BHqOpBNr.mjs} +1 -1
- package/dist/{CategoryStore-BOyzQjQp.mjs → CategoryStore-BfYppD3g.mjs} +4 -4
- package/dist/{ConnectDrawer-phFH6OHt.mjs → ConnectDrawer-CU5dEdrU.mjs} +1 -1
- package/dist/{ConnectionsDrawer-ihxkAi1P.mjs → ConnectionsDrawer-BUJuQrgF.mjs} +2 -2
- package/dist/{CurrencyInput-bEx2Mbd0.mjs → CurrencyInput-BtrNBP3z.mjs} +1 -1
- package/dist/{DebtsStore-VkyMADzd.mjs → DebtsStore-X3cUJZti.mjs} +1 -1
- package/dist/{ExportCsvAction-CbMfQ2Wa.mjs → ExportCsvAction-CUGnEaHw.mjs} +3 -3
- package/dist/{Fetch-CkFKy79O.mjs → Fetch-CJ9cgjgV.mjs} +9 -8
- package/dist/{FinstrongStore-mkALvztw.mjs → FinstrongStore-rC2F4Tq3.mjs} +4 -4
- package/dist/{GoalStore-eSOkI6uE.mjs → GoalStore-CFx47exL.mjs} +6 -6
- package/dist/{Help-KAAMEubC.mjs → Help-CCuoAZT3.mjs} +1 -1
- package/dist/{LineChart-BWWmmJxV.mjs → LineChart-D5uLCys4.mjs} +1 -1
- package/dist/{ListItemAction-DNZZ5fSa.mjs → ListItemAction-Cwadpg85.mjs} +1 -1
- package/dist/{ManageIncome-DcKHpJ9V.mjs → ManageIncome-B91zIeYo.mjs} +4 -4
- package/dist/MerchantStore-h96aTml7.mjs +37 -0
- package/dist/{MicroWidgetContainer-Dxz8uBN9.mjs → MicroWidgetContainer-DwTAjSdX.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CTyjmE1h.mjs → MiniWidgetContainer-CxggrnHk.mjs} +1 -1
- package/dist/{NetWorthStore-B6xF9eGH.mjs → NetWorthStore-CYYTpP9O.mjs} +2 -2
- package/dist/{NotificationSettings-Dhf_u5o-.mjs → NotificationSettings-BhJ2PUkt.mjs} +2 -2
- package/dist/{NotificationStore-DHtSGySy.mjs → NotificationStore-DpV9hXSE.mjs} +8 -4
- package/dist/{OriginalBalanceAction-DepsKiJz.mjs → OriginalBalanceAction-DDMRgIBU.mjs} +3 -3
- package/dist/{RecurringSettings-C9r4s1Cz.mjs → RecurringSettings-CGGFhlhh.mjs} +3 -3
- package/dist/{RecurringTransactionsStore-D62XJtdL.mjs → RecurringTransactionsStore-CXhnipfd.mjs} +20 -16
- package/dist/{SettingsStore-B4gi6oOw.mjs → SettingsStore-CLLqNa_S.mjs} +33 -29
- package/dist/{TransactionApi-DbbcjI2L.mjs → TransactionApi-C0HMGDBV.mjs} +29 -29
- package/dist/{TransactionDetails-bja6hKJk.mjs → TransactionDetails-Bc0iW26I.mjs} +5 -5
- package/dist/{TransactionStore-0tLtBEIC.mjs → TransactionStore-Va_jug-g.mjs} +29 -25
- package/dist/{TrendsStore-WrHxzdbQ.mjs → TrendsStore-DmuQennN.mjs} +1 -1
- package/dist/{User-Dq9Qj764.mjs → User-B9T_314z.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-BPEzFZRG.mjs → ViewMoreMicroCard-61VqFx4x.mjs} +5 -2
- package/dist/{WidgetContainer-CdBs9WOZ.mjs → WidgetContainer-CTrp2veH.mjs} +2 -2
- package/dist/accounts/api/AccountApi.d.ts +2 -2
- package/dist/accounts/index.es.js +12 -12
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/api/BudgetsApi.d.ts +2 -2
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/api/CashflowApi.d.ts +3 -2
- package/dist/cashflow/index.es.js +10 -10
- package/dist/categories/index.es.js +2 -2
- package/dist/common/api/AnalyticsApi.d.ts +2 -2
- package/dist/common/api/AppDataApi.d.ts +2 -2
- package/dist/common/api/BeatApi.d.ts +2 -2
- package/dist/common/api/CategoryApi.d.ts +2 -3
- package/dist/common/api/GlobalCopyApi.d.ts +2 -1
- package/dist/common/api/LocalizedCopyApi.d.ts +2 -1
- package/dist/common/api/NotificationApi.d.ts +2 -2
- package/dist/common/api/ScheduledPaymentsApi.d.ts +3 -2
- package/dist/common/api/UserApi.d.ts +2 -2
- package/dist/common/context/GlobalDataProvider.d.ts +3 -2
- package/dist/common/context/hooks.d.ts +4 -1
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +321 -315
- package/dist/common/stores/GlobalStore.d.ts +2 -1
- package/dist/common/types/Handlers.d.ts +2 -0
- package/dist/common/types/index.d.ts +1 -0
- package/dist/common/utils/Fetch.d.ts +3 -1
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +9 -9
- package/dist/{exportTransactionsToCSV-BDlt8u0n.mjs → exportTransactionsToCSV-ct1RkLbj.mjs} +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +2 -1
- package/dist/finstrong/index.es.js +7 -7
- package/dist/goals/api/GoalApi.d.ts +3 -2
- package/dist/goals/index.es.js +494 -493
- package/dist/help/api/HelpApi.d.ts +2 -2
- package/dist/help/index.es.js +3 -3
- package/dist/hooks-DcS6DyRl.mjs +74 -0
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/api/HoldingApi.d.ts +3 -2
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/api/MerchantApi.d.ts +2 -1
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +2 -1
- package/dist/microinsights/context/hooks.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -2
- package/dist/recurringtransactions/index.es.js +10 -10
- package/dist/settings/api/SettingsApi.d.ts +3 -2
- package/dist/settings/index.es.js +7 -7
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/api/TransactionApi.d.ts +3 -2
- package/dist/transactions/index.es.js +14 -14
- package/dist/trends/index.es.js +90 -85
- package/dist/{useCombineEvents-DaDBSR_1.mjs → useCombineEvents-Dbjzfwvo.mjs} +29 -29
- package/package.json +1 -1
- package/dist/MerchantStore-DVH-QOf0.mjs +0 -37
- package/dist/hooks-DkUqN6JE.mjs +0 -71
package/dist/trends/index.es.js
CHANGED
|
@@ -7,12 +7,12 @@ import _ from "@mui/material/Stack";
|
|
|
7
7
|
import pe from "@mui/material/Button";
|
|
8
8
|
import { addSeconds as Ie } from "date-fns/addSeconds";
|
|
9
9
|
import { differenceInCalendarMonths as Ce } from "date-fns/differenceInCalendarMonths";
|
|
10
|
-
import { a as Ke, g as $e, S as je, L as Ee, u as Ye } from "../TrendsStore-
|
|
11
|
-
import { T as eo } from "../TrendsStore-
|
|
10
|
+
import { a as Ke, g as $e, S as je, L as Ee, u as Ye } from "../TrendsStore-DmuQennN.mjs";
|
|
11
|
+
import { T as eo } from "../TrendsStore-DmuQennN.mjs";
|
|
12
12
|
import { i as Ue, c as Xe, d as Ze, e as Qe, f as qe, h as Je, b as Le, g as xe, j as _e } from "../SpendingData-D5vsfYKo.mjs";
|
|
13
13
|
import et from "@mui/material/ToggleButton";
|
|
14
14
|
import tt from "@mui/material/ToggleButtonGroup";
|
|
15
|
-
import { u as R, k as F, e as H, a as P, f as re, c as ae, v as q, l as ve, p as nt, m as ot } from "../hooks-
|
|
15
|
+
import { u as R, k as F, e as H, a as P, f as re, c as ae, v as q, l as ve, p as nt, m as ot } from "../hooks-DcS6DyRl.mjs";
|
|
16
16
|
import { u as K } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
17
17
|
import { f as Z, D as B } from "../Dialog-CWW597AF.mjs";
|
|
18
18
|
import { DataGridPro as st } from "@mui/x-data-grid-pro";
|
|
@@ -20,18 +20,18 @@ 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-
|
|
24
|
-
import { A as y, W as Ae } from "../WidgetContainer-
|
|
25
|
-
import { a as Re, T as ke } from "../TransactionDetails-
|
|
23
|
+
import { T as A, b as it } from "../ViewMoreMicroCard-61VqFx4x.mjs";
|
|
24
|
+
import { A as y, W as Ae } from "../WidgetContainer-CTrp2veH.mjs";
|
|
25
|
+
import { a as Re, T as ke } from "../TransactionDetails-Bc0iW26I.mjs";
|
|
26
26
|
import { D as fe } from "../Drawer-kEE73B87.mjs";
|
|
27
27
|
import { L as Q } from "../Loader-DUaFpDGv.mjs";
|
|
28
28
|
import { useTheme as He } from "@mui/material/styles";
|
|
29
|
-
import { L as ye } from "../LineChart-
|
|
30
|
-
import { M as ct } from "../MiniWidgetContainer-
|
|
29
|
+
import { L as ye } from "../LineChart-D5uLCys4.mjs";
|
|
30
|
+
import { M as ct } from "../MiniWidgetContainer-CxggrnHk.mjs";
|
|
31
31
|
import { subMonths as lt } from "date-fns";
|
|
32
32
|
import { TrendingUp as dt, TrendingDown as ht, MultilineChart as ut, ExpandLess as mt, ExpandMore as gt } from "@mxenabled/mx-icons";
|
|
33
33
|
import { a as pt, f as U } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
34
|
-
import { M as Ct } from "../MicroWidgetContainer-
|
|
34
|
+
import { M as Ct } from "../MicroWidgetContainer-DwTAjSdX.mjs";
|
|
35
35
|
import ft from "@mui/material/Collapse";
|
|
36
36
|
import Tt from "@mui/material/List";
|
|
37
37
|
import yt from "@mui/material/ListItem";
|
|
@@ -43,7 +43,7 @@ import wt from "@mui/material/Divider";
|
|
|
43
43
|
import { useTheme as Dt, Stack as It } from "@mui/material";
|
|
44
44
|
import Et from "@mui/material/Paper";
|
|
45
45
|
import { b as Lt } from "../CategoryUtil-BR3H5i6n.mjs";
|
|
46
|
-
import { E as xt } from "../ExportCsvAction-
|
|
46
|
+
import { E as xt } from "../ExportCsvAction-CUGnEaHw.mjs";
|
|
47
47
|
import { E as vt } from "../EmptyState-C0lr9E5T.mjs";
|
|
48
48
|
const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
49
49
|
tt,
|
|
@@ -920,8 +920,10 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
920
920
|
ee(v);
|
|
921
921
|
}, ge = () => {
|
|
922
922
|
ee(""), s(y.TRENDS_CLICK_ALL_CATEGORIES, A);
|
|
923
|
-
}
|
|
924
|
-
|
|
923
|
+
};
|
|
924
|
+
if (!p || !L) return /* @__PURE__ */ e(Q, {});
|
|
925
|
+
const Ge = a.show_connections_widget_in_master ? "buttons" : "no-buttons", Be = L && d.length === 0;
|
|
926
|
+
return /* @__PURE__ */ f(
|
|
925
927
|
Ae,
|
|
926
928
|
{
|
|
927
929
|
accountOptions: d,
|
|
@@ -932,83 +934,86 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
932
934
|
onBackClick: n,
|
|
933
935
|
sx: t,
|
|
934
936
|
title: D.title,
|
|
935
|
-
children:
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
937
|
+
children: [
|
|
938
|
+
/* @__PURE__ */ f(
|
|
939
|
+
_,
|
|
940
|
+
{
|
|
941
|
+
sx: {
|
|
942
|
+
px: c ? 0 : 48
|
|
943
|
+
},
|
|
944
|
+
children: [
|
|
945
|
+
/* @__PURE__ */ f(
|
|
946
|
+
_,
|
|
947
|
+
{
|
|
948
|
+
flexDirection: "row",
|
|
949
|
+
justifyContent: "space-between",
|
|
950
|
+
sx: { pb: c ? 12 : 24, pt: c ? 24 : 48 },
|
|
951
|
+
children: [
|
|
952
|
+
/* @__PURE__ */ e(
|
|
953
|
+
Oe,
|
|
954
|
+
{
|
|
955
|
+
selectedCategoryGuid: J,
|
|
956
|
+
selectedDateRange: r
|
|
957
|
+
}
|
|
958
|
+
),
|
|
959
|
+
/* @__PURE__ */ e(We, { onTabChange: me, selectedTab: z })
|
|
960
|
+
]
|
|
961
|
+
}
|
|
962
|
+
),
|
|
963
|
+
Be && /* @__PURE__ */ e(
|
|
964
|
+
vt,
|
|
965
|
+
{
|
|
966
|
+
header: "",
|
|
967
|
+
icon: "",
|
|
968
|
+
onClick: () => {
|
|
969
|
+
},
|
|
970
|
+
primaryButton: D.empty_state_primary,
|
|
971
|
+
subText: D.empty_state_sub_text,
|
|
972
|
+
variant: Ge
|
|
973
|
+
}
|
|
974
|
+
),
|
|
975
|
+
/* @__PURE__ */ e(_, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(O, { flexGrow: 1, children: J && /* @__PURE__ */ f(pe, { onClick: ge, sx: { p: 0, pr: 5 }, children: [
|
|
976
|
+
/* @__PURE__ */ e(se, { name: "arrow_back" }),
|
|
977
|
+
D.all_categories
|
|
978
|
+
] }) }) }),
|
|
979
|
+
/* @__PURE__ */ f(_, { flexDirection: x ? "row" : "column", gap: x ? 48 : 16, children: [
|
|
980
|
+
z === "Chart" && /* @__PURE__ */ f(Fe, { children: [
|
|
981
|
+
/* @__PURE__ */ e(O, { sx: { width: x ? "68%" : "100%" }, children: /* @__PURE__ */ e(
|
|
982
|
+
Jt,
|
|
962
983
|
{
|
|
963
|
-
|
|
964
|
-
|
|
984
|
+
availableHeight: le,
|
|
985
|
+
minHeight: 450,
|
|
986
|
+
selectedDateRange: r,
|
|
987
|
+
totals: u
|
|
965
988
|
}
|
|
966
|
-
),
|
|
967
|
-
/* @__PURE__ */
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
989
|
+
) }),
|
|
990
|
+
/* @__PURE__ */ f(_, { gap: 16, sx: { width: x ? "32%" : "100%" }, children: [
|
|
991
|
+
N && /* @__PURE__ */ e(Yt, { onInsightCardClick: o }),
|
|
992
|
+
/* @__PURE__ */ e(
|
|
993
|
+
Kt,
|
|
994
|
+
{
|
|
995
|
+
availableHeight: de,
|
|
996
|
+
onCategoryClick: he
|
|
997
|
+
}
|
|
998
|
+
)
|
|
999
|
+
] })
|
|
1000
|
+
] }),
|
|
1001
|
+
z === "Table" && /* @__PURE__ */ e(O, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
1002
|
+
Ve,
|
|
979
1003
|
{
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1004
|
+
height: "unset",
|
|
1005
|
+
monthlyCategoryTotals: u,
|
|
1006
|
+
onClickRow: G,
|
|
1007
|
+
selectedCategory: J,
|
|
1008
|
+
selectedDateRange: r
|
|
984
1009
|
}
|
|
985
|
-
) })
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
onCategoryClick: he
|
|
993
|
-
}
|
|
994
|
-
)
|
|
995
|
-
] })
|
|
996
|
-
] }),
|
|
997
|
-
z === "Table" && /* @__PURE__ */ e(O, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
998
|
-
Ve,
|
|
999
|
-
{
|
|
1000
|
-
height: "unset",
|
|
1001
|
-
monthlyCategoryTotals: u,
|
|
1002
|
-
onClickRow: G,
|
|
1003
|
-
selectedCategory: J,
|
|
1004
|
-
selectedDateRange: r
|
|
1005
|
-
}
|
|
1006
|
-
) })
|
|
1007
|
-
] }),
|
|
1008
|
-
te && /* @__PURE__ */ e(Xt, { onClose: ue })
|
|
1009
|
-
]
|
|
1010
|
-
}
|
|
1011
|
-
)
|
|
1010
|
+
) })
|
|
1011
|
+
] })
|
|
1012
|
+
]
|
|
1013
|
+
}
|
|
1014
|
+
),
|
|
1015
|
+
te && /* @__PURE__ */ e(Xt, { onClose: ue })
|
|
1016
|
+
]
|
|
1012
1017
|
}
|
|
1013
1018
|
);
|
|
1014
1019
|
}, Qn = M(en);
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { getUnixTime as l } from "date-fns/getUnixTime";
|
|
2
2
|
import A from "bowser";
|
|
3
|
-
import { F as u, A as r } from "./Fetch-
|
|
3
|
+
import { F as u, A as r } from "./Fetch-CJ9cgjgV.mjs";
|
|
4
4
|
import y from "react";
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const g = async (o, t, n = "1.0.0", s = "Experiences") => {
|
|
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 (c) => await
|
|
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
17
|
name: c?.label || "",
|
|
18
|
-
session_id:
|
|
18
|
+
session_id: i.guid,
|
|
19
19
|
user_agent: navigator.userAgent || "",
|
|
20
20
|
version: 2
|
|
21
21
|
}
|
|
22
22
|
}),
|
|
23
|
-
sendAnalyticsPageview: async (c) => await
|
|
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
29
|
name: c.name,
|
|
30
|
-
session_id:
|
|
30
|
+
session_id: i.guid,
|
|
31
31
|
user_agent: navigator.userAgent || ""
|
|
32
32
|
}
|
|
33
33
|
})
|
|
@@ -35,24 +35,24 @@ const d = async (o, t, n = "1.0.0", a = "Experiences") => {
|
|
|
35
35
|
};
|
|
36
36
|
class _ {
|
|
37
37
|
fetchInstance;
|
|
38
|
-
constructor(t, n) {
|
|
39
|
-
this.fetchInstance = new u(t, n);
|
|
38
|
+
constructor(t, n, s) {
|
|
39
|
+
this.fetchInstance = new u(t, n, void 0, s);
|
|
40
40
|
}
|
|
41
41
|
initializeAnalyticsSession = async (t, n) => {
|
|
42
|
-
const
|
|
43
|
-
browser_name:
|
|
44
|
-
browser_version:
|
|
42
|
+
const s = A.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
45
|
is_first_visit: !1,
|
|
46
46
|
product_name: "Individual Widget",
|
|
47
47
|
product_version: t
|
|
48
48
|
});
|
|
49
|
-
return
|
|
49
|
+
return a ? (this.fetchInstance.post(r.ANALYTICS_FEATURE_VISITS, {
|
|
50
50
|
feature_visit: {
|
|
51
|
-
analytics_session_guid:
|
|
51
|
+
analytics_session_guid: a.guid,
|
|
52
52
|
feature_name: n || "Experiences",
|
|
53
|
-
is_first_visit:
|
|
53
|
+
is_first_visit: a.is_first_visit
|
|
54
54
|
}
|
|
55
|
-
}), { analytics_session:
|
|
55
|
+
}), { analytics_session: a }) : { analytics_session: null };
|
|
56
56
|
};
|
|
57
57
|
sendAnalyticEvent = async (t) => this.fetchInstance.post(r.ANALYTICS_EVENTS, t).catch((n) => {
|
|
58
58
|
throw n;
|
|
@@ -63,30 +63,30 @@ class _ {
|
|
|
63
63
|
}
|
|
64
64
|
class h {
|
|
65
65
|
fetchInstance;
|
|
66
|
-
constructor(t, n) {
|
|
67
|
-
this.fetchInstance = new u(t, n);
|
|
66
|
+
constructor(t, n, s) {
|
|
67
|
+
this.fetchInstance = new u(t, n, void 0, s);
|
|
68
68
|
}
|
|
69
|
-
getGlobalCopy = async (t, n) => this.fetchInstance.post(`${r.LOCALIZED_CONTENT}/${t}`, { translation_key: n }).then((
|
|
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
|
-
const { session: n } = t,
|
|
73
|
-
return y.useMemo(() => (
|
|
74
|
-
|
|
75
|
-
n ? e(
|
|
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 y.useMemo(() => (i) => {
|
|
74
|
+
a.forEach((e) => {
|
|
75
|
+
n ? e(i, n) : e(i);
|
|
76
76
|
});
|
|
77
77
|
}, [o, n]);
|
|
78
78
|
}, E = (o, t) => {
|
|
79
|
-
const { session: n } = t,
|
|
80
|
-
return y.useMemo(() => (
|
|
81
|
-
|
|
82
|
-
n ? e(
|
|
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 y.useMemo(() => (i) => {
|
|
81
|
+
a.forEach((e) => {
|
|
82
|
+
n ? e(i, n) : e(i);
|
|
83
83
|
});
|
|
84
84
|
}, [o, n]);
|
|
85
85
|
};
|
|
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
|
};
|
package/package.json
CHANGED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable as m, runInAction as s } from "mobx";
|
|
2
|
-
import { F as p, A as c } from "./Fetch-CkFKy79O.mjs";
|
|
3
|
-
class h {
|
|
4
|
-
fetchInstance;
|
|
5
|
-
constructor(t, n) {
|
|
6
|
-
this.fetchInstance = new p(t, n);
|
|
7
|
-
}
|
|
8
|
-
getMerchants = async (t = [], n = [], r = 1, o = 25) => {
|
|
9
|
-
let a = c.MERCHANTS;
|
|
10
|
-
return a += `?page=${r}&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(`${c.MERCHANTS}/${t}`).then((n) => n.merchant);
|
|
13
|
-
}
|
|
14
|
-
class l {
|
|
15
|
-
globalStore;
|
|
16
|
-
api = new h("/", "");
|
|
17
|
-
merchant = null;
|
|
18
|
-
merchants = [];
|
|
19
|
-
isLoading = !1;
|
|
20
|
-
constructor(t) {
|
|
21
|
-
this.globalStore = t, this.api = new h(t.endpoint, t.sessionToken), m(this);
|
|
22
|
-
}
|
|
23
|
-
loadMerchants = async (t = "") => {
|
|
24
|
-
this.isLoading = !0;
|
|
25
|
-
const n = await this.api.getMerchants([t]);
|
|
26
|
-
s(() => {
|
|
27
|
-
this.merchants = n, this.isLoading = !1;
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
loadMerchantByGuid = async (t) => {
|
|
31
|
-
const n = await this.api.getMerchantByGuid(t);
|
|
32
|
-
s(() => this.merchant = n);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export {
|
|
36
|
-
l as M
|
|
37
|
-
};
|
package/dist/hooks-DkUqN6JE.mjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
const a = r.createContext(null), g = ({
|
|
4
|
-
children: t,
|
|
5
|
-
globalStore: e,
|
|
6
|
-
onEvent: s,
|
|
7
|
-
onPageView: l
|
|
8
|
-
}) => /* @__PURE__ */ n(
|
|
9
|
-
a.Provider,
|
|
10
|
-
{
|
|
11
|
-
value: {
|
|
12
|
-
globalStore: e,
|
|
13
|
-
onEvent: s,
|
|
14
|
-
onPageView: l,
|
|
15
|
-
children: t
|
|
16
|
-
},
|
|
17
|
-
children: t
|
|
18
|
-
}
|
|
19
|
-
), S = r.createContext(null), b = ({ children: t, availableHeight: e, availableWidth: s }) => /* @__PURE__ */ n(
|
|
20
|
-
S.Provider,
|
|
21
|
-
{
|
|
22
|
-
value: {
|
|
23
|
-
availableHeight: e,
|
|
24
|
-
availableWidth: s,
|
|
25
|
-
children: t
|
|
26
|
-
},
|
|
27
|
-
children: t
|
|
28
|
-
}
|
|
29
|
-
), o = (t = "useGlobalStore") => {
|
|
30
|
-
const e = r.useContext(a);
|
|
31
|
-
if (!e)
|
|
32
|
-
throw new Error(`${t}() must be used within the GlobalDataContext`);
|
|
33
|
-
return e;
|
|
34
|
-
}, C = () => o("useAccountStore").globalStore.accountStore, d = () => o("useAppConfig").globalStore.appDataStore.appConfig, p = () => o("useAnalyticsStore").globalStore.analyticsStore, h = () => o("useBudgetsStore").globalStore.budgetsStore, x = () => o("useCashflowStore").globalStore.cashflowStore, f = () => o("useCategoryStore").globalStore.categoryStore, w = () => o("useConnectStore").globalStore.connectStore, G = () => o("useDebtsStore").globalStore.debtsStore, v = () => o("useFinstrongStore").globalStore.finstrongStore, y = () => o("useGlobalStore").globalStore, W = () => o("useGlobalUiStore").globalStore.globalUiStore, m = () => o("globalCopyStore").globalStore.copyStore.copy, P = () => o("useGoalStore").globalStore.goalStore, A = () => o("useHelpStore").globalStore.helpStore, D = () => o("useHoldingStore").globalStore.holdingStore, T = () => o("useMerchantStore").globalStore.merchantStore, E = () => o("useNetWorthStore").globalStore.netWorthStore, U = () => o("useNotificationStore").globalStore.notificationStore, H = () => o("useRecurringTransactionsStore").globalStore.recurringTransactionsStore, N = () => o("useSettingsStore").globalStore.settingsStore, B = () => o("useTransactionStore").globalStore.transactionStore, R = () => o("useTrendsStore").globalStore.trendsStore, V = () => o("useUserStore").globalStore.userStore, j = () => ({ onEvent: o().onEvent }), F = () => ({ onPageView: o().onPageView }), u = (t = "useWidgetContainerContext") => {
|
|
35
|
-
const e = r.useContext(S);
|
|
36
|
-
if (!e)
|
|
37
|
-
throw new Error(`${t}() must be used within the WidgetContainerContext`);
|
|
38
|
-
return e;
|
|
39
|
-
}, M = () => u();
|
|
40
|
-
export {
|
|
41
|
-
g as A,
|
|
42
|
-
S as B,
|
|
43
|
-
a as G,
|
|
44
|
-
b as W,
|
|
45
|
-
W as a,
|
|
46
|
-
T as b,
|
|
47
|
-
C as c,
|
|
48
|
-
w as d,
|
|
49
|
-
j as e,
|
|
50
|
-
B as f,
|
|
51
|
-
h as g,
|
|
52
|
-
H as h,
|
|
53
|
-
p as i,
|
|
54
|
-
P as j,
|
|
55
|
-
f as k,
|
|
56
|
-
y as l,
|
|
57
|
-
d as m,
|
|
58
|
-
U as n,
|
|
59
|
-
V as o,
|
|
60
|
-
M as p,
|
|
61
|
-
E as q,
|
|
62
|
-
N as r,
|
|
63
|
-
D as s,
|
|
64
|
-
x as t,
|
|
65
|
-
m as u,
|
|
66
|
-
R as v,
|
|
67
|
-
v as w,
|
|
68
|
-
G as x,
|
|
69
|
-
A as y,
|
|
70
|
-
F as z
|
|
71
|
-
};
|