@mx-cartographer/experiences 9.4.58 → 9.4.60

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 (117) hide show
  1. package/CHANGELOG.md +42 -1
  2. package/dist/core/api/BeatApi.d.ts +6 -0
  3. package/dist/core/api/BeatApi.es.js +1 -1
  4. package/dist/core/api/BeatApi.es.js.map +1 -1
  5. package/dist/core/api/UserApi.d.ts +2 -1
  6. package/dist/core/api/UserApi.es.js +6 -5
  7. package/dist/core/api/UserApi.es.js.map +1 -1
  8. package/dist/core/constants/ApiEndpoints.d.ts +1 -0
  9. package/dist/core/constants/ApiEndpoints.es.js +1 -0
  10. package/dist/core/constants/ApiEndpoints.es.js.map +1 -1
  11. package/dist/core/stores/AccountStore.d.ts +2 -1
  12. package/dist/core/stores/AccountStore.es.js +16 -16
  13. package/dist/core/stores/AccountStore.es.js.map +1 -1
  14. package/dist/core/stores/BeatStore.d.ts +6 -0
  15. package/dist/core/stores/BeatStore.es.js +30 -17
  16. package/dist/core/stores/BeatStore.es.js.map +1 -1
  17. package/dist/core/stores/BudgetsStore.d.ts +2 -1
  18. package/dist/core/stores/BudgetsStore.es.js +8 -8
  19. package/dist/core/stores/BudgetsStore.es.js.map +1 -1
  20. package/dist/core/stores/CategoryStore.d.ts +7 -0
  21. package/dist/core/stores/CategoryStore.es.js +18 -7
  22. package/dist/core/stores/CategoryStore.es.js.map +1 -1
  23. package/dist/core/stores/InsightsV2Store.es.js.map +1 -1
  24. package/dist/core/stores/SettingsStore.d.ts +2 -1
  25. package/dist/core/stores/SettingsStore.es.js +11 -11
  26. package/dist/core/stores/SettingsStore.es.js.map +1 -1
  27. package/dist/core/stores/TransactionStore.d.ts +4 -2
  28. package/dist/core/stores/TransactionStore.es.js +6 -6
  29. package/dist/core/stores/TransactionStore.es.js.map +1 -1
  30. package/dist/core/stores/UserStore.d.ts +15 -1
  31. package/dist/core/stores/UserStore.es.js +21 -3
  32. package/dist/core/stores/UserStore.es.js.map +1 -1
  33. package/dist/core/types/Beat.d.ts +6 -0
  34. package/dist/core/types/Beat.es.js.map +1 -1
  35. package/dist/core/types/Insights.d.ts +127 -5
  36. package/dist/core/types/InsightsInstanceSlotData.d.ts +1 -13
  37. package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
  38. package/dist/core/types/RepeatingTransaction.d.ts +2 -0
  39. package/dist/core/types/RepeatingTransaction.es.js.map +1 -1
  40. package/dist/core/types/User.d.ts +11 -0
  41. package/dist/core/types/index.d.ts +2 -3
  42. package/dist/insights-v2/actionBlocks/ContactSupportActionBlock.d.ts +31 -0
  43. package/dist/insights-v2/actionBlocks/ContactSupportActionBlock.es.js +22 -0
  44. package/dist/insights-v2/actionBlocks/ContactSupportActionBlock.es.js.map +1 -0
  45. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/useTransactionDetailsBlock.d.ts +10 -9
  46. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/useTransactionDetailsBlock.es.js +7 -7
  47. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/useTransactionDetailsBlock.es.js.map +1 -1
  48. package/dist/insights-v2/beatActions.d.ts +7 -0
  49. package/dist/insights-v2/beatActions.es.js.map +1 -1
  50. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +8 -8
  51. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.d.ts +30 -3
  52. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +67 -24
  53. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
  54. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/index.d.ts +1 -1
  55. package/dist/insights-v2/components/BadgedTile.d.ts +22 -0
  56. package/dist/insights-v2/components/BadgedTile.es.js +46 -0
  57. package/dist/insights-v2/components/BadgedTile.es.js.map +1 -0
  58. package/dist/insights-v2/components/BaseLayout.es.js +113 -92
  59. package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
  60. package/dist/insights-v2/components/CompactInsightCard.d.ts +31 -0
  61. package/dist/insights-v2/components/CompactInsightCard.es.js +129 -0
  62. package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -0
  63. package/dist/insights-v2/components/Footer.d.ts +1 -4
  64. package/dist/insights-v2/components/Footer.es.js +30 -21
  65. package/dist/insights-v2/components/Footer.es.js.map +1 -1
  66. package/dist/insights-v2/components/Header.es.js +10 -10
  67. package/dist/insights-v2/components/Header.es.js.map +1 -1
  68. package/dist/insights-v2/components/InsightErrorCard.d.ts +19 -0
  69. package/dist/insights-v2/components/InsightErrorCard.es.js +45 -0
  70. package/dist/insights-v2/components/InsightErrorCard.es.js.map +1 -0
  71. package/dist/insights-v2/components/InsightTransactionRow.es.js +19 -15
  72. package/dist/insights-v2/components/InsightTransactionRow.es.js.map +1 -1
  73. package/dist/insights-v2/components/LogoFromGuid.d.ts +26 -0
  74. package/dist/insights-v2/components/LogoFromGuid.es.js +48 -0
  75. package/dist/insights-v2/components/LogoFromGuid.es.js.map +1 -0
  76. package/dist/insights-v2/components/StatusBadge.d.ts +16 -0
  77. package/dist/insights-v2/components/StatusBadge.es.js +29 -0
  78. package/dist/insights-v2/components/StatusBadge.es.js.map +1 -0
  79. package/dist/insights-v2/components/StatusPill.d.ts +11 -2
  80. package/dist/insights-v2/components/StatusPill.es.js +25 -13
  81. package/dist/insights-v2/components/StatusPill.es.js.map +1 -1
  82. package/dist/insights-v2/components/SubHeader.es.js +7 -5
  83. package/dist/insights-v2/components/SubHeader.es.js.map +1 -1
  84. package/dist/insights-v2/components/TransactionListCard.es.js +11 -11
  85. package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
  86. package/dist/insights-v2/components/shared/EntityLogo.d.ts +26 -0
  87. package/dist/insights-v2/components/shared/EntityLogo.es.js +33 -0
  88. package/dist/insights-v2/components/shared/EntityLogo.es.js.map +1 -0
  89. package/dist/insights-v2/index.d.ts +6 -0
  90. package/dist/insights-v2/index.es.js +95 -81
  91. package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
  92. package/dist/insights-v2/mappings/actionBlocksKey.es.js +2 -1
  93. package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
  94. package/dist/insights-v2/mappings/blocks.es.js +50 -44
  95. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  96. package/dist/insights-v2/resolveInsightRender.d.ts +30 -0
  97. package/dist/insights-v2/resolveInsightRender.es.js +10 -0
  98. package/dist/insights-v2/resolveInsightRender.es.js.map +1 -0
  99. package/dist/microinsights/cards/InsightCard.es.js +83 -39
  100. package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
  101. package/dist/microinsights/carousel/BeatList.es.js +24 -24
  102. package/dist/microinsights/carousel/BeatList.es.js.map +1 -1
  103. package/dist/notifications/components/NotificationBadge.es.js +12 -10
  104. package/dist/notifications/components/NotificationBadge.es.js.map +1 -1
  105. package/dist/notifications/components/NotificationCard.es.js +27 -18
  106. package/dist/notifications/components/NotificationCard.es.js.map +1 -1
  107. package/dist/transactions/components/shared/TransactionDetails.d.ts +7 -0
  108. package/dist/transactions/components/shared/TransactionDetails.es.js +159 -143
  109. package/dist/transactions/components/shared/TransactionDetails.es.js.map +1 -1
  110. package/dist/transactions/components/shared/TransactionInsightTag.d.ts +26 -0
  111. package/dist/transactions/components/shared/TransactionInsightTag.es.js +53 -0
  112. package/dist/transactions/components/shared/TransactionInsightTag.es.js.map +1 -0
  113. package/dist/transactions/components/shared/transactionlist/TransactionRow.es.js +30 -39
  114. package/dist/transactions/components/shared/transactionlist/TransactionRow.es.js.map +1 -1
  115. package/dist/transactions/components/shared/transactiontable/cells/AmountCell.es.js +15 -15
  116. package/dist/transactions/components/shared/transactiontable/cells/AmountCell.es.js.map +1 -1
  117. package/package.json +1 -1
