@mx-cartographer/experiences 9.4.12-alpha.al1 → 9.4.13

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 (41) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/common/context/hooks.d.ts +1 -0
  3. package/dist/common/context/hooks.es.js +18 -17
  4. package/dist/common/context/hooks.es.js.map +1 -1
  5. package/dist/common/context/index.d.ts +1 -1
  6. package/dist/common/index.es.js +130 -129
  7. package/dist/core/stores/InsightsV2Store.d.ts +24 -7
  8. package/dist/core/stores/InsightsV2Store.es.js +18 -23
  9. package/dist/core/stores/InsightsV2Store.es.js.map +1 -1
  10. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.d.ts +4 -27
  11. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js +253 -206
  12. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js.map +1 -1
  13. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.d.ts +5 -4
  14. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js +12 -20
  15. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js.map +1 -1
  16. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/index.d.ts +2 -0
  17. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.d.ts +9 -43
  18. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js +12 -79
  19. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js.map +1 -1
  20. package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js +35 -13
  21. package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -1
  22. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +17 -13
  23. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -1
  24. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -1
  25. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +7 -7
  26. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -1
  27. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js +17 -13
  28. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js.map +1 -1
  29. package/dist/insights-v2/blocks/ChartBlocks/index.d.ts +1 -0
  30. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +19 -25
  31. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -1
  32. package/dist/insights-v2/blocks/createVariantBlock.d.ts +29 -0
  33. package/dist/insights-v2/blocks/createVariantBlock.es.js +13 -0
  34. package/dist/insights-v2/blocks/createVariantBlock.es.js.map +1 -0
  35. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +24 -25
  36. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -1
  37. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js +18 -19
  38. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js.map +1 -1
  39. package/dist/insights-v2/index.es.js +52 -50
  40. package/dist/insights-v2/mappings/blocks.es.js +20 -20
  41. package/package.json +1 -1
@@ -0,0 +1,29 @@
1
+ import { ComponentType } from 'react';
2
+ export type VariantRegistry<P> = Record<string, ComponentType<P>>;
3
+ export interface WithVariant {
4
+ /** Backend variant name selecting which registered component renders. */
5
+ variant?: string | null;
6
+ }
7
+ interface CreateVariantBlockConfig<P> {
8
+ /** Registered variants keyed by the backend variant name. */
9
+ variants: VariantRegistry<P>;
10
+ /** Rendered when the incoming variant is unknown or absent. Required so an
11
+ * unrecognized backend variant degrades gracefully instead of crashing. */
12
+ fallback: ComponentType<P>;
13
+ /** Label used in the dev warning logged on an unknown variant. */
14
+ name?: string;
15
+ }
16
+ /**
17
+ * Builds a block that dispatches on `variant` to a registered component,
18
+ * falling back to `fallback` (with a dev warning) when the variant is unknown.
19
+ *
20
+ * This is the single place an n-variant block resolves its variant, so no block
21
+ * re-hand-rolls `variants[variant as keyof typeof variants]` or forgets the
22
+ * unknown-variant guard. Adding a variant becomes: write one presentational
23
+ * component + register it — existing variants are never touched (open/closed).
24
+ *
25
+ * Works for any block whose variants share a props shape `P`; the caller passes
26
+ * the resolved `variant` plus those props.
27
+ */
28
+ export declare function createVariantBlock<P extends object>({ variants, fallback, name, }: CreateVariantBlockConfig<P>): ComponentType<P & WithVariant>;
29
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ function k({ variants: t, fallback: e, name: o = "VariantBlock" }) {
3
+ const i = e;
4
+ return function({ variant: n, ...l }) {
5
+ const r = n != null ? t[n] : void 0;
6
+ return n != null && !r && console.warn(`[${o}] Unknown variant "${n}" — rendering fallback. Register it in the variants map.`), /* @__PURE__ */ a(r ?? i, { ...l });
7
+ };
8
+ }
9
+ export {
10
+ k as createVariantBlock
11
+ };
12
+
13
+ //# sourceMappingURL=createVariantBlock.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createVariantBlock.es.js","names":[],"sources":["../../../src/insights-v2/blocks/createVariantBlock.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\n\nexport type VariantRegistry<P> = Record<string, ComponentType<P>>\n\nexport interface WithVariant {\n /** Backend variant name selecting which registered component renders. */\n variant?: string | null\n}\n\ninterface CreateVariantBlockConfig<P> {\n /** Registered variants keyed by the backend variant name. */\n variants: VariantRegistry<P>\n /** Rendered when the incoming variant is unknown or absent. Required so an\n * unrecognized backend variant degrades gracefully instead of crashing. */\n fallback: ComponentType<P>\n /** Label used in the dev warning logged on an unknown variant. */\n name?: string\n}\n\n/**\n * Builds a block that dispatches on `variant` to a registered component,\n * falling back to `fallback` (with a dev warning) when the variant is unknown.\n *\n * This is the single place an n-variant block resolves its variant, so no block\n * re-hand-rolls `variants[variant as keyof typeof variants]` or forgets the\n * unknown-variant guard. Adding a variant becomes: write one presentational\n * component + register it — existing variants are never touched (open/closed).\n *\n * Works for any block whose variants share a props shape `P`; the caller passes\n * the resolved `variant` plus those props.\n */\nexport function createVariantBlock<P extends object>({\n variants,\n fallback,\n name = 'VariantBlock',\n}: CreateVariantBlockConfig<P>): ComponentType<P & WithVariant> {\n const Fallback = fallback\n\n return function VariantBlock({ variant, ...rest }: P & WithVariant) {\n const registered = variant != null ? variants[variant] : undefined\n\n if (variant != null && !registered) {\n console.warn(\n `[${name}] Unknown variant \"${variant}\" — rendering fallback. Register it in the variants map.`,\n )\n }\n\n const Variant = registered ?? Fallback\n\n return <Variant {...(rest as P)} />\n }\n}\n"],"mappings":";AA+BA,SAAgB,EAAqC,EACnD,UAAA,GACA,UAAA,GACA,MAAA,IAAO,eAAA,GACuD;AAC9D,QAAM,IAAW;AAEjB,SAAO,SAAsB,EAAE,SAAA,GAAS,GAAG,EAAA,GAAyB;AAClE,UAAM,IAAa,KAAW,OAAO,EAAS,CAAA,IAAW;AAEzD,WAAI,KAAW,QAAQ,CAAC,KACtB,QAAQ,KACN,IAAI,CAAA,sBAA0B,CAAA,0DAChC,GAKK,gBAAA,EAFS,KAAc,GAEvB,EAAS,GAAK,EAAa,CAAA;AAAA,EACpC;AACF"}
@@ -7,21 +7,21 @@ import { jsx as n, jsxs as M } from "react/jsx-runtime";
7
7
  import { useTheme as W } from "@mui/material/styles";
8
8
  import z from "@mui/material/Box";
9
9
  import { BarPlot as G, ChartContainer as N, ChartsReferenceLine as b, ChartsXAxis as X } from "@mui/x-charts";
