@mx-cartographer/experiences 7.0.27-alpha.mm0 → 7.0.27-alpha.sms2

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.
Files changed (99) hide show
  1. package/CHANGELOG.md +0 -4
  2. package/dist/{Account-DJ7VG5hs.mjs → Account-BW3-oYEs.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-YtqGgQmV.mjs → AccountDetailsContent-UxSEMBo_.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-DJk0hheh.mjs → AccountDetailsHeader-Eb3WvBGm.mjs} +5 -5
  5. package/dist/{AccountFields-BJfIdeay.mjs → AccountFields-CIz-r3gP.mjs} +2 -2
  6. package/dist/{AccountListItem-CkDTN1Bi.mjs → AccountListItem-B-ZjJ4Gp.mjs} +3 -3
  7. package/dist/{AccountStore-CJl0ld02.mjs → AccountStore-BaMynkQT.mjs} +26 -26
  8. package/dist/{Accounts-BYGu-bN1.mjs → Accounts-CA-nqAjT.mjs} +1 -1
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-DLu87ijw.mjs} +3 -3
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-By4aGoRM.mjs} +17 -17
  11. package/dist/{BudgetUtil-BB9gMyLW.mjs → BudgetUtil-CeSLAcsl.mjs} +1 -1
  12. package/dist/{CategorySelectorDrawer-B-W3eXHU.mjs → CategorySelectorDrawer-BJ9jlCyt.mjs} +1 -1
  13. package/dist/{CategoryStore-BCcpI3oJ.mjs → CategoryStore-BOyzQjQp.mjs} +4 -4
  14. package/dist/{ConnectDrawer-COy3Xwqv.mjs → ConnectDrawer-phFH6OHt.mjs} +1 -1
  15. package/dist/{ConnectionsDrawer-B36W8Qvy.mjs → ConnectionsDrawer-ihxkAi1P.mjs} +2 -2
  16. package/dist/{CurrencyInput-B6gF46iv.mjs → CurrencyInput-bEx2Mbd0.mjs} +1 -1
  17. package/dist/{DebtsStore-2yxA32_7.mjs → DebtsStore-VkyMADzd.mjs} +1 -1
  18. package/dist/{ExportCsvAction-C3s1m5os.mjs → ExportCsvAction-CbdFfDV5.mjs} +3 -3
  19. package/dist/{Fetch-87LIQbEA.mjs → Fetch-CkFKy79O.mjs} +10 -11
  20. package/dist/{FinstrongStore-F2c607dj.mjs → FinstrongStore-mkALvztw.mjs} +4 -4
  21. package/dist/{GoalStore-dBJBsl-g.mjs → GoalStore-eSOkI6uE.mjs} +6 -6
  22. package/dist/{Help-CWsL8d5P.mjs → Help-KAAMEubC.mjs} +1 -1
  23. package/dist/{LineChart-CBKadOFA.mjs → LineChart-BWWmmJxV.mjs} +1 -1
  24. package/dist/{ListItemAction-CpYlo5Sh.mjs → ListItemAction-DNZZ5fSa.mjs} +1 -1
  25. package/dist/{ManageIncome-CGoLh7xs.mjs → ManageIncome-DbsiKUoO.mjs} +4 -4
  26. package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
  27. package/dist/{MicroWidgetContainer-DQXTwO5i.mjs → MicroWidgetContainer-Dxz8uBN9.mjs} +1 -1
  28. package/dist/{MiniWidgetContainer-BF2Qwhh-.mjs → MiniWidgetContainer-CTyjmE1h.mjs} +1 -1
  29. package/dist/{NetWorthStore-CrQtq5rq.mjs → NetWorthStore-B6xF9eGH.mjs} +2 -2
  30. package/dist/{NotificationSettings-gz1XBCBs.mjs → NotificationSettings-D5xBFiWs.mjs} +53 -53
  31. package/dist/{NotificationStore-C6PH6MKm.mjs → NotificationStore-DHtSGySy.mjs} +4 -8
  32. package/dist/{OriginalBalanceAction-C3afa-mq.mjs → OriginalBalanceAction-DepsKiJz.mjs} +3 -3
  33. package/dist/{RecurringSettings-fjYVNmPp.mjs → RecurringSettings-Dj29piAQ.mjs} +3 -3
  34. package/dist/{RecurringTransactionsStore-DeLXfuC4.mjs → RecurringTransactionsStore-D62XJtdL.mjs} +16 -20
  35. package/dist/{SettingsStore-0aHfHlOE.mjs → SettingsStore-B4gi6oOw.mjs} +29 -33
  36. package/dist/{TransactionApi-B3Tksf7L.mjs → TransactionApi-DbbcjI2L.mjs} +29 -29
  37. package/dist/{TransactionDetails--DPYM8la.mjs → TransactionDetails-C-z3HGTT.mjs} +5 -5
  38. package/dist/{TransactionStore-Cd25G0gH.mjs → TransactionStore-Cep_Eeql.mjs} +25 -29
  39. package/dist/{TrendsStore-ReCVjB8o.mjs → TrendsStore-WrHxzdbQ.mjs} +1 -1
  40. package/dist/{User-DD7Pb2ze.mjs → User-Dq9Qj764.mjs} +1 -1
  41. package/dist/{ViewMoreMicroCard-C66pzgfS.mjs → ViewMoreMicroCard-DFAY0tA8.mjs} +2 -5
  42. package/dist/{WidgetContainer-C1NlG0pd.mjs → WidgetContainer-CdBs9WOZ.mjs} +2 -2
  43. package/dist/accounts/api/AccountApi.d.ts +2 -2
  44. package/dist/accounts/index.es.js +12 -12
  45. package/dist/analytics/index.es.js +2 -2
  46. package/dist/budgets/api/BudgetsApi.d.ts +2 -2
  47. package/dist/budgets/index.es.js +10 -10
  48. package/dist/cashflow/api/CashflowApi.d.ts +2 -3
  49. package/dist/cashflow/index.es.js +10 -10
  50. package/dist/categories/index.es.js +2 -2
  51. package/dist/common/api/AnalyticsApi.d.ts +2 -2
  52. package/dist/common/api/AppDataApi.d.ts +2 -2
  53. package/dist/common/api/BeatApi.d.ts +2 -2
  54. package/dist/common/api/CategoryApi.d.ts +3 -2
  55. package/dist/common/api/GlobalCopyApi.d.ts +1 -2
  56. package/dist/common/api/LocalizedCopyApi.d.ts +1 -2
  57. package/dist/common/api/NotificationApi.d.ts +2 -2
  58. package/dist/common/api/ScheduledPaymentsApi.d.ts +2 -3
  59. package/dist/common/api/UserApi.d.ts +2 -2
  60. package/dist/common/context/GlobalDataProvider.d.ts +2 -3
  61. package/dist/common/context/hooks.d.ts +1 -4
  62. package/dist/common/context/index.d.ts +1 -1
  63. package/dist/common/index.es.js +310 -316
  64. package/dist/common/stores/GlobalStore.d.ts +2 -3
  65. package/dist/common/types/index.d.ts +0 -1
  66. package/dist/common/utils/Fetch.d.ts +1 -3
  67. package/dist/dashboard/index.es.js +2 -2
  68. package/dist/debts/index.es.js +9 -9
  69. package/dist/{exportTransactionsToCSV-Ch_T5Xhk.mjs → exportTransactionsToCSV-B5qAKd6C.mjs} +1 -1
  70. package/dist/finstrong/api/FinstrongApi.d.ts +1 -2
  71. package/dist/finstrong/index.es.js +7 -7
  72. package/dist/goals/api/GoalApi.d.ts +2 -3
  73. package/dist/goals/index.es.js +11 -11
  74. package/dist/help/api/HelpApi.d.ts +2 -2
  75. package/dist/help/index.es.js +3 -3
  76. package/dist/hooks-DkUqN6JE.mjs +71 -0
  77. package/dist/insights/index.es.js +1 -1
  78. package/dist/investments/api/HoldingApi.d.ts +2 -3
  79. package/dist/investments/index.es.js +3 -3
  80. package/dist/merchants/api/MerchantApi.d.ts +1 -2
  81. package/dist/merchants/index.es.js +2 -2
  82. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -2
  83. package/dist/microinsights/context/hooks.d.ts +1 -1
  84. package/dist/microinsights/index.es.js +1 -1
  85. package/dist/networth/index.es.js +7 -7
  86. package/dist/notifications/index.es.js +5 -5
  87. package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -2
  88. package/dist/recurringtransactions/index.es.js +10 -10
  89. package/dist/settings/api/SettingsApi.d.ts +2 -3
  90. package/dist/settings/index.es.js +8 -8
  91. package/dist/spending/index.es.js +4 -4
  92. package/dist/transactions/api/TransactionApi.d.ts +2 -3
  93. package/dist/transactions/index.es.js +14 -14
  94. package/dist/trends/index.es.js +10 -10
  95. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-DaDBSR_1.mjs} +29 -29
  96. package/package.json +1 -1
  97. package/dist/MerchantStore-DrFvsUyy.mjs +0 -37
  98. package/dist/common/types/Handlers.d.ts +0 -2
  99. package/dist/hooks-CTieq90n.mjs +0 -74
