@mx-cartographer/experiences 9.6.5 → 9.6.6
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 +5 -0
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/subscriptionBeats.d.ts +6 -6
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/subscriptionBeats.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.d.ts +5 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.es.js +21 -16
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [9.6.6] - 10-13-2026
|
|
2
|
+
|
|
3
|
+
- **ADDED** - Beat contract test for the **Subscription Price Increase** insight (`SubscriptionPriceIncreaseContract.test.tsx`), one case per acceptance criterion: the `double_progress_bar_block` previous-vs-new card, opening the Expense Details drawer from the primary CTA, resolving the subscription from `primary_repeating_transaction_guid` on the envelope (transaction walk as the fallback), the no-activity state, and closing back to the feed. The `SubscriptionPriceIncrease` mock payload now names `double_progress_bar_block` and the beat fixture carries `primary_repeating_transaction_guid`, the `DoubleProgressBarBlock` story drives off that shared fixture, and `docs/action-blocks/recurring-transaction-block.md` records the beat and its open questions (MEW2-3308)
|
|
4
|
+
- **CHANGED** - `DoubleProgressBarBlock` exposes each bar as a `progressbar` (`aria-valuenow` is the fill percentage, the accessible name is the label plus the amount), so the previous-vs-new comparison is readable by assistive tech instead of existing only as a CSS width (MEW2-3308)
|
|
5
|
+
|
|
1
6
|
## [9.6.4] - 10-12-2026
|
|
2
7
|
|
|
3
8
|
- **CHANGED** - AccountBlock `instance_slot.variant` values are now snake_case (`transparent_overdraft`, `low_account_balance`, `status_off_track`, `status_on_track`, `monthly_credit_card_interest_summary`, `unified_deposit`, `unified_deposit_emergency_fund`, `celebrate_credit_card_payoff`, `savings_account_deposit`) to match what the backend sends. Updated the `getLayoutConfig` and `depositIcons` map keys in `AccountBlock` plus all related tests and stories (WEC-1813)
|
|
@@ -8,12 +8,12 @@ interface SubscriptionContext {
|
|
|
8
8
|
/**
|
|
9
9
|
* Which repeating transaction the beat is about, or `undefined` if it cannot tell.
|
|
10
10
|
*
|
|
11
|
-
* The direct pointer wins:
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* transaction
|
|
15
|
-
* `
|
|
16
|
-
*
|
|
11
|
+
* The direct pointer wins: `primary_repeating_transaction_guid` on the V2 payload, then on the legacy
|
|
12
|
+
* beat envelope (Upcoming Subscription, WEC-1469; Subscription Price Increase, WEC-1470, see open
|
|
13
|
+
* question 3 in docs/action-blocks/recurring-transaction-block.md). Failing that, the beat's primary
|
|
14
|
+
* transaction is walked to the repeating transaction it is linked to: the hydrated
|
|
15
|
+
* `beat.primary_transaction` first, then the transaction store, then each repeating transaction's
|
|
16
|
+
* own linked `transactions`.
|
|
17
17
|
*/
|
|
18
18
|
export declare const resolveSubscriptionGuid: (beat: Beat, { repeatingTransactions, transactions }: SubscriptionContext) => string | undefined;
|
|
19
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionBeats.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RecurringTransactionBlock/subscriptionBeats.ts"],"sourcesContent":["import type { Beat, RepeatingTransaction, Transaction } from '../../../core'\n\ninterface SubscriptionContext {\n /** `recurringTransactionsStore.repeatingTransactions`, with linked transactions when augmented. */\n repeatingTransactions: RepeatingTransaction[]\n /** `transactionStore.transactions`, consulted to walk a transaction to its repeating transaction. */\n transactions: Transaction[]\n}\n\n/**\n * Which repeating transaction the beat is about, or `undefined` if it cannot tell.\n *\n * The direct pointer wins:
|
|
1
|
+
{"version":3,"file":"subscriptionBeats.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RecurringTransactionBlock/subscriptionBeats.ts"],"sourcesContent":["import type { Beat, RepeatingTransaction, Transaction } from '../../../core'\n\ninterface SubscriptionContext {\n /** `recurringTransactionsStore.repeatingTransactions`, with linked transactions when augmented. */\n repeatingTransactions: RepeatingTransaction[]\n /** `transactionStore.transactions`, consulted to walk a transaction to its repeating transaction. */\n transactions: Transaction[]\n}\n\n/**\n * Which repeating transaction the beat is about, or `undefined` if it cannot tell.\n *\n * The direct pointer wins: `primary_repeating_transaction_guid` on the V2 payload, then on the legacy\n * beat envelope (Upcoming Subscription, WEC-1469; Subscription Price Increase, WEC-1470, see open\n * question 3 in docs/action-blocks/recurring-transaction-block.md). Failing that, the beat's primary\n * transaction is walked to the repeating transaction it is linked to: the hydrated\n * `beat.primary_transaction` first, then the transaction store, then each repeating transaction's\n * own linked `transactions`.\n */\nexport const resolveSubscriptionGuid = (\n beat: Beat,\n { repeatingTransactions, transactions }: SubscriptionContext,\n): string | undefined => {\n const direct =\n beat.insights_payload?.primary_repeating_transaction_guid ||\n beat.primary_repeating_transaction_guid\n\n if (direct) return direct\n\n const transactionGuid =\n beat.insights_payload?.primary_transaction_guid ||\n beat.primary_transaction?.guid ||\n beat.primary_transaction_guid\n\n if (!transactionGuid) return undefined\n\n const snapshot =\n beat.primary_transaction?.guid === transactionGuid ? beat.primary_transaction : undefined\n\n return (\n snapshot?.repeating_transaction_guid ||\n transactions.find((transaction) => transaction.guid === transactionGuid)\n ?.repeating_transaction_guid ||\n repeatingTransactions.find((repeating) =>\n repeating.transactions?.some((transaction) => transaction.guid === transactionGuid),\n )?.guid ||\n undefined\n )\n}\n"],"mappings":"AAmBA,IAAa,IAAA,CACX,GACA,EAAE,uBAAA,GAAuB,cAAA,EAAA,MACF;AACvB,QAAM,IACJ,EAAK,kBAAkB,sCACvB,EAAK;AAEP,MAAI,EAAQ,QAAO;AAEnB,QAAM,IACJ,EAAK,kBAAkB,4BACvB,EAAK,qBAAqB,QAC1B,EAAK;AAEP,MAAK;AAKL,YAFE,EAAK,qBAAqB,SAAS,IAAkB,EAAK,sBAAsB,SAGtE,8BACV,EAAa,KAAA,CAAM,MAAgB,EAAY,SAAS,CAAe,GACnE,8BACJ,EAAsB,KAAA,CAAM,MAC1B,EAAU,cAAc,KAAA,CAAM,MAAgB,EAAY,SAAS,CAAe,CACpF,GAAG,QACH;AAEJ"}
|
|
@@ -4,5 +4,10 @@ interface ProgressBarProps {
|
|
|
4
4
|
percentage: number;
|
|
5
5
|
isBold?: boolean;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* One labelled bar. The track is a `progressbar` whose value is the fill percentage and whose name is
|
|
9
|
+
* the label plus the amount, so the comparison the block draws is readable by assistive tech (and
|
|
10
|
+
* assertable in tests) rather than existing only as a CSS width.
|
|
11
|
+
*/
|
|
7
12
|
declare const ProgressBar: ({ label, amount, percentage, isBold }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
13
|
export default ProgressBar;
|
|
@@ -1,44 +1,49 @@
|
|
|
1
1
|
import { formatCurrency as c } from "../../../../core/utils/NumberFormatting.es.js";
|
|
2
2
|
import e from "@mui/material/Stack";
|
|
3
|
-
import { Text as
|
|
4
|
-
import { jsx as r, jsxs as
|
|
5
|
-
import { useTheme as
|
|
3
|
+
import { Text as n } from "@mxenabled/mxui";
|
|
4
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
5
|
+
import { useTheme as d } from "@mui/material/styles";
|
|
6
6
|
import h from "@mui/material/Box";
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
return /* @__PURE__ */
|
|
7
|
+
var v = ({ label: t, amount: s, percentage: a, isBold: l }) => {
|
|
8
|
+
const o = d(), i = c(s, "0,0.00");
|
|
9
|
+
return /* @__PURE__ */ m(e, {
|
|
10
10
|
sx: { gap: 4 },
|
|
11
|
-
children: [/* @__PURE__ */
|
|
11
|
+
children: [/* @__PURE__ */ m(e, {
|
|
12
12
|
sx: {
|
|
13
13
|
alignItems: "center",
|
|
14
14
|
flexDirection: "row",
|
|
15
15
|
justifyContent: "space-between"
|
|
16
16
|
},
|
|
17
|
-
children: [/* @__PURE__ */ r(
|
|
17
|
+
children: [/* @__PURE__ */ r(n, {
|
|
18
18
|
variant: "caption",
|
|
19
|
-
children:
|
|
20
|
-
}), /* @__PURE__ */ r(
|
|
21
|
-
bold:
|
|
19
|
+
children: t
|
|
20
|
+
}), /* @__PURE__ */ r(n, {
|
|
21
|
+
bold: l,
|
|
22
22
|
variant: "caption",
|
|
23
|
-
children:
|
|
23
|
+
children: i
|
|
24
24
|
})]
|
|
25
25
|
}), /* @__PURE__ */ r(e, {
|
|
26
|
+
"aria-label": `${t} ${i}`,
|
|
27
|
+
"aria-valuemax": 100,
|
|
28
|
+
"aria-valuemin": 0,
|
|
29
|
+
"aria-valuenow": a,
|
|
30
|
+
role: "progressbar",
|
|
26
31
|
sx: {
|
|
27
|
-
bgcolor:
|
|
32
|
+
bgcolor: o.palette.warning.lighter,
|
|
28
33
|
height: 12,
|
|
29
34
|
borderRadius: 6
|
|
30
35
|
},
|
|
31
36
|
children: /* @__PURE__ */ r(h, { sx: {
|
|
32
|
-
bgcolor:
|
|
37
|
+
bgcolor: o.palette.warning.main,
|
|
33
38
|
height: 12,
|
|
34
39
|
borderRadius: 6,
|
|
35
|
-
width: `${
|
|
40
|
+
width: `${a}%`
|
|
36
41
|
} })
|
|
37
42
|
})]
|
|
38
43
|
});
|
|
39
44
|
};
|
|
40
45
|
export {
|
|
41
|
-
|
|
46
|
+
v as default
|
|
42
47
|
};
|
|
43
48
|
|
|
44
49
|
//# sourceMappingURL=ProgressBar.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\nimport { Text } from '@mxenabled/mxui'\n\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\ninterface ProgressBarProps {\n label: string\n amount: number\n percentage: number\n isBold?: boolean\n}\n\nconst ProgressBar = ({ label, amount, percentage, isBold }: ProgressBarProps) => {\n const theme = useTheme()\n return (\n <Stack sx={{ gap: 4 }}>\n <Stack
|
|
1
|
+
{"version":3,"file":"ProgressBar.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\nimport { Text } from '@mxenabled/mxui'\n\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\ninterface ProgressBarProps {\n label: string\n amount: number\n percentage: number\n isBold?: boolean\n}\n\n/**\n * One labelled bar. The track is a `progressbar` whose value is the fill percentage and whose name is\n * the label plus the amount, so the comparison the block draws is readable by assistive tech (and\n * assertable in tests) rather than existing only as a CSS width.\n */\nconst ProgressBar = ({ label, amount, percentage, isBold }: ProgressBarProps) => {\n const theme = useTheme()\n const formattedAmount = formatCurrency(amount, '0,0.00')\n\n return (\n <Stack sx={{ gap: 4 }}>\n <Stack\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-between',\n }}\n >\n <Text variant=\"caption\">{label}</Text>\n <Text bold={isBold} variant=\"caption\">\n {formattedAmount}\n </Text>\n </Stack>\n <Stack\n aria-label={`${label} ${formattedAmount}`}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={percentage}\n role=\"progressbar\"\n sx={{\n bgcolor: theme.palette.warning.lighter,\n height: 12,\n borderRadius: 6,\n }}\n >\n <Box\n sx={{\n bgcolor: theme.palette.warning.main,\n height: 12,\n borderRadius: 6,\n width: `${percentage}%`,\n }}\n />\n </Stack>\n </Stack>\n )\n}\n\nexport default ProgressBar\n"],"mappings":";;;;;;AAmBA,IAAM,IAAA,CAAe,EAAE,OAAA,GAAO,QAAA,GAAQ,YAAA,GAAY,QAAA,EAAA,MAA+B;AAC/E,QAAM,IAAQ,EAAS,GACjB,IAAkB,EAAe,GAAQ,QAAQ;AAEvD,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,KAAK,EAAE;AAAA,IAApB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,eAAe;AAAA,QACf,gBAAgB;AAAA,MAClB;AAAA,MALF,UAAA,CAOE,gBAAA,EAAC,GAAD;AAAA,QAAM,SAAQ;AAAA,QAAW,UAAA;AAAA,MAAY,CAAA,GACrC,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM;AAAA,QAAQ,SAAQ;AAAA,QACzB,UAAA;AAAA,MACG,CAAA,CACD;AAAA,IACP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,MACE,cAAY,GAAG,CAAA,IAAS,CAAA;AAAA,MACxB,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,MAAK;AAAA,MACL,IAAI;AAAA,QACF,SAAS,EAAM,QAAQ,QAAQ;AAAA,QAC/B,QAAQ;AAAA,QACR,cAAc;AAAA,MAChB;AAAA,MAEA,UAAA,gBAAA,EAAC,GAAD,EACE,IAAI;AAAA,QACF,SAAS,EAAM,QAAQ,QAAQ;AAAA,QAC/B,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,OAAO,GAAG,CAAA;AAAA,MACZ,EACD,CAAA;AAAA,IACI,CAAA,CACF;AAAA;AAEX"}
|