10
- var Q = ({ amounts: c, color: s, data: e, heightOverride: f, margin: a = {
10
+ var Q = ({ amounts: c, color: s, data: e, heightOverride: p, margin: l = {
11
11
  bottom: 30,
12
12
  left: 16,
13
13
  right: 16,
14
14
  top: 20
15
- }, onBarClick: S, legendPosition: h = "bottom", monthlyAmountLabel: y, removeSelectedTabColorChange: u, selectedTabIndex: o, trendAmountLabel: x }) => {
16
- const A = m.useRef(null), { height: d, width: R } = V(A), g = W(), k = m.useMemo(() => {
17
- const t = e.map(({ value: l }) => l), r = Math.min(...t), i = Math.max(...t);
15
+ }, onBarClick: S, legendPosition: h = "bottom", monthlyAmountLabel: x, removeSelectedTabColorChange: u, selectedTabIndex: o, trendAmountLabel: y }) => {
16
+ const g = m.useRef(null), { height: d, width: R } = V(g), A = W(), k = m.useMemo(() => {
17
+ const t = e.map(({ value: a }) => a), r = Math.min(...t), i = Math.max(...t);
18
18
  return {
19
19
  series: [{
20
20
  data: t,
21
21
  type: "bar"
22
22
  }],
23
23
  xAxis: [{
24
- data: e.map(({ label: l }) => l),
24
+ data: e.map(({ label: a }) => a),
25
25
  scaleType: "band",
26
26
  categoryGapRatio: 0.45
27
27
  }],
@@ -38,14 +38,14 @@ var Q = ({ amounts: c, color: s, data: e, heightOverride: f, margin: a = {
38
38
  s,
39
39
  e,
40
40
  o
41
- ]), B = m.useMemo(() => e[o ?? e.length - 1], [e, o]), p = e.reduce((t, r) => Math.min(t, r.value), 1 / 0) < 0, C = /* @__PURE__ */ n(D, {
41
+ ]), B = m.useMemo(() => e[o ?? e.length - 1], [e, o]), f = e.reduce((t, r) => Math.min(t, r.value), 1 / 0) < 0, C = /* @__PURE__ */ n(D, {
42
42
  color: s,
43
- legendStyle: { pl: a.left },
43
+ legendStyle: { pl: l.left },
44
44
  monthlyAmount: B.formattedAmount,
45
- monthlyAmountLabel: y,
45
+ monthlyAmountLabel: x,
46
46
  trendAmount: c?.formattedAverage,
47
- trendAmountLabel: x
48
- }), w = y || x, L = (t, { dataIndex: r }) => S?.(r);
47
+ trendAmountLabel: y
48
+ }), w = x || y, L = (t, { dataIndex: r }) => S?.(r);
49
49
  return /* @__PURE__ */ M(j, {
50
50
  sx: {
51
51
  alignItems: "center",
@@ -54,9 +54,9 @@ var Q = ({ amounts: c, color: s, data: e, heightOverride: f, margin: a = {
54
54
  children: [
55
55
  w && h === "top" && C,
56
56
  /* @__PURE__ */ n(z, {
57
- ref: A,
57
+ ref: g,
58
58
  sx: {
59
- height: f || 122,
59
+ height: p || 122,
60
60
  mb: h === "top" ? 0 : 4,
61
61
  mt: h === "top" ? 4 : 0,
62
62
  touchAction: "pan-y",
@@ -64,16 +64,15 @@ var Q = ({ amounts: c, color: s, data: e, heightOverride: f, margin: a = {
64
64
  "& svg": {
65
65
  touchAction: "pan-y",
66
66
  userSelect: "none"
67
- },
68
- "& .recharts-wrapper": { touchAction: "pan-y" }
67
+ }
69
68
  },
70
69
  children: /* @__PURE__ */ M(N, {
71
70
  height: d,
72
71
  margin: {
73
- bottom: a.bottom,
74
- left: a.left,
75
- right: a.right,
76
- top: a.top || 45
72
+ bottom: l.bottom,
73
+ left: l.left,
74
+ right: l.right,
75
+ top: l.top || 45
77
76
  },
78
77
  series: k.series,
79
78
  width: R,
@@ -83,34 +82,34 @@ var Q = ({ amounts: c, color: s, data: e, heightOverride: f, margin: a = {
83
82
  c?.average && /* @__PURE__ */ n(b, {
84
83
  labelAlign: "middle",
85
84
  lineStyle: {
86
- stroke: g.palette.chart.chart7,
85
+ stroke: A.palette.chart.chart7,
87
86
  strokeDasharray: "4",
88
87
  strokeLinecap: "round",
89
88
  strokeWidth: 1
90
89
  },
91
90
  y: c?.average
92
91
  }),
93
- p && /* @__PURE__ */ n(b, {
92
+ f && /* @__PURE__ */ n(b, {
94
93
  labelAlign: "middle",
95
- lineStyle: { stroke: g.palette.chart.chart7 },
94
+ lineStyle: { stroke: A.palette.chart.chart7 },
96
95
  y: 0
97
96
  }),
98
97
  /* @__PURE__ */ n(X, {
99
98
  slots: { axisTickLabel: ({ text: t, ownerState: r, ...i }) => {
100
- const l = e[o ?? e.length - 1]?.label;
99
+ const a = e[o ?? e.length - 1]?.label;
101
100
  return /* @__PURE__ */ n("text", {
102
101
  ...i,
103
102
  style: {
104
103
  ...i.style,
105
- fontWeight: !u && l === t ? "bold" : 400
104
+ fontWeight: !u && a === t ? "bold" : 400
106
105
  },
107
106
  children: t
108
107
  });
109
108
  } },
110
109
  sx: (t) => ({
111
- "& .MuiChartsAxis-line": { stroke: p ? "none" : t.palette.text?.primary },
110
+ "& .MuiChartsAxis-line": { stroke: f ? "none" : t.palette.text?.primary },
112
111
  "& .MuiChartsAxis-tickContainer:first-of-type .MuiChartsAxis-tick": { display: "none" },
113
- "& .MuiChartsAxis-tickLabel": { transform: p ? "translateY(15px)" : {} }
112
+ "& .MuiChartsAxis-tickLabel": { transform: f ? "translateY(15px)" : {} }
114
113
  }),
115
114
  tickLabelStyle: { fontSize: 11 }
116
115
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"BarchartV2.es.js","names":[],"sources":["../../../../src/insights-v2/components/chartblocks/BarchartV2.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { type Theme, useTheme } from '@mui/material/styles'\nimport {\n BarPlot,\n type BarSeriesType,\n ChartContainer as ResponsiveChartContainer,\n ChartsReferenceLine,\n ChartsXAxis,\n} from '@mui/x-charts'\n\nimport { useContainerDimensions } from '../../../insights/hooks/useContainerDimensions'\nimport type { BarChartV2Props } from '../../../insights/types/Charts/BarChart'\nimport { LegendV2 } from '../../../insights/components/shared/Charts/BarChart/ChartLegendV2'\nimport { CustomBarPlotV2 } from '../../../insights/components/shared/Charts/BarChart/CustomBarPlotV2'\n\nexport const BarChartV2 = ({\n amounts,\n color,\n data,\n heightOverride,\n margin = {\n bottom: 30,\n left: 16,\n right: 16,\n top: 20,\n },\n onBarClick,\n legendPosition = 'bottom',\n monthlyAmountLabel,\n removeSelectedTabColorChange,\n selectedTabIndex,\n trendAmountLabel,\n}: BarChartV2Props) => {\n const containerRef = React.useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const theme = useTheme()\n\n const chartData = React.useMemo(() => {\n const values = data.map(({ value }) => value)\n const minValue = Math.min(...values)\n const maxValue = Math.max(...values)\n\n return {\n series: [\n {\n data: values,\n type: 'bar',\n },\n ] as BarSeriesType[],\n xAxis: [\n {\n data: data.map(({ label }) => label),\n scaleType: 'band' as const,\n categoryGapRatio: 0.45,\n },\n ],\n yAxis: [\n {\n scaleType: 'linear' as const,\n min: minValue < 0 ? minValue * 1.2 : 0,\n max: maxValue > 0 ? maxValue : 0,\n },\n ],\n }\n }, [data])\n\n const colorRange = React.useMemo(() => {\n const defaultColor = `${color}80`\n if (removeSelectedTabColorChange) return data.map(() => color)\n\n if (selectedTabIndex == null) {\n return [...new Array(data.length - 1).fill(defaultColor), color]\n }\n return data.map((_, index) => (index === selectedTabIndex ? color : defaultColor))\n }, [color, data, selectedTabIndex])\n\n const selectedData = React.useMemo(\n () => data[selectedTabIndex ?? data.length - 1],\n [data, selectedTabIndex],\n )\n\n const lowestValue = data.reduce((min, item) => Math.min(min, item.value), Infinity)\n const isNegative = lowestValue < 0\n\n const legendComponent = (\n <LegendV2\n color={color}\n legendStyle={{ pl: margin.left }}\n monthlyAmount={selectedData.formattedAmount}\n monthlyAmountLabel={monthlyAmountLabel}\n trendAmount={amounts?.formattedAverage}\n trendAmountLabel={trendAmountLabel}\n />\n )\n\n const shouldShowLegend = monthlyAmountLabel || trendAmountLabel\n\n const handleBarClick = (\n _: React.MouseEvent<SVGElement, MouseEvent>,\n { dataIndex }: { dataIndex: number },\n ) => onBarClick?.(dataIndex)\n\n return (\n <Stack sx={{ alignItems: 'center', width: '100%' }}>\n {shouldShowLegend && legendPosition === 'top' && legendComponent}\n <Box\n ref={containerRef}\n sx={{\n height: heightOverride ? heightOverride : 122,\n mb: legendPosition === 'top' ? 0 : 4,\n mt: legendPosition === 'top' ? 4 : 0,\n touchAction: 'pan-y',\n width: '100%',\n '& svg': {\n touchAction: 'pan-y',\n userSelect: 'none',\n },\n '& .recharts-wrapper': {\n touchAction: 'pan-y',\n },\n }}\n >\n <ResponsiveChartContainer\n height={height}\n margin={{\n bottom: margin.bottom,\n left: margin.left,\n right: margin.right,\n top: margin.top || 45,\n }}\n series={chartData.series}\n width={width}\n xAxis={chartData.xAxis}\n yAxis={[{ width: 0 }]}\n >\n {amounts?.average && (\n <ChartsReferenceLine\n labelAlign=\"middle\"\n lineStyle={{\n stroke: theme.palette.chart.chart7,\n strokeDasharray: '4',\n strokeLinecap: 'round',\n strokeWidth: 1,\n }}\n y={amounts?.average}\n />\n )}\n\n {isNegative && (\n <ChartsReferenceLine\n labelAlign=\"middle\"\n lineStyle={{\n stroke: theme.palette.chart.chart7,\n }}\n y={0}\n />\n )}\n\n <ChartsXAxis\n slots={{\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n axisTickLabel: ({ text, ownerState: _, ...restProps }) => {\n const label = data[selectedTabIndex ?? data.length - 1]?.label\n return (\n <text\n {...restProps}\n style={\n {\n ...restProps.style,\n fontWeight: !removeSelectedTabColorChange && label === text ? 'bold' : 400,\n } as React.CSSProperties\n }\n >\n {text}\n </text>\n )\n },\n }}\n sx={(theme) => ({\n '& .MuiChartsAxis-line': {\n stroke: !isNegative ? (theme as Theme).palette.text?.primary : 'none',\n },\n '& .MuiChartsAxis-tickContainer:first-of-type .MuiChartsAxis-tick': {\n display: 'none',\n },\n '& .MuiChartsAxis-tickLabel': {\n transform: isNegative ? 'translateY(15px)' : {},\n },\n })}\n tickLabelStyle={{\n fontSize: 11,\n }}\n />\n <BarPlot\n onItemClick={handleBarClick}\n slots={{\n bar: (props) => {\n const { ownerState, ...defaultProps } = props\n return (\n <CustomBarPlotV2\n {...defaultProps}\n colorRange={colorRange}\n data={data}\n dataIndex={ownerState.dataIndex}\n removeSelectedTabColorChange={removeSelectedTabColorChange}\n selectedTabIndex={selectedTabIndex ?? data.length - 1}\n style={{\n height: props.height,\n x: props.x,\n y: props.y,\n width: props.width,\n }}\n />\n )\n },\n }}\n />\n </ResponsiveChartContainer>\n </Box>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AE,YAAA,GAAY,GAAG,EAAA,IAAiB;AACxC,uBACE,gBAAA,EAAC,GAAD;AAAA,kBACE,GAAI;AAAA,kBACQ,YAAA;AAAA,kBACN,MAAA;AAAA,kBACN,WAAW,EAAW;AAAA,kBACQ,8BAAA;AAAA,kBAC9B,kBAAkB,KAAoB,EAAK,SAAS;AAAA,kBACpD,OAAO;AAAA,oBACL,QAAQ,EAAM;AAAA,oBACd,GAAG,EAAM;AAAA,oBACT,GAAG,EAAM;AAAA,oBACT,OAAO,EAAM;AAAA,kBACf;AAAA,gBACD,CAAA;AAAA,cAEL,EACF;AAAA,YACD,CAAA;AAAA,UACuB;AAAA;MACvB,CAAA;AAAA,MACJ,KAAoB,MAAmB,YAAY;AAAA,IAC/C;AAAA;AAEX"}
1
+ {"version":3,"file":"BarchartV2.es.js","names":[],"sources":["../../../../src/insights-v2/components/chartblocks/BarchartV2.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { type Theme, useTheme } from '@mui/material/styles'\nimport {\n BarPlot,\n type BarSeriesType,\n ChartContainer as ResponsiveChartContainer,\n ChartsReferenceLine,\n ChartsXAxis,\n} from '@mui/x-charts'\n\nimport { useContainerDimensions } from '../../../insights/hooks/useContainerDimensions'\nimport type { BarChartV2Props } from '../../../insights/types/Charts/BarChart'\nimport { LegendV2 } from '../../../insights/components/shared/Charts/BarChart/ChartLegendV2'\nimport { CustomBarPlotV2 } from '../../../insights/components/shared/Charts/BarChart/CustomBarPlotV2'\n\nexport const BarChartV2 = ({\n amounts,\n color,\n data,\n heightOverride,\n margin = {\n bottom: 30,\n left: 16,\n right: 16,\n top: 20,\n },\n onBarClick,\n legendPosition = 'bottom',\n monthlyAmountLabel,\n removeSelectedTabColorChange,\n selectedTabIndex,\n trendAmountLabel,\n}: BarChartV2Props) => {\n const containerRef = React.useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const theme = useTheme()\n\n const chartData = React.useMemo(() => {\n const values = data.map(({ value }) => value)\n const minValue = Math.min(...values)\n const maxValue = Math.max(...values)\n\n return {\n series: [\n {\n data: values,\n type: 'bar',\n },\n ] as BarSeriesType[],\n xAxis: [\n {\n data: data.map(({ label }) => label),\n scaleType: 'band' as const,\n categoryGapRatio: 0.45,\n },\n ],\n yAxis: [\n {\n scaleType: 'linear' as const,\n min: minValue < 0 ? minValue * 1.2 : 0,\n max: maxValue > 0 ? maxValue : 0,\n },\n ],\n }\n }, [data])\n\n const colorRange = React.useMemo(() => {\n const defaultColor = `${color}80`\n if (removeSelectedTabColorChange) return data.map(() => color)\n\n if (selectedTabIndex == null) {\n return [...new Array(data.length - 1).fill(defaultColor), color]\n }\n return data.map((_, index) => (index === selectedTabIndex ? color : defaultColor))\n }, [color, data, selectedTabIndex])\n\n const selectedData = React.useMemo(\n () => data[selectedTabIndex ?? data.length - 1],\n [data, selectedTabIndex],\n )\n\n const lowestValue = data.reduce((min, item) => Math.min(min, item.value), Infinity)\n const isNegative = lowestValue < 0\n\n const legendComponent = (\n <LegendV2\n color={color}\n legendStyle={{ pl: margin.left }}\n monthlyAmount={selectedData.formattedAmount}\n monthlyAmountLabel={monthlyAmountLabel}\n trendAmount={amounts?.formattedAverage}\n trendAmountLabel={trendAmountLabel}\n />\n )\n\n const shouldShowLegend = monthlyAmountLabel || trendAmountLabel\n\n const handleBarClick = (\n _: React.MouseEvent<SVGElement, MouseEvent>,\n { dataIndex }: { dataIndex: number },\n ) => onBarClick?.(dataIndex)\n\n return (\n <Stack sx={{ alignItems: 'center', width: '100%' }}>\n {shouldShowLegend && legendPosition === 'top' && legendComponent}\n <Box\n ref={containerRef}\n sx={{\n height: heightOverride ? heightOverride : 122,\n mb: legendPosition === 'top' ? 0 : 4,\n mt: legendPosition === 'top' ? 4 : 0,\n touchAction: 'pan-y',\n width: '100%',\n '& svg': {\n touchAction: 'pan-y',\n userSelect: 'none',\n },\n }}\n >\n <ResponsiveChartContainer\n height={height}\n margin={{\n bottom: margin.bottom,\n left: margin.left,\n right: margin.right,\n top: margin.top || 45,\n }}\n series={chartData.series}\n width={width}\n xAxis={chartData.xAxis}\n yAxis={[{ width: 0 }]}\n >\n {amounts?.average && (\n <ChartsReferenceLine\n labelAlign=\"middle\"\n lineStyle={{\n stroke: theme.palette.chart.chart7,\n strokeDasharray: '4',\n strokeLinecap: 'round',\n strokeWidth: 1,\n }}\n y={amounts?.average}\n />\n )}\n\n {isNegative && (\n <ChartsReferenceLine\n labelAlign=\"middle\"\n lineStyle={{\n stroke: theme.palette.chart.chart7,\n }}\n y={0}\n />\n )}\n\n <ChartsXAxis\n slots={{\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n axisTickLabel: ({ text, ownerState: _, ...restProps }) => {\n const label = data[selectedTabIndex ?? data.length - 1]?.label\n return (\n <text\n {...restProps}\n style={\n {\n ...restProps.style,\n fontWeight: !removeSelectedTabColorChange && label === text ? 'bold' : 400,\n } as React.CSSProperties\n }\n >\n {text}\n </text>\n )\n },\n }}\n sx={(theme) => ({\n '& .MuiChartsAxis-line': {\n stroke: !isNegative ? (theme as Theme).palette.text?.primary : 'none',\n },\n '& .MuiChartsAxis-tickContainer:first-of-type .MuiChartsAxis-tick': {\n display: 'none',\n },\n '& .MuiChartsAxis-tickLabel': {\n transform: isNegative ? 'translateY(15px)' : {},\n },\n })}\n tickLabelStyle={{\n fontSize: 11,\n }}\n />\n <BarPlot\n onItemClick={handleBarClick}\n slots={{\n bar: (props) => {\n const { ownerState, ...defaultProps } = props\n return (\n <CustomBarPlotV2\n {...defaultProps}\n colorRange={colorRange}\n data={data}\n dataIndex={ownerState.dataIndex}\n removeSelectedTabColorChange={removeSelectedTabColorChange}\n selectedTabIndex={selectedTabIndex ?? data.length - 1}\n style={{\n height: props.height,\n x: props.x,\n y: props.y,\n width: props.width,\n }}\n />\n )\n },\n }}\n />\n </ResponsiveChartContainer>\n </Box>\n {shouldShowLegend && legendPosition === 'bottom' && legendComponent}\n </Stack>\n )\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AA,kBACQ,YAAA;AAAA,kBACN,MAAA;AAAA,kBACN,WAAW,EAAW;AAAA,kBACQ,8BAAA;AAAA,kBAC9B,kBAAkB,KAAoB,EAAK,SAAS;AAAA,kBACpD,OAAO;AAAA,oBACL,QAAQ,EAAM;AAAA,oBACd,GAAG,EAAM;AAAA,oBACT,GAAG,EAAM;AAAA,oBACT,OAAO,EAAM;AAAA,kBACf;AAAA,gBACD,CAAA;AAAA,cAEL,EACF;AAAA,YACD,CAAA;AAAA,UACuB;AAAA;MACvB,CAAA;AAAA,MACJ,KAAoB,MAAmB,YAAY;AAAA,IAC/C;AAAA;AAEX"}
@@ -1,29 +1,29 @@
1
- import { EmptyBarChart as b } from "./EmptyBarChart.es.js";
1
+ import { EmptyBarChart as u } from "./EmptyBarChart.es.js";
2
2
  import { useContainerDimensions as C } from "../../hooks/useContainerDimensions.es.js";
3
3
  import { CustomDoubleBarPlotMXUI as k } from "./CustomDoubleBar.es.js";
4
- import { Legend as w } from "./ChartLegend.es.js";
5
- import S from "react";
6
- import A from "@mui/material/Stack";
7
- import { jsx as o, jsxs as m } from "react/jsx-runtime";
8
- import I from "@mui/material/Box";
4
+ import { Legend as S } from "./ChartLegend.es.js";
5
+ import w from "react";
6
+ import I from "@mui/material/Stack";
7
+ import { jsx as o, jsxs as c } from "react/jsx-runtime";
8
+ import A from "@mui/material/Box";
9
9
  import { BarPlot as B } from "@mui/x-charts/BarChart";
10
10
  import { ChartContainer as R } from "@mui/x-charts/ChartContainer";
11
11
  import { ChartsXAxis as L } from "@mui/x-charts/ChartsXAxis";
12
12
  var E = ({ bars: r, colors: n, legends: d, isMini: l = !1, onBarClick: h }) => {
13
- const s = r.length - 1, p = 5e-3, f = 0.16, c = S.useRef(null), { height: y, width: x } = C(c), g = ({ dataIndex: e, seriesId: t }) => {
13
+ const s = r.length - 1, p = 5e-3, f = 0.16, m = w.useRef(null), { height: x, width: y } = C(m), g = ({ dataIndex: e, seriesId: t }) => {
14
14
  h(e, Number(t.split("-").pop()));
15
15
  }, i = d?.map((e, t) => ({
16
16
  color: n[t] ?? "transparent",
17
17
  ...e
18
18
  }));
19
- return r.length > 0 ? /* @__PURE__ */ m(A, {
19
+ return r.length > 0 ? /* @__PURE__ */ c(I, {
20
20
  sx: {
21
21
  mb: 0,
22
22
  width: "100%",
23
23
  p: 0
24
24
  },
25
- children: [/* @__PURE__ */ o(I, {
26
- ref: c,
25
+ children: [/* @__PURE__ */ o(A, {
26
+ ref: m,
27
27
  sx: {
28
28
  height: l ? 120 : 172,
29
29
  touchAction: "pan-y",
@@ -33,13 +33,12 @@ var E = ({ bars: r, colors: n, legends: d, isMini: l = !1, onBarClick: h }) => {
33
33
  "& svg": {
34
34
  touchAction: "pan-y",
35
35
  userSelect: "none"
36
- },
37
- "& .recharts-wrapper": { touchAction: "pan-y" }
36
+ }
38
37
  },
39
- children: /* @__PURE__ */ m(R, {
38
+ children: /* @__PURE__ */ c(R, {
40
39
  colors: n,
41
40
  dataset: r,
42
- height: y,
41
+ height: x,
43
42
  margin: {
44
43
  bottom: 16,
45
44
  left: 24,
@@ -53,7 +52,7 @@ var E = ({ bars: r, colors: n, legends: d, isMini: l = !1, onBarClick: h }) => {
53
52
  dataKey: "comparison",
54
53
  type: "bar"
55
54
  }],
56
- width: x,
55
+ width: y,
57
56
  xAxis: [{
58
57
  barGapRatio: p,
59
58
  categoryGapRatio: f,
@@ -86,10 +85,10 @@ var E = ({ bars: r, colors: n, legends: d, isMini: l = !1, onBarClick: h }) => {
86
85
  seriesId: a.toString()
87
86
  }),
88
87
  slots: { bar: (e) => {
89
- const { ownerState: t, ...a } = e, u = s === t.dataIndex ? t.color : `${t.color}50`;
88
+ const { ownerState: t, ...a } = e, b = s === t.dataIndex ? t.color : `${t.color}50`;
90
89
  return /* @__PURE__ */ o(k, {
91
90
  ...a,
92
- color: u,
91
+ color: b,
93
92
  data: r,
94
93
  series: {
95
94
  index: t.dataIndex,
@@ -105,11 +104,11 @@ var E = ({ bars: r, colors: n, legends: d, isMini: l = !1, onBarClick: h }) => {
105
104
  } }
106
105
  })]
107
106
  })
108
- }), i && !l && i.length > 0 && /* @__PURE__ */ o(w, {
107
+ }), i && !l && i.length > 0 && /* @__PURE__ */ o(S, {
109
108
  legendItems: i,
110
109
  legendStyle: { ml: 24 }
111
110
  })]
112
- }) : /* @__PURE__ */ o(b, {});
111
+ }) : /* @__PURE__ */ o(u, {});
113
112
  };
114
113
  export {
115
114
  E as DoubleBarChart
@@ -1 +1 @@
1
- {"version":3,"file":"DoubleBarChart.es.js","names":[],"sources":["../../../../src/insights-v2/components/chartblocks/DoubleBarChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { BarPlot } from '@mui/x-charts/BarChart'\nimport { ChartContainer } from '@mui/x-charts/ChartContainer'\nimport { ChartsXAxis } from '@mui/x-charts/ChartsXAxis'\n\nimport { useContainerDimensions } from '../../hooks/useContainerDimensions'\nimport type { Legends } from '../../../core'\nimport type { DataSet, LegendProps } from '../../../core/types/InsightsInstanceSlotData'\n\nimport { CustomDoubleBarPlotMXUI } from './CustomDoubleBar'\nimport { Legend } from './ChartLegend'\nimport { EmptyBarChart } from './EmptyBarChart'\n\ninterface DoubleBarChartProps {\n // Shaped comparison series (one entry per month column), built by the caller (buildComparisonSeries)\n // \\u2014 mirroring how BarchartBlock builds `data` for BarChartV2.\n bars: DataSet[]\n // Two-entry palette [main, comparison]. Resolved by the caller (the card via getLayoutConfig). This\n // prop is the only color hook \\u2014 getLayoutConfig itself is never modified.\n colors: string[]\n // Same shape as instance_slot_data.legends; mapped onto the palette below.\n legends?: (Legends | LegendProps)[]\n isMini?: boolean\n // Called on a bar click with the clicked column and its sub-series (0 = main, 1 = comparison); the\n // caller decides what a click does (card opens the drawer, drill-down updates its selection).\n onBarClick: (columnIndex: number, subIndex: number) => void\n}\n\n/**\n * Pure double-bar chart (month columns x main/comparison). Presentational and self-contained \\u2014 it\n * receives shaped data + palette as props and reports clicks via onBarClick, holding no store,\n * selection, or data-shaping of its own. This mirrors BarChartV2; the DoubleBarChartBlock card\n * wrapper builds the data and injects the store behavior, exactly as BarchartBlock wraps BarChartV2.\n */\nexport const DoubleBarChart = ({\n bars,\n colors,\n legends,\n isMini = false,\n onBarClick,\n}: DoubleBarChartProps) => {\n // The most recent (last) column is emphasized; the others are dimmed.\n const selectedTabIndex = bars.length - 1\n const barGapRatio = 0.005\n const categoryGapRatio = 0.16\n\n const containerRef = React.useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n\n const handleBarClick = ({ dataIndex, seriesId }: { dataIndex: number; seriesId: string }) => {\n const seriesType = Number(seriesId.split('-').pop())\n onBarClick(dataIndex, seriesType)\n }\n\n // colors can be empty for an unregistered variant (getLayoutConfig miss); fall back to transparent\n // so a swatch never renders as default-black.\n const legendItems = legends?.map((legend, index) => ({\n color: colors[index] ?? 'transparent',\n ...legend,\n })) as LegendProps[]\n\n return bars.length > 0 ? (\n <Stack sx={{ mb: 0, width: '100%', p: 0 }}>\n <Box\n ref={containerRef}\n sx={{\n height: isMini ? 120 : 172,\n touchAction: 'pan-y',\n width: '100%',\n p: 0,\n m: 0,\n '& svg': {\n touchAction: 'pan-y',\n userSelect: 'none',\n },\n '& .recharts-wrapper': {\n touchAction: 'pan-y',\n },\n }}\n >\n <ChartContainer\n colors={colors}\n dataset={bars as any[]}\n height={height}\n margin={{\n bottom: 16,\n left: 24,\n right: 24,\n top: 0,\n }}\n series={[\n { dataKey: 'main', type: 'bar' },\n { dataKey: 'comparison', type: 'bar' },\n ]}\n width={width}\n xAxis={[\n {\n barGapRatio,\n categoryGapRatio,\n dataKey: 'label',\n scaleType: 'band',\n },\n ]}\n yAxis={[{ width: 0 }]}\n >\n <ChartsXAxis\n disableTicks={false}\n slots={{\n axisTickLabel: ({ text, ...restProps }) => {\n const selectedLabel = bars[selectedTabIndex]?.label\n return (\n <text\n {...restProps}\n style={\n {\n ...restProps.style,\n fontWeight: selectedLabel === text ? 700 : 400,\n } as React.CSSProperties\n }\n >\n {text}\n </text>\n )\n },\n }}\n sx={{\n '.MuiChartsAxis-line': {\n stroke: 'border.darker',\n },\n }}\n tickLabelStyle={{\n fontSize: 11,\n fill: 'text.secondary',\n fontWeight: 400,\n }}\n />\n <BarPlot\n onItemClick={(_, { dataIndex, seriesId }) =>\n handleBarClick({ dataIndex, seriesId: seriesId.toString() })\n }\n slots={{\n bar: (props) => {\n const { ownerState, ...defaultProps } = props\n const isSelected = selectedTabIndex === ownerState.dataIndex\n const barColor = isSelected ? ownerState.color : `${ownerState.color}50`\n\n return (\n <CustomDoubleBarPlotMXUI\n {...defaultProps}\n color={barColor}\n data={bars}\n series={{\n index: ownerState.dataIndex,\n type: Number(ownerState.id?.toString().split('-').pop() ?? 0),\n }}\n style={{\n height: props.height,\n x: props.x,\n y: props.y,\n width: props.width,\n }}\n />\n )\n },\n }}\n />\n </ChartContainer>\n </Box>\n\n {legendItems && !isMini && legendItems.length > 0 && (\n <Legend legendItems={legendItems} legendStyle={{ ml: 24 }} />\n )}\n </Stack>\n ) : (\n <EmptyBarChart />\n )\n}\n"],"mappings":";;;;;;;;;;;AAsCA,IAAa,IAAA,CAAkB,EAC7B,MAAA,GACA,QAAA,GACA,SAAA,GACA,QAAA,IAAS,IACT,YAAA,EAAA,MACyB;AAEzB,QAAM,IAAmB,EAAK,SAAS,GACjC,IAAc,MACd,IAAmB,MAEnB,IAAe,EAAM,OAAuB,IAAI,GAChD,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAuB,CAAY,GAEvD,IAAA,CAAkB,EAAE,WAAA,GAAW,UAAA,EAAA,MAAwD;AAE3F,IAAA,EAAW,GADQ,OAAO,EAAS,MAAM,GAAG,EAAE,IAAI,CAC5B,CAAU;AAAA,EAClC,GAIM,IAAc,GAAS,IAAA,CAAK,GAAQ,OAAW;AAAA,IACnD,OAAO,EAAO,CAAA,KAAU;AAAA,IACxB,GAAG;AAAA,EACL,EAA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cAGD,UAAA;AAAA,YACG,CAAA;AAAA,UAEV,EACF;AAAA,UACA,IAAI,EACF,uBAAuB,EACrB,QAAQ,gBACV,EACF;AAAA,UACA,gBAAgB;AAAA,YACd,UAAU;AAAA,YACV,MAAM;AAAA,YACN,YAAY;AAAA,UACd;AAAA,QACD,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,UACE,aAAA,CAAc,GAAG,EAAE,WAAA,GAAW,UAAA,EAAA,MAC5B,EAAe;AAAA,YAAE,WAAA;AAAA,YAAW,UAAU,EAAS,SAAS;AAAA,UAAE,CAAC;AAAA,UAE7D,OAAO,EACL,KAAA,CAAM,MAAU;AACd,kBAAM,EAAE,YAAA,GAAY,GAAG,EAAA,IAAiB,GAElC,IADa,MAAqB,EAAW,YACrB,EAAW,QAAQ,GAAG,EAAW,KAAA;AAE/D,mBACE,gBAAA,EAAC,GAAD;AAAA,cACE,GAAI;AAAA,cACJ,OAAO;AAAA,cACP,MAAM;AAAA,cACN,QAAQ;AAAA,gBACN,OAAO,EAAW;AAAA,gBAClB,MAAM,OAAO,EAAW,IAAI,SAAS,EAAE,MAAM,GAAG,EAAE,IAAI,KAAK,CAAC;AAAA,cAC9D;AAAA,cACA,OAAO;AAAA,gBACL,QAAQ,EAAM;AAAA,gBACd,GAAG,EAAM;AAAA,gBACT,GAAG,EAAM;AAAA,gBACT,OAAO,EAAM;AAAA,cACf;AAAA,YACD,CAAA;AAAA,UAEL,EACF;AAAA,QACD,CAAA,CACa;AAAA;IACb,CAAA,GAEJ,KAAe,CAAC,KAAU,EAAY,SAAS,KAC9C,gBAAA,EAAC,GAAD;AAAA,MAAqB,aAAA;AAAA,MAAa,aAAa,EAAE,IAAI,GAAG;AAAA,IAAI,CAAA,CAEzD;AAAA,EAEP,CAAA,IAAA,gBAAA,EAAC,GAAD,CAAgB,CAAA;AAEpB"}
1
+ {"version":3,"file":"DoubleBarChart.es.js","names":[],"sources":["../../../../src/insights-v2/components/chartblocks/DoubleBarChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { BarPlot } from '@mui/x-charts/BarChart'\nimport { ChartContainer } from '@mui/x-charts/ChartContainer'\nimport { ChartsXAxis } from '@mui/x-charts/ChartsXAxis'\n\nimport { useContainerDimensions } from '../../hooks/useContainerDimensions'\nimport type { Legends } from '../../../core'\nimport type { DataSet, LegendProps } from '../../../core/types/InsightsInstanceSlotData'\n\nimport { CustomDoubleBarPlotMXUI } from './CustomDoubleBar'\nimport { Legend } from './ChartLegend'\nimport { EmptyBarChart } from './EmptyBarChart'\n\ninterface DoubleBarChartProps {\n // Shaped comparison series (one entry per month column), built by the caller (buildComparisonSeries)\n // \\u2014 mirroring how BarchartBlock builds `data` for BarChartV2.\n bars: DataSet[]\n // Two-entry palette [main, comparison]. Resolved by the caller (the card via getLayoutConfig). This\n // prop is the only color hook \\u2014 getLayoutConfig itself is never modified.\n colors: string[]\n // Same shape as instance_slot_data.legends; mapped onto the palette below.\n legends?: (Legends | LegendProps)[]\n isMini?: boolean\n // Called on a bar click with the clicked column and its sub-series (0 = main, 1 = comparison); the\n // caller decides what a click does (card opens the drawer, drill-down updates its selection).\n onBarClick: (columnIndex: number, subIndex: number) => void\n}\n\n/**\n * Pure double-bar chart (month columns x main/comparison). Presentational and self-contained \\u2014 it\n * receives shaped data + palette as props and reports clicks via onBarClick, holding no store,\n * selection, or data-shaping of its own. This mirrors BarChartV2; the DoubleBarChartBlock card\n * wrapper builds the data and injects the store behavior, exactly as BarchartBlock wraps BarChartV2.\n */\nexport const DoubleBarChart = ({\n bars,\n colors,\n legends,\n isMini = false,\n onBarClick,\n}: DoubleBarChartProps) => {\n // The most recent (last) column is emphasized; the others are dimmed.\n const selectedTabIndex = bars.length - 1\n const barGapRatio = 0.005\n const categoryGapRatio = 0.16\n\n const containerRef = React.useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n\n const handleBarClick = ({ dataIndex, seriesId }: { dataIndex: number; seriesId: string }) => {\n const seriesType = Number(seriesId.split('-').pop())\n onBarClick(dataIndex, seriesType)\n }\n\n // colors can be empty for an unregistered variant (getLayoutConfig miss); fall back to transparent\n // so a swatch never renders as default-black.\n const legendItems = legends?.map((legend, index) => ({\n color: colors[index] ?? 'transparent',\n ...legend,\n })) as LegendProps[]\n\n return bars.length > 0 ? (\n <Stack sx={{ mb: 0, width: '100%', p: 0 }}>\n <Box\n ref={containerRef}\n sx={{\n height: isMini ? 120 : 172,\n touchAction: 'pan-y',\n width: '100%',\n p: 0,\n m: 0,\n '& svg': {\n touchAction: 'pan-y',\n userSelect: 'none',\n },\n }}\n >\n <ChartContainer\n colors={colors}\n dataset={bars as any[]}\n height={height}\n margin={{\n bottom: 16,\n left: 24,\n right: 24,\n top: 0,\n }}\n series={[\n { dataKey: 'main', type: 'bar' },\n { dataKey: 'comparison', type: 'bar' },\n ]}\n width={width}\n xAxis={[\n {\n barGapRatio,\n categoryGapRatio,\n dataKey: 'label',\n scaleType: 'band',\n },\n ]}\n yAxis={[{ width: 0 }]}\n >\n <ChartsXAxis\n disableTicks={false}\n slots={{\n axisTickLabel: ({ text, ...restProps }) => {\n const selectedLabel = bars[selectedTabIndex]?.label\n return (\n <text\n {...restProps}\n style={\n {\n ...restProps.style,\n fontWeight: selectedLabel === text ? 700 : 400,\n } as React.CSSProperties\n }\n >\n {text}\n </text>\n )\n },\n }}\n sx={{\n '.MuiChartsAxis-line': {\n stroke: 'border.darker',\n },\n }}\n tickLabelStyle={{\n fontSize: 11,\n fill: 'text.secondary',\n fontWeight: 400,\n }}\n />\n <BarPlot\n onItemClick={(_, { dataIndex, seriesId }) =>\n handleBarClick({ dataIndex, seriesId: seriesId.toString() })\n }\n slots={{\n bar: (props) => {\n const { ownerState, ...defaultProps } = props\n const isSelected = selectedTabIndex === ownerState.dataIndex\n const barColor = isSelected ? ownerState.color : `${ownerState.color}50`\n\n return (\n <CustomDoubleBarPlotMXUI\n {...defaultProps}\n color={barColor}\n data={bars}\n series={{\n index: ownerState.dataIndex,\n type: Number(ownerState.id?.toString().split('-').pop() ?? 0),\n }}\n style={{\n height: props.height,\n x: props.x,\n y: props.y,\n width: props.width,\n }}\n />\n )\n },\n }}\n />\n </ChartContainer>\n </Box>\n\n {legendItems && !isMini && legendItems.length > 0 && (\n <Legend legendItems={legendItems} legendStyle={{ ml: 24 }} />\n )}\n </Stack>\n ) : (\n <EmptyBarChart />\n )\n}\n"],"mappings":";;;;;;;;;;;AAsCA,IAAa,IAAA,CAAkB,EAC7B,MAAA,GACA,QAAA,GACA,SAAA,GACA,QAAA,IAAS,IACT,YAAA,EAAA,MACyB;AAEzB,QAAM,IAAmB,EAAK,SAAS,GACjC,IAAc,MACd,IAAmB,MAEnB,IAAe,EAAM,OAAuB,IAAI,GAChD,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAuB,CAAY,GAEvD,IAAA,CAAkB,EAAE,WAAA,GAAW,UAAA,EAAA,MAAwD;AAE3F,IAAA,EAAW,GADQ,OAAO,EAAS,MAAM,GAAG,EAAE,IAAI,CAC5B,CAAU;AAAA,EAClC,GAIM,IAAc,GAAS,IAAA,CAAK,GAAQ,OAAW;AAAA,IACnD,OAAO,EAAO,CAAA,KAAU;AAAA,IACxB,GAAG;AAAA,EACL,EAAE;AAEF,SAAO,EAAK,SAAS,IACnB,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,IAAI;AAAA,MAAG,OAAO;AAAA,MAAQ,GAAG;AAAA,IAAE;AAAA,IAAxC,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK;AAAA,MACL,IAAI;AAAA,QACF,QAAQ,IAAS,MAAM;AAAA,QACvB,aAAa;AAAA,QACb,OAAO;AAAA,QACP,GAAG;AAAA,QACH,GAAG;AAAA,QACH,SAAS;AAAA,UACP,aAAa;AAAA,UACb,YAAY;AAAA,QACd;AAAA,MACF;AAAA,MAEA,UAAA,gBAAA,EAAC,GAAD;AAA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MAAqB,EAAW,YACrB,EAAW,QAAQ,GAAG,EAAW,KAAA;AAE/D,mBACE,gBAAA,EAAC,GAAD;AAAA,cACE,GAAI;AAAA,cACJ,OAAO;AAAA,cACP,MAAM;AAAA,cACN,QAAQ;AAAA,gBACN,OAAO,EAAW;AAAA,gBAClB,MAAM,OAAO,EAAW,IAAI,SAAS,EAAE,MAAM,GAAG,EAAE,IAAI,KAAK,CAAC;AAAA,cAC9D;AAAA,cACA,OAAO;AAAA,gBACL,QAAQ,EAAM;AAAA,gBACd,GAAG,EAAM;AAAA,gBACT,GAAG,EAAM;AAAA,gBACT,OAAO,EAAM;AAAA,cACf;AAAA,YACD,CAAA;AAAA,UAEL,EACF;AAAA,QACD,CAAA,CACa;AAAA;IACb,CAAA,GAEJ,KAAe,CAAC,KAAU,EAAY,SAAS,KAC9C,gBAAA,EAAC,GAAD;AAAA,MAAqB,aAAA;AAAA,MAAa,aAAa,EAAE,IAAI,GAAG;AAAA,IAAI,CAAA,CAEzD;AAAA,EAEP,CAAA,IAAA,gBAAA,EAAC,GAAD,CAAgB,CAAA;AAEpB"}
@@ -1,60 +1,62 @@
1
1
  import { BAR_CHART_VARIANTS as o, barChartVariant as t, buildChartData as m, buildDataSeries as i } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
2
2
  import { BarchartBlock as p } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
3
3
  import { DoubleBarChartBlock as c } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
4
- import l from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
5
- import s from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
6
- import g from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
7
- import u from "./components/TransferLogoCard.es.js";
8
- import S from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
9
- import { BudgetBlock as h } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
10
- import T from "./components/SaveAnExtraCard.es.js";
11
- import D from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
12
- import P from "./components/InsightTransactionRow.es.js";
13
- import y from "./components/TransactionListCard.es.js";
14
- import { CategoryTransactionsBlock as R } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
15
- import { SVGImageBlock as E } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
16
- import V from "./components/AccountHeroCard.es.js";
17
- import M from "./components/AmountPill.es.js";
18
- import G from "./components/DesignateEmergencySavingsCard.es.js";
19
- import O from "./components/BaseLayout.es.js";
20
- import j from "./components/StatusMessageCard.es.js";
21
- import z from "./components/LogoTile.es.js";
22
- import J from "./components/LogoClusterCard.es.js";
23
- import Q from "./components/MerchantHighlightCard.es.js";
24
- import X from "./components/P2PLogoStack.es.js";
25
- import Z from "./components/SavingsOpportunityCard.es.js";
26
- import rr from "./components/StatusPill.es.js";
27
- import tr from "./components/SubscriptionHeroCard.es.js";
28
- import ir from "./components/UpcomingBillCard.es.js";
4
+ import l from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
5
+ import s from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
6
+ import B from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
7
+ import u from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
8
+ import S from "./components/TransferLogoCard.es.js";
9
+ import h from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
10
+ import { BudgetBlock as T } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
11
+ import D from "./components/SaveAnExtraCard.es.js";
12
+ import P from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
13
+ import y from "./components/InsightTransactionRow.es.js";
14
+ import R from "./components/TransactionListCard.es.js";
15
+ import { CategoryTransactionsBlock as E } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
16
+ import { SVGImageBlock as V } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
17
+ import M from "./components/AccountHeroCard.es.js";
18
+ import G from "./components/AmountPill.es.js";
19
+ import O from "./components/DesignateEmergencySavingsCard.es.js";
20
+ import j from "./components/BaseLayout.es.js";
21
+ import z from "./components/StatusMessageCard.es.js";
22
+ import J from "./components/LogoTile.es.js";
23
+ import Q from "./components/LogoClusterCard.es.js";
24
+ import X from "./components/MerchantHighlightCard.es.js";
25
+ import Z from "./components/P2PLogoStack.es.js";
26
+ import rr from "./components/SavingsOpportunityCard.es.js";
27
+ import tr from "./components/StatusPill.es.js";
28
+ import ir from "./components/SubscriptionHeroCard.es.js";
29
+ import pr from "./components/UpcomingBillCard.es.js";
29
30
  export {
30
- g as AccountBlock,
31
- V as AccountHeroCard,
32
- S as AccountSwitchBlock,
33
- M as AmountPill,
31
+ u as AccountBlock,
32
+ M as AccountHeroCard,
33
+ h as AccountSwitchBlock,
34
+ G as AmountPill,
34
35
  o as BAR_CHART_VARIANTS,
35
36
  p as BarchartBlock,
36
- O as BaseLayout,
37
- h as BudgetBlock,
38
- R as CategoryTransactionsBlock,
39
- G as DesignateEmergencySavingsCard,
40
- l as DonutChartBlock,
37
+ j as BaseLayout,
38
+ T as BudgetBlock,
39
+ E as CategoryTransactionsBlock,
40
+ O as DesignateEmergencySavingsCard,
41
+ s as DonutChartBlock,
41
42
  c as DoubleBarChartBlock,
42
- s as DoubleProgressBarBlock,
43
- P as InsightTransactionRow,
44
- J as LogoClusterCard,
45
- z as LogoTile,
46
- Q as MerchantHighlightCard,
47
- X as P2PLogoStack,
48
- E as SVGImageBlock,
49
- T as SaveAnExtraCard,
50
- D as SaveExtraBlock,
51
- Z as SavingsOpportunityCard,
52
- j as StatusMessageCard,
53
- rr as StatusPill,
54
- tr as SubscriptionHeroCard,
55
- y as TransactionListCard,
56
- u as TransferLogoCard,
57
- ir as UpcomingBillCard,
43
+ B as DoubleProgressBarBlock,
44
+ y as InsightTransactionRow,
45
+ Q as LogoClusterCard,
46
+ J as LogoTile,
47
+ X as MerchantHighlightCard,
48
+ Z as P2PLogoStack,
49
+ V as SVGImageBlock,
50
+ D as SaveAnExtraCard,
51
+ P as SaveExtraBlock,
52
+ rr as SavingsOpportunityCard,
53
+ z as StatusMessageCard,
54
+ tr as StatusPill,
55
+ l as StepChartBlock,
56
+ ir as SubscriptionHeroCard,
57
+ R as TransactionListCard,
58
+ S as TransferLogoCard,
59
+ pr as UpcomingBillCard,
58
60
  t as barChartVariant,
59
61
  m as buildChartData,
60
62
  i as buildDataSeries
@@ -1,15 +1,15 @@
1
1
  import { BarchartBlock as e } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
2
2
  import { DoubleBarChartBlock as a } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
3
- import c from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
4
- import m from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
5
- import l from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
6
- import i from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
7
- import { BudgetBlock as n } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
8
- import k from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
9
- import { CategoryTransactionsBlock as B } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
10
- import p from "../blocks/ImageBlocks/ImageBlock.es.js";
11
- import { SVGImageBlock as f } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
12
- import s from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
3
+ import c from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
4
+ import m from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
5
+ import l from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
6
+ import i from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
7
+ import n from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
8
+ import { BudgetBlock as k } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
9
+ import B from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
10
+ import { CategoryTransactionsBlock as p } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
11
+ import f from "../blocks/ImageBlocks/ImageBlock.es.js";
12
+ import { SVGImageBlock as s } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
13
13
  import { PlaceholderActionBlock as u } from "../actionBlocks/PlaceholderActionBlock.es.js";
14
14
  import { getMakeTransferDrawerTitle as h } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
15
15
  import { MakeTransferActionBlockLayer as C } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
@@ -33,18 +33,18 @@ var t = (o) => {
33
33
  title: h
34
34
  }
35
35
  }, O = {
36
- AccountBlock: l,
37
- account_switch_block: i,
36
+ AccountBlock: i,
37
+ account_switch_block: n,
38
38
  BarChartBlock: e,
39
- BudgetBlock: n,
40
- CategoryTransactionsBlock: B,
41
- DonutChartBlock: c,
39
+ BudgetBlock: k,
40
+ CategoryTransactionsBlock: p,
41
+ DonutChartBlock: m,
42
42
  DoubleBarChartBlock: a,
43
- DoubleProgressBarBlock: m,
44
- ImageBlock: p,
45
- save_extra_block: k,
46
- StepChartBlock: s,
47
- SVGImageBlock: f
43
+ DoubleProgressBarBlock: l,
44
+ ImageBlock: f,
45
+ save_extra_block: B,
46
+ StepChartBlock: c,
47
+ SVGImageBlock: s
48
48
  };
49
49
  export {
50
50
  N as actionBlocks,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.4.12-alpha.al1",
3
+ "version": "9.4.13",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",