@mx-cartographer/experiences 9.7.140 → 9.7.141
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,8 @@
|
|
|
1
|
+
## [9.7.141] - 11-12-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - An Insights 2.0 notification row whose logo is an icon (`ICO-…`) draws it in a tinted tile, as Figma does, instead of a bare glyph. Newman keeps no colour, so the tint comes from the glyph: `error` red (Low Account Balance), `check_circle` green, `warning` amber, any other primary (Monthly Spend Comparison's trendline) (WEC-2299)
|
|
4
|
+
- **CHANGED** - Storybook: Monthly Spend Comparison V2's micro and notification draw ditto's trendline icon, and the notification uses its short sentence from mrs_content (WEC-2299)
|
|
5
|
+
|
|
1
6
|
## [9.7.140] - 11-12-2026
|
|
2
7
|
|
|
3
8
|
- **FIXED** - The micro card draws its status icon instead of an empty tile when its row logo is unusable, and its unanswered icon when the reviewed one is; the merchant quiz keeps only a row's checked fields and the Not Interested dialog only a text account name, so malformed data cannot break either (WEC-2259)
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
- [Styling and Theming](docs/STYLING_AND_THEMING.md)
|
|
12
12
|
- [Testing](docs/TESTING.md)
|
|
13
13
|
- [Insights V2 Action Blocks](docs/action-blocks/README.md)
|
|
14
|
+
- [Releasing](docs/RELEASING.md)
|
|
14
15
|
|
|
15
16
|
## Tech Stack
|
|
16
17
|
|
|
@@ -145,10 +146,10 @@ The test configuration is in [vitest.config.ts](vitest.config.ts) and [tests/set
|
|
|
145
146
|
|
|
146
147
|
|
|
147
148
|
## Merging and Publishing
|
|
148
|
-
1.
|
|
149
|
+
1. Do not edit CHANGELOG.md or the version in package.json. Add a `## Changelog` section to the MR description instead; see docs/RELEASING.md.
|
|
149
150
|
1. Request a MR review by commenting `shipit --review`
|
|
150
|
-
1. Once the MR is approved, comment `shipit --publish-version=major|minor|patch`.
|
|
151
|
-
|
|
151
|
+
1. Once the MR is approved, comment `shipit --publish-version=major|minor|patch`. Breaking changes bump the major, new features the minor, and bug fixes or minor changes the patch.
|
|
152
|
+
1. Shipit bumps the version in package.json, adds the `## Changelog` lines to CHANGELOG.md, publishes the package to npm, merges, and commits both files to master. -->
|
|
152
153
|
|
|
153
154
|
## Support
|
|
154
155
|
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import { useNotificationStore as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { useNotificationStore as s } from "../../common/context/hooks.es.js";
|
|
2
|
+
import m, { isLogoGuid as c } from "../../insights-v2/components/LogoFromGuid.es.js";
|
|
3
|
+
import { statusIconName as g } from "../../insights-v2/components/statusIcon.es.js";
|
|
4
|
+
import u from "../../microinsights/beaticons/BeatMaterialIcon.es.js";
|
|
5
|
+
import p from "./NotificationBadge.es.js";
|
|
4
6
|
import "react";
|
|
5
|
-
import { Text as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { Text as h } from "@mxenabled/mxui";
|
|
8
|
+
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
import { alpha as _ } from "@mui/material/styles";
|
|
10
|
+
import { Box as b, Card as y, useTheme as x } from "@mui/material";
|
|
11
|
+
var a = 33, C = /* @__PURE__ */ new Map([
|
|
12
|
+
["error", "error"],
|
|
13
|
+
["check_circle", "success"],
|
|
14
|
+
["warning", "warning"]
|
|
15
|
+
]), j = ({ notification: e, onClick: d }) => {
|
|
16
|
+
const { updateNotification: l } = s(), t = x(), r = g(e.entity_guid), i = r && C.get(r) || "primary", n = {
|
|
10
17
|
card: {
|
|
11
18
|
alignItems: "center",
|
|
12
19
|
cursor: "pointer",
|
|
@@ -14,12 +21,12 @@ var p = 33, w = ({ notification: e, onClick: a }) => {
|
|
|
14
21
|
marginBottom: 12,
|
|
15
22
|
paddingX: 24,
|
|
16
23
|
paddingY: 12,
|
|
17
|
-
"&:focus": { backgroundColor:
|
|
18
|
-
"&:hover": { backgroundColor:
|
|
24
|
+
"&:focus": { backgroundColor: t.palette.background.default },
|
|
25
|
+
"&:hover": { backgroundColor: t.palette.background.default },
|
|
19
26
|
"& .notification-logo": { marginRight: 12 }
|
|
20
27
|
},
|
|
21
28
|
dot: {
|
|
22
|
-
backgroundColor:
|
|
29
|
+
backgroundColor: t.palette.primary.main,
|
|
23
30
|
borderRadius: "100%",
|
|
24
31
|
flex: "0 0 auto",
|
|
25
32
|
marginLeft: -8,
|
|
@@ -28,28 +35,43 @@ var p = 33, w = ({ notification: e, onClick: a }) => {
|
|
|
28
35
|
width: 8
|
|
29
36
|
}
|
|
30
37
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ f(y, {
|
|
32
39
|
onClick: () => {
|
|
33
|
-
|
|
40
|
+
d(e), l({
|
|
34
41
|
...e,
|
|
35
42
|
has_been_viewed: !0
|
|
36
43
|
}).finally();
|
|
37
44
|
},
|
|
38
|
-
sx:
|
|
45
|
+
sx: n.card,
|
|
39
46
|
children: [
|
|
40
|
-
e.has_been_viewed ? null : /* @__PURE__ */
|
|
47
|
+
e.has_been_viewed ? null : /* @__PURE__ */ o("div", {
|
|
41
48
|
"data-testid": "new-message-dot",
|
|
42
|
-
style:
|
|
49
|
+
style: n.dot
|
|
43
50
|
}),
|
|
44
|
-
|
|
51
|
+
r ? /* @__PURE__ */ o(b, {
|
|
52
|
+
className: "notification-logo",
|
|
53
|
+
sx: {
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
display: "flex",
|
|
56
|
+
flexShrink: 0,
|
|
57
|
+
height: a,
|
|
58
|
+
justifyContent: "center",
|
|
59
|
+
width: a
|
|
60
|
+
},
|
|
61
|
+
children: /* @__PURE__ */ o(u, {
|
|
62
|
+
bgColor: _(t.palette[i].main, 0.15),
|
|
63
|
+
iconColor: i,
|
|
64
|
+
name: r
|
|
65
|
+
})
|
|
66
|
+
}) : c(e.entity_guid) ? /* @__PURE__ */ o(m, {
|
|
45
67
|
className: "notification-logo",
|
|
46
68
|
logo: {
|
|
47
69
|
alt: e.content,
|
|
48
70
|
guid: e.entity_guid
|
|
49
71
|
},
|
|
50
|
-
size:
|
|
51
|
-
}) : /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
72
|
+
size: a
|
|
73
|
+
}) : /* @__PURE__ */ o(p, { notification: e }),
|
|
74
|
+
/* @__PURE__ */ o(h, {
|
|
53
75
|
bold: !e.has_been_viewed,
|
|
54
76
|
truncate: !1,
|
|
55
77
|
variant: "body2",
|
|
@@ -59,7 +81,7 @@ var p = 33, w = ({ notification: e, onClick: a }) => {
|
|
|
59
81
|
});
|
|
60
82
|
};
|
|
61
83
|
export {
|
|
62
|
-
|
|
84
|
+
j as default
|
|
63
85
|
};
|
|
64
86
|
|
|
65
87
|
//# sourceMappingURL=NotificationCard.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCard.es.js","names":[],"sources":["../../../src/notifications/components/NotificationCard.tsx"],"sourcesContent":["import React from 'react'\nimport { Card, useTheme } from '@mui/material'\nimport { Text } from '@mxenabled/mxui'\n\nimport { type Notification } from '../../core'\nimport { useNotificationStore } from '../../common'\n// Leaf import on purpose: the `insights-v2` barrel pulls in `mappings/blocks` and its chart blocks\n// (see the circular-import note in `insights-v2/mappings/actionBlocksKey.ts`).\nimport LogoFromGuid, { isLogoGuid } from '../../insights-v2/components/LogoFromGuid'\nimport NotificationBadge from './NotificationBadge'\n\n/** Same footprint as the legacy badge's institution logo, so rows line up either way. */\nconst LOGO_SIZE = 33\n\ninterface NotificationCardProps {\n notification: Notification\n onClick: (notification: Notification) => void\n}\n\nconst NotificationCard: React.FC<NotificationCardProps> = ({ notification, onClick }) => {\n const { updateNotification } = useNotificationStore()\n const theme = useTheme()\n\n const styles = {\n card: {\n alignItems: 'center',\n cursor: 'pointer',\n display: 'flex',\n marginBottom: 12,\n paddingX: 24,\n paddingY: 12,\n '&:focus': {\n backgroundColor: theme.palette.background.default,\n },\n '&:hover': {\n backgroundColor: theme.palette.background.default,\n },\n // Matches the legacy badge's trailing gap so the text column lines up either way.\n '& .notification-logo': { marginRight: 12 },\n },\n dot: {\n backgroundColor: theme.palette.primary.main,\n borderRadius: '100%',\n flex: '0 0 auto',\n marginLeft: -8,\n marginRight: 8,\n height: 8,\n width: 8,\n },\n }\n\n const handleOnClick = () => {\n onClick(notification)\n updateNotification({ ...notification, has_been_viewed: true }).finally()\n }\n\n return (\n <Card onClick={handleOnClick} sx={styles.card}>\n {!notification.has_been_viewed ? (\n <div data-testid=\"new-message-dot\" style={styles.dot} />\n ) : null}\n {/* Insights 2.0 (insights_v2.2.md §8.3): Newman writes the row logo guid
|
|
1
|
+
{"version":3,"file":"NotificationCard.es.js","names":[],"sources":["../../../src/notifications/components/NotificationCard.tsx"],"sourcesContent":["import React from 'react'\nimport { Box, Card, useTheme } from '@mui/material'\nimport { alpha } from '@mui/material/styles'\nimport { Text } from '@mxenabled/mxui'\n\nimport { type Notification } from '../../core'\nimport { useNotificationStore } from '../../common'\n// Leaf import on purpose: the `insights-v2` barrel pulls in `mappings/blocks` and its chart blocks\n// (see the circular-import note in `insights-v2/mappings/actionBlocksKey.ts`).\nimport LogoFromGuid, { isLogoGuid } from '../../insights-v2/components/LogoFromGuid'\nimport { statusIconName } from '../../insights-v2/components/statusIcon'\nimport BeatMaterialIcon from '../../microinsights/beaticons/BeatMaterialIcon'\nimport NotificationBadge from './NotificationBadge'\n\n/** Same footprint as the legacy badge's institution logo, so rows line up either way. */\nconst LOGO_SIZE = 33\n\n// Newman keeps an icon's guid but not its colour, so the tint comes from the glyph.\nconst STATUS_GLYPH_TONES = new Map<string, 'error' | 'success' | 'warning'>([\n ['error', 'error'],\n ['check_circle', 'success'],\n ['warning', 'warning'],\n])\n\ninterface NotificationCardProps {\n notification: Notification\n onClick: (notification: Notification) => void\n}\n\nconst NotificationCard: React.FC<NotificationCardProps> = ({ notification, onClick }) => {\n const { updateNotification } = useNotificationStore()\n const theme = useTheme()\n const iconName = statusIconName(notification.entity_guid)\n const iconTone = (iconName && STATUS_GLYPH_TONES.get(iconName)) || 'primary'\n\n const styles = {\n card: {\n alignItems: 'center',\n cursor: 'pointer',\n display: 'flex',\n marginBottom: 12,\n paddingX: 24,\n paddingY: 12,\n '&:focus': {\n backgroundColor: theme.palette.background.default,\n },\n '&:hover': {\n backgroundColor: theme.palette.background.default,\n },\n // Matches the legacy badge's trailing gap so the text column lines up either way.\n '& .notification-logo': { marginRight: 12 },\n },\n dot: {\n backgroundColor: theme.palette.primary.main,\n borderRadius: '100%',\n flex: '0 0 auto',\n marginLeft: -8,\n marginRight: 8,\n height: 8,\n width: 8,\n },\n }\n\n const handleOnClick = () => {\n onClick(notification)\n updateNotification({ ...notification, has_been_viewed: true }).finally()\n }\n\n return (\n <Card onClick={handleOnClick} sx={styles.card}>\n {!notification.has_been_viewed ? (\n <div data-testid=\"new-message-dot\" style={styles.dot} />\n ) : null}\n {/* Insights 2.0 (insights_v2.2.md §8.3): Newman writes the row's logo guid into\n `entity_guid`: a known `ICO-` icon draws in the tinted tile, a `MCH-`/`CAT-`/`INS-` guid\n its logo, and account or budget guids or legacy `\"PARENT-ENTITY\"` the badge. */}\n {iconName ? (\n <Box\n className=\"notification-logo\"\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexShrink: 0,\n height: LOGO_SIZE,\n justifyContent: 'center',\n width: LOGO_SIZE,\n }}\n >\n <BeatMaterialIcon\n bgColor={alpha(theme.palette[iconTone].main, 0.15)}\n iconColor={iconTone}\n name={iconName}\n />\n </Box>\n ) : isLogoGuid(notification.entity_guid) ? (\n <LogoFromGuid\n className=\"notification-logo\"\n logo={{ alt: notification.content, guid: notification.entity_guid }}\n size={LOGO_SIZE}\n />\n ) : (\n <NotificationBadge notification={notification} />\n )}\n <Text bold={!notification.has_been_viewed} truncate={false} variant={'body2'}>\n {notification.content}\n </Text>\n </Card>\n )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