@mx-cartographer/experiences 9.7.157 → 9.7.158

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 CHANGED
@@ -1,6 +1,12 @@
1
+ ## [9.7.158] - 11-16-2026
2
+
3
+ - **CHANGED** - Debt Payment Reminder card labels come only from the backend (WEC-2312)
4
+ - **CHANGED** - Debt Payment Reminder QA page moves to Debt Payment Reminder V4 (WEC-2312)
5
+
1
6
  ## [9.7.157] - 11-13-2026
2
7
 
3
- - Credit Utilization drawer matches the Figma drill-down (WEC-2318)
8
+ - **CHANGED** - Credit Utilization drawer matches the Figma drill-down with short definitions, a marker on the utilization bands, a tip and a card per credit card that opens Account Details (WEC-2318)
9
+ - **CHANGED** - CreditUtilizationCopy adds six optional keys for the new wording and removes total_credit_utilized, total_credit_utilized_aria, credit_utilized and credit_utilization_ratio (WEC-2318)
4
10
 
5
11
  ## [9.7.156] - 11-13-2026
6
12
 
@@ -3,7 +3,23 @@ interface DebtsBlockProps {
3
3
  payload: InsightsPayload;
4
4
  beatGuid?: string;
5
5
  }
6
- declare const _default: (({ payload }: DebtsBlockProps) => import("react/jsx-runtime").JSX.Element | null) & {
7
- displayName: string;
8
- };
9
- export default _default;
6
+ /**
7
+ * Debts component block: the Debt Payment Reminder card (Figma 1943:219556). One bordered card:
8
+ *
9
+ * - the upcoming payment, from `data.series[0]`: `logo`, `primary_text` (payment name),
10
+ * `secondary_text` (account name) and `amount` (the payment);
11
+ * - "Payment Due On" with `data.due_date` (ISO day, shown as "September 15");
12
+ * - "Minimum Payment" with `data.minimum_payment`, only when ditto sends one (Figma "Has Minimum
13
+ * Payment"; "No Minimum Payment" omits the line);
14
+ * - the account balance, `data.amount`.
15
+ *
16
+ * The last line drawn sits on the grey surface: the balance on full, the due date on mini (whose
17
+ * Figma draws the due date alone).
18
+ *
19
+ * Every caption comes from the backend, in the beat's own slots (`due_date_label`, `minimum_payment_label`,
20
+ * `amount_label`); there is no frontend fallback. A line whose label or value is missing or invalid is left out
21
+ * rather than drawn unlabelled or blank; a missing label for a line that has a value also warns once, naming the
22
+ * slot. With no payment row there is no card.
23
+ */
24
+ declare const DebtsBlock: ({ payload }: DebtsBlockProps) => import("react/jsx-runtime").JSX.Element | null;
25
+ export default DebtsBlock;
@@ -1,30 +1,28 @@
1
- import { DATE_FORMATS_INTL as R, formatDate as k } from "../../../../core/constants/DateFormats.es.js";
2
- import { useGlobalCopyStore as w } from "../../../../common/context/hooks.es.js";
3
- import { slot as s } from "../../../../core/types/Insights.es.js";
4
- import { CURRENCY_FORMAT as b, formatCurrency as f } from "../../../../core/utils/NumberFormatting.es.js";
5
- import { asLogoRef as A, asNonEmptyText as C, asNumber as _, asText as L } from "../../slotReaders.es.js";
6
- import F from "../../../components/LogoFromGuid.es.js";
7
- import O from "../../../components/InsightTransactionRow.es.js";
8
- import { parseDueDate as j } from "../RepeatingTransactionBlock/weekStrip.es.js";
9
- import { useEffect as E } from "react";
10
- import { observer as I } from "mobx-react-lite";
1
+ import { DATE_FORMATS_INTL as R, formatDate as w } from "../../../../core/constants/DateFormats.es.js";
2
+ import { slot as a } from "../../../../core/types/Insights.es.js";
3
+ import { CURRENCY_FORMAT as f, formatCurrency as _ } from "../../../../core/utils/NumberFormatting.es.js";
4
+ import { asLogoRef as k, asNonEmptyText as u, asNumber as v, asText as T } from "../../slotReaders.es.js";
5
+ import A from "../../../components/LogoFromGuid.es.js";
6
+ import F from "../../../components/InsightTransactionRow.es.js";
7
+ import { parseDueDate as O } from "../RepeatingTransactionBlock/weekStrip.es.js";
8
+ import { useEffect as j } from "react";
11
9
  import y from "@mui/material/Stack";
