@mx-cartographer/experiences 9.7.31 → 9.7.33

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/core/constants/InstitutionLogo.d.ts +2 -0
  3. package/dist/core/constants/InstitutionLogo.es.js +6 -0
  4. package/dist/core/constants/InstitutionLogo.es.js.map +1 -0
  5. package/dist/core/constants/index.d.ts +1 -0
  6. package/dist/core/index.es.js +137 -135
  7. package/dist/core/types/InsightsInstanceSlotData.d.ts +6 -1
  8. package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
  9. package/dist/core/types/localization/InsightsFeedCopy.d.ts +20 -0
  10. package/dist/core/types/localization/index.d.ts +1 -1
  11. package/dist/core/utils/SanitizeHtml.d.ts +2 -0
  12. package/dist/core/utils/SanitizeHtml.es.js +44 -0
  13. package/dist/core/utils/SanitizeHtml.es.js.map +1 -0
  14. package/dist/core/utils/index.d.ts +1 -0
  15. package/dist/dashboard/WelcomeDialog.es.js +78 -115
  16. package/dist/dashboard/WelcomeDialog.es.js.map +1 -1
  17. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.d.ts +10 -0
  18. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js +32 -0
  19. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js.map +1 -0
  20. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.d.ts +16 -0
  21. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js +287 -0
  22. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js.map +1 -0
  23. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/index.d.ts +2 -0
  24. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.d.ts +32 -0
  25. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js +66 -0
  26. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js.map +1 -0
  27. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.d.ts +1 -0
  28. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js +13 -0
  29. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js.map +1 -0
  30. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +31 -30
  31. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
  32. package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.d.ts +0 -6
  33. package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js +13 -14
  34. package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js.map +1 -1
  35. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
  36. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +3 -3
  37. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
  38. package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
  39. package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -0
  40. package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
  41. package/dist/insights-v2/mappings/blocks.es.js +76 -69
  42. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  43. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [9.7.33] - 10-22-2026
2
+
3
+ - **FIXED** - `SVGImageBlock` resolves the Upcoming Tax Deadline Alert illustration under the snake_case variant `remainder` that ditto emits. It was keyed `Reminder`, which `resolveVariantConfig` (exact `Object.hasOwn`) could not match, so the American and Canadian Upcoming Tax Deadline Alert cards fell back to the emergency-savings art. Updates the `layout.ts` variant key + `SVGImageVariant` union and the layout/block tests (WEC-2044, WEC-2067)
4
+
5
+ ## [9.7.32] - 10-22-2026
6
+
7
+ - **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)
8
+
1
9
  ## [9.7.31] - 10-22-2026
2
10
 
3
11
  - **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,6 @@
