@mx-cartographer/experiences 9.5.4 → 9.6.0-alpha-ram1-connect-widget-testing
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 +6 -0
- package/dist/common/components/ConnectDrawer.es.js +17 -44
- package/dist/common/components/ConnectDrawer.es.js.map +1 -1
- package/dist/common/components/ConnectWidgetPanel.d.ts +8 -0
- package/dist/common/components/ConnectWidgetPanel.es.js +44 -0
- package/dist/common/components/ConnectWidgetPanel.es.js.map +1 -0
- package/dist/common/components/dialog/Dialog.d.ts +2 -0
- package/dist/common/components/dialog/Dialog.es.js +30 -30
- package/dist/common/components/dialog/Dialog.es.js.map +1 -1
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +67 -65
- package/dist/core/index.es.js +111 -109
- package/dist/core/types/Insights.d.ts +33 -16
- package/dist/core/types/Insights.es.js +6 -0
- package/dist/core/types/Insights.es.js.map +1 -0
- package/dist/core/types/index.d.ts +2 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +87 -0
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +19 -19
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.d.ts +21 -0
- package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js +16 -0
- package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.d.ts +12 -0
- package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.es.js +25 -0
- package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.d.ts +17 -0
- package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js +39 -0
- package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.d.ts +16 -0
- package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js +47 -0
- package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js.map +1 -0
- package/dist/insights-v2/beatActions.d.ts +2 -2
- package/dist/insights-v2/beatActions.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.d.ts +5 -2
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +36 -35
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.d.ts +2 -2
- package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js +6 -5
- package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/BaseLayout.es.js +14 -14
- package/dist/insights-v2/components/CompactInsightCard.d.ts +4 -4
- package/dist/insights-v2/components/CompactInsightCard.es.js +50 -46
- package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
- package/dist/insights-v2/components/ConnectionDetailDrillDown.d.ts +32 -0
- package/dist/insights-v2/components/ConnectionDetailDrillDown.es.js +148 -0
- package/dist/insights-v2/components/ConnectionDetailDrillDown.es.js.map +1 -0
- package/dist/insights-v2/components/FeedbackDialog.d.ts +3 -1
- package/dist/insights-v2/components/FeedbackDialog.es.js +80 -72
- package/dist/insights-v2/components/FeedbackDialog.es.js.map +1 -1
- package/dist/insights-v2/components/FeedbackModal.d.ts +60 -0
- package/dist/insights-v2/components/FeedbackModal.es.js +61 -0
- package/dist/insights-v2/components/FeedbackModal.es.js.map +1 -0
- package/dist/insights-v2/components/SurveyModal.d.ts +65 -0
- package/dist/insights-v2/components/SurveyModal.es.js +138 -0
- package/dist/insights-v2/components/SurveyModal.es.js.map +1 -0
- package/dist/insights-v2/components/shared/StatusSnackbar.d.ts +28 -0
- package/dist/insights-v2/components/shared/StatusSnackbar.es.js +19 -0
- package/dist/insights-v2/components/shared/StatusSnackbar.es.js.map +1 -0
- package/dist/insights-v2/index.d.ts +4 -0
- package/dist/insights-v2/index.es.js +72 -64
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +4 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +4 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +79 -56
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/dist/insights-v2/resolveInsightRender.d.ts +8 -5
- package/dist/insights-v2/resolveInsightRender.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +32 -31
- package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,13 +19,13 @@ export interface CompactInsightCardProps {
|
|
|
19
19
|
* The one compact renderer the micro and embedded envelopes share (`insights_v2.2.md` §8.3).
|
|
20
20
|
*
|
|
21
21
|
* Figma 1941:111897 (Embedded | Large Transaction): a title row with the overflow slot, the HTML
|
|
22
|
-
* description with the primary CTA under it, and on the right the
|
|
23
|
-
* `<BadgedTile>`. Under ditto's `
|
|
24
|
-
*
|
|
22
|
+
* description with the primary CTA under it, and on the right the slot's `logo` in a
|
|
23
|
+
* `<BadgedTile>`. Under ditto's `with_warning_badge` variant the tile takes a status badge; under
|
|
24
|
+
* `minimal` it draws the logo alone. The card lays out from the envelope alone and never reads
|
|
25
25
|
* `widget_type`.
|
|
26
26
|
*
|
|
27
27
|
* The icon falls back to the neutral insight glyph **here**, not in `LogoFromGuid`, when the slot
|
|
28
|
-
*
|
|
28
|
+
* carries no logo. The `pill` on the same envelope is the transaction row's, not the card's.
|
|
29
29
|
*/
|
|
30
30
|
declare const CompactInsightCard: ({ isCtaDisabled, onCtaClick, onTap, payload, }: CompactInsightCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export default CompactInsightCard;
|
|
@@ -1,57 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { slot as y } from "../../core/types/Insights.es.js";
|
|
2
|
+
import { createVariantBlock as k } from "../blocks/createVariantBlock.es.js";
|
|
3
|
+
import m from "./BadgedTile.es.js";
|
|
4
|
+
import { InsightOptionsMenu as I } from "./InsightOptionsMenu.es.js";
|
|
5
|
+
import w from "./LogoFromGuid.es.js";
|
|
6
|
+
import v from "./StatusBadge.es.js";
|
|
6
7
|
import l from "@mui/material/Stack";
|
|
7
|
-
import { P as
|
|
8
|
-
import
|
|
9
|
-
import { Icon as
|
|
8
|
+
import { P as C, Text as _ } from "@mxenabled/mxui";
|
|
9
|
+
import S from "@mui/material/Button";
|
|
10
|
+
import { Icon as B } from "@mxenabled/mx-icons";
|
|
10
11
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
var
|
|
12
|
+
import p from "@mui/material/Box";
|
|
13
|
+
import z from "@mui/material/Card";
|
|
14
|
+
var a = 44, d = ({ logo: r }) => r ? /* @__PURE__ */ t(w, {
|
|
14
15
|
logo: r,
|
|
15
|
-
size:
|
|
16
|
-
}) : /* @__PURE__ */ t(
|
|
16
|
+
size: a
|
|
17
|
+
}) : /* @__PURE__ */ t(p, {
|
|
17
18
|
"data-testid": "compact-insight-card-fallback-icon",
|
|
18
19
|
sx: {
|
|
19
20
|
alignItems: "center",
|
|
20
21
|
bgcolor: "primary.lighter",
|
|
21
22
|
display: "flex",
|
|
22
|
-
height:
|
|
23
|
+
height: a,
|
|
23
24
|
justifyContent: "center",
|
|
24
|
-
width:
|
|
25
|
+
width: a
|
|
25
26
|
},
|
|
26
|
-
children: /* @__PURE__ */ t(
|
|
27
|
+
children: /* @__PURE__ */ t(B, {
|
|
27
28
|
color: "primary",
|
|
28
29
|
fill: !0,
|
|
29
30
|
name: "lightbulb",
|
|
30
31
|
size: 24
|
|
31
32
|
})
|
|
32
|
-
}),
|
|
33
|
-
center: /* @__PURE__ */ t(
|
|
34
|
-
size:
|
|
33
|
+
}), c = ({ logo: r }) => /* @__PURE__ */ t(m, {
|
|
34
|
+
center: /* @__PURE__ */ t(d, { logo: r }),
|
|
35
|
+
size: a,
|
|
35
36
|
sx: { flexShrink: 0 }
|
|
36
|
-
}),
|
|
37
|
-
center: /* @__PURE__ */ t(
|
|
38
|
-
size:
|
|
37
|
+
}), P = ({ logo: r }) => /* @__PURE__ */ t(m, {
|
|
38
|
+
center: /* @__PURE__ */ t(d, { logo: r }),
|
|
39
|
+
size: a,
|
|
39
40
|
sx: { flexShrink: 0 },
|
|
40
|
-
topRight: /* @__PURE__ */ t(
|
|
41
|
-
}),
|
|
42
|
-
variants: {
|
|
43
|
-
|
|
41
|
+
topRight: /* @__PURE__ */ t(v, { tone: "warning" })
|
|
42
|
+
}), V = k({
|
|
43
|
+
variants: {
|
|
44
|
+
minimal: c,
|
|
45
|
+
with_warning_badge: P
|
|
46
|
+
},
|
|
47
|
+
fallback: c,
|
|
44
48
|
name: "InsightVisual"
|
|
45
|
-
}),
|
|
46
|
-
const { description:
|
|
47
|
-
i.stopPropagation(), !(r || !o) &&
|
|
49
|
+
}), j = (r) => r.stopPropagation(), $ = ({ isCtaDisabled: r = !1, onCtaClick: g, onTap: e, payload: f }) => {
|
|
50
|
+
const { description: h, instance_slot: s, primary_cta: o, title: x } = f, u = y(s.data, "logo"), b = (i) => {
|
|
51
|
+
i.stopPropagation(), !(r || !o) && g?.(o);
|
|
48
52
|
};
|
|
49
|
-
return /* @__PURE__ */ n(
|
|
53
|
+
return /* @__PURE__ */ n(z, {
|
|
50
54
|
"data-testid": "compact-insight-card",
|
|
51
|
-
...
|
|
52
|
-
onClick:
|
|
55
|
+
...e ? {
|
|
56
|
+
onClick: e,
|
|
53
57
|
onKeyDown: (i) => {
|
|
54
|
-
i.target === i.currentTarget && (i.key === "Enter" || i.key === " ") && (i.preventDefault(),
|
|
58
|
+
i.target === i.currentTarget && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), e?.());
|
|
55
59
|
},
|
|
56
60
|
role: "button",
|
|
57
61
|
tabIndex: 0
|
|
@@ -62,7 +66,7 @@ var e = 44, m = ({ logo: r }) => r ? /* @__PURE__ */ t(k, {
|
|
|
62
66
|
pl: 8,
|
|
63
67
|
pr: 16,
|
|
64
68
|
pt: 8,
|
|
65
|
-
...
|
|
69
|
+
...e && { cursor: "pointer" }
|
|
66
70
|
},
|
|
67
71
|
children: [/* @__PURE__ */ n(l, {
|
|
68
72
|
sx: {
|
|
@@ -73,14 +77,14 @@ var e = 44, m = ({ logo: r }) => r ? /* @__PURE__ */ t(k, {
|
|
|
73
77
|
pl: 8,
|
|
74
78
|
pt: 4
|
|
75
79
|
},
|
|
76
|
-
children: [/* @__PURE__ */ t(
|
|
80
|
+
children: [/* @__PURE__ */ t(_, {
|
|
77
81
|
bold: !0,
|
|
78
82
|
variant: "body1",
|
|
79
|
-
children:
|
|
80
|
-
}), /* @__PURE__ */ t(
|
|
81
|
-
onClick:
|
|
83
|
+
children: x ?? ""
|
|
84
|
+
}), /* @__PURE__ */ t(p, {
|
|
85
|
+
onClick: j,
|
|
82
86
|
sx: { display: "flex" },
|
|
83
|
-
children: /* @__PURE__ */ t(
|
|
87
|
+
children: /* @__PURE__ */ t(I, {})
|
|
84
88
|
})]
|
|
85
89
|
}), /* @__PURE__ */ n(l, {
|
|
86
90
|
sx: {
|
|
@@ -95,13 +99,13 @@ var e = 44, m = ({ logo: r }) => r ? /* @__PURE__ */ t(k, {
|
|
|
95
99
|
gap: 8,
|
|
96
100
|
minWidth: 0
|
|
97
101
|
},
|
|
98
|
-
children: [/* @__PURE__ */ t(
|
|
99
|
-
dangerouslySetInnerHTML: { __html:
|
|
102
|
+
children: [/* @__PURE__ */ t(C, {
|
|
103
|
+
dangerouslySetInnerHTML: { __html: h.html_text },
|
|
100
104
|
"data-testid": "compact-insight-card-description",
|
|
101
105
|
variant: "subtitle2"
|
|
102
|
-
}), o?.label && /* @__PURE__ */ t(
|
|
106
|
+
}), o?.label && /* @__PURE__ */ t(S, {
|
|
103
107
|
"aria-disabled": r,
|
|
104
|
-
onClick:
|
|
108
|
+
onClick: b,
|
|
105
109
|
size: "small",
|
|
106
110
|
sx: {
|
|
107
111
|
alignSelf: "flex-start",
|
|
@@ -115,15 +119,15 @@ var e = 44, m = ({ logo: r }) => r ? /* @__PURE__ */ t(k, {
|
|
|
115
119
|
variant: "text",
|
|
116
120
|
children: o.label
|
|
117
121
|
})]
|
|
118
|
-
}), /* @__PURE__ */ t(
|
|
119
|
-
logo:
|
|
122
|
+
}), /* @__PURE__ */ t(V, {
|
|
123
|
+
logo: u,
|
|
120
124
|
variant: s.variant
|
|
121
125
|
})]
|
|
122
126
|
})]
|
|
123
127
|
});
|
|
124
128
|
};
|
|
125
129
|
export {
|
|
126
|
-
|
|
130
|
+
$ as default
|
|
127
131
|
};
|
|
128
132
|
|
|
129
133
|
//# sourceMappingURL=CompactInsightCard.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactInsightCard.es.js","names":[],"sources":["../../../src/insights-v2/components/CompactInsightCard.tsx"],"sourcesContent":["import type { KeyboardEvent, MouseEvent } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Card from '@mui/material/Card'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { P, Text } from '@mxenabled/mxui'\n\nimport type { InsightsPayload, LogoRef, PrimaryCTA } from '../../core'\nimport { createVariantBlock } from '../blocks/createVariantBlock'\nimport BadgedTile from './BadgedTile'\nimport InsightOptionsMenu from './InsightOptionsMenu'\nimport LogoFromGuid from './LogoFromGuid'\nimport StatusBadge from './StatusBadge'\n\n/** Figma 1941:111897: the tile the logo fills is 44px (rows are 32, the notification row 33). */\nconst ICON_SIZE = 44\n\ninterface InsightVisualProps {\n /** The first slot row's logo, when the envelope carries a row. */\n logo?: LogoRef | null\n}\n\n/** The row's logo, or the neutral insight glyph when the slot has no row. */\nconst LogoOrFallback = ({ logo }: InsightVisualProps) =>\n logo ? (\n <LogoFromGuid logo={logo} size={ICON_SIZE} />\n ) : (\n <Box\n data-testid=\"compact-insight-card-fallback-icon\"\n sx={{\n alignItems: 'center',\n bgcolor: 'primary.lighter',\n display: 'flex',\n height: ICON_SIZE,\n justifyContent: 'center',\n width: ICON_SIZE,\n }}\n >\n <Icon color=\"primary\" fill={true} name=\"lightbulb\" size={24} />\n </Box>\n )\n\n/** Micro, and any variant not registered below: the logo alone. */\nconst PlainVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile center={<LogoOrFallback logo={logo} />} size={ICON_SIZE} sx={{ flexShrink: 0 }} />\n)\n\n/** ditto `embedded`: the logo badged with a status glyph (Figma 1941:111897). */\nconst EmbeddedVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"warning\" />}\n />\n)\n\n/**\n * The card's right-hand visual, one component per ditto layout variant.\n *\n * A variant names a rendering *shape*, not an insight — `with_header` already serves both Large\n * Transaction and Fee Detected — so an insight wanting the badged logo reuses `embedded`. Only a\n * genuinely different visual registers a new entry, and existing ones are never touched.\n */\nconst InsightVisual = createVariantBlock<InsightVisualProps>({\n variants: { embedded: EmbeddedVisual },\n fallback: PlainVisual,\n name: 'InsightVisual',\n})\n\nexport interface CompactInsightCardProps {\n /** A `micro` or `embedded` envelope. */\n payload: InsightsPayload\n /**\n * Makes the whole card the tap target. What a tap does is the host's decision (post to the\n * host app, open a drawer, …); the card never opens anything itself. Omit for a static card.\n */\n onTap?: () => void\n /** Receives the primary CTA when tapped. The card does not resolve the CTA's block itself. */\n onCtaClick?: (cta: PrimaryCTA) => void\n /**\n * Renders the CTA disabled — label shown, `aria-disabled`, not tappable — for a host that cannot\n * honour it (e.g. `contact_support_block` when the client's `enable_support_requests` is off).\n */\n isCtaDisabled?: boolean\n}\n\nconst stopPropagation = (event: MouseEvent) => event.stopPropagation()\n\n/**\n * The one compact renderer the micro and embedded envelopes share (`insights_v2.2.md` §8.3).\n *\n * Figma 1941:111897 (Embedded | Large Transaction): a title row with the overflow slot, the HTML\n * description with the primary CTA under it, and on the right the first slot row's logo in a\n * `<BadgedTile>`. Under ditto's `embedded` variant the tile takes a status badge; micro sends no\n * variant and draws the logo alone. The card lays out from the envelope alone and never reads\n * `widget_type`.\n *\n * The icon falls back to the neutral insight glyph **here**, not in `LogoFromGuid`, when the slot\n * has no row. The `pill` on the same envelope is the transaction row's, not the card's.\n */\nconst CompactInsightCard = ({\n isCtaDisabled = false,\n onCtaClick,\n onTap,\n payload,\n}: CompactInsightCardProps) => {\n const { description, instance_slot, primary_cta, title } = payload\n const rowLogo = instance_slot.data_series?.[0]?.logo\n\n const handleCtaClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation()\n if (isCtaDisabled || !primary_cta) return\n onCtaClick?.(primary_cta)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n // Only the card itself: Enter on the CTA button is the button's own click.\n if (event.target !== event.currentTarget) return\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n onTap?.()\n }\n }\n\n const interactiveProps = onTap\n ? { onClick: onTap, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 }\n : {}\n\n return (\n <Card\n data-testid=\"compact-insight-card\"\n {...interactiveProps}\n sx={{ minWidth: 288, pb: 12, pl: 8, pr: 16, pt: 8, ...(onTap && { cursor: 'pointer' }) }}\n >\n <Stack\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 8,\n justifyContent: 'space-between',\n pl: 8,\n pt: 4,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {title ?? ''}\n </Text>\n {/* The menu renders only when the host wired `onMenuAction` (BeatActionsProvider). */}\n <Box onClick={stopPropagation} sx={{ display: 'flex' }}>\n <InsightOptionsMenu />\n </Box>\n </Stack>\n\n <Stack sx={{ flexDirection: 'row', gap: 16, pl: 8, pt: 4 }}>\n <Stack sx={{ flex: 1, gap: 8, minWidth: 0 }}>\n {/* `html_text` is rendered server-side by mrs_content from the ditto copy template (bold\n amount / merchant), not user-authored input; painted the same way `BaseLayout` paints\n the full card's description. */}\n <P\n dangerouslySetInnerHTML={{ __html: description.html_text }}\n data-testid=\"compact-insight-card-description\"\n variant=\"subtitle2\"\n />\n {primary_cta?.label && (\n <Button\n aria-disabled={isCtaDisabled}\n onClick={handleCtaClick}\n size=\"small\"\n sx={{\n alignSelf: 'flex-start',\n // Figma 1941:111897 lines the CTA label up with the description's left edge. The\n // column already pads 8, so the button's own 8 is pulled back out — padding kept so\n // the tap target does not shrink.\n ml: -8,\n px: 8,\n ...(isCtaDisabled && { color: 'text.disabled', cursor: 'default' }),\n }}\n variant=\"text\"\n >\n {primary_cta.label}\n </Button>\n )}\n </Stack>\n\n <InsightVisual logo={rowLogo} variant={instance_slot.variant} />\n </Stack>\n </Card>\n )\n}\n\nexport default CompactInsightCard\n"],"mappings":";;;;;;;;;;;;AAkBA,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O,IAAI;AAAA,UAAE,MAAM;AAAA,UAAG,KAAK;AAAA,UAAG,UAAU;AAAA,QAAE;AAAA,QAA1C,UAAA,CAIE,gBAAA,EAAC,GAAD;AAAA,UACE,yBAAyB,EAAE,QAAQ,EAAY,UAAU;AAAA,UACzD,eAAY;AAAA,UACZ,SAAQ;AAAA,QACT,CAAA,GACA,GAAa,SACZ,gBAAA,EAAC,GAAD;AAAA,UACE,iBAAe;AAAA,UACf,SAAS;AAAA,UACT,MAAK;AAAA,UACL,IAAI;AAAA,YACF,WAAW;AAAA,YAIX,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,GAAI,KAAiB;AAAA,cAAE,OAAO;AAAA,cAAiB,QAAQ;AAAA,YAAU;AAAA,UACnE;AAAA,UACA,SAAQ;AAAA,UAEP,UAAA,EAAY;AAAA,QACP,CAAA,CAEL;AAAA,MAEP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,QAAe,MAAM;AAAA,QAAS,SAAS,EAAc;AAAA,MAAU,CAAA,CAC1D;AAAA,IACH,CAAA,CAAA;AAAA;AAEV"}
|
|
1
|
+
{"version":3,"file":"CompactInsightCard.es.js","names":[],"sources":["../../../src/insights-v2/components/CompactInsightCard.tsx"],"sourcesContent":["import type { KeyboardEvent, MouseEvent } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Card from '@mui/material/Card'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { P, Text } from '@mxenabled/mxui'\n\nimport { slot } from '../../core'\nimport type { InsightsPayload, LogoRef, PrimaryCTA } from '../../core'\nimport { createVariantBlock } from '../blocks/createVariantBlock'\nimport BadgedTile from './BadgedTile'\nimport InsightOptionsMenu from './InsightOptionsMenu'\nimport LogoFromGuid from './LogoFromGuid'\nimport StatusBadge from './StatusBadge'\n\n/** Figma 1941:111897: the tile the logo fills is 44px (rows are 32, the notification row 33). */\nconst ICON_SIZE = 44\n\ninterface InsightVisualProps {\n /** The slot's `logo`, when ditto's variant declares and fills one. */\n logo?: LogoRef | null\n}\n\n/** The slot's logo, or the neutral insight glyph when the slot carries none. */\nconst LogoOrFallback = ({ logo }: InsightVisualProps) =>\n logo ? (\n <LogoFromGuid logo={logo} size={ICON_SIZE} />\n ) : (\n <Box\n data-testid=\"compact-insight-card-fallback-icon\"\n sx={{\n alignItems: 'center',\n bgcolor: 'primary.lighter',\n display: 'flex',\n height: ICON_SIZE,\n justifyContent: 'center',\n width: ICON_SIZE,\n }}\n >\n <Icon color=\"primary\" fill={true} name=\"lightbulb\" size={24} />\n </Box>\n )\n\n/** Micro, and any variant not registered below: the logo alone. */\nconst PlainVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile center={<LogoOrFallback logo={logo} />} size={ICON_SIZE} sx={{ flexShrink: 0 }} />\n)\n\n/** ditto `with_warning_badge`: the logo badged with a status glyph (Figma 1941:111897). */\nconst WarningBadgeVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"warning\" />}\n />\n)\n\n/**\n * The card's right-hand visual, one component per ditto layout variant.\n *\n * A variant names a rendering *shape*, not an insight or a surface — `with_header` already serves\n * both Large Transaction and Fee Detected — so an insight wanting the badged logo reuses\n * `with_warning_badge`. Only a genuinely different visual registers a new entry, and existing ones\n * are never touched.\n *\n * `minimal` draws the plain logo and is registered explicitly even though it matches the fallback:\n * micro and notification resolve it on every render, and an unregistered variant warns. The\n * fallback is for variants we genuinely do not know.\n */\nconst InsightVisual = createVariantBlock<InsightVisualProps>({\n variants: { minimal: PlainVisual, with_warning_badge: WarningBadgeVisual },\n fallback: PlainVisual,\n name: 'InsightVisual',\n})\n\nexport interface CompactInsightCardProps {\n /** A `micro` or `embedded` envelope. */\n payload: InsightsPayload\n /**\n * Makes the whole card the tap target. What a tap does is the host's decision (post to the\n * host app, open a drawer, …); the card never opens anything itself. Omit for a static card.\n */\n onTap?: () => void\n /** Receives the primary CTA when tapped. The card does not resolve the CTA's block itself. */\n onCtaClick?: (cta: PrimaryCTA) => void\n /**\n * Renders the CTA disabled — label shown, `aria-disabled`, not tappable — for a host that cannot\n * honour it (e.g. `contact_support_block` when the client's `enable_support_requests` is off).\n */\n isCtaDisabled?: boolean\n}\n\nconst stopPropagation = (event: MouseEvent) => event.stopPropagation()\n\n/**\n * The one compact renderer the micro and embedded envelopes share (`insights_v2.2.md` §8.3).\n *\n * Figma 1941:111897 (Embedded | Large Transaction): a title row with the overflow slot, the HTML\n * description with the primary CTA under it, and on the right the slot's `logo` in a\n * `<BadgedTile>`. Under ditto's `with_warning_badge` variant the tile takes a status badge; under\n * `minimal` it draws the logo alone. The card lays out from the envelope alone and never reads\n * `widget_type`.\n *\n * The icon falls back to the neutral insight glyph **here**, not in `LogoFromGuid`, when the slot\n * carries no logo. The `pill` on the same envelope is the transaction row's, not the card's.\n */\nconst CompactInsightCard = ({\n isCtaDisabled = false,\n onCtaClick,\n onTap,\n payload,\n}: CompactInsightCardProps) => {\n const { description, instance_slot, primary_cta, title } = payload\n // Reduced variants (`minimal`, `with_warning_badge`) declare a bare `logo` slot.\n const rowLogo = slot<LogoRef>(instance_slot.data, 'logo')\n\n const handleCtaClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation()\n if (isCtaDisabled || !primary_cta) return\n onCtaClick?.(primary_cta)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n // Only the card itself: Enter on the CTA button is the button's own click.\n if (event.target !== event.currentTarget) return\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n onTap?.()\n }\n }\n\n const interactiveProps = onTap\n ? { onClick: onTap, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 }\n : {}\n\n return (\n <Card\n data-testid=\"compact-insight-card\"\n {...interactiveProps}\n sx={{\n minWidth: 288,\n pb: 12,\n pl: 8,\n pr: 16,\n pt: 8,\n ...(onTap && { cursor: 'pointer' }),\n }}\n >\n <Stack\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 8,\n justifyContent: 'space-between',\n pl: 8,\n pt: 4,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {title ?? ''}\n </Text>\n {/* The menu renders only when the host wired `onMenuAction` (BeatActionsProvider). */}\n <Box onClick={stopPropagation} sx={{ display: 'flex' }}>\n <InsightOptionsMenu />\n </Box>\n </Stack>\n\n <Stack sx={{ flexDirection: 'row', gap: 16, pl: 8, pt: 4 }}>\n <Stack sx={{ flex: 1, gap: 8, minWidth: 0 }}>\n {/* `html_text` is rendered server-side by mrs_content from the ditto copy template (bold\n amount / merchant), not user-authored input; painted the same way `BaseLayout` paints\n the full card's description. */}\n <P\n dangerouslySetInnerHTML={{ __html: description.html_text }}\n data-testid=\"compact-insight-card-description\"\n variant=\"subtitle2\"\n />\n {primary_cta?.label && (\n <Button\n aria-disabled={isCtaDisabled}\n onClick={handleCtaClick}\n size=\"small\"\n sx={{\n alignSelf: 'flex-start',\n // Figma 1941:111897 lines the CTA label up with the description's left edge. The\n // column already pads 8, so the button's own 8 is pulled back out — padding kept so\n // the tap target does not shrink.\n ml: -8,\n px: 8,\n ...(isCtaDisabled && {\n color: 'text.disabled',\n cursor: 'default',\n }),\n }}\n variant=\"text\"\n >\n {primary_cta.label}\n </Button>\n )}\n </Stack>\n\n <InsightVisual logo={rowLogo} variant={instance_slot.variant} />\n </Stack>\n </Card>\n )\n}\n\nexport default CompactInsightCard\n"],"mappings":";;;;;;;;;;;;;AAmBA,IAAM,IAAY,IAQZ,IAAA,CAAkB,EAAE,MAAA,EAAA,MACxB,IACE,gBAAA,EAAC,GAAD;AAAA,EAAoB,MAAA;AAAA,EAAM,MAAM;AAAY,CAAA,IAE5C,gBAAA,EAAC,GAAD;AAAA,EACE,eAAY;AAAA,EACZ,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;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Z,gBAAA,EAAC,GAAD;AAAA,UACE,iBAAe;AAAA,UACf,SAAS;AAAA,UACT,MAAK;AAAA,UACL,IAAI;AAAA,YACF,WAAW;AAAA,YAIX,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,GAAI,KAAiB;AAAA,cACnB,OAAO;AAAA,cACP,QAAQ;AAAA,YACV;AAAA,UACF;AAAA,UACA,SAAQ;AAAA,UAEP,UAAA,EAAY;AAAA,QACP,CAAA,CAEL;AAAA,MAEP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,QAAe,MAAM;AAAA,QAAS,SAAS,EAAc;AAAA,MAAU,CAAA,CAC1D;AAAA,IACH,CAAA,CAAA;AAAA;AAEV"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface ConnectionDetailItem {
|
|
2
|
+
content: string;
|
|
3
|
+
icon_name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
}
|
|
6
|
+
/** Resolved strings the drilldown renders (see ConnectionDetailActionBlock). */
|
|
7
|
+
export interface ConnectionDetailContent {
|
|
8
|
+
aria_label_thumbs_down: string;
|
|
9
|
+
aria_label_thumbs_up: string;
|
|
10
|
+
benefits: string[];
|
|
11
|
+
description: string;
|
|
12
|
+
footer_title: string;
|
|
13
|
+
header_text: string;
|
|
14
|
+
shared_info_description: string;
|
|
15
|
+
shared_info_header_text: string;
|
|
16
|
+
shared_info_items: ConnectionDetailItem[];
|
|
17
|
+
}
|
|
18
|
+
interface ConnectionDetailDrillDownProps {
|
|
19
|
+
copy: ConnectionDetailContent;
|
|
20
|
+
/** Thumbs response — `'yes'` (up) / `'no'` (down). */
|
|
21
|
+
onRespond?: (response: 'yes' | 'no') => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Insights-v2 copy of the V1 `insights/components/shared/ConnectionDetailDrillDown`:
|
|
25
|
+
* the connection-details education panel (benefits, shared-info cards, and a
|
|
26
|
+
* thumbs was-this-helpful footer).
|
|
27
|
+
*
|
|
28
|
+
* Unlike V1, this is drawer CONTENT only — the `connection_detail_block`
|
|
29
|
+
* registry entry supplies the drawer and its title via ActionBlockLayer.
|
|
30
|
+
*/
|
|
31
|
+
declare const ConnectionDetailDrillDown: ({ copy, onRespond }: ConnectionDetailDrillDownProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default ConnectionDetailDrillDown;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import i from "@mui/material/Stack";
|
|
2
|
+
import { P as a, Text as s } from "@mxenabled/mxui";
|
|
3
|
+
import { Icon as l } from "@mxenabled/mx-icons";
|
|
4
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
5
|
+
import d from "@mui/material/IconButton";
|
|
6
|
+
import h from "@mui/material/Card";
|
|
7
|
+
import x from "@mui/material/CardContent";
|
|
8
|
+
var m = ({ icon: r, title: o, description: n }) => /* @__PURE__ */ e(h, {
|
|
9
|
+
variant: "outlined",
|
|
10
|
+
children: /* @__PURE__ */ t(x, {
|
|
11
|
+
sx: {
|
|
12
|
+
display: "flex",
|
|
13
|
+
gap: 12,
|
|
14
|
+
"&:last-child": { pb: 16 }
|
|
15
|
+
},
|
|
16
|
+
children: [r, /* @__PURE__ */ t(i, {
|
|
17
|
+
sx: { gap: 4 },
|
|
18
|
+
children: [/* @__PURE__ */ e(s, {
|
|
19
|
+
bold: !0,
|
|
20
|
+
variant: "body1",
|
|
21
|
+
children: o
|
|
22
|
+
}), /* @__PURE__ */ e(a, {
|
|
23
|
+
sx: {
|
|
24
|
+
color: "text.secondary",
|
|
25
|
+
fontWeight: 400
|
|
26
|
+
},
|
|
27
|
+
variant: "subtitle2",
|
|
28
|
+
children: n
|
|
29
|
+
})]
|
|
30
|
+
})]
|
|
31
|
+
})
|
|
32
|
+
}), I = ({ copy: r, onRespond: o }) => /* @__PURE__ */ t(i, {
|
|
33
|
+
sx: {
|
|
34
|
+
p: 24,
|
|
35
|
+
bgcolor: "background.paper"
|
|
36
|
+
},
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ t(i, {
|
|
39
|
+
sx: {
|
|
40
|
+
gap: 16,
|
|
41
|
+
pb: 16
|
|
42
|
+
},
|
|
43
|
+
children: [/* @__PURE__ */ t(i, {
|
|
44
|
+
sx: { gap: 4 },
|
|
45
|
+
children: [/* @__PURE__ */ e(a, {
|
|
46
|
+
variant: "h3",
|
|
47
|
+
children: r.header_text
|
|
48
|
+
}), /* @__PURE__ */ e(a, {
|
|
49
|
+
sx: {
|
|
50
|
+
fontWeight: 400,
|
|
51
|
+
color: "text.secondary"
|
|
52
|
+
},
|
|
53
|
+
variant: "subtitle2",
|
|
54
|
+
children: r.description
|
|
55
|
+
})]
|
|
56
|
+
}), /* @__PURE__ */ e(i, {
|
|
57
|
+
sx: { gap: 12 },
|
|
58
|
+
children: r.benefits.map((n, c) => /* @__PURE__ */ t(i, {
|
|
59
|
+
sx: {
|
|
60
|
+
flexDirection: "row",
|
|
61
|
+
gap: 8
|
|
62
|
+
},
|
|
63
|
+
children: [/* @__PURE__ */ e(l, {
|
|
64
|
+
color: "success",
|
|
65
|
+
name: "check_circle",
|
|
66
|
+
size: 16
|
|
67
|
+
}), /* @__PURE__ */ e(a, {
|
|
68
|
+
sx: { fontWeight: 400 },
|
|
69
|
+
variant: "subtitle2",
|
|
70
|
+
children: n
|
|
71
|
+
})]
|
|
72
|
+
}, c))
|
|
73
|
+
})]
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ t(i, {
|
|
76
|
+
sx: {
|
|
77
|
+
gap: 4,
|
|
78
|
+
py: 12
|
|
79
|
+
},
|
|
80
|
+
children: [/* @__PURE__ */ e(s, {
|
|
81
|
+
sx: { fontWeight: 600 },
|
|
82
|
+
variant: "body1",
|
|
83
|
+
children: r.shared_info_header_text
|
|
84
|
+
}), /* @__PURE__ */ e(a, {
|
|
85
|
+
sx: {
|
|
86
|
+
color: "text.secondary",
|
|
87
|
+
lineHeight: "20px"
|
|
88
|
+
},
|
|
89
|
+
variant: "body2",
|
|
90
|
+
children: r.shared_info_description
|
|
91
|
+
})]
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ e(i, {
|
|
94
|
+
sx: {
|
|
95
|
+
py: 16,
|
|
96
|
+
gap: 24
|
|
97
|
+
},
|
|
98
|
+
children: r.shared_info_items.map((n, c) => /* @__PURE__ */ e(m, {
|
|
99
|
+
description: n.content,
|
|
100
|
+
icon: /* @__PURE__ */ e(l, {
|
|
101
|
+
name: n.icon_name,
|
|
102
|
+
size: 24,
|
|
103
|
+
sx: { color: "text.primary" }
|
|
104
|
+
}),
|
|
105
|
+
title: n.title
|
|
106
|
+
}, c))
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ t(i, {
|
|
109
|
+
sx: {
|
|
110
|
+
py: 16,
|
|
111
|
+
gap: 12,
|
|
112
|
+
alignItems: "center"
|
|
113
|
+
},
|
|
114
|
+
children: [/* @__PURE__ */ e(s, {
|
|
115
|
+
bold: !0,
|
|
116
|
+
children: r.footer_title
|
|
117
|
+
}), /* @__PURE__ */ t(i, {
|
|
118
|
+
sx: {
|
|
119
|
+
flexDirection: "row",
|
|
120
|
+
alignItems: "center",
|
|
121
|
+
gap: 24
|
|
122
|
+
},
|
|
123
|
+
children: [/* @__PURE__ */ e(d, {
|
|
124
|
+
"aria-label": r.aria_label_thumbs_down,
|
|
125
|
+
onClick: () => o?.("no"),
|
|
126
|
+
children: /* @__PURE__ */ e(l, {
|
|
127
|
+
color: "secondary",
|
|
128
|
+
name: "thumb_down",
|
|
129
|
+
size: 24
|
|
130
|
+
})
|
|
131
|
+
}), /* @__PURE__ */ e(d, {
|
|
132
|
+
"aria-label": r.aria_label_thumbs_up,
|
|
133
|
+
onClick: () => o?.("yes"),
|
|
134
|
+
children: /* @__PURE__ */ e(l, {
|
|
135
|
+
color: "secondary",
|
|
136
|
+
name: "thumb_up",
|
|
137
|
+
size: 24
|
|
138
|
+
})
|
|
139
|
+
})]
|
|
140
|
+
})]
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
});
|
|
144
|
+
export {
|
|
145
|
+
I as default
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
//# sourceMappingURL=ConnectionDetailDrillDown.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectionDetailDrillDown.es.js","names":[],"sources":["../../../src/insights-v2/components/ConnectionDetailDrillDown.tsx"],"sourcesContent":["import Card from '@mui/material/Card'\nimport CardContent from '@mui/material/CardContent'\nimport IconButton from '@mui/material/IconButton'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { P, Text } from '@mxenabled/mxui'\n\ninterface InfoItemProps {\n icon: React.ReactNode\n title: string\n description: string\n}\n\nexport interface ConnectionDetailItem {\n content: string\n icon_name: string\n title: string\n}\n\n/** Resolved strings the drilldown renders (see ConnectionDetailActionBlock). */\nexport interface ConnectionDetailContent {\n aria_label_thumbs_down: string\n aria_label_thumbs_up: string\n benefits: string[]\n description: string\n footer_title: string\n header_text: string\n shared_info_description: string\n shared_info_header_text: string\n shared_info_items: ConnectionDetailItem[]\n}\n\ninterface ConnectionDetailDrillDownProps {\n copy: ConnectionDetailContent\n /** Thumbs response — `'yes'` (up) / `'no'` (down). */\n onRespond?: (response: 'yes' | 'no') => void\n}\n\nconst InfoItem = ({ icon, title, description }: InfoItemProps) => (\n <Card variant=\"outlined\">\n <CardContent sx={{ display: 'flex', gap: 12, '&:last-child': { pb: 16 } }}>\n {icon}\n <Stack sx={{ gap: 4 }}>\n <Text bold={true} variant=\"body1\">\n {title}\n </Text>\n <P sx={{ color: 'text.secondary', fontWeight: 400 }} variant=\"subtitle2\">\n {description}\n </P>\n </Stack>\n </CardContent>\n </Card>\n)\n\n/**\n * Insights-v2 copy of the V1 `insights/components/shared/ConnectionDetailDrillDown`:\n * the connection-details education panel (benefits, shared-info cards, and a\n * thumbs was-this-helpful footer).\n *\n * Unlike V1, this is drawer CONTENT only — the `connection_detail_block`\n * registry entry supplies the drawer and its title via ActionBlockLayer.\n */\nconst ConnectionDetailDrillDown = ({ copy, onRespond }: ConnectionDetailDrillDownProps) => (\n <Stack sx={{ p: 24, bgcolor: 'background.paper' }}>\n <Stack sx={{ gap: 16, pb: 16 }}>\n <Stack sx={{ gap: 4 }}>\n <P variant=\"h3\">{copy.header_text}</P>\n\n <P sx={{ fontWeight: 400, color: 'text.secondary' }} variant=\"subtitle2\">\n {copy.description}\n </P>\n </Stack>\n\n {/* Bullet points */}\n <Stack sx={{ gap: 12 }}>\n {copy.benefits.map((text, i) => (\n <Stack key={i} sx={{ flexDirection: 'row', gap: 8 }}>\n <Icon color=\"success\" name=\"check_circle\" size={16} />\n <P sx={{ fontWeight: 400 }} variant=\"subtitle2\">\n {text}\n </P>\n </Stack>\n ))}\n </Stack>\n </Stack>\n\n {/* Info section */}\n <Stack sx={{ gap: 4, py: 12 }}>\n <Text sx={{ fontWeight: 600 }} variant=\"body1\">\n {copy.shared_info_header_text}\n </Text>\n\n <P sx={{ color: 'text.secondary', lineHeight: '20px' }} variant=\"body2\">\n {copy.shared_info_description}\n </P>\n </Stack>\n\n {/* Cards */}\n <Stack sx={{ py: 16, gap: 24 }}>\n {copy.shared_info_items.map((item, index) => (\n <InfoItem\n description={item.content}\n icon={<Icon name={item.icon_name} size={24} sx={{ color: 'text.primary' }} />}\n key={index}\n title={item.title}\n />\n ))}\n </Stack>\n\n <Stack sx={{ py: 16, gap: 12, alignItems: 'center' }}>\n <Text bold={true}>{copy.footer_title}</Text>\n <Stack sx={{ flexDirection: 'row', alignItems: 'center', gap: 24 }}>\n <IconButton aria-label={copy.aria_label_thumbs_down} onClick={() => onRespond?.('no')}>\n <Icon color=\"secondary\" name=\"thumb_down\" size={24} />\n </IconButton>\n <IconButton aria-label={copy.aria_label_thumbs_up} onClick={() => onRespond?.('yes')}>\n <Icon color=\"secondary\" name=\"thumb_up\" size={24} />\n </IconButton>\n </Stack>\n </Stack>\n </Stack>\n)\n\n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A,UAAI,IAAI,EAAE,OAAO,eAAe;AAAA,QAAI,CAAA;AAAA,QAE5E,OAAO,EAAK;AAAA,MACb,GAFM,CAEN,CACF;AAAA,IACI,CAAA;AAAA,IAEP,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,IAAI;AAAA,QAAI,KAAK;AAAA,QAAI,YAAY;AAAA,MAAS;AAAA,MAAnD,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM;AAAA,QAAO,UAAA,EAAK;AAAA,MAAmB,CAAA,GAC3C,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,eAAe;AAAA,UAAO,YAAY;AAAA,UAAU,KAAK;AAAA,QAAG;AAAA,QAAjE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UAAY,cAAY,EAAK;AAAA,UAAwB,SAAA,MAAe,IAAY,IAAI;AAAA,UAClF,UAAA,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAY,MAAK;AAAA,YAAa,MAAM;AAAA,UAAK,CAAA;AAAA,QAC3C,CAAA,GACZ,gBAAA,EAAC,GAAD;AAAA,UAAY,cAAY,EAAK;AAAA,UAAsB,SAAA,MAAe,IAAY,KAAK;AAAA,UACjF,UAAA,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAY,MAAK;AAAA,YAAW,MAAM;AAAA,UAAK,CAAA;AAAA,QACzC,CAAA,CACP;AAAA,MACF,CAAA,CAAA;AAAA;EACF"}
|
|
@@ -3,6 +3,8 @@ export interface FeedbackDialogProps {
|
|
|
3
3
|
title: string;
|
|
4
4
|
options: string[];
|
|
5
5
|
characterLimit?: number;
|
|
6
|
+
/** Optional paragraph rendered between the title and the options (Figma feedback survey). */
|
|
7
|
+
description?: string;
|
|
6
8
|
characterLimitLabel?: string;
|
|
7
9
|
isOpen: boolean;
|
|
8
10
|
onSubmit: (option: string, detail?: string) => void;
|
|
@@ -15,5 +17,5 @@ export interface FeedbackDialogProps {
|
|
|
15
17
|
closeAriaLabel: string;
|
|
16
18
|
}
|
|
17
19
|
/** Generic feedback survey dialog. Last option shows detail text field. */
|
|
18
|
-
declare const FeedbackDialog: ({ isOpen, onClose, onSubmit, title, options, characterLimit, characterLimitLabel, secondaryText, primaryText, closeAriaLabel, onBackClick, onTextInputFocus, }: FeedbackDialogProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
declare const FeedbackDialog: ({ isOpen, onClose, onSubmit, title, options, characterLimit, description, characterLimitLabel, secondaryText, primaryText, closeAriaLabel, onBackClick, onTextInputFocus, }: FeedbackDialogProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
21
|
export default FeedbackDialog;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import
|
|
4
|
-
import { Text as
|
|
5
|
-
import { jsx as o, jsxs as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
var
|
|
12
|
-
const [t,
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
}, [
|
|
16
|
-
const c = t === r[r.length - 1],
|
|
17
|
-
|
|
18
|
-
},
|
|
1
|
+
import _ from "../../common/components/dialog/Dialog.es.js";
|
|
2
|
+
import { useEffect as j, useRef as b, useState as h } from "react";
|
|
3
|
+
import z from "@mui/material/Stack";
|
|
4
|
+
import { Text as g } from "@mxenabled/mxui";
|
|
5
|
+
import { jsx as o, jsxs as x } from "react/jsx-runtime";
|
|
6
|
+
import E from "@mui/material/FormControlLabel";
|
|
7
|
+
import L from "@mui/material/TextField";
|
|
8
|
+
import G from "@mui/material/Radio";
|
|
9
|
+
import H from "@mui/material/FormControl";
|
|
10
|
+
import K from "@mui/material/RadioGroup";
|
|
11
|
+
var W = 250, ee = ({ isOpen: a, onClose: v, onSubmit: C, title: s, options: r, characterLimit: y = W, description: u, characterLimitLabel: m, secondaryText: S, primaryText: k, closeAriaLabel: F, onBackClick: R, onTextInputFocus: D }) => {
|
|
12
|
+
const [t, d] = h(""), [l, f] = h(""), i = b(!1), n = b(!1);
|
|
13
|
+
if (j(() => {
|
|
14
|
+
a && (i.current = !1, n.current = !1);
|
|
15
|
+
}, [a]), r.length === 0) return null;
|
|
16
|
+
const c = t === r[r.length - 1], M = !t || c && !l.trim(), p = () => {
|
|
17
|
+
d(""), f("");
|
|
18
|
+
}, T = (e) => {
|
|
19
19
|
if (e === "backdropClick" || e === "escapeKeyDown") return e;
|
|
20
20
|
if (!n.current) return "closeButton";
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
n.current = !0,
|
|
26
|
-
},
|
|
27
|
-
i.current || (i.current = !0,
|
|
21
|
+
}, A = (e, P) => {
|
|
22
|
+
const w = T(P);
|
|
23
|
+
p(), v(w);
|
|
24
|
+
}, B = () => {
|
|
25
|
+
n.current = !0, R?.();
|
|
26
|
+
}, I = () => {
|
|
27
|
+
i.current || (i.current = !0, D?.());
|
|
28
28
|
};
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ x(_, {
|
|
30
30
|
copy: {
|
|
31
31
|
title: s,
|
|
32
|
-
close_aria:
|
|
32
|
+
close_aria: F
|
|
33
33
|
},
|
|
34
|
-
disablePrimaryButton:
|
|
35
|
-
isOpen:
|
|
36
|
-
onClose:
|
|
34
|
+
disablePrimaryButton: M,
|
|
35
|
+
isOpen: a,
|
|
36
|
+
onClose: A,
|
|
37
37
|
onPrimaryAction: () => {
|
|
38
|
-
n.current = !0,
|
|
38
|
+
n.current = !0, C(t, c ? l.trim() : void 0), p();
|
|
39
39
|
},
|
|
40
|
-
onSecondaryAction:
|
|
41
|
-
primaryText:
|
|
42
|
-
secondaryText:
|
|
40
|
+
onSecondaryAction: B,
|
|
41
|
+
primaryText: k,
|
|
42
|
+
secondaryText: S,
|
|
43
43
|
sx: {
|
|
44
44
|
"& .MuiDialogContent-root": { py: 0 },
|
|
45
45
|
"& .MuiDialog-paperScrollPaper": { bgcolor: "background.paper" },
|
|
@@ -58,50 +58,58 @@ var K = 250, O = ({ isOpen: l, onClose: h, onSubmit: x, title: s, options: r, ch
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
|
-
children: [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
} } }),
|
|
71
|
-
label: e,
|
|
72
|
-
sx: { "& .MuiFormControlLabel-label": {
|
|
73
|
-
color: "text.primary",
|
|
74
|
-
fontSize: 15
|
|
75
|
-
} },
|
|
76
|
-
value: e
|
|
77
|
-
}, e))
|
|
78
|
-
}) }), c && /* @__PURE__ */ g(_, {
|
|
79
|
-
sx: {
|
|
80
|
-
gap: 3,
|
|
81
|
-
mt: 4
|
|
82
|
-
},
|
|
83
|
-
children: [/* @__PURE__ */ o(E, {
|
|
84
|
-
autoFocus: !0,
|
|
85
|
-
maxRows: 4,
|
|
86
|
-
minRows: 4,
|
|
87
|
-
multiline: !0,
|
|
61
|
+
children: [
|
|
62
|
+
u && /* @__PURE__ */ o(g, {
|
|
63
|
+
sx: { mb: 8 },
|
|
64
|
+
variant: "body1",
|
|
65
|
+
children: u
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ o(H, { children: /* @__PURE__ */ o(K, {
|
|
68
|
+
"aria-label": s,
|
|
69
|
+
name: "feedback-radio-group",
|
|
88
70
|
onChange: (e) => d(e.target.value),
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
71
|
+
value: t,
|
|
72
|
+
children: r.map((e) => /* @__PURE__ */ o(E, {
|
|
73
|
+
control: /* @__PURE__ */ o(G, { sx: { "& .MuiSvgIcon-root": {
|
|
74
|
+
fontSize: 22,
|
|
75
|
+
color: "action.active"
|
|
76
|
+
} } }),
|
|
77
|
+
label: e,
|
|
78
|
+
sx: { "& .MuiFormControlLabel-label": {
|
|
79
|
+
color: "text.primary",
|
|
80
|
+
fontSize: 15
|
|
81
|
+
} },
|
|
82
|
+
value: e
|
|
83
|
+
}, e))
|
|
84
|
+
}) }),
|
|
85
|
+
c && /* @__PURE__ */ x(z, {
|
|
93
86
|
sx: {
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
gap: 3,
|
|
88
|
+
mt: 4
|
|
96
89
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
90
|
+
children: [/* @__PURE__ */ o(L, {
|
|
91
|
+
autoFocus: !0,
|
|
92
|
+
maxRows: 4,
|
|
93
|
+
minRows: 4,
|
|
94
|
+
multiline: !0,
|
|
95
|
+
onChange: (e) => f(e.target.value),
|
|
96
|
+
onFocus: I,
|
|
97
|
+
slotProps: { htmlInput: { maxLength: y } },
|
|
98
|
+
value: l
|
|
99
|
+
}), m && /* @__PURE__ */ o(g, {
|
|
100
|
+
sx: {
|
|
101
|
+
color: "text.secondary",
|
|
102
|
+
fontWeight: 400
|
|
103
|
+
},
|
|
104
|
+
variant: "subtitle2",
|
|
105
|
+
children: m
|
|
106
|
+
})]
|
|
107
|
+
})
|
|
108
|
+
]
|
|
101
109
|
});
|
|
102
110
|
};
|
|
103
111
|
export {
|
|
104
|
-
|
|
112
|
+
ee as default
|
|
105
113
|
};
|
|
106
114
|
|
|
107
115
|
//# sourceMappingURL=FeedbackDialog.es.js.map
|