@@ -0,0 +1,53 @@
1
+ import { postInsightOnTransaction as c } from "../../../common/utils/PostMessage.es.js";
2
+ import p from "../../../insights-v2/components/StatusPill.es.js";
3
+ import { resolveInsightRender as g } from "../../../insights-v2/resolveInsightRender.es.js";
4
+ import { Text as u } from "@mxenabled/mxui";
5
+ import { Lightbulb as d } from "@mxenabled/mx-icons";
6
+ import { jsx as i } from "react/jsx-runtime";
7
+ var o = {
8
+ bgcolor: "primary.lighter",
9
+ borderColor: "primary.lighter",
10
+ textColor: "primary.darker"
11
+ }, v = ({ beat: r, legacyBold: e = !0, legacyColor: a = "action.active", legacyTruncate: s = !0 }) => {
12
+ const l = g(r), n = (t) => {
13
+ t.stopPropagation(), t.preventDefault(), c(r.guid);
14
+ };
15
+ if (l === "error") return null;
16
+ if (l === "v2") {
17
+ const t = r.insights_payload?.pill?.text;
18
+ return t ? /* @__PURE__ */ i(p, {
19
+ bgcolor: o.bgcolor,
20
+ borderColor: o.borderColor,
21
+ "data-testid": "transaction-insight-pill",
22
+ icon: /* @__PURE__ */ i(d, {
23
+ size: 12,
24
+ sx: { color: o.textColor }
25
+ }),
26
+ label: t,
27
+ labelColor: o.textColor,
28
+ labelVariant: "caption",
29
+ onClick: n,
30
+ sx: {
31
+ cursor: "pointer",
32
+ gap: 4,
33
+ minHeight: 18,
34
+ px: 8,
35
+ py: 1
36
+ }
37
+ }) : null;
38
+ }
39
+ return r.short_title ? /* @__PURE__ */ i(u, {
40
+ bold: e,
41
+ color: a,
42
+ "data-testid": "transaction-insight-caption",
43
+ onClick: n,
44
+ truncate: s,
45
+ variant: "caption",
46
+ children: r.short_title
47
+ }) : null;
48
+ };
49
+ export {
50
+ v as default
51
+ };
52
+
53
+ //# sourceMappingURL=TransactionInsightTag.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransactionInsightTag.es.js","names":[],"sources":["../../../../src/transactions/components/shared/TransactionInsightTag.tsx"],"sourcesContent":["import type { SyntheticEvent } from 'react'\n\nimport { Lightbulb } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\n\nimport { postInsightOnTransaction } from '../../../common/utils/PostMessage'\nimport type { Beat } from '../../../core'\n// Leaf imports on purpose: the `insights-v2` barrel pulls in `mappings/blocks`, whose chart blocks\n// reach back into transactions code (see the circular-import note in `actionBlocksKey.ts`).\nimport StatusPill from '../../../insights-v2/components/StatusPill'\nimport { resolveInsightRender } from '../../../insights-v2/resolveInsightRender'\n\n/** Figma 1941:111883 \"Inline Insight\": `primary.lighter` surface, 12px radius, lightbulb + caption. */\nconst PILL_TOKENS = {\n bgcolor: 'primary.lighter',\n borderColor: 'primary.lighter',\n textColor: 'primary.darker',\n} as const\n\nexport interface TransactionInsightTagProps {\n /** The beat matched to the row by `associated_transaction_guid`. */\n beat: Beat\n /** Caption color for the legacy branch (the two surfaces use different tokens). */\n legacyColor?: string\n /** Whether the legacy caption is bold (the list row is, the table cell is). */\n legacyBold?: boolean\n /** Truncate the legacy caption (the list row does; the table cell wraps its own column). */\n legacyTruncate?: boolean\n}\n\n/**\n * The transaction row's insight tag, shared by the list row and the table's amount cell so the two\n * cannot drift (`insights_v2.2.md` §10.1). Three-way branch on the matched beat:\n *\n * - `v2` → `insights_payload.pill.text` drawn as a `StatusPill`; nothing when the envelope has\n * no `pill` (the insight tags no row).\n * - `error` → nothing. A flagged beat with no envelope must never fall back to `short_title`: that\n * caption is filled from the same V2 copy block and would hide the failure.\n * - `legacy` → `short_title` as the plain caption, exactly as before.\n *\n * On tap both branches post `mx/moneyDashboard/insightOnTransaction` with the beat guid, as today.\n * The caller keeps the `showInsights` gate.\n */\nconst TransactionInsightTag = ({\n beat,\n legacyBold = true,\n legacyColor = 'action.active',\n legacyTruncate = true,\n}: TransactionInsightTagProps) => {\n const render = resolveInsightRender(beat)\n\n const handleClick = (event: SyntheticEvent) => {\n event.stopPropagation()\n event.preventDefault()\n postInsightOnTransaction(beat.guid)\n }\n\n if (render === 'error') return null\n\n if (render === 'v2') {\n const text = beat.insights_payload?.pill?.text\n if (!text) return null\n\n return (\n <StatusPill\n bgcolor={PILL_TOKENS.bgcolor}\n borderColor={PILL_TOKENS.borderColor}\n data-testid=\"transaction-insight-pill\"\n icon={<Lightbulb size={12} sx={{ color: PILL_TOKENS.textColor }} />}\n label={text}\n labelColor={PILL_TOKENS.textColor}\n labelVariant=\"caption\"\n onClick={handleClick}\n sx={{ cursor: 'pointer', gap: 4, minHeight: 18, px: 8, py: 1 }}\n />\n )\n }\n\n if (!beat.short_title) return null\n\n return (\n <Text\n bold={legacyBold}\n color={legacyColor}\n data-testid=\"transaction-insight-caption\"\n onClick={handleClick}\n truncate={legacyTruncate}\n variant=\"caption\"\n >\n {beat.short_title}\n </Text>\n )\n}\n\nexport default TransactionInsightTag\n"],"mappings":";;;;;;AAaA,IAAM,IAAc;AAAA,EAClB,SAAS;AAAA,EACT,aAAa;AAAA,EACb,WAAW;AACb,GA0BM,IAAA,CAAyB,EAC7B,MAAA,GACA,YAAA,IAAa,IACb,aAAA,IAAc,iBACd,gBAAA,IAAiB,GAAA,MACe;AAChC,QAAM,IAAS,EAAqB,CAAI,GAElC,IAAA,CAAe,MAA0B;AAC7C,IAAA,EAAM,gBAAgB,GACtB,EAAM,eAAe,GACrB,EAAyB,EAAK,IAAI;AAAA,EACpC;AAEA,MAAI,MAAW,QAAS,QAAO;AAE/B,MAAI,MAAW,MAAM;AACnB,UAAM,IAAO,EAAK,kBAAkB,MAAM;AAC1C,WAAK,IAGH,gBAAA,EAAC,GAAD;AAAA,MACE,SAAS,EAAY;AAAA,MACrB,aAAa,EAAY;AAAA,MACzB,eAAY;AAAA,MACZ,MAAM,gBAAA,EAAC,GAAD;AAAA,QAAW,MAAM;AAAA,QAAI,IAAI,EAAE,OAAO,EAAY,UAAU;AAAA,MAAI,CAAA;AAAA,MAClE,OAAO;AAAA,MACP,YAAY,EAAY;AAAA,MACxB,cAAa;AAAA,MACb,SAAS;AAAA,MACT,IAAI;AAAA,QAAE,QAAQ;AAAA,QAAW,KAAK;AAAA,QAAG,WAAW;AAAA,QAAI,IAAI;AAAA,QAAG,IAAI;AAAA,MAAE;AAAA,IAC9D,CAAA,IAbe;AAAA,EAepB;AAEA,SAAK,EAAK,cAGR,gBAAA,EAAC,GAAD;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,eAAY;AAAA,IACZ,SAAS;AAAA,IACT,UAAU;AAAA,IACV,SAAQ;AAAA,IAEP,UAAA,EAAK;AAAA,EACF,CAAA,IAZsB;AAchC"}
@@ -1,91 +1,82 @@
1
- import { useGlobalCopyStore as I, useTransactionStore as C } from "../../../../common/context/hooks.es.js";
1
+ import { useGlobalCopyStore as C, useTransactionStore as v } from "../../../../common/context/hooks.es.js";
2
2
  import { TransactionType as w } from "../../../../core/types/Transaction.es.js";
