@mx-cartographer/experiences 9.7.205 → 9.7.206
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 +4 -0
- package/dist/core/types/localization/index.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/QuarterlySummaryBlock/QuarterlySummaryBlock.d.ts +3 -1
- package/dist/insights-v2/blocks/ComponentBlocks/QuarterlySummaryBlock/QuarterlySummaryBlock.es.js +50 -38
- package/dist/insights-v2/blocks/ComponentBlocks/QuarterlySummaryBlock/QuarterlySummaryBlock.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [9.7.206] - 11-25-2026
|
|
2
|
+
|
|
3
|
+
- **ADDED** - QuarterlySummaryBlock component block, copy types, mock fixtures, and contract test (WEC-2363)
|
|
4
|
+
|
|
1
5
|
## [9.7.205] - 11-24-2026
|
|
2
6
|
|
|
3
7
|
- **ADDED** - Monthly Non-Essential Category Summary V2 drilldown support and guidance tip for essential vs flexible categories (WEC-2448)
|
|
@@ -13,7 +13,7 @@ export type { DebtsCopy } from './DebtsCopy';
|
|
|
13
13
|
export type { FinstrongCopy } from './FinstrongCopy';
|
|
14
14
|
export type { GoalsCopy } from './GoalsCopy';
|
|
15
15
|
export type { HelpCopy, HelpByCategoryList } from './HelpCopy';
|
|
16
|
-
export type { AmountInputModalCopy, AmountInputModalVariantCopy, EmergencySavingsCopy, InsightsFeedCopy, MakeTransferCopy, PayoffCalculatorCopy, RemainingCashCopy, OverdraftCopy, CreditUtilizationCopy, AccountListCopy, OverflowMenuCopy, DismissInsightCopy, DismissInsightOptionCopy, HiddenConfirmationCopy, HideFeedbackCopy, FeedbackCopy, FeedbackBarCopy, TopMerchantsCopy, TransactionHistoryBlock, } from './InsightsFeedCopy';
|
|
16
|
+
export type { AmountInputModalCopy, AmountInputModalVariantCopy, EmergencySavingsCopy, InsightsFeedCopy, MakeTransferCopy, PayoffCalculatorCopy, RemainingCashCopy, OverdraftCopy, CreditUtilizationCopy, AccountListCopy, OverflowMenuCopy, DismissInsightCopy, DismissInsightOptionCopy, HiddenConfirmationCopy, HideFeedbackCopy, FeedbackCopy, FeedbackBarCopy, TopMerchantsCopy, TransactionHistoryBlock, QuarterlySummaryBlockCopy, } from './InsightsFeedCopy';
|
|
17
17
|
export type { InvestmentsCopy } from './InvestmentsCopy';
|
|
18
18
|
export type { MicroInsightsCopy } from './MicroInsightsCopy';
|
|
19
19
|
export type { NetWorthCopy } from './NetWorthCopy';
|
package/dist/insights-v2/blocks/ComponentBlocks/QuarterlySummaryBlock/QuarterlySummaryBlock.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { BlockProps } from '../../types';
|
|
2
|
-
declare const QuarterlySummaryBlock: ({ payload }: BlockProps) => import("react/jsx-runtime").JSX.Element | null
|
|
2
|
+
declare const QuarterlySummaryBlock: (({ payload }: BlockProps) => import("react/jsx-runtime").JSX.Element | null) & {
|
|
3
|
+
displayName: string;
|
|
4
|
+
};
|
|
3
5
|
export default QuarterlySummaryBlock;
|
package/dist/insights-v2/blocks/ComponentBlocks/QuarterlySummaryBlock/QuarterlySummaryBlock.es.js
CHANGED
|
@@ -1,68 +1,80 @@
|
|
|
1
|
-
import { useGlobalCopyStore as
|
|
2
|
-
import { slot as
|
|
3
|
-
import { CURRENCY_FORMAT as
|
|
4
|
-
import { asNumber as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { useGlobalCopyStore as C } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import { slot as n } from "../../../../core/types/Insights.es.js";
|
|
3
|
+
import { CURRENCY_FORMAT as h, formatCurrency as g } from "../../../../core/utils/NumberFormatting.es.js";
|
|
4
|
+
import { asNumber as l, asText as k } from "../../slotReaders.es.js";
|
|
5
|
+
import { observer as R } from "mobx-react-lite";
|
|
6
|
+
import i from "@mui/material/Stack";
|
|
7
|
+
import { Text as c } from "@mxenabled/mxui";
|
|
8
|
+
import { jsx as e, jsxs as _ } from "react/jsx-runtime";
|
|
9
|
+
var q = ({ label: t, value: o }) => /* @__PURE__ */ _(i, {
|
|
9
10
|
sx: {
|
|
10
11
|
alignItems: "flex-start",
|
|
11
12
|
bgcolor: "background.default",
|
|
12
13
|
border: 1,
|
|
13
14
|
borderColor: "divider",
|
|
14
|
-
borderRadius:
|
|
15
|
+
borderRadius: 2,
|
|
15
16
|
flex: 1,
|
|
16
17
|
gap: 4,
|
|
18
|
+
m: 0,
|
|
17
19
|
p: 12
|
|
18
20
|
},
|
|
19
|
-
children: [/* @__PURE__ */
|
|
21
|
+
children: [/* @__PURE__ */ e(c, {
|
|
20
22
|
color: "text.secondary",
|
|
23
|
+
component: "dt",
|
|
21
24
|
variant: "caption",
|
|
22
|
-
children:
|
|
23
|
-
}), /* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
children: t
|
|
26
|
+
}), /* @__PURE__ */ e(c, {
|
|
27
|
+
bold: !0,
|
|
28
|
+
color: "text.primary",
|
|
29
|
+
component: "dd",
|
|
30
|
+
sx: { m: 0 },
|
|
31
|
+
variant: "body2",
|
|
32
|
+
children: o
|
|
28
33
|
})]
|
|
29
|
-
}),
|
|
30
|
-
const
|
|
31
|
-
|
|
34
|
+
}), s = (t) => typeof t == "string" && t.trim().length > 0, F = R(({ payload: t }) => {
|
|
35
|
+
const o = C().insights_feed?.quarterly_summary_block, { data: a } = t.instance_slot ?? {}, m = l(n(a, "spent_amount")), d = l(n(a, "saved_amount")), u = l(n(a, "transactions_count")), p = k(n(a, "quarter")), b = o?.spent_label, v = o?.saved_label, f = o?.transactions_label, x = m !== void 0 && s(b), y = d !== void 0 && s(v);
|
|
36
|
+
if (!x && !y) return null;
|
|
37
|
+
const S = [
|
|
38
|
+
x ? {
|
|
39
|
+
label: b,
|
|
40
|
+
value: g(m, h.cents)
|
|
41
|
+
} : null,
|
|
42
|
+
y ? {
|
|
43
|
+
label: v,
|
|
44
|
+
value: g(d, h.cents)
|
|
45
|
+
} : null,
|
|
46
|
+
u !== void 0 && s(f) ? {
|
|
47
|
+
label: f,
|
|
48
|
+
value: String(u)
|
|
49
|
+
} : null
|
|
50
|
+
].filter((r) => r !== null);
|
|
51
|
+
return /* @__PURE__ */ _(i, {
|
|
32
52
|
sx: {
|
|
33
53
|
gap: 12,
|
|
34
54
|
px: 16,
|
|
35
55
|
width: "100%"
|
|
36
56
|
},
|
|
37
|
-
children: [
|
|
57
|
+
children: [p && /* @__PURE__ */ e(c, {
|
|
38
58
|
color: "text.secondary",
|
|
39
59
|
variant: "caption",
|
|
40
|
-
children:
|
|
41
|
-
}), /* @__PURE__ */
|
|
60
|
+
children: p
|
|
61
|
+
}), /* @__PURE__ */ e(i, {
|
|
62
|
+
component: "dl",
|
|
42
63
|
direction: "row",
|
|
43
64
|
sx: {
|
|
44
65
|
gap: 12,
|
|
66
|
+
m: 0,
|
|
45
67
|
width: "100%"
|
|
46
68
|
},
|
|
47
|
-
children:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
l !== void 0 && /* @__PURE__ */ a(c, {
|
|
53
|
-
label: _,
|
|
54
|
-
value: x(l, v.cents)
|
|
55
|
-
}),
|
|
56
|
-
u !== void 0 && /* @__PURE__ */ a(c, {
|
|
57
|
-
label: h,
|
|
58
|
-
value: String(u)
|
|
59
|
-
})
|
|
60
|
-
]
|
|
69
|
+
children: S.map((r) => /* @__PURE__ */ e(q, {
|
|
70
|
+
label: r.label,
|
|
71
|
+
value: r.value
|
|
72
|
+
}, r.label))
|
|
61
73
|
})]
|
|
62
74
|
});
|
|
63
|
-
};
|
|
75
|
+
});
|
|
64
76
|
export {
|
|
65
|
-
|
|
77
|
+
F as default
|
|
66
78
|
};
|
|
67
79
|
|
|
68
80
|
//# sourceMappingURL=QuarterlySummaryBlock.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuarterlySummaryBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/QuarterlySummaryBlock/QuarterlySummaryBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { slot } from '../../../../core/types/Insights'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport { asNumber, asText } from '../../slotReaders'\nimport type { BlockProps } from '../../types'\n\nconst StatBox = ({ label, value }: { label: string; value: string }) => (\n <Stack\n sx={{\n alignItems: 'flex-start',\n bgcolor: 'background.default',\n border: 1,\n borderColor: 'divider',\n borderRadius:
|
|
1
|
+
{"version":3,"file":"QuarterlySummaryBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/QuarterlySummaryBlock/QuarterlySummaryBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { slot } from '../../../../core/types/Insights'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport { asNumber, asText } from '../../slotReaders'\nimport type { BlockProps } from '../../types'\n\nconst StatBox = ({ label, value }: { label: string; value: string }) => (\n <Stack\n sx={{\n alignItems: 'flex-start',\n bgcolor: 'background.default',\n border: 1,\n borderColor: 'divider',\n borderRadius: 2,\n flex: 1,\n gap: 4,\n m: 0,\n p: 12,\n }}\n >\n <Text color=\"text.secondary\" component=\"dt\" variant=\"caption\">\n {label}\n </Text>\n <Text bold={true} color=\"text.primary\" component=\"dd\" sx={{ m: 0 }} variant=\"body2\">\n {value}\n </Text>\n </Stack>\n)\n\nconst isNonEmptyString = (value?: string): value is string =>\n typeof value === 'string' && value.trim().length > 0\n\nconst QuarterlySummaryBlock = observer(({ payload }: BlockProps) => {\n const copy = useGlobalCopyStore().insights_feed?.quarterly_summary_block\n\n const { data } = payload.instance_slot ?? {}\n const spentAmount = asNumber(slot(data, 'spent_amount'))\n const savedAmount = asNumber(slot(data, 'saved_amount'))\n const transactionsCount = asNumber(slot(data, 'transactions_count'))\n const quarter = asText(slot(data, 'quarter'))\n\n const spentLabel = copy?.spent_label\n const savedLabel = copy?.saved_label\n const transactionsLabel = copy?.transactions_label\n\n const hasSpent = spentAmount !== undefined && isNonEmptyString(spentLabel)\n const hasSaved = savedAmount !== undefined && isNonEmptyString(savedLabel)\n\n if (!hasSpent && !hasSaved) {\n return null\n }\n\n const stats = [\n hasSpent\n ? { label: spentLabel, value: formatCurrency(spentAmount, CURRENCY_FORMAT.cents) }\n : null,\n hasSaved\n ? { label: savedLabel, value: formatCurrency(savedAmount, CURRENCY_FORMAT.cents) }\n : null,\n transactionsCount !== undefined && isNonEmptyString(transactionsLabel)\n ? { label: transactionsLabel, value: String(transactionsCount) }\n : null,\n ].filter((stat): stat is { label: string; value: string } => stat !== null)\n\n return (\n <Stack sx={{ gap: 12, px: 16, width: '100%' }}>\n {quarter && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {quarter}\n </Text>\n )}\n <Stack component=\"dl\" direction=\"row\" sx={{ gap: 12, m: 0, width: '100%' }}>\n {stats.map((stat) => (\n <StatBox key={stat.label} label={stat.label} value={stat.value} />\n ))}\n </Stack>\n </Stack>\n )\n})\n\nexport default QuarterlySummaryBlock\n"],"mappings":";;;;;;;;AAYA,IAAM,IAAA,CAAW,EAAE,OAAA,GAAO,OAAA,EAAA,MACxB,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,KAAK;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA,EAXF,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