@mx-cartographer/experiences 8.0.13 → 8.0.15-alpha-view-history-testing

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 (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/EmbeddedCard-yQXb1_JB.mjs +794 -0
  3. package/dist/{ExportCsvAction-ErKh7wJ2.mjs → ExportCsvAction-CHCmCCqf.mjs} +4 -5
  4. package/dist/{ManageIncome-C_XOG9CZ.mjs → ManageIncome-soXohjI4.mjs} +3 -3
  5. package/dist/{RecurringSettings-Bt-zMwCB.mjs → RecurringSettings-rn4NvTVz.mjs} +1 -1
  6. package/dist/{Transaction-Cn5_iFm0.mjs → Transaction-C3Pg9TKf.mjs} +2 -2
  7. package/dist/TransactionDetails-UyBJ8fVg.mjs +1703 -0
  8. package/dist/{TransactionStore-CbZfz7-2.mjs → TransactionStore-BUsgGRL1.mjs} +43 -32
  9. package/dist/{ViewMoreMicroCard-D24H9kDm.mjs → ViewMoreMicroCard-BJOZcYnB.mjs} +511 -518
  10. package/dist/accounts/index.es.js +2 -2
  11. package/dist/budgets/index.es.js +5 -6
  12. package/dist/cashflow/index.es.js +3 -3
  13. package/dist/common/index.es.js +20 -21
  14. package/dist/core/index.es.js +1 -1
  15. package/dist/core/types/AppData.d.ts +0 -1
  16. package/dist/core/types/localization/InsightsFeedCopy.d.ts +11 -0
  17. package/dist/{OnClickEvents-CseHDZ94.mjs → exportTransactionsToCSV-DgdB3TBt.mjs} +70 -24
  18. package/dist/finstrong/index.es.js +3 -3
  19. package/dist/insights/components/shared/InsightsCard/EmbeddedCard.d.ts +1 -2
  20. package/dist/insights/index.es.js +1043 -1566
  21. package/dist/microinsights/index.es.js +1 -1
  22. package/dist/microinsights/interfaces.d.ts +0 -1
  23. package/dist/recurringtransactions/index.es.js +4 -4
  24. package/dist/spending/index.es.js +3 -3
  25. package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +8 -0
  26. package/dist/transactions/index.es.js +15 -15
  27. package/dist/transactions/stores/TransactionStore.d.ts +1 -0
  28. package/dist/trends/index.es.js +4 -5
  29. package/package.json +1 -1
  30. package/dist/StatusIndicator-DAWRKwmE.mjs +0 -264
  31. package/dist/TransactionDetails-DA6tdnu0.mjs +0 -1476
  32. package/dist/exportTransactionsToCSV-MCYH_zzN.mjs +0 -48
@@ -1,28 +1,27 @@
1
- import { jsx as E } from "react/jsx-runtime";
1
+ import { jsx as I } from "react/jsx-runtime";
2
2
  import M from "@mui/material/Box";
3
3
  import H from "@mui/material/FormControlLabel";
4
4
  import P from "@mui/material/Radio";
5
- import U from "@mui/material/styles/useTheme";
6
- import B from "@mui/material/Tooltip";
7
- import { makeAutoObservable as p } from "mobx";
8
- import { endOfToday as f } from "date-fns/endOfToday";
5
+ import B from "@mui/material/styles/useTheme";
6
+ import U from "@mui/material/Tooltip";
7
+ import { makeAutoObservable as f } from "mobx";
8
+ import { endOfToday as h } from "date-fns/endOfToday";
9
9
  import { formatISO as K } from "date-fns/formatISO";
10
- import { getUnixTime as O } from "date-fns/getUnixTime";
10
+ import { getUnixTime as E } from "date-fns/getUnixTime";
11
11
  import { isBefore as V } from "date-fns/isBefore";
12
12
  import { startOfMonth as u } from "date-fns/startOfMonth";
13
13
  import { startOfToday as m } from "date-fns/startOfToday";
14
14
  import { subDays as v } from "date-fns/subDays";
15
- import { O as n } from "./OnClickEvents-CseHDZ94.mjs";
15
+ import { O as n, f as Y } from "./exportTransactionsToCSV-DgdB3TBt.mjs";
16
16
  import { T as D } from "./TransactionApi-Ck5Ua-7F.mjs";
17
- import { b as Y } from "./Category-CevNQ03n.mjs";
18
- import { a as y, T as b } from "./Transaction-Cn5_iFm0.mjs";
19
- import { f as F } from "./exportTransactionsToCSV-MCYH_zzN.mjs";
17
+ import { b as F } from "./Category-CevNQ03n.mjs";
18
+ import { T as y, a as b } from "./Transaction-C3Pg9TKf.mjs";
20
19
  import { format as W } from "date-fns/format";
21
20
  import { fromUnixTime as $ } from "date-fns/fromUnixTime";
22
- import { f as C, D as I, O as k } from "./DateFormats-BMpMrZpW.mjs";
21
+ import { f as C, D as O, O as k } from "./DateFormats-BMpMrZpW.mjs";
23
22
  import { f as z } from "./NumberFormatting-QCaNwbjv.mjs";
24
23
  import { endOfMonth as X } from "date-fns/endOfMonth";
25
- import { B as h } from "./BeatApi-EFHXULDx.mjs";
24
+ import { B as R } from "./BeatApi-EFHXULDx.mjs";
26
25
  const j = ({
27
26
  checked: l = !1,
28
27
  label: t,
@@ -30,8 +29,8 @@ const j = ({
30
29
  tooltip: s = "",
31
30
  value: A
32
31
  }) => {
33
- const d = U(), e = d.palette.mode === "light" ? d.palette.grey[400] : d.palette.grey[700], c = l ? d.palette.action.active : e;
34
- return /* @__PURE__ */ E(
32
+ const d = B(), e = d.palette.mode === "light" ? d.palette.grey[400] : d.palette.grey[700], c = l ? d.palette.action.active : e;
33
+ return /* @__PURE__ */ I(
35
34
  M,
36
35
  {
37
36
  bgcolor: "background.paper",
@@ -43,10 +42,10 @@ const j = ({
43
42
  pr: 8,
44
43
  py: 4,
45
44
  sx: { "&:hover": { borderColor: d.palette.action.active }, ...a },
46
- children: /* @__PURE__ */ E(B, { title: s, children: /* @__PURE__ */ E(
45
+ children: /* @__PURE__ */ I(U, { title: s, children: /* @__PURE__ */ I(
47
46
  H,
48
47
  {
49
- control: /* @__PURE__ */ E(
48
+ control: /* @__PURE__ */ I(
50
49
  P,
51
50
  {
52
51
  disableRipple: !0,
@@ -61,7 +60,7 @@ const j = ({
61
60
  ) })
62
61
  }
63
62
  );
64
- }, yt = j, G = {
63
+ }, mt = j, G = {
65
64
  ASC: "ASC",
66
65
  DESC: "DESC",
67
66
  DIRECTION: {
@@ -110,7 +109,7 @@ const j = ({
110
109
  TRANSACTION: "Transaction",
111
110
  TRANSACTIONS_LIST: "Transactions List",
112
111
  UNHIDE_TRANSACTION: "Unhide Transaction"
113
- }, R = {
112
+ }, p = {
114
113
  // splits
115
114
  [n.ON_TRANSACTION_SPLIT_CLICK]: {
116
115
  action: o.SELECT,
@@ -324,7 +323,7 @@ const j = ({
324
323
  category: T.TRANSACTIONS_WIDGET,
325
324
  label: r.DELETE_TRANSACTION
326
325
  }
327
- }, Z = async (l, t) => !t || !R[l] ? null : t.sendAnalyticEvent(R[l]), L = {
326
+ }, Z = async (l, t) => !t || !p[l] ? null : t.sendAnalyticEvent(p[l]), L = {
328
327
  FLAG: "flag",
329
328
  DATE: "date",
330
329
  PAYEE: "payee",
@@ -353,7 +352,7 @@ const j = ({
353
352
  accountIsClosed: i?.is_closed,
354
353
  accountIsHidden: i?.is_hidden,
355
354
  category: S?.name || "Uncategorized",
356
- isIncome: c.top_level_category_guid === Y.INCOME,
355
+ isIncome: c.top_level_category_guid === F.INCOME,
357
356
  isPending: c.feed_status === y.PENDING,
358
357
  number: i?.account_number || "",
359
358
  payee: c.description,
@@ -369,12 +368,12 @@ const j = ({
369
368
  }, tt = (l, t, a) => {
370
369
  const {
371
370
  accounts: s = [],
372
- dateRange: A = { start: u(m()), end: f() },
371
+ dateRange: A = { start: u(m()), end: h() },
373
372
  custom: d = () => !0,
374
373
  searchTerm: e = "",
375
374
  showSplits: c = !1
376
375
  } = l;
377
- return a.filter((i) => c ? !i.has_been_split : !i.parent_guid).filter((i) => !!s.find((S) => S === i.account_guid)).filter((i) => i.date >= O(A.start) && i.date <= O(A.end)).filter(d).filter((i) => {
376
+ return a.filter((i) => c ? !i.has_been_split : !i.parent_guid).filter((i) => !!s.find((S) => S === i.account_guid)).filter((i) => i.date >= E(A.start) && i.date <= E(A.end)).filter(d).filter((i) => {
378
377
  if (e === J && i.has_been_split)
379
378
  return !1;
380
379
  if (/^spl/i.test(e) && (i.has_been_split || i.parent_guid))
@@ -382,7 +381,7 @@ const j = ({
382
381
  const N = i.tags.some(
383
382
  (w) => _(e, t.find((x) => x.guid === w)?.name)
384
383
  ), g = $(i.date);
385
- return _(e, i.payee) || _(e, i.feed_description) || _(e, i.category) || _(e, C(g, I.MONTH)) || _(e, C(g, I.DAY)) || _(e, C(g, I.FULL_MONTH_DAY)) || _(e, C(g, I.MONTH_DAY_YEAR)) || _(e, W(g, k)) || _(e, i.account) || _(e, z(i.amount, "0,0.00")) || _(e, i.memo) || N;
384
+ return _(e, i.payee) || _(e, i.feed_description) || _(e, i.category) || _(e, C(g, O.MONTH)) || _(e, C(g, O.DAY)) || _(e, C(g, O.FULL_MONTH_DAY)) || _(e, C(g, O.MONTH_DAY_YEAR)) || _(e, W(g, k)) || _(e, i.account) || _(e, z(i.amount, "0,0.00")) || _(e, i.memo) || N;
386
385
  });
387
386
  }, at = (l, t, a) => [...l].sort((s, A) => {
388
387
  const d = t, e = (s[d] || "") > (A[d] || "");
@@ -433,7 +432,7 @@ class st {
433
432
  isAmountValid = !1;
434
433
  showInsights = !1;
435
434
  constructor() {
436
- p(this);
435
+ f(this);
437
436
  }
438
437
  setDateRange = (t, a) => {
439
438
  this.beginDate = t, this.endDate = a;
@@ -459,11 +458,11 @@ class st {
459
458
  this.manualTransaction = t;
460
459
  };
461
460
  }
462
- class bt {
461
+ class yt {
463
462
  globalStore;
464
463
  uiStore;
465
464
  api = new D("/", "");
466
- beatApi = new h("/", "");
465
+ beatApi = new R("/", "");
467
466
  associatedBeats = [];
468
467
  associatedBeatsLoaded = !1;
469
468
  associatedBeatsLoading = !1;
@@ -490,7 +489,7 @@ class bt {
490
489
  t.endpoint,
491
490
  t.sessionToken,
492
491
  t.onError
493
- ), this.beatApi = new h(t.endpoint, t.sessionToken, t.onError), p(this);
492
+ ), this.beatApi = new R(t.endpoint, t.sessionToken, t.onError), f(this);
494
493
  }
495
494
  loadTransactionData = async () => {
496
495
  this.globalStore.accountStore.isAccountDataLoaded || await this.globalStore.accountStore.loadAccountData(), this.globalStore.categoryStore.categoriesLoaded || await this.globalStore.categoryStore.loadCategories(), await Promise.all([
@@ -524,7 +523,7 @@ class bt {
524
523
  );
525
524
  }
526
525
  get sortedTransactionsWithSplits() {
527
- return F(this.sortedTransactions, this.detailedTransactions);
526
+ return Y(this.sortedTransactions, this.detailedTransactions);
528
527
  }
529
528
  setAssociatedBeats = (t) => {
530
529
  this.associatedBeats = t, this.associatedBeatsLoading = !1, this.associatedBeatsLoaded = !0;
@@ -616,8 +615,8 @@ class bt {
616
615
  this.setIsLoading(!0), this.transactionsLoading = !0, this.transactions = [];
617
616
  try {
618
617
  const a = await this.api.getTransactionsByDateRange(
619
- O(t),
620
- O(f())
618
+ E(t),
619
+ E(h())
621
620
  );
622
621
  this.setTransactions(a);
623
622
  } catch (a) {
@@ -704,9 +703,21 @@ class bt {
704
703
  ...this.transactions.slice(s + 1)
705
704
  ]);
706
705
  };
706
+ // This is used for loading the transactions list on demand, on clicking the different transactions of the insightful beats.
707
+ loadEmbeddedInstanceTransactions = async (t) => {
708
+ try {
709
+ const a = await this.api.getTransactionsByDateRange(
710
+ E(t),
711
+ E(h())
712
+ );
713
+ this.cachedStartDate = t, this.transactions = a;
714
+ } catch (a) {
715
+ console.error(`Error occurred while loading embedded instance transactions: ${a}`);
716
+ }
717
+ };
707
718
  }
708
719
  export {
709
720
  et as D,
710
- yt as S,
711
- bt as T
721
+ mt as S,
722
+ yt as T
712
723
  };