3
3
  import { formatCurrency as S } from "../../../../core/utils/NumberFormatting.es.js";
4
- import { isTransferTransaction as k } from "../../../../core/utils/TransactionUtils.es.js";
5
- import { ListItemWrapper as N } from "../../../../common/components/ListItemWrapper.es.js";
4
+ import { isTransferTransaction as N } from "../../../../core/utils/TransactionUtils.es.js";
5
+ import { ListItemWrapper as k } from "../../../../common/components/ListItemWrapper.es.js";
6
6
  import { useTransactionsUiStore as f } from "../../../context/hooks.es.js";
7
7
  import { ON_CLICK_EVENTS as L } from "../../../constants/OnClickEvents.es.js";
8
- import { postInsightOnTransaction as E } from "../../../../common/utils/PostMessage.es.js";
8
+ import E from "../TransactionInsightTag.es.js";
9
9
  import _ from "react";
10
10
  import { observer as R } from "mobx-react-lite";
11
- import d from "@mui/material/Stack";
12
- import { Icon as c, MerchantLogo as j, Text as n } from "@mxenabled/mxui";
13
- import { jsx as t, jsxs as i } from "react/jsx-runtime";
11
+ import n from "@mui/material/Stack";
12
+ import { Icon as a, MerchantLogo as j, Text as d } from "@mxenabled/mxui";
13
+ import { jsx as r, jsxs as t } from "react/jsx-runtime";
14
14
  import { useTheme as M } from "@mui/material/styles";
