@mx-cartographer/experiences 9.7.31 → 9.7.32
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/constants/InstitutionLogo.d.ts +2 -0
- package/dist/core/constants/InstitutionLogo.es.js +6 -0
- package/dist/core/constants/InstitutionLogo.es.js.map +1 -0
- package/dist/core/constants/index.d.ts +1 -0
- package/dist/core/index.es.js +137 -135
- package/dist/core/types/InsightsInstanceSlotData.d.ts +6 -1
- package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +20 -0
- package/dist/core/types/localization/index.d.ts +1 -1
- package/dist/core/utils/SanitizeHtml.d.ts +2 -0
- package/dist/core/utils/SanitizeHtml.es.js +44 -0
- package/dist/core/utils/SanitizeHtml.es.js.map +1 -0
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/dashboard/WelcomeDialog.es.js +78 -115
- package/dist/dashboard/WelcomeDialog.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.d.ts +10 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js +32 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.d.ts +16 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js +287 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/index.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.d.ts +32 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js +66 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.d.ts +1 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js +13 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +31 -30
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.d.ts +0 -6
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js +13 -14
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +76 -69
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [9.7.32] - 10-22-2026
|
|
2
|
+
|
|
3
|
+
- **ADDED** - `credit_utilization_block` action block for the Credit Utilization beat's "Learn more": the beat's donut summary, the utilization legend and a per-card list from `instance_slot_data.data_series`, joined to the loaded accounts by guid for the institution logo; a card with no shared limit says so. Copy from the new `insights_feed.credit_utilization` namespace. Fixture, stories, tests and `docs/action-blocks/credit-utilization-block.md` (MEW2-3356)
|
|
4
|
+
|
|
1
5
|
## [9.7.31] - 10-22-2026
|
|
2
6
|
|
|
3
7
|
- **ADDED** - `emergency_savings_block` action block (savings calculator drawer) for Monthly Emergency Savings Reminder (MEW2-3352)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/** MXUI's own `InstitutionLogo` fallback tile. Passed as `logoUrl` it shows straight away, instead of after a failed request for an empty institution guid. */
|
|
2
|
+
export declare const DEFAULT_INSTITUTION_LOGO_URL = "https://content.moneydesktop.com/storage/MD_Assets/serenity/default_institution_logo.png";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstitutionLogo.es.js","names":[],"sources":["../../../src/core/constants/InstitutionLogo.ts"],"sourcesContent":["/** MXUI's own `InstitutionLogo` fallback tile. Passed as `logoUrl` it shows straight away, instead of after a failed request for an empty institution guid. */\nexport const DEFAULT_INSTITUTION_LOGO_URL =\n 'https://content.moneydesktop.com/storage/MD_Assets/serenity/default_institution_logo.png'\n"],"mappings":"AACA,IAAa,IACX"}
|
|
@@ -2,3 +2,4 @@ export { ApiEndpoints } from './ApiEndpoints';
|
|
|
2
2
|
export { CategoryColors, CategoryGuids, CategoryGuidToName, CategoryIcon, PaymentCategories, } from '../../core/constants/Category';
|
|
3
3
|
export { DATE_FORMATS_INTL, formatDate, ORDINAL_DATE_FORMAT, ORDINAL_MONTH_DAY_YEAR_FORMAT, } from '../../core/constants/DateFormats';
|
|
4
4
|
export { RecurrenceTypes } from './repeatingTransactions';
|
|
5
|
+
export { DEFAULT_INSTITUTION_LOGO_URL } from './InstitutionLogo';
|
package/dist/core/index.es.js
CHANGED
|
@@ -1,144 +1,146 @@
|
|
|
1
1
|
import { LOCALES as r, VALID_LOCALES as t, buildDynamicCopy as i, getLocale as m } from "./utils/Localization.es.js";
|
|
2
2
|
import { Fetch as p } from "./utils/Fetch.es.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
3
|
+
import { sanitizeHtml as f } from "./utils/SanitizeHtml.es.js";
|
|
4
|
+
import { AccountIcon as c, AccountIconVariants as s, AccountSubType as S, AccountType as A, AccountTypeName as u, ConnectionStatus as y, ConnectionStatusEnums as l, ErrorStatuses as T, MfaStatuses as g, NonConnectedStatuses as d, ProcessingStatuses as C, PropertyType as N, PropertyTypeName as h, StatusName as b } from "./types/Account.es.js";
|
|
5
|
+
import { UserVerification as B } from "./types/Beat.es.js";
|
|
6
|
+
import { ExpenseStatus as D, ScheduledPaymentTypes as E } from "./types/Expense.es.js";
|
|
7
|
+
import { GoalType as I, MetaType as P, TrackType as R } from "./types/Goal.es.js";
|
|
8
|
+
import { slot as M } from "./types/Insights.es.js";
|
|
9
|
+
import { AccountNotificationTypes as V, BudgetNotificationTypes as x, InsightNotificationTypes as z, NotificationTypes as O } from "./types/Notification.es.js";
|
|
10
|
+
import { TransactionStatus as k, TransactionType as q } from "./types/Transaction.es.js";
|
|
11
|
+
import { ScreenSize as _ } from "./types/ScreenSize.es.js";
|
|
12
|
+
import { Frequency as v, RecurrenceStatus as J, RecurrenceType as K, RepeatingType as Q } from "./types/RepeatingTransaction.es.js";
|
|
13
|
+
import { AccountApi as Y } from "./api/AccountApi.es.js";
|
|
14
|
+
import { AgreementApi as $ } from "./api/AgreementApi.es.js";
|
|
15
|
+
import { AnalyticsApi as ro } from "./api/AnalyticsApi.es.js";
|
|
16
|
+
import { AppDataApi as io } from "./api/AppDataApi.es.js";
|
|
17
|
+
import { BannerApi as eo } from "./api/BannerApi.es.js";
|
|
18
|
+
import { BeatApi as no } from "./api/BeatApi.es.js";
|
|
19
|
+
import { BudgetsApi as ao } from "./api/BudgetsApi.es.js";
|
|
20
|
+
import { CategoryApi as so } from "./api/CategoryApi.es.js";
|
|
21
|
+
import { FinstrongApi as Ao } from "./api/FinstrongApi.es.js";
|
|
22
|
+
import { GlobalCopyApi as yo } from "./api/GlobalCopyApi.es.js";
|
|
23
|
+
import { GoalApi as To } from "./api/GoalApi.es.js";
|
|
24
|
+
import { HelpApi as Co } from "./api/HelpApi.es.js";
|
|
25
|
+
import { HoldingApi as ho } from "./api/HoldingApi.es.js";
|
|
26
|
+
import { MerchantApi as Go } from "./api/MerchantApi.es.js";
|
|
27
|
+
import { NotificationApi as Lo } from "./api/NotificationApi.es.js";
|
|
28
|
+
import { RepeatingTransactionsApi as Eo } from "./api/RepeatingTransactionsApi.es.js";
|
|
29
|
+
import { ScheduledPaymentsApi as Io } from "./api/ScheduledPaymentsApi.es.js";
|
|
30
|
+
import { SettingsApi as Ro } from "./api/SettingsApi.es.js";
|
|
31
|
+
import { TransactionApi as Mo } from "./api/TransactionApi.es.js";
|
|
32
|
+
import { UserApi as Vo } from "./api/UserApi.es.js";
|
|
33
|
+
import { WidgetApi as zo } from "./api/WidgetApi.es.js";
|
|
34
|
+
import { AccountStore as Wo } from "./stores/AccountStore.es.js";
|
|
35
|
+
import { AgreementStore as qo } from "./stores/AgreementStore.es.js";
|
|
36
|
+
import { AppDataStore as _o } from "./stores/AppDataStore.es.js";
|
|
37
|
+
import { AnalyticsStore as vo } from "./stores/AnalyticsStore.es.js";
|
|
38
|
+
import { BeatStore as Ko } from "./stores/BeatStore.es.js";
|
|
39
|
+
import { BudgetsStore as Xo } from "./stores/BudgetsStore.es.js";
|
|
40
|
+
import { CashflowStore as Zo } from "./stores/CashflowStore.es.js";
|
|
41
|
+
import { CategoryStore as or } from "./stores/CategoryStore.es.js";
|
|
42
|
+
import { ConnectStore as tr } from "./stores/ConnectStore.es.js";
|
|
43
|
+
import { DebtsStore as mr } from "./stores/DebtsStore.es.js";
|
|
44
|
+
import { FinstrongStore as pr } from "./stores/FinstrongStore.es.js";
|
|
45
|
+
import { GlobalStore as fr } from "./stores/GlobalStore.es.js";
|
|
46
|
+
import { GlobalUiStore as cr } from "./stores/GlobalUiStore.es.js";
|
|
47
|
+
import { GlobalCopyStore as Sr } from "./stores/GlobalCopyStore.es.js";
|
|
48
|
+
import { GoalStore as ur } from "./stores/GoalStore.es.js";
|
|
49
|
+
import { HelpStore as lr } from "./stores/HelpStore.es.js";
|
|
50
|
+
import { HoldingStore as gr } from "./stores/HoldingStore.es.js";
|
|
51
|
+
import { InsightsV2Store as Cr } from "./stores/InsightsV2Store.es.js";
|
|
52
|
+
import { MerchantStore as hr } from "./stores/MerchantStore.es.js";
|
|
53
|
+
import { NetWorthStore as Gr } from "./stores/NetWorthStore.es.js";
|
|
54
|
+
import { NotificationStore as Lr } from "./stores/NotificationStore.es.js";
|
|
55
|
+
import { RecurringTransactionsStore as Er } from "./stores/RecurringTransactionsStore.es.js";
|
|
56
|
+
import { SettingsStore as Ir } from "./stores/SettingsStore.es.js";
|
|
57
|
+
import { TransactionStore as Rr } from "./stores/TransactionStore.es.js";
|
|
58
|
+
import { TrendsStore as Mr } from "./stores/TrendsStore.es.js";
|
|
59
|
+
import { UserStore as Vr } from "./stores/UserStore.es.js";
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
61
|
+
Y as AccountApi,
|
|
62
|
+
c as AccountIcon,
|
|
63
|
+
s as AccountIconVariants,
|
|
64
|
+
V as AccountNotificationTypes,
|
|
65
|
+
Wo as AccountStore,
|
|
66
|
+
S as AccountSubType,
|
|
67
|
+
A as AccountType,
|
|
68
|
+
u as AccountTypeName,
|
|
69
|
+
$ as AgreementApi,
|
|
70
|
+
qo as AgreementStore,
|
|
71
|
+
ro as AnalyticsApi,
|
|
72
|
+
vo as AnalyticsStore,
|
|
73
|
+
io as AppDataApi,
|
|
74
|
+
_o as AppDataStore,
|
|
75
|
+
eo as BannerApi,
|
|
76
|
+
no as BeatApi,
|
|
77
|
+
Ko as BeatStore,
|
|
78
|
+
x as BudgetNotificationTypes,
|
|
79
|
+
ao as BudgetsApi,
|
|
80
|
+
Xo as BudgetsStore,
|
|
81
|
+
Zo as CashflowStore,
|
|
82
|
+
so as CategoryApi,
|
|
83
|
+
or as CategoryStore,
|
|
84
|
+
tr as ConnectStore,
|
|
85
|
+
y as ConnectionStatus,
|
|
86
|
+
l as ConnectionStatusEnums,
|
|
87
|
+
mr as DebtsStore,
|
|
88
|
+
T as ErrorStatuses,
|
|
89
|
+
D as ExpenseStatus,
|
|
89
90
|
p as Fetch,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
91
|
+
Ao as FinstrongApi,
|
|
92
|
+
pr as FinstrongStore,
|
|
93
|
+
v as Frequency,
|
|
94
|
+
yo as GlobalCopyApi,
|
|
95
|
+
Sr as GlobalCopyStore,
|
|
96
|
+
fr as GlobalStore,
|
|
97
|
+
cr as GlobalUiStore,
|
|
98
|
+
To as GoalApi,
|
|
99
|
+
ur as GoalStore,
|
|
100
|
+
I as GoalType,
|
|
101
|
+
Co as HelpApi,
|
|
102
|
+
lr as HelpStore,
|
|
103
|
+
ho as HoldingApi,
|
|
104
|
+
gr as HoldingStore,
|
|
105
|
+
z as InsightNotificationTypes,
|
|
106
|
+
Cr as InsightsV2Store,
|
|
106
107
|
r as LOCALES,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
108
|
+
Go as MerchantApi,
|
|
109
|
+
hr as MerchantStore,
|
|
110
|
+
P as MetaType,
|
|
111
|
+
g as MfaStatuses,
|
|
112
|
+
Gr as NetWorthStore,
|
|
113
|
+
d as NonConnectedStatuses,
|
|
114
|
+
Lo as NotificationApi,
|
|
115
|
+
Lr as NotificationStore,
|
|
116
|
+
O as NotificationTypes,
|
|
117
|
+
C as ProcessingStatuses,
|
|
118
|
+
N as PropertyType,
|
|
119
|
+
h as PropertyTypeName,
|
|
120
|
+
J as RecurrenceStatus,
|
|
121
|
+
K as RecurrenceType,
|
|
122
|
+
Er as RecurringTransactionsStore,
|
|
123
|
+
Eo as RepeatingTransactionsApi,
|
|
124
|
+
Q as RepeatingType,
|
|
125
|
+
E as ScheduledPaymentTypes,
|
|
126
|
+
Io as ScheduledPaymentsApi,
|
|
127
|
+
_ as ScreenSize,
|
|
128
|
+
Ro as SettingsApi,
|
|
129
|
+
Ir as SettingsStore,
|
|
130
|
+
b as StatusName,
|
|
131
|
+
R as TrackType,
|
|
132
|
+
Mo as TransactionApi,
|
|
133
|
+
k as TransactionStatus,
|
|
134
|
+
Rr as TransactionStore,
|
|
135
|
+
q as TransactionType,
|
|
136
|
+
Mr as TrendsStore,
|
|
137
|
+
Vo as UserApi,
|
|
138
|
+
Vr as UserStore,
|
|
139
|
+
B as UserVerification,
|
|
139
140
|
t as VALID_LOCALES,
|
|
140
|
-
|
|
141
|
+
zo as WidgetApi,
|
|
141
142
|
i as buildDynamicCopy,
|
|
142
143
|
m as getLocale,
|
|
143
|
-
|
|
144
|
+
f as sanitizeHtml,
|
|
145
|
+
M as slot
|
|
144
146
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataSeries, Legends } from '../../core';
|
|
2
|
-
export interface InsightsInstanceSlotData extends Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<AccountSwitchBlockData>, Partial<TransactionDetailsBlockData>, Partial<CommonProps> {
|
|
2
|
+
export interface InsightsInstanceSlotData extends Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<AccountSwitchBlockData>, Partial<TransactionDetailsBlockData>, Partial<CreditUtilizationBlockData>, Partial<CommonProps> {
|
|
3
3
|
}
|
|
4
4
|
interface CommonProps {
|
|
5
5
|
amount?: number;
|
|
@@ -118,4 +118,9 @@ export interface TransactionDetailsBlockData {
|
|
|
118
118
|
/** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */
|
|
119
119
|
bottom_actions?: string[];
|
|
120
120
|
}
|
|
121
|
+
export interface CreditUtilizationBlockData {
|
|
122
|
+
accounts_balance_sum?: number;
|
|
123
|
+
accounts_credit_limit_sum?: number;
|
|
124
|
+
credit_utilization_percentage?: number;
|
|
125
|
+
}
|
|
121
126
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n ariaLabel?: string\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block: `instance_slot.data` (Insights 2.0)\nexport interface BarChartBlockData {\n series?: DataSeries\n category_guid?: string\n average_amount?: number\n /** [0] monthly amount, [1] trend. */\n additional_data?: Legends[]\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CreditUtilizationBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n ariaLabel?: string\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block: `instance_slot.data` (Insights 2.0)\nexport interface BarChartBlockData {\n series?: DataSeries\n category_guid?: string\n average_amount?: number\n /** [0] monthly amount, [1] trend. */\n additional_data?: Legends[]\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n\n// Credit Utilization action block. The per-card rows are the beat's `data_series` table\n// (`guid`, `label`, `amount`, `total_amount`, `percentage`), carried on `CommonProps.data_series`.\nexport interface CreditUtilizationBlockData {\n accounts_balance_sum?: number\n accounts_credit_limit_sum?: number\n credit_utilization_percentage?: number\n}\n"],"mappings":"AA8HA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
|
|
@@ -290,6 +290,25 @@ export interface GoalsBlockCopy {
|
|
|
290
290
|
total_saved_label: string;
|
|
291
291
|
complete_label: string;
|
|
292
292
|
}
|
|
293
|
+
/** Labels for the Credit Utilization drawer; the figures come off the beat. */
|
|
294
|
+
export interface CreditUtilizationCopy {
|
|
295
|
+
/** Drawer title. */
|
|
296
|
+
title: string;
|
|
297
|
+
total_credit_utilized: string;
|
|
298
|
+
/** Spoken donut summary: `_1{amount}` utilized, `_2{total}` limit, `_3{ratio}` percent. */
|
|
299
|
+
total_credit_utilized_aria: string;
|
|
300
|
+
what_does_this_mean: string;
|
|
301
|
+
excellent: string;
|
|
302
|
+
good: string;
|
|
303
|
+
fair: string;
|
|
304
|
+
needs_work: string;
|
|
305
|
+
ratio_explanation: string;
|
|
306
|
+
recommendation: string;
|
|
307
|
+
per_card_header: string;
|
|
308
|
+
credit_utilized: string;
|
|
309
|
+
credit_utilization_ratio: string;
|
|
310
|
+
credit_limit_not_shared: string;
|
|
311
|
+
}
|
|
293
312
|
/** The credit card payoff calculator drawer (`payoff_calculator_block`). */
|
|
294
313
|
export interface PayoffCalculatorCopy {
|
|
295
314
|
/** Drawer title, e.g. "Credit card payoff calculator". */
|
|
@@ -340,6 +359,7 @@ export interface InsightsFeedCopy {
|
|
|
340
359
|
/** Optional until the localized-content service ships the namespace. */
|
|
341
360
|
goals_block?: GoalsBlockCopy;
|
|
342
361
|
/** Optional until the localized-content service ships the namespace. */
|
|
362
|
+
credit_utilization?: CreditUtilizationCopy;
|
|
343
363
|
payoff_calculator?: PayoffCalculatorCopy;
|
|
344
364
|
}
|
|
345
365
|
export {};
|
|
@@ -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, OverflowMenuCopy, DismissInsightCopy, DismissInsightOptionCopy, HiddenConfirmationCopy, HideFeedbackCopy, FeedbackCopy, FeedbackBarCopy, } from './InsightsFeedCopy';
|
|
16
|
+
export type { AmountInputModalCopy, AmountInputModalVariantCopy, EmergencySavingsCopy, InsightsFeedCopy, MakeTransferCopy, PayoffCalculatorCopy, RemainingCashCopy, CreditUtilizationCopy, OverflowMenuCopy, DismissInsightCopy, DismissInsightOptionCopy, HiddenConfirmationCopy, HideFeedbackCopy, FeedbackCopy, FeedbackBarCopy, } from './InsightsFeedCopy';
|
|
17
17
|
export type { InvestmentsCopy } from './InvestmentsCopy';
|
|
18
18
|
export type { MicroInsightsCopy } from './MicroInsightsCopy';
|
|
19
19
|
export type { NetWorthCopy } from './NetWorthCopy';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import t from "dompurify";
|
|
2
|
+
var e = {
|
|
3
|
+
ALLOWED_TAGS: [
|
|
4
|
+
"a",
|
|
5
|
+
"b",
|
|
6
|
+
"br",
|
|
7
|
+
"div",
|
|
8
|
+
"em",
|
|
9
|
+
"h1",
|
|
10
|
+
"h2",
|
|
11
|
+
"h3",
|
|
12
|
+
"h4",
|
|
13
|
+
"h5",
|
|
14
|
+
"h6",
|
|
15
|
+
"i",
|
|
16
|
+
"li",
|
|
17
|
+
"ol",
|
|
18
|
+
"p",
|
|
19
|
+
"span",
|
|
20
|
+
"strong",
|
|
21
|
+
"u",
|
|
22
|
+
"ul"
|
|
23
|
+
],
|
|
24
|
+
ALLOWED_ATTR: [
|
|
25
|
+
"href",
|
|
26
|
+
"target",
|
|
27
|
+
"rel"
|
|
28
|
+
]
|
|
29
|
+
}, i = (r) => {
|
|
30
|
+
r.tagName === "A" && r.getAttribute("target") === "_blank" && r.setAttribute("rel", "noopener noreferrer");
|
|
31
|
+
}, o = (r) => {
|
|
32
|
+
if (!t.isSupported) return "";
|
|
33
|
+
t.addHook("afterSanitizeAttributes", i);
|
|
34
|
+
try {
|
|
35
|
+
return t.sanitize(r, e);
|
|
36
|
+
} finally {
|
|
37
|
+
t.removeHook("afterSanitizeAttributes");
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
o as sanitizeHtml
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=SanitizeHtml.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SanitizeHtml.es.js","names":[],"sources":["../../../src/core/utils/SanitizeHtml.ts"],"sourcesContent":["import DOMPurify from 'dompurify'\n\nconst SANITIZE_CONFIG = {\n ALLOWED_TAGS: [\n 'a',\n 'b',\n 'br',\n 'div',\n 'em',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'i',\n 'li',\n 'ol',\n 'p',\n 'span',\n 'strong',\n 'u',\n 'ul',\n ],\n ALLOWED_ATTR: ['href', 'target', 'rel'],\n}\n\nconst forceSafeRel = (node: Element) => {\n if (node.tagName === 'A' && node.getAttribute('target') === '_blank') {\n node.setAttribute('rel', 'noopener noreferrer')\n }\n}\n\n/** Server HTML against an explicit allowlist; empty when DOMPurify has no DOM to sanitize against. */\nexport const sanitizeHtml = (html: string): string => {\n if (!DOMPurify.isSupported) return ''\n\n DOMPurify.addHook('afterSanitizeAttributes', forceSafeRel)\n try {\n return DOMPurify.sanitize(html, SANITIZE_CONFIG)\n } finally {\n DOMPurify.removeHook('afterSanitizeAttributes')\n }\n}\n"],"mappings":";AAEA,IAAM,IAAkB;AAAA,EACtB,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IAAC;AAAA,IAAQ;AAAA,IAAU;AAAA,EAAK;AACxC,GAEM,IAAA,CAAgB,MAAkB;AACtC,EAAI,EAAK,YAAY,OAAO,EAAK,aAAa,QAAQ,MAAM,YAC1D,EAAK,aAAa,OAAO,qBAAqB;AAElD,GAGa,IAAA,CAAgB,MAAyB;AACpD,MAAI,CAAC,EAAU,YAAa,QAAO;AAEnC,EAAA,EAAU,QAAQ,2BAA2B,CAAY;AACzD,MAAI;AACF,WAAO,EAAU,SAAS,GAAM,CAAe;AAAA,EACjD,UAAA;AACE,IAAA,EAAU,WAAW,yBAAyB;AAAA,EAChD;AACF"}
|