@mx-cartographer/experiences 7.2.15-alpha.sms1 → 7.2.15-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.
@@ -22,18 +22,18 @@ import { f as g, D as O, O as $ } from "./Dialog-CWW597AF.mjs";
22
22
  import { endOfMonth as X } from "date-fns/endOfMonth";
23
23
  import { B as f } from "./BeatApi-DhJpgCLz.mjs";
24
24
  const j = ({
25
- checked: S = !1,
25
+ checked: l = !1,
26
26
  label: t,
27
27
  sx: a = {},
28
28
  tooltip: e = "",
29
29
  value: c
30
30
  }) => {
31
- const _ = V(), i = _.palette.mode === "light" ? _.palette.grey[400] : _.palette.grey[700], A = S ? _.palette.action.active : i;
31
+ const _ = V(), i = _.palette.mode === "light" ? _.palette.grey[400] : _.palette.grey[700], A = l ? _.palette.action.active : i;
32
32
  return /* @__PURE__ */ C(
33
33
  P,
34
34
  {
35
35
  bgcolor: "background.paper",
36
- border: `${S ? 3 : 1}px solid`,
36
+ border: `${l ? 3 : 1}px solid`,
37
37
  borderColor: A,
38
38
  borderRadius: 2,
39
39
  mt: -2,
@@ -322,35 +322,35 @@ const j = ({
322
322
  category: o.TRANSACTIONS_WIDGET,
323
323
  label: r.DELETE_TRANSACTION
324
324
  }
325
- }, Z = async (S, t) => !t || !m[S] ? null : t.sendAnalyticEvent(m[S]), L = {
325
+ }, Z = async (l, t) => !t || !m[l] ? null : t.sendAnalyticEvent(m[l]), L = {
326
326
  FLAG: "flag",
327
327
  DATE: "date",
328
328
  PAYEE: "payee",
329
329
  CATEGORY: "category",
330
330
  ACCOUNT: "account",
331
331
  AMOUNT: "amount"
332
- }, q = (S, t, a, e = []) => {
332
+ }, q = (l, t, a, e = []) => {
333
333
  const c = t.reduce((A, s) => ({ ...A, [s.guid]: s }), {}), _ = a.reduce((A, s) => ({ ...A, [s.guid]: s }), {}), i = e.reduce((A, s) => {
334
- const { transaction_guid: l, tag_guid: I } = s;
335
- if (!A[l])
334
+ const { transaction_guid: N, tag_guid: I } = s;
335
+ if (!A[N])
336
336
  return {
337
337
  ...A,
338
- [l]: [I]
338
+ [N]: [I]
339
339
  };
340
- const E = [...A[l], I];
340
+ const E = [...A[N], I];
341
341
  return {
342
342
  ...A,
343
- [l]: E
343
+ [N]: E
344
344
  };
345
345
  }, {});
346
- return S.map((A) => {
347
- const s = c[A.account_guid], l = A.category_guid ? _[A.category_guid] : null, I = i[A.guid] ?? [];
346
+ return l.map((A) => {
347
+ const s = c[A.account_guid], N = A.category_guid ? _[A.category_guid] : null, I = i[A.guid] ?? [];
348
348
  return {
349
349
  ...A,
350
350
  account: s?.user_name || "Unknown",
351
351
  accountIsClosed: s?.is_closed,
352
352
  accountIsHidden: s?.is_hidden,
353
- category: l?.name || "Uncategorized",
353
+ category: N?.name || "Uncategorized",
354
354
  isIncome: A.top_level_category_guid === W.INCOME,
355
355
  isPending: A.feed_status === G.PENDING,
356
356
  number: s?.account_number || "",
@@ -358,36 +358,36 @@ const j = ({
358
358
  tags: I
359
359
  };
360
360
  });
361
- }, J = "uncategorized", Q = (S, t, a, e, c, _) => {
362
- const i = tt(S, c, _), A = at(i, a, e);
361
+ }, J = "uncategorized", Q = (l, t, a, e, c, _) => {
362
+ const i = tt(l, c, _), A = at(i, a, e);
363
363
  return t.forEach((s) => {
364
- const l = A.findIndex((E) => E.guid === s), I = _.filter((E) => E.parent_guid === s);
365
- A.splice(l + 1, 0, ...I);
364
+ const N = A.findIndex((E) => E.guid === s), I = _.filter((E) => E.parent_guid === s);
365
+ A.splice(N + 1, 0, ...I);
366
366
  }), A;
367
- }, tt = (S, t, a) => {
367
+ }, tt = (l, t, a) => {
368
368
  const {
369
369
  accounts: e = [],
370
370
  dateRange: c = { start: R(b()), end: D() },
371
371
  custom: _ = () => !0,
372
372
  searchTerm: i = "",
373
373
  showSplits: A = !1
374
- } = S;
375
- return a.filter((s) => A ? !s.has_been_split : !s.parent_guid).filter((s) => !!e.find((l) => l === s.account_guid)).filter((s) => s.date >= u(c.start) && s.date <= u(c.end)).filter(_).filter((s) => {
374
+ } = l;
375
+ return a.filter((s) => A ? !s.has_been_split : !s.parent_guid).filter((s) => !!e.find((N) => N === s.account_guid)).filter((s) => s.date >= u(c.start) && s.date <= u(c.end)).filter(_).filter((s) => {
376
376
  if (i === J && s.has_been_split)
377
377
  return !1;
378
378
  if (/^spl/i.test(i) && (s.has_been_split || s.parent_guid))
379
379
  return !0;
380
380
  const I = s.tags.some(
381
- (M) => N(i, t.find((H) => H.guid === M)?.name)
381
+ (M) => S(i, t.find((H) => H.guid === M)?.name)
382
382
  ), E = h(s.date);
383
- return N(i, s.payee) || N(i, s.feed_description) || N(i, s.category) || N(i, g(E, O.MONTH)) || N(i, g(E, O.DAY)) || N(i, g(E, O.FULL_MONTH_DAY)) || N(i, g(E, O.MONTH_DAY_YEAR)) || N(i, k(E, $)) || N(i, s.account) || N(i, `${s.amount}`) || N(i, s.memo) || I;
383
+ return S(i, s.payee) || S(i, s.feed_description) || S(i, s.category) || S(i, g(E, O.MONTH)) || S(i, g(E, O.DAY)) || S(i, g(E, O.FULL_MONTH_DAY)) || S(i, g(E, O.MONTH_DAY_YEAR)) || S(i, k(E, $)) || S(i, s.account) || S(i, `${s.amount}`) || S(i, s.memo) || I;
384
384
  });
385
- }, at = (S, t, a) => [...S].sort((e, c) => {
385
+ }, at = (l, t, a) => [...l].sort((e, c) => {
386
386
  const _ = t, i = (e[_] || "") > (c[_] || "");
387
387
  let A = i ? -1 : 1, s = i ? 1 : -1;
388
388
  return (t === L.DATE || t === L.AMOUNT) && (A = i ? 1 : -1, s = i ? -1 : 1), a === x.ASC ? A : s;
389
- }), N = (S, t) => {
390
- const a = S.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
389
+ }), S = (l, t) => {
390
+ const a = l.toLowerCase().split(" "), e = t?.toString().toLowerCase() ?? "";
391
391
  return a.every((c) => e.indexOf(c) > -1);
392
392
  }, et = {
393
393
  account_guid: "",
@@ -661,13 +661,13 @@ class mt {
661
661
  };
662
662
  updateTransaction = async (t) => {
663
663
  const a = await this.api.updateTransaction(t), e = this.transactions.findIndex((c) => c.guid === t.guid);
664
- e >= 0 && d(
664
+ console.log("updateTransaction ran 1", e), e >= 0 && (console.log("updateTransaction ran 2", e), d(
665
665
  () => this.rawTransactions = [
666
666
  ...this.transactions.slice(0, e),
667
667
  a,
668
668
  ...this.transactions.slice(e + 1)
669
669
  ]
670
- );
670
+ ));
671
671
  };
672
672
  }
673
673
  export {
@@ -18,8 +18,8 @@ import { C as Ys } from "../CurrencyInput-DUsQbkXb.mjs";
18
18
  import { L as zs } from "../Loader-DUaFpDGv.mjs";
19
19
  import { R as js } from "../ResponsiveButton-DZFp78fJ.mjs";
20
20
  import { S as Vs } from "../SearchBox-B2_zLv8-.mjs";
21
- import { T as at } from "../TransactionStore-DxPLdF3B.mjs";
22
- import { S as Js } from "../TransactionStore-DxPLdF3B.mjs";
21
+ import { T as at } from "../TransactionStore-Cd9GapAi.mjs";
22
+ import { S as Js } from "../TransactionStore-Cd9GapAi.mjs";
23
23
  import { T as er } from "../TabContentContainer-j01JYR_7.mjs";
24
24
  import { I as rr } from "../IconBacking-B9oC6uL2.mjs";
25
25
  import { D as ar, F as nr, a as ir, c as cr, R as dr, S as lr } from "../RecurringTransactions-ej39mgA6.mjs";
@@ -3,8 +3,8 @@ import { u as P, C as Pe, D as $e, M as Ve, c as We, T as Ge, a as Ue } from "..
3
3
  import { B as xa, d as wa, b as Ia } from "../TransactionDetails-BqCr2FTh.mjs";
4
4
  import { T as M } from "../User-BQUxBeZV.mjs";
5
5
  import { O as Da } from "../User-BQUxBeZV.mjs";
6
- import { S as ae, D as Fe } from "../TransactionStore-DxPLdF3B.mjs";
7
- import { T as Ea } from "../TransactionStore-DxPLdF3B.mjs";
6
+ import { S as ae, D as Fe } from "../TransactionStore-Cd9GapAi.mjs";
7
+ import { T as Ea } from "../TransactionStore-Cd9GapAi.mjs";
8
8
  import { e as ze } from "../exportTransactionsToCSV-7bVS7KXf.mjs";
9
9
  import { E as Ma } from "../ExportCsvAction-sX8Rg4Ov.mjs";
10
10
  import { jsxs as _, jsx as e } from "react/jsx-runtime";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.15-alpha.sms1",
3
+ "version": "7.2.15-alpha.sms2",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",