@mx-cartographer/experiences 9.7.8 → 9.7.10
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,3 +1,12 @@
|
|
|
1
|
+
## [9.7.10] - 10-20-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Cash Back `image_block` (`image_with_overlay` variant) reads the Insights 2.0 `instance_slot.data` (`amount`, `image`) instead of the legacy top-level `instance_slot_data`, so the card draws the reward amount rather than `$0.00`; and `imageMap` is keyed by the snake_case `cash_back` the backend sends (was camelCase `cashBack`), so the `CashBack.png` background resolves. The overlay amount is omitted when `amount` is missing or non-finite, and the background is dropped (no `url(undefined)`) when the image key is unknown. Test and story moved to the V2 slot shape (WEC-1516)
|
|
4
|
+
|
|
5
|
+
## [9.7.9] - 10-20-2026
|
|
6
|
+
|
|
7
|
+
- **CHANGED** - Insights V2 Storybook taxonomy: `ComponentBlocks/` + `ChartBlocks/` + `ImageBlock/` merged into `blocks/`, `ActionBlock/` renamed to `actionBlocks/`, both nested under `components/`. Titles now match the directory layout 1:1 (`InsightsV2/Components/Blocks/*`, `InsightsV2/Components/ActionBlocks/*`), with `donut_chart_block`/`step_chart_block`/`Barchart` normalized to PascalCase. Block stories carry their registry variant name (e.g. `remainder (CIBC)`), so the sidebar and the autodocs all-variants page both read in registry terms (WEC-1956)
|
|
8
|
+
- **ADDED** - `InsightsV2/Insights/*` Storybook section listing the shipped v2 insights only: LargeTransactionV2, LargeTransactionPendingV2, FeeDetectedV2 and PaydayCashLeftOverV2, over a shared `renderInsightCard`/`findBeat` helper. Includes a new `LargeTransactionPendingV2` beat fixture in `mock/BlockBeatsData/TransactionBlockBeats.ts` (same block and variant as LargeTransactionV2, pending copy) (WEC-1956)
|
|
9
|
+
|
|
1
10
|
## [9.7.8] - 10-20-2026
|
|
2
11
|
|
|
3
12
|
- **ADDED** - `repeating_transaction_block` component block (`scheduled` variant): the Upcoming Bill card (week strip, merchant row, amount) read from `instance_slot.data`, falling back to the flat slot (WEC-1299)
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { InsightsPayload } from '../../../core';
|
|
2
|
+
declare const ImageBlock: ({ payload }: {
|
|
3
|
+
payload: InsightsPayload;
|
|
4
|
+
beatGuid?: string;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
6
|
export default ImageBlock;
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import c from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { slot as s } from "../../../core/types/Insights.es.js";
|
|
2
|
+
import { formatCurrency as c } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import p from "@mui/material/Stack";
|
|
4
|
+
import { Text as l } from "@mxenabled/mxui";
|
|
5
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
6
|
+
import { alpha as h } from "@mui/material/styles";
|
|
7
|
+
import u from "@mui/material/Box";
|
|
8
|
+
var d = { cash_back: "https://content.moneydesktop.com/storage/MD_Assets/md/insights/CashBack.png" }, B = ({ payload: a }) => {
|
|
9
|
+
const { data: r } = a.instance_slot, t = s(r, "amount"), n = typeof t == "number" && Number.isFinite(t), m = s(r, "image") ?? "", e = d[m];
|
|
10
|
+
return /* @__PURE__ */ o(p, {
|
|
10
11
|
justifyContent: "flex-end",
|
|
11
12
|
sx: {
|
|
12
|
-
background: `url(${
|
|
13
|
+
background: e ? `url(${e}) no-repeat top / cover` : void 0,
|
|
13
14
|
height: 175,
|
|
14
15
|
width: "100%"
|
|
15
16
|
},
|
|
16
|
-
children: /* @__PURE__ */
|
|
17
|
+
children: /* @__PURE__ */ o(u, {
|
|
17
18
|
sx: {
|
|
18
|
-
bgcolor: (
|
|
19
|
+
bgcolor: (i) => h(i.palette.success.light, 0.6),
|
|
19
20
|
height: 56,
|
|
20
21
|
p: 8,
|
|
21
22
|
pl: 16
|
|
22
23
|
},
|
|
23
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ o(l, {
|
|
24
25
|
color: "success.dark",
|
|
25
26
|
variant: "h1",
|
|
26
|
-
children:
|
|
27
|
+
children: n ? c(t, "0,0.00") : null
|
|
27
28
|
})
|
|
28
29
|
})
|
|
29
30
|
});
|
|
30
31
|
};
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
B as default
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
//# sourceMappingURL=ImageBlock.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageBlock.es.js","names":[],"sources":["../../../../src/insights-v2/blocks/ImageBlocks/ImageBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { alpha } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport type
|
|
1
|
+
{"version":3,"file":"ImageBlock.es.js","names":[],"sources":["../../../../src/insights-v2/blocks/ImageBlocks/ImageBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { alpha } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { slot, type InsightsPayload } from '../../../core'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\n\nconst INSIGHTS_ASSETS_URL = 'https://content.moneydesktop.com/storage/MD_Assets/md/insights'\n\nconst imageMap: Record<string, string> = {\n cash_back: `${INSIGHTS_ASSETS_URL}/CashBack.png`,\n}\n\nconst ImageBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n // V2 contract carries the block's slots on `instance_slot.data` (not the V1 `instance_slot_data`).\n const { data } = payload.instance_slot\n const amount = slot<number>(data, 'amount')\n const hasAmount = typeof amount === 'number' && Number.isFinite(amount)\n const image = slot<string>(data, 'image') ?? ''\n // Only draw the background when the asset is known; an unmapped image would otherwise produce\n // `url(undefined)` and a broken request.\n const asset = imageMap[image]\n\n return (\n <Stack\n justifyContent=\"flex-end\"\n sx={{\n background: asset ? `url(${asset}) no-repeat top / cover` : undefined,\n height: 175,\n width: '100%',\n }}\n >\n <Box\n sx={{\n bgcolor: (theme) => alpha(theme.palette.success.light, 0.6),\n height: 56,\n p: 8,\n pl: 16,\n }}\n >\n <Text color=\"success.dark\" variant=\"h1\">\n {hasAmount ? formatCurrency(amount, '0,0.00') : null}\n </Text>\n </Box>\n </Stack>\n )\n}\n\nexport default ImageBlock\n"],"mappings":";;;;;;;AAWA,IAAM,IAAmC,EACvC,WAAW,8EACb,GAEM,IAAA,CAAc,EAAE,SAAA,EAAA,MAA+D;AAEnF,QAAM,EAAE,MAAA,EAAA,IAAS,EAAQ,eACnB,IAAS,EAAa,GAAM,QAAQ,GACpC,IAAY,OAAO,KAAW,YAAY,OAAO,SAAS,CAAM,GAChE,IAAQ,EAAa,GAAM,OAAO,KAAK,IAGvC,IAAQ,EAAS,CAAA;AAEvB,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAe;AAAA,IACf,IAAI;AAAA,MACF,YAAY,IAAQ,OAAO,CAAA,4BAAiC;AAAA,MAC5D,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAA,CAAU,MAAU,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG;AAAA,QAC1D,QAAQ;AAAA,QACR,GAAG;AAAA,QACH,IAAI;AAAA,MACN;AAAA,MAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,OAAM;AAAA,QAAe,SAAQ;AAAA,QAChC,UAAA,IAAY,EAAe,GAAQ,QAAQ,IAAI;AAAA,MAC5C,CAAA;AAAA,IACH,CAAA;AAAA,EACA,CAAA;AAEX"}
|