1
+ var t = "https://content.moneydesktop.com/storage/MD_Assets/serenity/default_institution_logo.png";
2
+ export {
3
+ t as DEFAULT_INSTITUTION_LOGO_URL
4
+ };
5
+
6
+ //# sourceMappingURL=InstitutionLogo.es.js.map
@@ -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';
@@ -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 { AccountIcon as f, AccountIconVariants as a, AccountSubType as c, AccountType as s, AccountTypeName as S, ConnectionStatus as A, ConnectionStatusEnums as u, ErrorStatuses as y, MfaStatuses as T, NonConnectedStatuses as l, ProcessingStatuses as g, PropertyType as d, PropertyTypeName as C, StatusName as N } from "./types/Account.es.js";
4
- import { UserVerification as b } from "./types/Beat.es.js";
5
- import { ExpenseStatus as B, ScheduledPaymentTypes as L } from "./types/Expense.es.js";
6
- import { GoalType as E, MetaType as I, TrackType as P } from "./types/Goal.es.js";
7
- import { slot as F } from "./types/Insights.es.js";
8
- import { AccountNotificationTypes as M, BudgetNotificationTypes as U, InsightNotificationTypes as V, NotificationTypes as x } from "./types/Notification.es.js";
9
- import { TransactionStatus as W, TransactionType as k } from "./types/Transaction.es.js";
10
- import { ScreenSize as w } from "./types/ScreenSize.es.js";
11
- import { Frequency as _, RecurrenceStatus as j, RecurrenceType as v, RepeatingType as J } from "./types/RepeatingTransaction.es.js";
12
- import { AccountApi as Q } from "./api/AccountApi.es.js";
13
- import { AgreementApi as Y } from "./api/AgreementApi.es.js";
14
- import { AnalyticsApi as $ } from "./api/AnalyticsApi.es.js";
15
- import { AppDataApi as ro } from "./api/AppDataApi.es.js";
16
- import { BannerApi as io } from "./api/BannerApi.es.js";
17
- import { BeatApi as eo } from "./api/BeatApi.es.js";
18
- import { BudgetsApi as no } from "./api/BudgetsApi.es.js";
19
- import { CategoryApi as ao } from "./api/CategoryApi.es.js";
20
- import { FinstrongApi as so } from "./api/FinstrongApi.es.js";
21
- import { GlobalCopyApi as Ao } from "./api/GlobalCopyApi.es.js";
22
- import { GoalApi as yo } from "./api/GoalApi.es.js";
23
- import { HelpApi as lo } from "./api/HelpApi.es.js";
24
- import { HoldingApi as Co } from "./api/HoldingApi.es.js";
25
- import { MerchantApi as ho } from "./api/MerchantApi.es.js";
26
- import { NotificationApi as Go } from "./api/NotificationApi.es.js";
27
- import { RepeatingTransactionsApi as Lo } from "./api/RepeatingTransactionsApi.es.js";
28
- import { ScheduledPaymentsApi as Eo } from "./api/ScheduledPaymentsApi.es.js";
29
- import { SettingsApi as Po } from "./api/SettingsApi.es.js";
30
- import { TransactionApi as Fo } from "./api/TransactionApi.es.js";
31
- import { UserApi as Mo } from "./api/UserApi.es.js";
32
- import { WidgetApi as Vo } from "./api/WidgetApi.es.js";
33
- import { AccountStore as Oo } from "./stores/AccountStore.es.js";
34
- import { AgreementStore as ko } from "./stores/AgreementStore.es.js";
35
- import { AppDataStore as wo } from "./stores/AppDataStore.es.js";
36
- import { AnalyticsStore as _o } from "./stores/AnalyticsStore.es.js";
37
- import { BeatStore as vo } from "./stores/BeatStore.es.js";
38
- import { BudgetsStore as Ko } from "./stores/BudgetsStore.es.js";
39
- import { CashflowStore as Xo } from "./stores/CashflowStore.es.js";
40
- import { CategoryStore as Zo } from "./stores/CategoryStore.es.js";
41
- import { ConnectStore as or } from "./stores/ConnectStore.es.js";
42
- import { DebtsStore as tr } from "./stores/DebtsStore.es.js";
43
- import { FinstrongStore as mr } from "./stores/FinstrongStore.es.js";
44
- import { GlobalStore as pr } from "./stores/GlobalStore.es.js";
45
- import { GlobalUiStore as fr } from "./stores/GlobalUiStore.es.js";
46
- import { GlobalCopyStore as cr } from "./stores/GlobalCopyStore.es.js";
47
- import { GoalStore as Sr } from "./stores/GoalStore.es.js";
48
- import { HelpStore as ur } from "./stores/HelpStore.es.js";
49
- import { HoldingStore as Tr } from "./stores/HoldingStore.es.js";
50
- import { InsightsV2Store as gr } from "./stores/InsightsV2Store.es.js";
51
- import { MerchantStore as Cr } from "./stores/MerchantStore.es.js";
52
- import { NetWorthStore as hr } from "./stores/NetWorthStore.es.js";
53
- import { NotificationStore as Gr } from "./stores/NotificationStore.es.js";
54
- import { RecurringTransactionsStore as Lr } from "./stores/RecurringTransactionsStore.es.js";
55
- import { SettingsStore as Er } from "./stores/SettingsStore.es.js";
56
- import { TransactionStore as Pr } from "./stores/TransactionStore.es.js";
57
- import { TrendsStore as Fr } from "./stores/TrendsStore.es.js";
58
- import { UserStore as Mr } from "./stores/UserStore.es.js";
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
- Q as AccountApi,
61
- f as AccountIcon,
62
- a as AccountIconVariants,
63
- M as AccountNotificationTypes,
64
- Oo as AccountStore,
65
- c as AccountSubType,
66
- s as AccountType,
67
- S as AccountTypeName,
68
- Y as AgreementApi,
69
- ko as AgreementStore,
70
- $ as AnalyticsApi,
71
- _o as AnalyticsStore,
72
- ro as AppDataApi,
73
- wo as AppDataStore,
74
- io as BannerApi,
75
- eo as BeatApi,
76
- vo as BeatStore,
77
- U as BudgetNotificationTypes,
78
- no as BudgetsApi,
79
- Ko as BudgetsStore,
80
- Xo as CashflowStore,
81
- ao as CategoryApi,
82
- Zo as CategoryStore,
83
- or as ConnectStore,
84
- A as ConnectionStatus,
85
- u as ConnectionStatusEnums,
86
- tr as DebtsStore,
87
- y as ErrorStatuses,
88
- B as ExpenseStatus,
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
- so as FinstrongApi,
91
- mr as FinstrongStore,
92
- _ as Frequency,
93
- Ao as GlobalCopyApi,
94
- cr as GlobalCopyStore,
95
- pr as GlobalStore,
96
- fr as GlobalUiStore,
97
- yo as GoalApi,
98
- Sr as GoalStore,
99
- E as GoalType,
100
- lo as HelpApi,
101
- ur as HelpStore,
102
- Co as HoldingApi,
103
- Tr as HoldingStore,
104
- V as InsightNotificationTypes,
105
- gr as InsightsV2Store,
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
- ho as MerchantApi,
108
- Cr as MerchantStore,
109
- I as MetaType,
110
- T as MfaStatuses,
111
- hr as NetWorthStore,
112
- l as NonConnectedStatuses,
113
- Go as NotificationApi,
114
- Gr as NotificationStore,
115
- x as NotificationTypes,
116
- g as ProcessingStatuses,
117
- d as PropertyType,
118
- C as PropertyTypeName,
119
- j as RecurrenceStatus,
120
- v as RecurrenceType,
121
- Lr as RecurringTransactionsStore,
122
- Lo as RepeatingTransactionsApi,
123
- J as RepeatingType,
124
- L as ScheduledPaymentTypes,
125
- Eo as ScheduledPaymentsApi,
126
- w as ScreenSize,
127
- Po as SettingsApi,
128
- Er as SettingsStore,
129
- N as StatusName,
130
- P as TrackType,
131
- Fo as TransactionApi,
132
- W as TransactionStatus,
133
- Pr as TransactionStore,
134
- k as TransactionType,
135
- Fr as TrendsStore,
136
- Mo as UserApi,
137
- Mr as UserStore,
138
- b as UserVerification,
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
- Vo as WidgetApi,
141
+ zo as WidgetApi,
141
142
  i as buildDynamicCopy,
142
143
  m as getLocale,
143
- F as slot
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":"AA6HA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
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,2 @@
1
+ /** Server HTML against an explicit allowlist; empty when DOMPurify has no DOM to sanitize against. */
2
+ export declare const sanitizeHtml: (html: string) => string;
@@ -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"}
@@ -1,2 +1,3 @@
1
1
  export { Fetch } from './Fetch';
2
2
  export { buildDynamicCopy, getLocale, LOCALES, VALID_LOCALES } from './Localization';
3
+ export { sanitizeHtml } from './SanitizeHtml';