@mx-cartographer/experiences 9.7.129 → 9.7.130
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/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +44 -43
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js +46 -45
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js +23 -22
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +26 -25
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/HelpBlock/layout.d.ts +0 -1
- package/dist/insights-v2/actionBlocks/HelpBlock/layout.es.js +6 -6
- package/dist/insights-v2/actionBlocks/HelpBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js +8 -7
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/OverdraftBlock/layout.es.js +11 -13
- package/dist/insights-v2/actionBlocks/OverdraftBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +14 -13
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js +10 -9
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +0 -3
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js +30 -33
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +31 -30
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +14 -14
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js +11 -10
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js +5 -5
- package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/EmergencySavingsAccountPicker.es.js +1 -1
- package/dist/insights-v2/blocks/slotReaders.d.ts +5 -0
- package/dist/insights-v2/blocks/slotReaders.es.js +7 -5
- package/dist/insights-v2/blocks/slotReaders.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { buildDynamicCopy as x } from "../../../../core/utils/Localization.es.js";
|
|
2
2
|
import { useGlobalCopyStore as y } from "../../../../common/context/hooks.es.js";
|
|
3
3
|
import { formatCurrency as w } from "../../../../core/utils/NumberFormatting.es.js";
|
|
4
|
-
import C,
|
|
5
|
-
import {
|
|
4
|
+
import { asNumber as C, slotOrFlat as h } from "../../slotReaders.es.js";
|
|
5
|
+
import _, { isLogoGuid as L } from "../../../components/LogoFromGuid.es.js";
|
|
6
6
|
import f from "../../../components/LogoTile.es.js";
|
|
7
7
|
import i from "@mui/material/Stack";
|
|
8
8
|
import { Text as n } from "@mxenabled/mxui";
|
|
9
9
|
import { Icon as R } from "@mxenabled/mx-icons";
|
|
10
10
|
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
11
11
|
var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r }) => {
|
|
12
|
-
if (
|
|
12
|
+
if (L(r.logo?.guid)) return /* @__PURE__ */ o(_, {
|
|
13
13
|
logo: r.logo,
|
|
14
14
|
size: d
|
|
15
15
|
});
|
|
@@ -24,7 +24,7 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
|
|
|
24
24
|
sx: { color: "text.secondary" }
|
|
25
25
|
});
|
|
26
26
|
}, B = ({ payload: r }) => {
|
|
27
|
-
const e = y().insights_feed?.general, { instance_slot: c = {} } = r, m =
|
|
27
|
+
const e = y().insights_feed?.general, { instance_slot: c = {} } = r, m = C(h(c, "amount"));
|
|
28
28
|
if (m === void 0) return null;
|
|
29
29
|
const p = h(c, "data_series"), t = (Array.isArray(p) ? p : []).filter(S), u = t.length > g ? t.slice(0, 5) : t, a = t.length - u.length, s = x(e?.more_merchants ?? "", `${a}`) || void 0;
|
|
30
30
|
return /* @__PURE__ */ o(i, {
|
package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/EmergencySavingsAccountPicker.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAccountStore as g, useInsightsV2Store as p } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import { asText as t } from "../../slotReaders.es.js";
|
|
2
3
|
import { ANALYTICS_EVENTS_CONFIG as _ } from "../../../analytics/analyticsEventsConfig.es.js";
|
|
3
4
|
import { useAnalyticsEvent as v } from "../../../analytics/useAnalyticsEvent.es.js";
|
|
4
|
-
import { asText as t } from "../../slotReaders.es.js";
|
|
5
5
|
import E from "../../../components/DesignateEmergencySavingsCard.es.js";
|
|
6
6
|
import { observer as S } from "mobx-react-lite";
|
|
7
7
|
import { jsx as d } from "react/jsx-runtime";
|
|
@@ -9,4 +9,9 @@ export type FlatSlotKey = Exclude<keyof InstanceSlot, 'data' | 'block' | 'varian
|
|
|
9
9
|
export declare const slotOrFlat: (instanceSlot: InstanceSlot, key: FlatSlotKey) => unknown;
|
|
10
10
|
/** A finite number, else undefined (so a card never shows a made-up value). */
|
|
11
11
|
export declare const asNumber: (value: unknown) => number | undefined;
|
|
12
|
+
/** Any string, empty included, else undefined. */
|
|
12
13
|
export declare const asText: (value: unknown) => string | undefined;
|
|
14
|
+
/** A string with more than whitespace, else undefined: a blank guid or label is no value. */
|
|
15
|
+
export declare const asNonEmptyText: (value: unknown) => string | undefined;
|
|
16
|
+
/** Guids, else undefined: an empty list or a blank guid names nothing to fetch or draw. */
|
|
17
|
+
export declare const asGuidList: (value: unknown) => string[] | undefined;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { slot as
|
|
2
|
-
var
|
|
1
|
+
import { slot as i } from "../../core/types/Insights.es.js";
|
|
2
|
+
var d = (r, t) => i(r.data, t) ?? r[t], m = (r) => typeof r == "number" && Number.isFinite(r) ? r : void 0, p = (r) => typeof r == "string" ? r : void 0, o = (r) => typeof r == "string" && r.trim() !== "" ? r : void 0, y = (r) => Array.isArray(r) && r.length > 0 && r.every((t) => o(t) !== void 0) ? r : void 0;
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
m as
|
|
4
|
+
y as asGuidList,
|
|
5
|
+
o as asNonEmptyText,
|
|
6
|
+
m as asNumber,
|
|
7
|
+
p as asText,
|
|
8
|
+
d as slotOrFlat
|
|
7
9
|
};
|
|
8
10
|
|
|
9
11
|
//# sourceMappingURL=slotReaders.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotReaders.es.js","names":[],"sources":["../../../src/insights-v2/blocks/slotReaders.ts"],"sourcesContent":["import { slot, type InstanceSlot } from '../../core'\n\n/** A field V1 payloads carry flat on the slot, beside `data`. */\nexport type FlatSlotKey = Exclude<keyof InstanceSlot, 'data' | 'block' | 'variant'>\n\n/**\n * `data` first, then the flat field V1 payloads carry beside it. Any non-null `data` value wins,\n * even one of the wrong kind (`data` is the truth; the caller's guard then drops it). For blocks\n * that still accept V1; a V2-only block reads `slot()` so a stale flat field never shows.\n */\nexport const slotOrFlat = (instanceSlot: InstanceSlot, key: FlatSlotKey): unknown =>\n slot(instanceSlot.data, key) ?? instanceSlot[key]\n\n/** A finite number, else undefined (so a card never shows a made-up value). */\nexport const asNumber = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) ? value : undefined\n\nexport const asText = (value: unknown): string | undefined =>\n typeof value === 'string' ? value : undefined\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"slotReaders.es.js","names":[],"sources":["../../../src/insights-v2/blocks/slotReaders.ts"],"sourcesContent":["import { slot, type InstanceSlot } from '../../core'\n\n// Readers for untrusted payload values, in instance slots and drilldown_data: each returns the value\n// when it has the right shape, else undefined, so the caller drops it rather than drawing a guess.\n\n/** A field V1 payloads carry flat on the slot, beside `data`. */\nexport type FlatSlotKey = Exclude<keyof InstanceSlot, 'data' | 'block' | 'variant'>\n\n/**\n * `data` first, then the flat field V1 payloads carry beside it. Any non-null `data` value wins,\n * even one of the wrong kind (`data` is the truth; the caller's guard then drops it). For blocks\n * that still accept V1; a V2-only block reads `slot()` so a stale flat field never shows.\n */\nexport const slotOrFlat = (instanceSlot: InstanceSlot, key: FlatSlotKey): unknown =>\n slot(instanceSlot.data, key) ?? instanceSlot[key]\n\n/** A finite number, else undefined (so a card never shows a made-up value). */\nexport const asNumber = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) ? value : undefined\n\n/** Any string, empty included, else undefined. */\nexport const asText = (value: unknown): string | undefined =>\n typeof value === 'string' ? value : undefined\n\n/** A string with more than whitespace, else undefined: a blank guid or label is no value. */\nexport const asNonEmptyText = (value: unknown): string | undefined =>\n typeof value === 'string' && value.trim() !== '' ? value : undefined\n\n/** Guids, else undefined: an empty list or a blank guid names nothing to fetch or draw. */\nexport const asGuidList = (value: unknown): string[] | undefined =>\n Array.isArray(value) &&\n value.length > 0 &&\n value.every((item) => asNonEmptyText(item) !== undefined)\n ? (value as string[])\n : undefined\n"],"mappings":";AAaA,IAAa,IAAA,CAAc,GAA4B,MACrD,EAAK,EAAa,MAAM,CAAG,KAAK,EAAa,CAAA,GAGlC,IAAA,CAAY,MACvB,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK,IAAI,IAAQ,QAGnD,IAAA,CAAU,MACrB,OAAO,KAAU,WAAW,IAAQ,QAGzB,IAAA,CAAkB,MAC7B,OAAO,KAAU,YAAY,EAAM,KAAK,MAAM,KAAK,IAAQ,QAGhD,IAAA,CAAc,MACzB,MAAM,QAAQ,CAAK,KACnB,EAAM,SAAS,KACf,EAAM,MAAA,CAAO,MAAS,EAAe,CAAI,MAAM,MAAS,IACnD,IACD"}
|