12
- import { Text as D } from "@mxenabled/mxui";
13
- import { Fragment as N, jsx as a, jsxs as v } from "react/jsx-runtime";
14
- import S from "@mui/material/Divider";
15
- var B = 32, G = (r) => {
10
+ import { Text as L } from "@mxenabled/mxui";
11
+ import { Fragment as C, jsx as n, jsxs as g } from "react/jsx-runtime";
12
+ import E from "@mui/material/Divider";
13
+ var I = 32, N = (r) => {
16
14
  if (Array.isArray(r))
17
- for (const o of r) {
18
- if (typeof o != "object" || o === null) continue;
19
- const { amount: t, logo: l, primary_text: i, secondary_text: n } = o, e = C(i);
20
- if (e) return {
21
- name: e,
22
- account: L(n),
23
- amount: _(t),
24
- logo: A(l)
15
+ for (const e of r) {
16
+ if (typeof e != "object" || e === null) continue;
17
+ const { amount: t, logo: l, primary_text: i, secondary_text: o } = e, m = u(i);
18
+ if (m) return {
19
+ name: m,
20
+ account: T(o),
21
+ amount: v(t),
22
+ logo: k(l)
25
23
  };
26
24
  }
27
- }, M = ({ grey: r, label: o, value: t }) => /* @__PURE__ */ v(N, { children: [/* @__PURE__ */ a(S, {}), /* @__PURE__ */ v(y, {
25
+ }, S = ({ grey: r, label: e, value: t }) => /* @__PURE__ */ g(C, { children: [/* @__PURE__ */ n(E, {}), /* @__PURE__ */ g(y, {
28
26
  sx: {
29
27
  alignItems: "center",
30
28
  bgcolor: r ? "background.default" : "background.paper",
@@ -34,42 +32,42 @@ var B = 32, G = (r) => {
34
32
  px: 16,
35
33
  py: 2
36
34
  },
37
- children: [/* @__PURE__ */ a(D, {
35
+ children: [/* @__PURE__ */ n(L, {
38
36
  color: "text.primary",
39
37
  variant: "subtitle2",
40
- children: o
41
- }), /* @__PURE__ */ a(D, {
38
+ children: e
39
+ }), /* @__PURE__ */ n(L, {
42
40
  bold: !0,
43
41
  color: "text.primary",
44
42
  variant: "caption",
45
43
  children: t
46
44
  })]
47
- })] }), H = ({ payload: r }) => {
48
- const o = w().insights_feed?.debts_block, t = o?.payment_due_label, l = o?.minimum_payment_label, i = o?.balance_label, n = r.instance_slot?.data, e = G(s(n, "series")), g = L(s(n, "due_date")), c = g ? j(g) : null, u = _(s(n, "minimum_payment")), d = _(s(n, "amount")), x = e !== void 0, p = [
49
- c && !t && "payment_due_label",
50
- u !== void 0 && !l && "minimum_payment_label",
51
- d !== void 0 && !i && "balance_label"
45
+ })] }), q = ({ payload: r }) => {
46
+ const e = r.instance_slot?.data, t = u(a(e, "due_date_label")), l = u(a(e, "minimum_payment_label")), i = u(a(e, "amount_label")), o = N(a(e, "series")), m = T(a(e, "due_date")), c = m ? O(m) : null, d = v(a(e, "minimum_payment")), p = v(a(e, "amount")), x = o !== void 0, b = [
47
+ c && !t && "due_date_label",
48
+ d !== void 0 && !l && "minimum_payment_label",
49
+ p !== void 0 && !i && "amount_label"
52
50
  ].filter(Boolean).join(", ");
53
- if (E(() => {
54
- x && p && console.warn(`debts_block: copy missing ${p}; hiding those lines`);
55
- }, [x, p]), !e) return null;
51
+ if (j(() => {
52
+ x && b && console.warn(`debts_block: backend sent no ${b}; hiding those lines`);
53
+ }, [x, b]), !o) return null;
56
54
  const h = [
57
55
  t && c ? {
58
56
  label: t,
59
- value: k(c, R.FULL_MONTH_DAY)
57
+ value: w(c, R.FULL_MONTH_DAY)
60
58
  } : null,
61
- l && u !== void 0 ? {
59
+ l && d !== void 0 ? {
62
60
  label: l,
63
- value: f(u, b.cents)
61
+ value: _(d, f.cents)
64
62
  } : null,
65
- i && d !== void 0 ? {
63
+ i && p !== void 0 ? {
66
64
  label: i,
67
- value: f(d, b.cents)
65
+ value: _(p, f.cents)
68
66
  } : null
69
- ].filter((m) => m !== null);
70
- return /* @__PURE__ */ a(y, {
67
+ ].filter((s) => s !== null);
68
+ return /* @__PURE__ */ n(y, {
71
69
  sx: { px: 16 },
72
- children: /* @__PURE__ */ v(y, {
70
+ children: /* @__PURE__ */ g(y, {
73
71
  sx: {
74
72
  border: "1px solid",
75
73
  borderColor: "divider",
@@ -77,24 +75,24 @@ var B = 32, G = (r) => {
77
75
  overflow: "hidden",
78
76
  width: "100%"
79
77
  },
80
- children: [/* @__PURE__ */ a(O, {
81
- amount: e.amount === void 0 ? "" : f(e.amount, b.cents),
82
- leading: /* @__PURE__ */ a(F, {
83
- logo: e.logo,
84
- size: B
78
+ children: [/* @__PURE__ */ n(F, {
79
+ amount: o.amount === void 0 ? "" : _(o.amount, f.cents),
80
+ leading: /* @__PURE__ */ n(A, {
81
+ logo: o.logo,
82
+ size: I
85
83
  }),
86
- subtitle: e.account ?? "",
87
- title: e.name
88
- }), h.map((m, T) => /* @__PURE__ */ a(M, {
89
- grey: T === h.length - 1,
90
- label: m.label,
91
- value: m.value
92
- }, m.label))]
84
+ subtitle: o.account ?? "",
85
+ title: o.name
86
+ }), h.map((s, D) => /* @__PURE__ */ n(S, {
87
+ grey: D === h.length - 1,
88
+ label: s.label,
89
+ value: s.value
90
+ }, D))]
93
91
  })
94
92
  });
95
- }, oe = I(H);
93
+ };
96
94
  export {
97
- oe as default
95
+ q as default
98
96
  };
99
97
 
100
98
  //# sourceMappingURL=DebtsBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DebtsBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DebtsBlock/DebtsBlock.tsx"],"sourcesContent":["import { useEffect } from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { DATE_FORMATS_INTL, formatDate } from '../../../../core/constants'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport InsightTransactionRow from '../../../components/InsightTransactionRow'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { asLogoRef, asNonEmptyText, asNumber, asText } from '../../slotReaders'\nimport { parseDueDate } from '../RepeatingTransactionBlock/weekStrip'\n\ninterface DebtsBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n\ninterface PaymentRow {\n name: string\n account?: string\n amount?: number\n logo?: LogoRef\n}\n\n/** The first `series` row with a name, read through the shared slot readers; else undefined. */\nconst readPayment = (series: unknown): PaymentRow | undefined => {\n if (!Array.isArray(series)) return undefined\n for (const row of series) {\n if (typeof row !== 'object' || row === null) continue\n const { amount, logo, primary_text, secondary_text } = row as Record<string, unknown>\n const name = asNonEmptyText(primary_text)\n if (name) {\n return {\n name,\n account: asText(secondary_text),\n amount: asNumber(amount),\n logo: asLogoRef(logo),\n }\n }\n }\n return undefined\n}\n\n/** A label / value line under the payment row; the card's last line sits on the grey surface. */\nconst SummaryLine = ({ grey, label, value }: { grey?: boolean; label: string; value: string }) => (\n <>\n <Divider />\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: grey ? 'background.default' : 'background.paper',\n flexDirection: 'row',\n justifyContent: 'space-between',\n minHeight: 40,\n px: 16,\n py: 2,\n }}\n >\n <Text color=\"text.primary\" variant=\"subtitle2\">\n {label}\n </Text>\n <Text bold={true} color=\"text.primary\" variant=\"caption\">\n {value}\n </Text>\n </Stack>\n </>\n)\n\n/**\n * Debts component block: the Debt Payment Reminder card (Figma 1943:219556). One bordered card:\n *\n * - the upcoming payment, from `data.series[0]`: `logo`, `primary_text` (payment name),\n * `secondary_text` (account name) and `amount` (the payment);\n * - \"Payment due on\" with `data.due_date` (ISO day, shown as \"September 15\");\n * - \"Minimum payment\" with `data.minimum_payment`, only when ditto sends one (Figma \"Has Minimum\n * Payment\"; \"No Minimum Payment\" omits the line);\n * - the account balance, `data.amount`.\n *\n * The last line drawn sits on the grey surface: the balance on full, the due date on mini (whose\n * Figma draws the due date alone).\n *\n * The captions come from `insights_feed.debts_block` (`payment_due_label`, `minimum_payment_label`,\n * `balance_label`). A line whose caption has not shipped, or whose value is missing or invalid, is\n * left out rather than drawn unlabelled or blank; a missing caption for a line that has a value\n * also warns once, naming the key. With no payment row there is no card.\n */\nconst DebtsBlock = ({ payload }: DebtsBlockProps) => {\n const copy = useGlobalCopyStore().insights_feed?.debts_block\n const dueLabel = copy?.payment_due_label\n const minimumLabel = copy?.minimum_payment_label\n const balanceLabel = copy?.balance_label\n\n // Backend data is untrusted: every value goes through the shared slot readers before use.\n const data = payload.instance_slot?.data\n const payment = readPayment(slot(data, 'series'))\n const dueDateIso = asText(slot(data, 'due_date'))\n const dueDate = dueDateIso ? parseDueDate(dueDateIso) : null\n const minimum = asNumber(slot(data, 'minimum_payment'))\n const balance = asNumber(slot(data, 'amount'))\n const hasPayment = payment !== undefined\n\n // Only the captions for lines this card has a value to draw (mini sends no balance).\n const missingKeys = [\n dueDate && !dueLabel && 'payment_due_label',\n minimum !== undefined && !minimumLabel && 'minimum_payment_label',\n balance !== undefined && !balanceLabel && 'balance_label',\n ]\n .filter(Boolean)\n .join(', ')\n\n useEffect(() => {\n if (hasPayment && missingKeys) {\n console.warn(`debts_block: copy missing ${missingKeys}; hiding those lines`)\n }\n }, [hasPayment, missingKeys])\n\n if (!payment) return null\n\n // Figma's order; the last line drawn sits on the grey surface.\n const lines = [\n dueLabel && dueDate\n ? { label: dueLabel, value: formatDate(dueDate, DATE_FORMATS_INTL.FULL_MONTH_DAY) }\n : null,\n minimumLabel && minimum !== undefined\n ? { label: minimumLabel, value: formatCurrency(minimum, CURRENCY_FORMAT.cents) }\n : null,\n balanceLabel && balance !== undefined\n ? { label: balanceLabel, value: formatCurrency(balance, CURRENCY_FORMAT.cents) }\n : null,\n ].filter((line): line is { label: string; value: string } => line !== null)\n\n return (\n <Stack sx={{ px: 16 }}>\n <Stack\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n width: '100%',\n }}\n >\n <InsightTransactionRow\n amount={\n payment.amount === undefined\n ? ''\n : formatCurrency(payment.amount, CURRENCY_FORMAT.cents)\n }\n leading={<LogoFromGuid logo={payment.logo} size={ROW_LOGO_SIZE} />}\n subtitle={payment.account ?? ''}\n title={payment.name}\n />\n {lines.map((line, index) => (\n <SummaryLine\n grey={index === lines.length - 1}\n key={line.label}\n label={line.label}\n value={line.value}\n />\n ))}\n </Stack>\n </Stack>\n )\n}\n\n// observer: the captions come from the copy store, which can load or change after the first render.\nexport default observer(DebtsBlock)\n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AAK;AAAA,QAE1D,SAAS,gBAAA,EAAC,GAAD;AAAA,UAAc,MAAM,EAAQ;AAAA,UAAM,MAAM;AAAA,QAAgB,CAAA;AAAA,QACjE,UAAU,EAAQ,WAAW;AAAA,QAC7B,OAAO,EAAQ;AAAA,MAChB,CAAA,GACA,EAAM,IAAA,CAAK,GAAM,MAChB,gBAAA,EAAC,GAAD;AAAA,QACE,MAAM,MAAU,EAAM,SAAS;AAAA,QAE/B,OAAO,EAAK;AAAA,QACZ,OAAO,EAAK;AAAA,MACb,GAHM,EAAK,KAGX,CACF,CACI;AAAA;EACF,CAAA;AAEX,GAGA,KAAe,EAAS,CAAU"}
1
+ {"version":3,"file":"DebtsBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DebtsBlock/DebtsBlock.tsx"],"sourcesContent":["import { useEffect } from 'react'\n\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { DATE_FORMATS_INTL, formatDate } from '../../../../core/constants'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport InsightTransactionRow from '../../../components/InsightTransactionRow'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { asLogoRef, asNonEmptyText, asNumber, asText } from '../../slotReaders'\nimport { parseDueDate } from '../RepeatingTransactionBlock/weekStrip'\n\ninterface DebtsBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n\ninterface PaymentRow {\n name: string\n account?: string\n amount?: number\n logo?: LogoRef\n}\n\n/** The first `series` row with a name, read through the shared slot readers; else undefined. */\nconst readPayment = (series: unknown): PaymentRow | undefined => {\n if (!Array.isArray(series)) return undefined\n for (const row of series) {\n if (typeof row !== 'object' || row === null) continue\n const { amount, logo, primary_text, secondary_text } = row as Record<string, unknown>\n const name = asNonEmptyText(primary_text)\n if (name) {\n return {\n name,\n account: asText(secondary_text),\n amount: asNumber(amount),\n logo: asLogoRef(logo),\n }\n }\n }\n return undefined\n}\n\n/** A label / value line under the payment row; the card's last line sits on the grey surface. */\nconst SummaryLine = ({ grey, label, value }: { grey?: boolean; label: string; value: string }) => (\n <>\n <Divider />\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: grey ? 'background.default' : 'background.paper',\n flexDirection: 'row',\n justifyContent: 'space-between',\n minHeight: 40,\n px: 16,\n py: 2,\n }}\n >\n <Text color=\"text.primary\" variant=\"subtitle2\">\n {label}\n </Text>\n <Text bold={true} color=\"text.primary\" variant=\"caption\">\n {value}\n </Text>\n </Stack>\n </>\n)\n\n/**\n * Debts component block: the Debt Payment Reminder card (Figma 1943:219556). One bordered card:\n *\n * - the upcoming payment, from `data.series[0]`: `logo`, `primary_text` (payment name),\n * `secondary_text` (account name) and `amount` (the payment);\n * - \"Payment Due On\" with `data.due_date` (ISO day, shown as \"September 15\");\n * - \"Minimum Payment\" with `data.minimum_payment`, only when ditto sends one (Figma \"Has Minimum\n * Payment\"; \"No Minimum Payment\" omits the line);\n * - the account balance, `data.amount`.\n *\n * The last line drawn sits on the grey surface: the balance on full, the due date on mini (whose\n * Figma draws the due date alone).\n *\n * Every caption comes from the backend, in the beat's own slots (`due_date_label`, `minimum_payment_label`,\n * `amount_label`); there is no frontend fallback. A line whose label or value is missing or invalid is left out\n * rather than drawn unlabelled or blank; a missing label for a line that has a value also warns once, naming the\n * slot. With no payment row there is no card.\n */\nconst DebtsBlock = ({ payload }: DebtsBlockProps) => {\n // Backend data is untrusted: every value goes through the shared slot readers before use.\n const data = payload.instance_slot?.data\n const dueLabel = asNonEmptyText(slot(data, 'due_date_label'))\n const minimumLabel = asNonEmptyText(slot(data, 'minimum_payment_label'))\n const balanceLabel = asNonEmptyText(slot(data, 'amount_label'))\n const payment = readPayment(slot(data, 'series'))\n const dueDateIso = asText(slot(data, 'due_date'))\n const dueDate = dueDateIso ? parseDueDate(dueDateIso) : null\n const minimum = asNumber(slot(data, 'minimum_payment'))\n const balance = asNumber(slot(data, 'amount'))\n const hasPayment = payment !== undefined\n\n // Only the labels for lines this card has a value to draw (mini sends no balance).\n const missingKeys = [\n dueDate && !dueLabel && 'due_date_label',\n minimum !== undefined && !minimumLabel && 'minimum_payment_label',\n balance !== undefined && !balanceLabel && 'amount_label',\n ]\n .filter(Boolean)\n .join(', ')\n\n useEffect(() => {\n if (hasPayment && missingKeys) {\n console.warn(`debts_block: backend sent no ${missingKeys}; hiding those lines`)\n }\n }, [hasPayment, missingKeys])\n\n if (!payment) return null\n\n // Figma's order; the last line drawn sits on the grey surface.\n const lines = [\n dueLabel && dueDate\n ? { label: dueLabel, value: formatDate(dueDate, DATE_FORMATS_INTL.FULL_MONTH_DAY) }\n : null,\n minimumLabel && minimum !== undefined\n ? { label: minimumLabel, value: formatCurrency(minimum, CURRENCY_FORMAT.cents) }\n : null,\n balanceLabel && balance !== undefined\n ? { label: balanceLabel, value: formatCurrency(balance, CURRENCY_FORMAT.cents) }\n : null,\n ].filter((line): line is { label: string; value: string } => line !== null)\n\n return (\n <Stack sx={{ px: 16 }}>\n <Stack\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n width: '100%',\n }}\n >\n <InsightTransactionRow\n amount={\n payment.amount === undefined\n ? ''\n : formatCurrency(payment.amount, CURRENCY_FORMAT.cents)\n }\n leading={<LogoFromGuid logo={payment.logo} size={ROW_LOGO_SIZE} />}\n subtitle={payment.account ?? ''}\n title={payment.name}\n />\n {lines.map((line, index) => (\n <SummaryLine\n grey={index === lines.length - 1}\n key={index}\n label={line.label}\n value={line.value}\n />\n ))}\n </Stack>\n </Stack>\n )\n}\n\nexport default DebtsBlock\n"],"mappings":";;;;;;;;;;;;AAqBA,IAAM,IAAgB,IAUhB,IAAA,CAAe,MAA4C;AAC/D,MAAK,MAAM,QAAQ,CAAM;AACzB,eAAW,KAAO,GAAQ;AACxB,UAA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,CAAA;AAAA,QACjE,UAAU,EAAQ,WAAW;AAAA,QAC7B,OAAO,EAAQ;AAAA,MAChB,CAAA,GACA,EAAM,IAAA,CAAK,GAAM,MAChB,gBAAA,EAAC,GAAD;AAAA,QACE,MAAM,MAAU,EAAM,SAAS;AAAA,QAE/B,OAAO,EAAK;AAAA,QACZ,OAAO,EAAK;AAAA,MACb,GAHM,CAGN,CACF,CACI;AAAA;EACF,CAAA;AAEX"}
@@ -1,10 +1,10 @@
1
1
  import r from "./components/StatusPill.es.js";
2
2
  import { resolveInsightRender as m } from "./resolveInsightRender.es.js";
3
3
  import { useBeatActions as a } from "./beatActions.es.js";
4
- import { BAR_ARIA_LABEL as e, BAR_CHART_VARIANTS as f, barChartVariant as c, buildChartData as n, buildDataSeries as l } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
4
+ import { BAR_ARIA_LABEL as e, BAR_CHART_VARIANTS as f, barChartVariant as n, buildChartData as c, buildDataSeries as l } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
5
5
  import { HOST_ACTIONS as d } from "./ctaActions/hostActions.es.js";
6
6
  import { runInDescriptionCta as u } from "./ctaActions/runCtaAction.es.js";
7
- import { useBeatCtaActions as g, useCtaHandler as C } from "./ctaActions/useCtaAction.es.js";
7
+ import { useBeatCtaActions as k, useCtaHandler as C } from "./ctaActions/useCtaAction.es.js";
8
8
  import { BarchartBlock as D } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
9
9
  import { DoubleBarChartBlock as A } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
10
10
  import I from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
@@ -25,10 +25,10 @@ import ro from "./blocks/ComponentBlocks/GasPurchaseBlock/GasPurchaseBlock.es.js
25
25
  import mo from "./components/GoalProgressCard.es.js";
26
26
  import ao from "./blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js";
27
27
  import eo from "./components/LogoTile.es.js";
28
- import co from "./components/LogoClusterCard.es.js";
28
+ import no from "./components/LogoClusterCard.es.js";
29
29
  import lo from "./components/AmountPill.es.js";
30
30
  import Bo from "./components/MerchantHighlightCard.es.js";
31
- import ko from "./components/P2PLogoStack.es.js";
31
+ import go from "./components/P2PLogoStack.es.js";
32
32
  import Co from "./blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js";
33
33
  import Do from "./blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
34
34
  import Ao from "./blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js";
@@ -52,10 +52,10 @@ import tr from "./components/DesignateEmergencySavingsCard.es.js";
52
52
  import { SVGImageBlock as ir } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
53
53
  import pr from "./components/shared/StatusSnackbar.es.js";
54
54
  import fr from "./components/FeedbackDialog.es.js";
55
- import nr from "./components/FeedbackModal.es.js";
55
+ import cr from "./components/FeedbackModal.es.js";
56
56
  import sr from "./components/ConnectionDetailDrillDown.es.js";
57
57
  import Br from "./components/SurveyModal.es.js";
58
- import kr from "./components/InsightErrorCard.es.js";
58
+ import gr from "./components/InsightErrorCard.es.js";
59
59
  import { ErrorCard as Cr } from "./components/ErrorCard.es.js";
60
60
  import Dr from "./components/AmountBreakdownCard.es.js";
61
61
  import Ar from "./components/BadgedTile.es.js";
@@ -95,17 +95,17 @@ export {
95
95
  Cr as ErrorCard,
96
96
  Hr as FeedbackBar,
97
97
  fr as FeedbackDialog,
98
- nr as FeedbackModal,
98
+ cr as FeedbackModal,
99
99
  ro as GasPurchaseBlock,
100
100
  mo as GoalProgressCard,
101
101
  ao as GoalsBlock,
102
102
  d as HOST_ACTIONS,
103
103
  Er as HiddenConfirmationCard,
104
- kr as InsightErrorCard,
104
+ gr as InsightErrorCard,
105
105
  Tr as InsightOptionsMenu,
106
106
  Y as InsightTransactionRow,
107
107
  _r as LoadingCard,
108
- co as LogoClusterCard,
108
+ no as LogoClusterCard,
109
109
  R as LogoFromGuid,
110
110
  eo as LogoTile,
111
111
  Co as MerchantBlock,
@@ -113,7 +113,7 @@ export {
113
113
  Do as NoSpendDaysBlock,
114
114
  xr as ObsolesceBanner,
115
115
  Ir as OverflowMenu,
116
- ko as P2PLogoStack,
116
+ go as P2PLogoStack,
117
117
  Ao as QuizBlock,
118
118
  To as RepeatingTransactionBlock,
119
119
  ir as SVGImageBlock,
@@ -138,8 +138,8 @@ export {
138
138
  Xo as WeeklySmallPurchasesBlock,
139
139
  or as WithdrawalBlock,
140
140
  Zo as WithdrawalCard,
141
- c as barChartVariant,
142
- n as buildChartData,
141
+ n as barChartVariant,
142
+ c as buildChartData,
143
143
  l as buildDataSeries,
144
144
  G as detailedAccountVariant,
145
145
  _ as directDepositVariant,
@@ -149,6 +149,6 @@ export {
149
149
  u as runInDescriptionCta,
150
150
  Uo as transactionBlockVariant,
151
151
  a as useBeatActions,
152
- g as useBeatCtaActions,
152
+ k as useBeatCtaActions,
153
153
  C as useCtaHandler
154
154
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.157",
3
+ "version": "9.7.158",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",