15
- import O from "@mui/material/ListItemAvatar";
16
- import z from "@mui/material/ListItemText";
17
- var A = ({ transaction: e, onClick: m, component: p }) => {
18
- const g = M().palette.mode === "dark", { associatedBeats: l } = C(), { expandedSplits: h } = f(), { transactions: y } = I(), { showInsights: T } = f(), u = e.transaction_type === w.CREDIT, b = k(e) && !!e.institutionName, a = _.useMemo(() => l.find((r) => r.associated_transaction_guid === e.guid), [l, e]), v = (r, o) => {
15
+ import z from "@mui/material/ListItemAvatar";
16
+ import A from "@mui/material/ListItemText";
17
+ var G = ({ transaction: e, onClick: m, component: c }) => {
18
+ const g = M().palette.mode === "dark", { associatedBeats: p } = v(), { expandedSplits: h } = f(), { transactions: T } = C(), { showInsights: y } = f(), l = e.transaction_type === w.CREDIT, b = N(e) && !!e.institutionName, u = _.useMemo(() => p.find((i) => i.associated_transaction_guid === e.guid), [p, e]), x = (i, o) => {
19
19
  const s = [];
20
- return r.is_flagged && s.push(/* @__PURE__ */ t(c, {
20
+ return i.is_flagged && s.push(/* @__PURE__ */ r(a, {
21
21
  fill: !0,
22
22
  name: "flag",
23
23
  size: 16,
24
24
  sx: { color: o ? "primary.main" : "warning.dark" }
25
- }, "flag")), r.is_hidden && s.push(/* @__PURE__ */ t(c, {
25
+ }, "flag")), i.is_hidden && s.push(/* @__PURE__ */ r(a, {
26
26
  name: "visibility_off",
27
27
  size: 16
28
- }, "hidden")), r.has_been_split && s.push(/* @__PURE__ */ t(c, {
28
+ }, "hidden")), i.has_been_split && s.push(/* @__PURE__ */ r(a, {
29
29
  name: "call_split",
30
30
  size: 16
31
31
  }, "split")), s;
32
- }, x = (r, o) => r.is_hidden ? o.is_excluded : r.has_been_split ? o.split_transaction_category_label : r.category || "";
33
- return /* @__PURE__ */ i(N, {
32
+ }, I = (i, o) => i.is_hidden ? o.is_excluded : i.has_been_split ? o.split_transaction_category_label : i.category || "";
33
+ return /* @__PURE__ */ t(k, {
34
34
  clickEventName: L.ON_TRANSACTION_LIST_ITEM_CLICK,
35
- ...p && { component: p },
35
+ ...c && { component: c },
36
36
  onClick: m ? () => m(e.guid) : void 0,
37
37
  sx: e.is_hidden ? {
38
38
  backgroundColor: "grey.50",
39
39
  color: "text.secondary"
40
40
  } : void 0,
41
- children: [/* @__PURE__ */ t(O, { children: e.parent_guid && h.includes(e.parent_guid) ? /* @__PURE__ */ t(_.Fragment, {}) : /* @__PURE__ */ t(j, {
41
+ children: [/* @__PURE__ */ r(z, { children: e.parent_guid && h.includes(e.parent_guid) ? /* @__PURE__ */ r(_.Fragment, {}) : /* @__PURE__ */ r(j, {
42
42
  categoryGuid: e.top_level_category_guid || "",
43
43
  merchantGuid: e.merchant_guid || ""
44
- }) }), /* @__PURE__ */ t(z, {
44
+ }) }), /* @__PURE__ */ r(A, {
45
45
  disableTypography: !0,
46
- secondary: /* @__PURE__ */ i(d, {
46
+ secondary: /* @__PURE__ */ t(n, {
47
47
  direction: "row",
48
48
  justifyContent: "space-between",
49
- children: [/* @__PURE__ */ i(d, {
49
+ children: [/* @__PURE__ */ t(n, {
50
50
  alignItems: "center",
51
51
  direction: "row",
52
52
  gap: 4,
53
- children: [v(e, g), /* @__PURE__ */ t(n, {
53
+ children: [x(e, g), /* @__PURE__ */ r(d, {
54
54
  truncate: !0,
55
55
  variant: "caption",
56
- children: x(e, y)
56
+ children: I(e, T)
57
57
  })]
58
- }), a && T && /* @__PURE__ */ t(n, {
59
- bold: !0,
60
- color: "action.active",
61
- onClick: (r) => {
62
- r.stopPropagation(), r.preventDefault(), E(a.guid);
63
- },
64
- truncate: !0,
65
- variant: "caption",
66
- children: a.short_title
67
- })]
58
+ }), u && y && /* @__PURE__ */ r(E, { beat: u })]
68
59
  }),
69
- children: /* @__PURE__ */ i(d, {
60
+ children: /* @__PURE__ */ t(n, {
70
61
  direction: "row",
71
62
  justifyContent: "space-between",
72
63
  sx: { gap: 8 },
73
- children: [/* @__PURE__ */ t(n, {
64
+ children: [/* @__PURE__ */ r(d, {
74
65
  bold: !0,
75
66
  truncate: !0,
76
67
  variant: "body1",
77
68
  children: b ? e.institutionName : e.payee || e.description || e.feed_description
78
- }), /* @__PURE__ */ i(n, {
69
+ }), /* @__PURE__ */ t(d, {
79
70
  bold: !0,
80
- color: u ? "success.main" : "text.primary",
71
+ color: l ? "success.main" : "text.primary",
81
72
  sx: { flexShrink: 0 },
82
73
  variant: "body1",
83
- children: [u ? "+" : "", S(e.amount, "0,0.00")]
74
+ children: [l ? "+" : "", S(e.amount, "0,0.00")]
84
75
  })]
85
76
  })
86
77
  })]
87
78
  });
88
- }, $ = R(A);
79
+ }, $ = R(G);
89
80
  export {
90
81
  $ as default
91
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionRow.es.js","names":[],"sources":["../../../../../src/transactions/components/shared/transactionlist/TransactionRow.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport ListItemAvatar from '@mui/material/ListItemAvatar'\nimport ListItemText from '@mui/material/ListItemText'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Icon, MerchantLogo, Text } from '@mxenabled/mxui'\n\nimport { ListItemWrapper, useGlobalCopyStore, useTransactionStore } from '../../../../common'\nimport { Transaction, TransactionType } from '../../../../core'\nimport { isTransferTransaction } from '../../../../core/utils/TransactionUtils'\n\nimport { postInsightOnTransaction } from '../../../../common/utils/PostMessage'\n\nimport { ON_CLICK_EVENTS } from '../../../constants/OnClickEvents'\nimport { useTransactionsUiStore } from '../../../context/hooks'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\ninterface TransactionRowProps {\n component?: React.ElementType\n onClick?: (guid: string) => void\n transaction: Transaction\n}\n\nconst TransactionRow: React.FC<TransactionRowProps> = ({ transaction, onClick, component }) => {\n const theme = useTheme()\n const isDarkMode = theme.palette.mode === 'dark'\n\n const { associatedBeats } = useTransactionStore()\n const { expandedSplits } = useTransactionsUiStore()\n const { transactions: copy } = useGlobalCopyStore()\n const { showInsights } = useTransactionsUiStore()\n\n const isCredit = transaction.transaction_type === TransactionType.CREDIT\n\n const showInstitution = isTransferTransaction(transaction) && Boolean(transaction.institutionName)\n\n const beat = React.useMemo(() => {\n return associatedBeats.find((beat) => beat.associated_transaction_guid === transaction.guid)\n }, [associatedBeats, transaction])\n\n const getTransactionStatusIcons = (\n transaction: Transaction,\n isDarkMode: boolean,\n ): React.ReactNode[] => {\n const icons: React.ReactNode[] = []\n\n if (transaction.is_flagged) {\n icons.push(\n <Icon\n fill={true}\n key=\"flag\"\n name=\"flag\"\n size={16}\n sx={{ color: isDarkMode ? 'primary.main' : 'warning.dark' }}\n />,\n )\n }\n\n if (transaction.is_hidden) {\n icons.push(<Icon key=\"hidden\" name=\"visibility_off\" size={16} />)\n }\n\n if (transaction.has_been_split) {\n icons.push(<Icon key=\"split\" name=\"call_split\" size={16} />)\n }\n\n return icons\n }\n\n const getTransactionCategoryText = (transaction: Transaction, copy: any): string => {\n if (transaction.is_hidden) {\n return copy.is_excluded\n }\n\n if (transaction.has_been_split) {\n return copy.split_transaction_category_label\n }\n\n return transaction.category || ''\n }\n\n return (\n //TODO: implement common/components/ListItemRow.tsx\n <ListItemWrapper\n clickEventName={ON_CLICK_EVENTS.ON_TRANSACTION_LIST_ITEM_CLICK}\n {...(component && { component })}\n onClick={onClick ? () => onClick(transaction.guid) : undefined}\n sx={\n transaction.is_hidden ? { backgroundColor: 'grey.50', color: 'text.secondary' } : undefined\n }\n >\n <ListItemAvatar>\n {transaction.parent_guid && expandedSplits.includes(transaction.parent_guid) ? (\n <React.Fragment />\n ) : (\n <MerchantLogo\n categoryGuid={transaction.top_level_category_guid || ''}\n merchantGuid={transaction.merchant_guid || ''}\n />\n )}\n </ListItemAvatar>\n <ListItemText\n disableTypography={true}\n secondary={\n <Stack direction=\"row\" justifyContent=\"space-between\">\n <Stack alignItems=\"center\" direction=\"row\" gap={4}>\n {getTransactionStatusIcons(transaction, isDarkMode)}\n <Text truncate={true} variant=\"caption\">\n {getTransactionCategoryText(transaction, copy)}\n </Text>\n </Stack>\n {beat && showInsights && (\n <Text\n bold={true}\n color=\"action.active\"\n onClick={(e) => {\n e.stopPropagation()\n e.preventDefault()\n\n postInsightOnTransaction(beat.guid)\n }}\n truncate={true}\n variant=\"caption\"\n >\n {beat.short_title}\n </Text>\n )}\n </Stack>\n }\n >\n <Stack direction=\"row\" justifyContent=\"space-between\" sx={{ gap: 8 }}>\n <Text bold={true} truncate={true} variant=\"body1\">\n {showInstitution\n ? transaction.institutionName\n : transaction.payee || transaction.description || transaction.feed_description}\n </Text>\n <Text\n bold={true}\n color={isCredit ? 'success.main' : 'text.primary'}\n sx={{ flexShrink: 0 }}\n variant=\"body1\"\n >\n {isCredit ? '+' : ''}\n {formatCurrency(transaction.amount, '0,0.00')}\n </Text>\n </Stack>\n </ListItemText>\n </ListItemWrapper>\n )\n}\n\nexport default observer(TransactionRow)\n"],"mappings":"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"}
1
+ {"version":3,"file":"TransactionRow.es.js","names":[],"sources":["../../../../../src/transactions/components/shared/transactionlist/TransactionRow.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport ListItemAvatar from '@mui/material/ListItemAvatar'\nimport ListItemText from '@mui/material/ListItemText'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Icon, MerchantLogo, Text } from '@mxenabled/mxui'\n\nimport { ListItemWrapper, useGlobalCopyStore, useTransactionStore } from '../../../../common'\nimport { Transaction, TransactionType } from '../../../../core'\nimport { isTransferTransaction } from '../../../../core/utils/TransactionUtils'\n\nimport TransactionInsightTag from '../TransactionInsightTag'\n\nimport { ON_CLICK_EVENTS } from '../../../constants/OnClickEvents'\nimport { useTransactionsUiStore } from '../../../context/hooks'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\ninterface TransactionRowProps {\n component?: React.ElementType\n onClick?: (guid: string) => void\n transaction: Transaction\n}\n\nconst TransactionRow: React.FC<TransactionRowProps> = ({ transaction, onClick, component }) => {\n const theme = useTheme()\n const isDarkMode = theme.palette.mode === 'dark'\n\n const { associatedBeats } = useTransactionStore()\n const { expandedSplits } = useTransactionsUiStore()\n const { transactions: copy } = useGlobalCopyStore()\n const { showInsights } = useTransactionsUiStore()\n\n const isCredit = transaction.transaction_type === TransactionType.CREDIT\n\n const showInstitution = isTransferTransaction(transaction) && Boolean(transaction.institutionName)\n\n const beat = React.useMemo(() => {\n return associatedBeats.find((beat) => beat.associated_transaction_guid === transaction.guid)\n }, [associatedBeats, transaction])\n\n const getTransactionStatusIcons = (\n transaction: Transaction,\n isDarkMode: boolean,\n ): React.ReactNode[] => {\n const icons: React.ReactNode[] = []\n\n if (transaction.is_flagged) {\n icons.push(\n <Icon\n fill={true}\n key=\"flag\"\n name=\"flag\"\n size={16}\n sx={{ color: isDarkMode ? 'primary.main' : 'warning.dark' }}\n />,\n )\n }\n\n if (transaction.is_hidden) {\n icons.push(<Icon key=\"hidden\" name=\"visibility_off\" size={16} />)\n }\n\n if (transaction.has_been_split) {\n icons.push(<Icon key=\"split\" name=\"call_split\" size={16} />)\n }\n\n return icons\n }\n\n const getTransactionCategoryText = (transaction: Transaction, copy: any): string => {\n if (transaction.is_hidden) {\n return copy.is_excluded\n }\n\n if (transaction.has_been_split) {\n return copy.split_transaction_category_label\n }\n\n return transaction.category || ''\n }\n\n return (\n //TODO: implement common/components/ListItemRow.tsx\n <ListItemWrapper\n clickEventName={ON_CLICK_EVENTS.ON_TRANSACTION_LIST_ITEM_CLICK}\n {...(component && { component })}\n onClick={onClick ? () => onClick(transaction.guid) : undefined}\n sx={\n transaction.is_hidden ? { backgroundColor: 'grey.50', color: 'text.secondary' } : undefined\n }\n >\n <ListItemAvatar>\n {transaction.parent_guid && expandedSplits.includes(transaction.parent_guid) ? (\n <React.Fragment />\n ) : (\n <MerchantLogo\n categoryGuid={transaction.top_level_category_guid || ''}\n merchantGuid={transaction.merchant_guid || ''}\n />\n )}\n </ListItemAvatar>\n <ListItemText\n disableTypography={true}\n secondary={\n <Stack direction=\"row\" justifyContent=\"space-between\">\n <Stack alignItems=\"center\" direction=\"row\" gap={4}>\n {getTransactionStatusIcons(transaction, isDarkMode)}\n <Text truncate={true} variant=\"caption\">\n {getTransactionCategoryText(transaction, copy)}\n </Text>\n </Stack>\n {beat && showInsights && <TransactionInsightTag beat={beat} />}\n </Stack>\n }\n >\n <Stack direction=\"row\" justifyContent=\"space-between\" sx={{ gap: 8 }}>\n <Text bold={true} truncate={true} variant=\"body1\">\n {showInstitution\n ? transaction.institutionName\n : transaction.payee || transaction.description || transaction.feed_description}\n </Text>\n <Text\n bold={true}\n color={isCredit ? 'success.main' : 'text.primary'}\n sx={{ flexShrink: 0 }}\n variant=\"body1\"\n >\n {isCredit ? '+' : ''}\n {formatCurrency(transaction.amount, '0,0.00')}\n </Text>\n </Stack>\n </ListItemText>\n </ListItemWrapper>\n )\n}\n\nexport default observer(TransactionRow)\n"],"mappings":"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"}
@@ -1,25 +1,25 @@
1
- import { useTransactionStore as d } from "../../../../../common/context/hooks.es.js";
2
- import { TransactionType as l } from "../../../../../core/types/Transaction.es.js";
3
- import { formatCurrency as f } from "../../../../../core/utils/NumberFormatting.es.js";
4
- import { useTransactionsUiStore as p } from "../../../../context/hooks.es.js";
1
+ import { useTransactionStore as m } from "../../../../../common/context/hooks.es.js";
2
+ import { TransactionType as d } from "../../../../../core/types/Transaction.es.js";
3
+ import { formatCurrency as l } from "../../../../../core/utils/NumberFormatting.es.js";
4
+ import { useTransactionsUiStore as f } from "../../../../context/hooks.es.js";
5
+ import p from "../../TransactionInsightTag.es.js";
5
6
  import u from "@mui/material/Stack";
6
- import { Text as i } from "@mxenabled/mxui";
7
- import { jsx as x, jsxs as n } from "react/jsx-runtime";
7
+ import { Text as g } from "@mxenabled/mxui";
8
+ import { jsx as T, jsxs as a } from "react/jsx-runtime";
8
9
  var _ = (t) => {
9
- const { associatedBeats: a } = d(), { showInsights: e } = p(), { amount: s, transaction_type: c } = t.row, r = a.find((m) => m.associated_transaction_guid === t.row.guid), o = c === l.CREDIT;
10
- return /* @__PURE__ */ n(u, {
10
+ const { associatedBeats: n } = m(), { showInsights: i } = f(), { amount: s, transaction_type: e } = t.row, r = n.find((c) => c.associated_transaction_guid === t.row.guid), o = e === d.CREDIT;
11
+ return /* @__PURE__ */ a(u, {
11
12
  alignItems: "flex-end",
12
13
  tabIndex: t.tabIndex,
13
- children: [/* @__PURE__ */ n(i, {
14
+ children: [/* @__PURE__ */ a(g, {
14
15
  bold: o,
15
16
  color: o ? "success.main" : "text.primary",
16
17
  variant: "body2",
17
- children: [o ? "+" : "", f(s, "0,0.00")]
18
- }), r && e && /* @__PURE__ */ x(i, {
19
- bold: !0,
20
- color: "primary.light",
21
- variant: "caption",
22
- children: r.short_title
18
+ children: [o ? "+" : "", l(s, "0,0.00")]
19
+ }), r && i && /* @__PURE__ */ T(p, {
20
+ beat: r,
21
+ legacyColor: "primary.light",
22
+ legacyTruncate: !1
23
23
  })]
24
24
  });
25
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AmountCell.es.js","names":[],"sources":["../../../../../../src/transactions/components/shared/transactiontable/cells/AmountCell.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { GridCellParams } from '@mui/x-data-grid'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { useTransactionStore } from '../../../../../common'\nimport { TransactionType } from '../../../../../core'\n\nimport { useTransactionsUiStore } from '../../../../context/hooks'\nimport { formatCurrency } from '../../../../../core/utils/NumberFormatting'\n\nconst AmountCell = (params: GridCellParams) => {\n const { associatedBeats } = useTransactionStore()\n const { showInsights } = useTransactionsUiStore()\n\n const { amount, transaction_type } = params.row\n const beat = associatedBeats.find((beat) => beat.associated_transaction_guid === params.row.guid)\n\n const isCredit = transaction_type === TransactionType.CREDIT\n\n return (\n <Stack alignItems=\"flex-end\" tabIndex={params.tabIndex}>\n <Text bold={isCredit} color={isCredit ? 'success.main' : 'text.primary'} variant=\"body2\">\n {isCredit ? '+' : ''}\n {formatCurrency(amount, '0,0.00')}\n </Text>\n {beat && showInsights && (\n <Text bold={true} color=\"primary.light\" variant=\"caption\">\n {beat.short_title}\n </Text>\n )}\n </Stack>\n )\n}\n\nexport default AmountCell\n"],"mappings":";;;;;;;AAYA,IAAM,IAAA,CAAc,MAA2B;AAC7C,QAAM,EAAE,iBAAA,EAAA,IAAoB,EAAoB,GAC1C,EAAE,cAAA,EAAA,IAAiB,EAAuB,GAE1C,EAAE,QAAA,GAAQ,kBAAA,EAAA,IAAqB,EAAO,KACtC,IAAO,EAAgB,KAAA,CAAM,MAAS,EAAK,gCAAgC,EAAO,IAAI,IAAI,GAE1F,IAAW,MAAqB,EAAgB;AAEtD,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,YAAW;AAAA,IAAW,UAAU,EAAO;AAAA,IAA9C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAM,MAAM;AAAA,MAAU,OAAO,IAAW,iBAAiB;AAAA,MAAgB,SAAQ;AAAA,MAAjF,UAAA,CACG,IAAW,MAAM,IACjB,EAAe,GAAQ,QAAQ,CAC5B;AAAA,IACL,CAAA,GAAA,KAAQ,KACP,gBAAA,EAAC,GAAD;AAAA,MAAM,MAAM;AAAA,MAAM,OAAM;AAAA,MAAgB,SAAQ;AAAA,MAC7C,UAAA,EAAK;AAAA,IACF,CAAA,CAEH;AAAA;AAEX"}
1
+ {"version":3,"file":"AmountCell.es.js","names":[],"sources":["../../../../../../src/transactions/components/shared/transactiontable/cells/AmountCell.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { GridCellParams } from '@mui/x-data-grid'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { useTransactionStore } from '../../../../../common'\nimport { TransactionType } from '../../../../../core'\n\nimport { useTransactionsUiStore } from '../../../../context/hooks'\nimport { formatCurrency } from '../../../../../core/utils/NumberFormatting'\nimport TransactionInsightTag from '../../TransactionInsightTag'\n\nconst AmountCell = (params: GridCellParams) => {\n const { associatedBeats } = useTransactionStore()\n const { showInsights } = useTransactionsUiStore()\n\n const { amount, transaction_type } = params.row\n const beat = associatedBeats.find((beat) => beat.associated_transaction_guid === params.row.guid)\n\n const isCredit = transaction_type === TransactionType.CREDIT\n\n return (\n <Stack alignItems=\"flex-end\" tabIndex={params.tabIndex}>\n <Text bold={isCredit} color={isCredit ? 'success.main' : 'text.primary'} variant=\"body2\">\n {isCredit ? '+' : ''}\n {formatCurrency(amount, '0,0.00')}\n </Text>\n {beat && showInsights && (\n <TransactionInsightTag beat={beat} legacyColor=\"primary.light\" legacyTruncate={false} />\n )}\n </Stack>\n )\n}\n\nexport default AmountCell\n"],"mappings":";;;;;;;;AAaA,IAAM,IAAA,CAAc,MAA2B;AAC7C,QAAM,EAAE,iBAAA,EAAA,IAAoB,EAAoB,GAC1C,EAAE,cAAA,EAAA,IAAiB,EAAuB,GAE1C,EAAE,QAAA,GAAQ,kBAAA,EAAA,IAAqB,EAAO,KACtC,IAAO,EAAgB,KAAA,CAAM,MAAS,EAAK,gCAAgC,EAAO,IAAI,IAAI,GAE1F,IAAW,MAAqB,EAAgB;AAEtD,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,YAAW;AAAA,IAAW,UAAU,EAAO;AAAA,IAA9C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAM,MAAM;AAAA,MAAU,OAAO,IAAW,iBAAiB;AAAA,MAAgB,SAAQ;AAAA,MAAjF,UAAA,CACG,IAAW,MAAM,IACjB,EAAe,GAAQ,QAAQ,CAC5B;AAAA,IACL,CAAA,GAAA,KAAQ,KACP,gBAAA,EAAC,GAAD;AAAA,MAA6B,MAAA;AAAA,MAAM,aAAY;AAAA,MAAgB,gBAAgB;AAAA,IAAQ,CAAA,CAEpF;AAAA;AAEX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.4.58",
3
+ "version": "9.4.60",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",