@@ -14,20 +14,20 @@ import { Text as f, CategoryIcon as ht, CategoryIconVariants as ft } from "@mxen
14
14
  import { f as A } from "../NumberFormatting-CtWHhyBX.mjs";
15
15
  import yt from "@mui/material/Button";
16
16
  import { useTheme as it } from "@mui/material";
17
- import { u as w, a as R, k as z, c as rt, m as st, f as Ct, e as _t } from "../hooks-CTieq90n.mjs";
17
+ import { u as w, a as R, k as z, c as rt, m as st, f as Ct, e as _t } from "../hooks-DkUqN6JE.mjs";
18
18
  import { u as ct } from "../useScreenSize-B6JyS_Lj.mjs";
19
19
  import { D as bt } from "../Donut-1UMNcG67.mjs";
20
20
  import { L as F } from "../Loader-DUaFpDGv.mjs";
21
- import { M as St } from "../MiniWidgetContainer-BF2Qwhh-.mjs";
21
+ import { M as St } from "../MiniWidgetContainer-CTyjmE1h.mjs";
22
22
  import { startOfToday as U } from "date-fns/startOfToday";
23
- import { T as Tt, a as Mt } from "../TransactionDetails--DPYM8la.mjs";
23
+ import { T as Tt, a as Mt } from "../TransactionDetails-C-z3HGTT.mjs";
24
24
  import Dt from "@mui/material/Collapse";
