@mx-cartographer/experiences 9.7.76 → 9.7.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [9.7.77] - 11-02-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - The Net Worth monthly table now shows the full number of months for the 6M and 9M timeframe selections; it previously dropped one month in certain calendar months (MEW-4195)
|
|
4
|
+
|
|
1
5
|
## [9.7.76] - 11-02-2026
|
|
2
6
|
|
|
3
7
|
- **ADDED** - Subscription Detected beat on Insights 2.0 (WEC-2147): `confirm_subscription_detected` registers the shared subscription status CTA. "Does this look right?" opens the survey, which saves the answer to the repeating transaction (Yes → `CONFIRMED`; a reason → `NEVER_SUBSCRIBED` / `CANCELLED` / `ONE_TIME_PURCHASE` / `WRONG_FREQUENCY`); the card then shows ✓ Confirmed or ✗ Incorrect with Undo. A CTA step can now bring its own survey reasons and submit (`surveyAnswer`); otherwise `survey_modal_block` sends beat feedback, and the last reason can drop its free-text field (`showDetailField`). The `info_wash` row captions the amount with the subscription's live frequency (e.g. YEARLY, from the shared `RECURRENCE_COPY` words; none while unknown) via `InsightTransactionRow` `amountCaption` and TransactionBlock `showFrequency`. Mini shows the "Does this look right?" link (its tap is the host's, as micro); a card whose action travels as `in_description_cta` now runs that step's `prepare`, so mini still loads the frequency. Fixtures, the `InsightsV2/Insights/SubscriptionDetectedV2` story and a contract test
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { DateRange } from '@mui/x-date-pickers-pro';
|
|
2
3
|
import { WidgetProps } from '../core';
|
|
4
|
+
export declare const monthsInRange: (range: DateRange<Date>) => number | null;
|
|
3
5
|
export declare const NetWorthWidget: React.FC<WidgetProps>;
|
|
@@ -1,78 +1,82 @@
|
|
|
1
|
-
import { useEvent as
|
|
1
|
+
import { useEvent as w, useGlobalCopyStore as y, useGlobalUiStore as D, useNetWorthStore as L } from "../common/context/hooks.es.js";
|
|
2
2
|
import { useScreenSize as R } from "../common/hooks/useScreenSize.es.js";
|
|
3
|
-
import { useWidgetLoadTimer as
|
|
4
|
-
import { ANALYTICS_EVENTS as
|
|
5
|
-
import
|
|
6
|
-
import { WidgetContainer as
|
|
7
|
-
import { EmptyState as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { observer as
|
|
14
|
-
import
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
|
|
3
|
+
import { useWidgetLoadTimer as b } from "../common/hooks/useWidgetLoadTimer.es.js";
|
|
4
|
+
import { ANALYTICS_EVENTS as a } from "../common/constants/Analytics.es.js";
|
|
5
|
+
import x from "../common/components/Loader.es.js";
|
|
6
|
+
import { WidgetContainer as v } from "../common/components/WidgetContainer.es.js";
|
|
7
|
+
import { EmptyState as A } from "../common/components/EmptyState.es.js";
|
|
8
|
+
import M from "../accounts/components/ConnectionsDrawer.es.js";
|
|
9
|
+
import k from "./components/NetWorthChart.es.js";
|
|
10
|
+
import F from "./components/NetWorthList.es.js";
|
|
11
|
+
import O from "./components/NetWorthSummary.es.js";
|
|
12
|
+
import p from "react";
|
|
13
|
+
import { observer as G } from "mobx-react-lite";
|
|
14
|
+
import j from "@mui/material/Stack";
|
|
15
|
+
import { Fragment as H, jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
16
|
+
import K from "@mui/material/Box";
|
|
17
|
+
import { differenceInCalendarMonths as V } from "date-fns";
|
|
18
|
+
var z = (s) => {
|
|
19
|
+
const [e, o] = s;
|
|
20
|
+
return !e || !o ? null : V(o, e);
|
|
21
|
+
}, st = G(({ onBackClick: s, onMenuClick: e }) => {
|
|
22
|
+
const { isInitialized: o } = D(), { accounts: u, net_worth: r } = y(), { hoveredData: C, isNetWorthDataLoaded: m, loadNetWorthData: _, netWorthChartData: g, selectedData: l, setTimeframe: W } = L(), { isMobile: n } = R(), { onEvent: i } = w(), [T, f] = p.useState(!1);
|
|
23
|
+
b({
|
|
21
24
|
widgetName: "NetWorthWidget",
|
|
22
|
-
isLoaded:
|
|
23
|
-
}),
|
|
24
|
-
|
|
25
|
+
isLoaded: m
|
|
26
|
+
}), p.useEffect(() => {
|
|
27
|
+
m || _().finally(), i(a.NET_WORTH_VIEW);
|
|
25
28
|
}, []);
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
29
|
+
const E = async (c) => {
|
|
30
|
+
const h = z(c);
|
|
31
|
+
h !== null && W(h);
|
|
32
|
+
}, N = (c) => {
|
|
33
|
+
i(a.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: c + "M" });
|
|
34
|
+
}, I = () => {
|
|
35
|
+
f(!0), i(a.ACCOUNTS_CLICK_CONNECT);
|
|
33
36
|
};
|
|
34
|
-
if (!
|
|
35
|
-
const
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
+
if (!o || !m) return /* @__PURE__ */ t(x, {});
|
|
38
|
+
const S = g.length === 0;
|
|
39
|
+
return /* @__PURE__ */ d(v, {
|
|
37
40
|
calendarActions: {
|
|
38
|
-
onRangeChanged:
|
|
39
|
-
onTimeframeClick:
|
|
41
|
+
onRangeChanged: E,
|
|
42
|
+
onTimeframeClick: N
|
|
40
43
|
},
|
|
41
|
-
dateRangeVariant:
|
|
42
|
-
onAccountsFilterClick: () =>
|
|
43
|
-
onBackClick:
|
|
44
|
-
onMenuClick:
|
|
45
|
-
title:
|
|
46
|
-
children: [
|
|
44
|
+
dateRangeVariant: n ? "timeframetabs" : "timeframebuttons",
|
|
45
|
+
onAccountsFilterClick: () => i(a.NET_WORTH_WIDGET_CLICK_FILTER),
|
|
46
|
+
onBackClick: s,
|
|
47
|
+
onMenuClick: e,
|
|
48
|
+
title: r.net_worth,
|
|
49
|
+
children: [S ? /* @__PURE__ */ t(K, {
|
|
47
50
|
sx: { justifyItems: "center" },
|
|
48
|
-
children: /* @__PURE__ */ t(
|
|
49
|
-
header:
|
|
51
|
+
children: /* @__PURE__ */ t(A, {
|
|
52
|
+
header: r.empty_widget_header,
|
|
50
53
|
icon: "elevation",
|
|
51
|
-
onClick:
|
|
52
|
-
primaryButton:
|
|
53
|
-
subText:
|
|
54
|
+
onClick: I,
|
|
55
|
+
primaryButton: r.empty_widget_button,
|
|
56
|
+
subText: r.empty_widget_description,
|
|
54
57
|
sx: {
|
|
55
58
|
width: { sm: 432 },
|
|
56
59
|
".buttons-footer": { width: 167 }
|
|
57
60
|
}
|
|
58
61
|
})
|
|
59
|
-
}) : /* @__PURE__ */
|
|
60
|
-
hoveredData:
|
|
61
|
-
selectedData:
|
|
62
|
-
}), /* @__PURE__ */
|
|
63
|
-
alignItems:
|
|
64
|
-
direction:
|
|
65
|
-
spacing:
|
|
66
|
-
children: [/* @__PURE__ */ t(
|
|
67
|
-
})] }), /* @__PURE__ */ t(
|
|
68
|
-
onClose: () =>
|
|
69
|
-
showConnectionsWidget:
|
|
70
|
-
title:
|
|
62
|
+
}) : /* @__PURE__ */ d(H, { children: [l && /* @__PURE__ */ t(O, {
|
|
63
|
+
hoveredData: C,
|
|
64
|
+
selectedData: l
|
|
65
|
+
}), /* @__PURE__ */ d(j, {
|
|
66
|
+
alignItems: n ? "center" : "flex-start",
|
|
67
|
+
direction: n ? "column" : "row",
|
|
68
|
+
spacing: n ? 0 : 48,
|
|
69
|
+
children: [/* @__PURE__ */ t(k, {}), /* @__PURE__ */ t(F, {})]
|
|
70
|
+
})] }), /* @__PURE__ */ t(M, {
|
|
71
|
+
onClose: () => f(!1),
|
|
72
|
+
showConnectionsWidget: T,
|
|
73
|
+
title: u.manage_connections
|
|
71
74
|
})]
|
|
72
75
|
});
|
|
73
76
|
});
|
|
74
77
|
export {
|
|
75
|
-
st as NetWorthWidget
|
|
78
|
+
st as NetWorthWidget,
|
|
79
|
+
z as monthsInRange
|
|
76
80
|
};
|
|
77
81
|
|
|
78
82
|
//# sourceMappingURL=NetWorthWidget.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetWorthWidget.es.js","names":[],"sources":["../../src/networth/NetWorthWidget.tsx"],"sourcesContent":["import React from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"NetWorthWidget.es.js","names":[],"sources":["../../src/networth/NetWorthWidget.tsx"],"sourcesContent":["import React from 'react'\nimport { differenceInCalendarMonths } from 'date-fns'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport type { DateRange } from '@mui/x-date-pickers-pro'\n\nimport ConnectionsDrawer from '../accounts/components/ConnectionsDrawer'\nimport {\n ANALYTICS_EVENTS,\n EmptyState,\n Loader,\n useEvent,\n useGlobalCopyStore,\n useGlobalUiStore,\n useNetWorthStore,\n useScreenSize,\n useWidgetLoadTimer,\n WidgetContainer,\n} from '../common'\nimport { WidgetProps } from '../core'\n\nimport NetWorthChart from './components/NetWorthChart'\nimport NetWorthList from './components/NetWorthList'\nimport NetWorthSummary from './components/NetWorthSummary'\n\n// The timeframe selector bounds ranges with end-of-month dates, so differenceInMonths\n// would undercount by one when the start month is longer than the end month (e.g.\n// Mar 31 -> Sep 30 = 5). differenceInCalendarMonths compares only year+month and\n// returns the true month count.\nexport const monthsInRange = (range: DateRange<Date>): number | null => {\n const [startDate, endDate] = range\n if (!startDate || !endDate) return null\n return differenceInCalendarMonths(endDate, startDate)\n}\n\nexport const NetWorthWidget: React.FC<WidgetProps> = observer(({ onBackClick, onMenuClick }) => {\n const { isInitialized } = useGlobalUiStore()\n const { accounts: accountsCopy, net_worth: copy } = useGlobalCopyStore()\n const {\n hoveredData,\n isNetWorthDataLoaded,\n loadNetWorthData,\n netWorthChartData,\n selectedData,\n setTimeframe,\n } = useNetWorthStore()\n const { isMobile } = useScreenSize()\n const { onEvent } = useEvent()\n\n const [showConnectionsWidget, setShowConnectionsWidget] = React.useState(false)\n\n useWidgetLoadTimer({\n widgetName: 'NetWorthWidget',\n isLoaded: isNetWorthDataLoaded,\n })\n\n React.useEffect(() => {\n if (!isNetWorthDataLoaded) {\n loadNetWorthData().finally()\n }\n onEvent(ANALYTICS_EVENTS.NET_WORTH_VIEW)\n }, [])\n\n const handleRangeChanged = async (range: DateRange<Date>) => {\n const months = monthsInRange(range)\n if (months !== null) {\n setTimeframe(months)\n }\n }\n\n const handleTimeframeClick = (months: number) => {\n onEvent(ANALYTICS_EVENTS.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: months + 'M' })\n }\n\n const handleManageConnections = () => {\n setShowConnectionsWidget(true)\n onEvent(ANALYTICS_EVENTS.ACCOUNTS_CLICK_CONNECT)\n }\n\n if (!isInitialized || !isNetWorthDataLoaded) return <Loader />\n\n const showEmptyState = netWorthChartData.length === 0\n\n return (\n <WidgetContainer\n calendarActions={{\n onRangeChanged: handleRangeChanged,\n onTimeframeClick: handleTimeframeClick,\n }}\n dateRangeVariant={isMobile ? 'timeframetabs' : 'timeframebuttons'}\n onAccountsFilterClick={() => onEvent(ANALYTICS_EVENTS.NET_WORTH_WIDGET_CLICK_FILTER)}\n onBackClick={onBackClick}\n onMenuClick={onMenuClick}\n title={copy.net_worth}\n >\n {!showEmptyState ? (\n <>\n {selectedData && (\n <NetWorthSummary hoveredData={hoveredData} selectedData={selectedData} />\n )}\n <Stack\n alignItems={isMobile ? 'center' : 'flex-start'}\n direction={isMobile ? 'column' : 'row'}\n spacing={isMobile ? 0 : 48}\n >\n <NetWorthChart />\n <NetWorthList />\n </Stack>\n </>\n ) : (\n <Box sx={{ justifyItems: 'center' }}>\n <EmptyState\n header={copy.empty_widget_header}\n icon={'elevation'}\n onClick={handleManageConnections}\n primaryButton={copy.empty_widget_button}\n subText={copy.empty_widget_description}\n sx={{\n width: { sm: 432 },\n '.buttons-footer': {\n width: 167,\n },\n }}\n />\n </Box>\n )}\n\n <ConnectionsDrawer\n onClose={() => setShowConnectionsWidget(false)}\n showConnectionsWidget={showConnectionsWidget}\n title={accountsCopy.manage_connections}\n />\n </WidgetContainer>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;AAgCA,IAAa,IAAA,CAAiB,MAA0C;AACtE,QAAM,CAAC,GAAW,CAAA,IAAW;AAC7B,SAAI,CAAC,KAAa,CAAC,IAAgB,OAC5B,EAA2B,GAAS,CAAS;AACtD,GAEa,KAAwC,EAAA,CAAU,EAAE,aAAA,GAAa,aAAA,EAAA,MAAkB;AAC9F,QAAM,EAAE,eAAA,EAAA,IAAkB,EAAiB,GACrC,EAAE,UAAU,GAAc,WAAW,EAAA,IAAS,EAAmB,GACjE,EACJ,aAAA,GACA,sBAAA,GACA,kBAAA,GACA,mBAAA,GACA,cAAA,GACA,cAAA,EAAA,IACE,EAAiB,GACf,EAAE,UAAA,EAAA,IAAa,EAAc,GAC7B,EAAE,SAAA,EAAA,IAAY,EAAS,GAEvB,CAAC,GAAuB,CAAA,IAA4B,EAAM,SAAS,EAAK;AAE9E,EAAA,EAAmB;AAAA,IACjB,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ,CAAC,GAED,EAAM,UAAA,MAAgB;AACpB,IAAK,KACH,EAAiB,EAAE,QAAQ,GAE7B,EAAQ,EAAiB,cAAc;AAAA,EACzC,GAAG,CAAC,CAAC;AAEL,QAAM,IAAqB,OAAO,MAA2B;AAC3D,UAAM,IAAS,EAAc,CAAK;AAClC,IAAI,MAAW,QACb,EAAa,CAAM;AAAA,EAEvB,GAEM,IAAA,CAAwB,MAAmB;AAC/C,IAAA,EAAQ,EAAiB,kCAAkC,EAAE,aAAa,IAAS,IAAI,CAAC;AAAA,EAC1F,GAEM,IAAA,MAAgC;AACpC,IAAA,EAAyB,EAAI,GAC7B,EAAQ,EAAiB,sBAAsB;AAAA,EACjD;AAEA,MAAI,CAAC,KAAiB,CAAC,EAAsB,QAAO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