25
25
  import B from "@mui/material/Divider";
26
26
  import q from "@mui/material/List";
27
27
  import J from "@mui/material/ListItem";
28
28
  import xt from "@mui/material/ListItemButton";
29
29
  import { D as Q } from "../Drawer-kEE73B87.mjs";
30
- import { A as Z, W as wt } from "../WidgetContainer-C1NlG0pd.mjs";
30
+ import { A as Z, W as wt } from "../WidgetContainer-CdBs9WOZ.mjs";
31
31
  const j = 5, vt = (n, l, r) => r.reduce((i, c) => {
32
32
  if (c.total > 0) {
33
33
  const a = n.find((s) => s.guid === c.category_guid);
@@ -1,8 +1,7 @@
1
- import { Fetch } from '../../common';
2
- import { GlobalErrorHandler, Tag, Tagging, Transaction, TransactionRule } from '../../common/types';
1
+ import { Fetch, Tag, Tagging, Transaction, TransactionRule } from '../../common';
3
2
  export declare class TransactionApi {
4
3
  fetchInstance: Fetch;
5
- constructor(endpoint: string, token: string, onError?: GlobalErrorHandler);
4
+ constructor(endpoint: string, token: string);
6
5
  addTag: (tag: Tag) => Promise<any>;
7
6
  addTagging: (tagging: Tagging) => Promise<any>;
8
7
  addTransaction: (transaction: Transaction) => Promise<any>;
@@ -1,12 +1,12 @@
1
- import { T as fa } from "../TransactionApi-B3Tksf7L.mjs";
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--DPYM8la.mjs";
3
- import { B as ya, d as ba, b as Ta } from "../TransactionDetails--DPYM8la.mjs";
4
- import { T as M } from "../User-DD7Pb2ze.mjs";
5
- import { O as Sa } from "../User-DD7Pb2ze.mjs";
6
- import { S as ee, D as We } from "../TransactionStore-Cd25G0gH.mjs";
7
- import { T as wa } from "../TransactionStore-Cd25G0gH.mjs";
8
- import { e as Ge } from "../exportTransactionsToCSV-Ch_T5Xhk.mjs";
9
- import { E as va } from "../ExportCsvAction-C3s1m5os.mjs";
1
+ import { T as fa } from "../TransactionApi-DbbcjI2L.mjs";
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-C-z3HGTT.mjs";
3
+ import { B as ya, d as ba, b as Ta } from "../TransactionDetails-C-z3HGTT.mjs";
4
+ import { T as M } from "../User-Dq9Qj764.mjs";
5
+ import { O as Sa } from "../User-Dq9Qj764.mjs";
6
+ import { S as ee, D as We } from "../TransactionStore-Cep_Eeql.mjs";
7
+ import { T as wa } from "../TransactionStore-Cep_Eeql.mjs";
8
+ import { e as Ge } from "../exportTransactionsToCSV-B5qAKd6C.mjs";
9
+ import { E as va } from "../ExportCsvAction-CbdFfDV5.mjs";
10
10
  import { jsxs as _, jsx as e } from "react/jsx-runtime";
11
11
  import u from "react";
12
12
  import { observer as S } from "mobx-react-lite";
@@ -15,7 +15,7 @@ import { DataGridPro as Fe } from "@mui/x-data-grid-pro";
15
15
  import A from "@mui/material/Box";
16
16
  import { useTheme as ze } from "@mui/material/styles";
17
17
  import { Text as C, Icon as H, MerchantLogo as Ke, TextField as te, P as qe } from "@mxenabled/mxui";
18
- import { f as P, u as x, a as K, c as re, k as je, m as Xe, e as Ye, o as Je } from "../hooks-CTieq90n.mjs";
18
+ import { f as P, u as x, a as K, c as re, k as je, m as Xe, e as Ye, o as Je } from "../hooks-DkUqN6JE.mjs";
19
19
  import { fromUnixTime as Qe } from "date-fns/fromUnixTime";
20
20
  import { f as Ze, D as et, a as se } from "../Dialog-CWW597AF.mjs";
21
21
  import N from "@mui/material/Stack";
@@ -26,15 +26,15 @@ import { getUnixTime as at } from "date-fns/getUnixTime";
26
26
  import { startOfMonth as nt } from "date-fns/startOfMonth";
27
27
  import { startOfToday as z } from "date-fns/startOfToday";
28
28
  import ot from "@mui/material/styles/useTheme";
29
- import { j as rt } from "../ConnectDrawer-COy3Xwqv.mjs";
29
+ import { j as rt } from "../ConnectDrawer-phFH6OHt.mjs";
30
30
  import st from "@mui/material/Divider";
31
31
  import it from "@mui/material/MenuItem";
32
32
  import ct from "@mui/material/RadioGroup";
33
33
  import { ExpandMore as lt } from "@mxenabled/mx-icons";
34
- import { C as dt } from "../CurrencyInput-B6gF46iv.mjs";
35
- import { a as ut, u as mt } from "../CategorySelectorDrawer-B-W3eXHU.mjs";
34
+ import { C as dt } from "../CurrencyInput-bEx2Mbd0.mjs";
35
+ import { a as ut, u as mt } from "../CategorySelectorDrawer-BJ9jlCyt.mjs";
36
36
  import { b as ae } from "../Localization-2MODESHW.mjs";
37
- import { A as T, W as _t } from "../WidgetContainer-C1NlG0pd.mjs";
37
+ import { A as T, W as _t } from "../WidgetContainer-CdBs9WOZ.mjs";
38
38
  import { u as pt } from "../useScreenSize-B6JyS_Lj.mjs";
39
39
  import { S as gt } from "../SearchBox-B2_zLv8-.mjs";
40
40
  import { D as ne } from "../Drawer-kEE73B87.mjs";
@@ -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-ReCVjB8o.mjs";
11
- import { T as eo } from "../TrendsStore-ReCVjB8o.mjs";
10
+ import { a as Ke, g as $e, S as je, L as Ee, u as Ye } from "../TrendsStore-WrHxzdbQ.mjs";
11
+ import { T as eo } from "../TrendsStore-WrHxzdbQ.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-CTieq90n.mjs";
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-DkUqN6JE.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-C66pzgfS.mjs";
24
- import { A as y, W as Ae } from "../WidgetContainer-C1NlG0pd.mjs";
25
- import { a as Re, T as ke } from "../TransactionDetails--DPYM8la.mjs";
23
+ import { T as A, b as it } from "../ViewMoreMicroCard-DFAY0tA8.mjs";
24
+ import { A as y, W as Ae } from "../WidgetContainer-CdBs9WOZ.mjs";
25
+ import { a as Re, T as ke } from "../TransactionDetails-C-z3HGTT.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-CBKadOFA.mjs";
30
- import { M as ct } from "../MiniWidgetContainer-BF2Qwhh-.mjs";
29
+ import { L as ye } from "../LineChart-BWWmmJxV.mjs";
30
+ import { M as ct } from "../MiniWidgetContainer-CTyjmE1h.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-DQXTwO5i.mjs";
34
+ import { M as Ct } from "../MicroWidgetContainer-Dxz8uBN9.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-C3s1m5os.mjs";
46
+ import { E as xt } from "../ExportCsvAction-CbdFfDV5.mjs";
47
47
  import { E as vt } from "../EmptyState-C0lr9E5T.mjs";
48
48
  const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
49
49
  tt,
@@ -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-87LIQbEA.mjs";
3
+ import { F as u, A as r } from "./Fetch-CkFKy79O.mjs";
4
4
  import y from "react";
5
- const g = async (o, t, n = "1.0.0", s = "Experiences") => {
6
- const a = new _(o, t), { analytics_session: i } = await a.initializeAnalyticsSession(
5
+ const d = async (o, t, n = "1.0.0", a = "Experiences") => {
6
+ const i = new _(o, t), { analytics_session: s } = await i.initializeAnalyticsSession(
7
7
  n,
8
- s
8
+ a
9
9
  ), e = window.location.hostname;
10
10
  return {
11
- sendAnalyticEvent: async (c) => await a.sendAnalyticEvent({
11
+ sendAnalyticEvent: async (c) => await i.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: i.guid,
18
+ session_id: s.guid,
19
19
  user_agent: navigator.userAgent || "",
20
20
  version: 2
21
21
  }
22
22
  }),
23
- sendAnalyticsPageview: async (c) => await a.sendAnalyticsPageview({
23
+ sendAnalyticsPageview: async (c) => await i.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: i.guid,
30
+ session_id: s.guid,
31
31
  user_agent: navigator.userAgent || ""
32
32
  }
33
33
  })
@@ -35,24 +35,24 @@ const g = async (o, t, n = "1.0.0", s = "Experiences") => {
35
35
  };
36
36
  class _ {
37
37
  fetchInstance;
38
- constructor(t, n, s) {
39
- this.fetchInstance = new u(t, n, void 0, s);
38
+ constructor(t, n) {
39
+ this.fetchInstance = new u(t, n);
40
40
  }
41
41
  initializeAnalyticsSession = async (t, n) => {
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",
42
+ const a = A.getParser(window.navigator.userAgent), { analytics_session: i } = await this.fetchInstance.post(r.ANALYTICS_SESSION, {
43
+ browser_name: a.getBrowserName() || "Unknown",
44
+ browser_version: a.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(r.ANALYTICS_FEATURE_VISITS, {
49
+ return i ? (this.fetchInstance.post(r.ANALYTICS_FEATURE_VISITS, {
50
50
  feature_visit: {
51
- analytics_session_guid: a.guid,
51
+ analytics_session_guid: i.guid,
52
52
  feature_name: n || "Experiences",
53
- is_first_visit: a.is_first_visit
53
+ is_first_visit: i.is_first_visit
54
54
  }
55
- }), { analytics_session: a }) : { analytics_session: null };
55
+ }), { analytics_session: i }) : { 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, s) {
67
- this.fetchInstance = new u(t, n, void 0, s);
66
+ constructor(t, n) {
67
+ this.fetchInstance = new u(t, n);
68
68
  }
69
- getGlobalCopy = async (t, n) => this.fetchInstance.post(`${r.LOCALIZED_CONTENT}/${t}`, { translation_key: n }).then((s) => s);
69
+ getGlobalCopy = async (t, n) => this.fetchInstance.post(`${r.LOCALIZED_CONTENT}/${t}`, { translation_key: n }).then((a) => a);
70
70
  }
71
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 y.useMemo(() => (i) => {
74
- a.forEach((e) => {
75
- n ? e(i, n) : e(i);
72
+ const { session: n } = t, a = Object.values(t).reduce((s, e) => n && e?.onAnalyticEvent && typeof e?.onAnalyticEvent == "function" ? [...s, e.onAnalyticEvent] : s, []), i = [...o, ...a];
73
+ return y.useMemo(() => (s) => {
74
+ i.forEach((e) => {
75
+ n ? e(s, n) : e(s);
76
76
  });
77
77
  }, [o, n]);
78
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 y.useMemo(() => (i) => {
81
- a.forEach((e) => {
82
- n ? e(i, n) : e(i);
79
+ const { session: n } = t, a = Object.values(t).reduce((s, e) => n && e?.onAnalyticPageView && typeof e?.onAnalyticPageView == "function" ? [...s, e.onAnalyticPageView] : s, []), i = [...o, ...a];
80
+ return y.useMemo(() => (s) => {
81
+ i.forEach((e) => {
82
+ n ? e(s, n) : e(s);
83
83
  });
84
84
  }, [o, n]);
85
85
  };
86
86
  export {
87
87
  _ as A,
88
88
  h as G,
89
- g as a,
89
+ d as a,
90
90
  E as b,
91
91
  p as u
92
92
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.0.27-alpha.mm0",
3
+ "version": "7.0.27-alpha.sms2",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,37 +0,0 @@
1
- import { makeAutoObservable as m, runInAction as c } from "mobx";
2
- import { F as p, A as h } from "./Fetch-87LIQbEA.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,2 +0,0 @@
1
- export type GlobalErrorHandler = (error: Error, props?: object, errorActionType?: string) => void;
2
- export type GlobalEventHandler = (event: string, props?: object) => void;
@@ -1,74 +0,0 @@
1
- import r from "react";
2
- import { jsx as n } from "react/jsx-runtime";
3
- const a = r.createContext(null), b = ({
4
- children: t,
5
- globalStore: e,
6
- onError: s,
7
- onEvent: l,
8
- onPageView: u
9
- }) => /* @__PURE__ */ n(
10
- a.Provider,
11
- {
12
- value: {
13
- globalStore: e,
14
- onError: s,
15
- onEvent: l,
16
- onPageView: u,
17
- children: t
18
- },
19
- children: t
20
- }
21
- ), S = r.createContext(null), C = ({ children: t, availableHeight: e, availableWidth: s }) => /* @__PURE__ */ n(
22
- S.Provider,
23
- {
24
- value: {
25
- availableHeight: e,
26
- availableWidth: s,
27
- children: t
28
- },
29
- children: t
30
- }
31
- ), o = (t = "useGlobalStore") => {
32
- const e = r.useContext(a);
33
- if (!e)
34
- throw new Error(`${t}() must be used within the GlobalDataContext`);
35
- return e;
36
- }, d = () => o("useAccountStore").globalStore.accountStore, p = () => o("useAppConfig").globalStore.appDataStore.appConfig, h = () => o("useAnalyticsStore").globalStore.analyticsStore, x = () => o("useBudgetsStore").globalStore.budgetsStore, f = () => o("useCashflowStore").globalStore.cashflowStore, w = () => o("useCategoryStore").globalStore.categoryStore, G = () => o("useConnectStore").globalStore.connectStore, v = () => o("useDebtsStore").globalStore.debtsStore, y = () => o("useFinstrongStore").globalStore.finstrongStore, W = () => o("useGlobalStore").globalStore, m = () => o("useGlobalUiStore").globalStore.globalUiStore, E = () => 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, U = () => o("useNetWorthStore").globalStore.netWorthStore, H = () => o("useNotificationStore").globalStore.notificationStore, N = () => o("useRecurringTransactionsStore").globalStore.recurringTransactionsStore, B = () => o("useSettingsStore").globalStore.settingsStore, R = () => o("useTransactionStore").globalStore.transactionStore, V = () => o("useTrendsStore").globalStore.trendsStore, j = () => o("useUserStore").globalStore.userStore, F = () => ({ onError: o().onError }), M = () => ({ onEvent: o().onEvent }), $ = () => ({ onPageView: o().onPageView }), c = (t = "useWidgetContainerContext") => {
37
- const e = r.useContext(S);
38
- if (!e)
39
- throw new Error(`${t}() must be used within the WidgetContainerContext`);
40
- return e;
41
- }, k = () => c();
42
- export {
43
- $ as A,
44
- b as B,
45
- S as C,
46
- a as G,
47
- C as W,
48
- m as a,
49
- T as b,
50
- d as c,
51
- G as d,
52
- M as e,
53
- R as f,
54
- x as g,
55
- N as h,
56
- h as i,
57
- P as j,
58
- w as k,
59
- W as l,
60
- p as m,
61
- H as n,
62
- j as o,
63
- k as p,
64
- U as q,
65
- B as r,
66
- D as s,
67
- f as t,
68
- E as u,
69
- V as v,
70
- y as w,
71
- v as x,
72
- F as y,
73
- A as z
74
- };