@mx-cartographer/experiences 9.4.12-alpha.al1 → 9.4.12

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 (45) hide show
  1. package/CHANGELOG.md +3 -2
  2. package/dist/common/context/hooks.d.ts +1 -0
  3. package/dist/common/context/hooks.es.js +18 -17
  4. package/dist/common/context/hooks.es.js.map +1 -1
  5. package/dist/common/context/index.d.ts +1 -1
  6. package/dist/common/index.es.js +130 -129
  7. package/dist/common/utils/Theme.es.js +37 -37
  8. package/dist/common/utils/Theme.es.js.map +1 -1
  9. package/dist/core/stores/InsightsV2Store.d.ts +24 -7
  10. package/dist/core/stores/InsightsV2Store.es.js +18 -23
  11. package/dist/core/stores/InsightsV2Store.es.js.map +1 -1
  12. package/dist/core/types/AppData.d.ts +8 -9
  13. package/dist/core/types/Client.d.ts +19 -19
  14. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.d.ts +4 -27
  15. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js +253 -206
  16. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js.map +1 -1
  17. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.d.ts +5 -4
  18. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js +12 -20
  19. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js.map +1 -1
  20. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/index.d.ts +2 -0
  21. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.d.ts +9 -43
  22. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js +12 -79
  23. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js.map +1 -1
  24. package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js +35 -13
  25. package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -1
  26. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +17 -13
  27. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -1
  28. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -1
  29. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +7 -7
  30. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -1
  31. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js +17 -13
  32. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js.map +1 -1
  33. package/dist/insights-v2/blocks/ChartBlocks/index.d.ts +1 -0
  34. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +19 -25
  35. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -1
  36. package/dist/insights-v2/blocks/createVariantBlock.d.ts +29 -0
  37. package/dist/insights-v2/blocks/createVariantBlock.es.js +13 -0
  38. package/dist/insights-v2/blocks/createVariantBlock.es.js.map +1 -0
  39. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +24 -25
  40. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -1
  41. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js +18 -19
  42. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js.map +1 -1
  43. package/dist/insights-v2/index.es.js +52 -50
  44. package/dist/insights-v2/mappings/blocks.es.js +20 -20
  45. package/package.json +1 -1
@@ -1,24 +1,41 @@
1
- import { DrilldownPayload } from '../types';
2
1
  import { GlobalStore } from './GlobalStore';
3
2
  export type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar';
4
3
  export interface ActionDrawerState {
5
4
  isDrawerOpen: boolean;
6
5
  trigger: ActionDrawerTrigger;
7
- chartBarIndex: number;
8
- tabIndex: number;
9
6
  guid: string;
7
+ /**
8
+ * Block-specific drilldown data, opaque to the store. Each action block defines
9
+ * and reads its own shape (via useActionContext<T>()), so adding a block never
10
+ * widens this envelope. Chart drilldowns put `{ chartBarIndex, tabIndex }` here;
11
+ * CTAs carry none.
12
+ */
13
+ context: unknown;
10
14
  }
11
15
  export declare const CLOSED_ACTION_DRAWER: ActionDrawerState;
16
+ interface OpenActionDrawerArgs {
17
+ guid: string;
18
+ trigger: ActionDrawerTrigger;
19
+ context?: unknown;
20
+ }
12
21
  /**
13
- * UI state shared across the insights-v2 widget tree. Owns the action drawer
14
- * so cards, charts, and action blocks coordinate through the store instead of
15
- * prop drilling.
22
+ * UI state shared across the insights-v2 widget tree. Owns the action drawer so
23
+ * cards, charts, and action blocks coordinate through the store instead of prop
24
+ * drilling. The drawer state is a fixed envelope (isDrawerOpen/guid/trigger) plus
25
+ * an opaque `context` bag, so per-block drilldown data never leaks into this shape.
16
26
  */
17
27
  export declare class InsightsV2Store {
18
28
  globalStore: GlobalStore;
19
29
  actionDrawer: ActionDrawerState;
20
30
  constructor(globalStore: GlobalStore);
31
+ /**
32
+ * Generic drawer opener — the only opener a new action block needs. Pass the
33
+ * beat guid, the CTA/source that triggered it, and (optionally) a block-specific
34
+ * context object the block reads back via useActionContext.
35
+ */
36
+ openActionDrawer: ({ guid, trigger, context }: OpenActionDrawerArgs) => void;
37
+ /** Convenience opener for CTA drawers (no drilldown context). */
21
38
  openCtaDrawer: (guid: string, trigger: "primaryCta" | "secondaryCta") => void;
22
- openChartDrilldown: (guid: string, { chartBarIndex, tabIndex }: DrilldownPayload) => void;
23
39
  closeActionDrawer: () => void;
24
40
  }
41
+ export {};
@@ -1,33 +1,28 @@
1
- import { makeAutoObservable as t } from "mobx";
2
- var i = {
3
- chartBarIndex: 0,
4
- tabIndex: 0,
1
+ import { makeAutoObservable as a } from "mobx";
2
+ var o = {
5
3
  isDrawerOpen: !1,
6
4
  trigger: "primaryCta",
7
- guid: ""
8
- }, n = class {
5
+ guid: "",
6
+ context: void 0
7
+ }, s = class {
9
8
  globalStore;
10
- actionDrawer = i;
9
+ actionDrawer = o;
11
10
  constructor(r) {
12
- this.globalStore = r, t(this);
11
+ this.globalStore = r, a(this);
13
12
  }
14
- openCtaDrawer = (r, a) => {
13
+ openActionDrawer = ({ guid: r, trigger: e, context: t }) => {
15
14
  this.actionDrawer = {
16
- chartBarIndex: 0,
17
- tabIndex: 0,
18
15
  isDrawerOpen: !0,
19
- trigger: a,
20
- guid: r
16
+ trigger: e,
17
+ guid: r,
18
+ context: t
21
19
  };
22
20
  };
23
- openChartDrilldown = (r, { chartBarIndex: a, tabIndex: e }) => {
24
- this.actionDrawer = {
25
- chartBarIndex: a,
26
- tabIndex: e ?? 0,
27
- isDrawerOpen: !0,
28
- trigger: "chartBar",
29
- guid: r
30
- };
21
+ openCtaDrawer = (r, e) => {
22
+ this.openActionDrawer({
23
+ guid: r,
24
+ trigger: e
25
+ });
31
26
  };
32
27
  closeActionDrawer = () => {
33
28
  this.actionDrawer = {
@@ -38,8 +33,8 @@ var i = {
38
33
  };
39
34
  };
40
35
  export {
41
- i as CLOSED_ACTION_DRAWER,
42
- n as InsightsV2Store
36
+ o as CLOSED_ACTION_DRAWER,
37
+ s as InsightsV2Store
43
38
  };
44
39
 
45
40
  //# sourceMappingURL=InsightsV2Store.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InsightsV2Store.es.js","names":[],"sources":["../../../src/core/stores/InsightsV2Store.ts"],"sourcesContent":["import { makeAutoObservable } from 'mobx'\n\nimport type { DrilldownPayload } from '../types'\n\nimport type { GlobalStore } from './GlobalStore'\n\nexport type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar'\n\nexport interface ActionDrawerState {\n isDrawerOpen: boolean\n trigger: ActionDrawerTrigger\n chartBarIndex: number\n tabIndex: number\n guid: string\n}\n\nexport const CLOSED_ACTION_DRAWER: ActionDrawerState = {\n chartBarIndex: 0,\n tabIndex: 0,\n isDrawerOpen: false,\n trigger: 'primaryCta',\n guid: '',\n}\n\n/**\n * UI state shared across the insights-v2 widget tree. Owns the action drawer\n * so cards, charts, and action blocks coordinate through the store instead of\n * prop drilling.\n */\nexport class InsightsV2Store {\n globalStore: GlobalStore\n\n actionDrawer: ActionDrawerState = CLOSED_ACTION_DRAWER\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n\n makeAutoObservable(this)\n }\n\n openCtaDrawer = (guid: string, trigger: 'primaryCta' | 'secondaryCta') => {\n this.actionDrawer = {\n chartBarIndex: 0,\n tabIndex: 0,\n isDrawerOpen: true,\n trigger,\n guid,\n }\n }\n\n openChartDrilldown = (guid: string, { chartBarIndex, tabIndex }: DrilldownPayload) => {\n this.actionDrawer = {\n chartBarIndex,\n tabIndex: tabIndex ?? 0,\n isDrawerOpen: true,\n trigger: 'chartBar',\n guid,\n }\n }\n\n closeActionDrawer = () => {\n // Preserve `trigger` so the drawer keeps its variant-specific title/content\n // through the slide-out animation (ActionBlockLayer stays mounted while\n // closing). Only flip isDrawerOpen off and clear the beat guid.\n this.actionDrawer = { ...this.actionDrawer, isDrawerOpen: false, guid: '' }\n }\n}\n"],"mappings":";AAgBA,IAAa,IAA0C;AAAA,EACrD,eAAe;AAAA,EACf,UAAU;AAAA,EACV,cAAc;AAAA,EACd,SAAS;AAAA,EACT,MAAM;AACR,GAOa,IAAb,MAA6B;AAAA,EAC3B;AAAA,EAEA,eAAkC;AAAA,EAElC,YAAY,GAA0B;AACpC,SAAK,cAAc,GAEnB,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,gBAAA,CAAiB,GAAc,MAA2C;AACxE,SAAK,eAAe;AAAA,MAClB,eAAe;AAAA,MACf,UAAU;AAAA,MACV,cAAc;AAAA,MACd,SAAA;AAAA,MACA,MAAA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,qBAAA,CAAsB,GAAc,EAAE,eAAA,GAAe,UAAA,EAAA,MAAiC;AACpF,SAAK,eAAe;AAAA,MAClB,eAAA;AAAA,MACA,UAAU,KAAY;AAAA,MACtB,cAAc;AAAA,MACd,SAAS;AAAA,MACT,MAAA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,oBAAA,MAA0B;AAIxB,SAAK,eAAe;AAAA,MAAE,GAAG,KAAK;AAAA,MAAc,cAAc;AAAA,MAAO,MAAM;AAAA,IAAG;AAAA,EAC5E;AACF"}
1
+ {"version":3,"file":"InsightsV2Store.es.js","names":[],"sources":["../../../src/core/stores/InsightsV2Store.ts"],"sourcesContent":["import { makeAutoObservable } from 'mobx'\n\nimport type { GlobalStore } from './GlobalStore'\n\nexport type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar'\n\nexport interface ActionDrawerState {\n isDrawerOpen: boolean\n trigger: ActionDrawerTrigger\n guid: string\n /**\n * Block-specific drilldown data, opaque to the store. Each action block defines\n * and reads its own shape (via useActionContext<T>()), so adding a block never\n * widens this envelope. Chart drilldowns put `{ chartBarIndex, tabIndex }` here;\n * CTAs carry none.\n */\n context: unknown\n}\n\nexport const CLOSED_ACTION_DRAWER: ActionDrawerState = {\n isDrawerOpen: false,\n trigger: 'primaryCta',\n guid: '',\n context: undefined,\n}\n\ninterface OpenActionDrawerArgs {\n guid: string\n trigger: ActionDrawerTrigger\n context?: unknown\n}\n\n/**\n * UI state shared across the insights-v2 widget tree. Owns the action drawer so\n * cards, charts, and action blocks coordinate through the store instead of prop\n * drilling. The drawer state is a fixed envelope (isDrawerOpen/guid/trigger) plus\n * an opaque `context` bag, so per-block drilldown data never leaks into this shape.\n */\nexport class InsightsV2Store {\n globalStore: GlobalStore\n\n actionDrawer: ActionDrawerState = CLOSED_ACTION_DRAWER\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n\n makeAutoObservable(this)\n }\n\n /**\n * Generic drawer opener — the only opener a new action block needs. Pass the\n * beat guid, the CTA/source that triggered it, and (optionally) a block-specific\n * context object the block reads back via useActionContext.\n */\n openActionDrawer = ({ guid, trigger, context }: OpenActionDrawerArgs) => {\n this.actionDrawer = { isDrawerOpen: true, trigger, guid, context }\n }\n\n /** Convenience opener for CTA drawers (no drilldown context). */\n openCtaDrawer = (guid: string, trigger: 'primaryCta' | 'secondaryCta') => {\n this.openActionDrawer({ guid, trigger })\n }\n\n closeActionDrawer = () => {\n // Preserve `trigger` + `context` so the drawer keeps its variant-specific\n // title/content through the slide-out animation (ActionBlockLayer stays\n // mounted while closing). Only flip isDrawerOpen off and clear the beat guid.\n this.actionDrawer = { ...this.actionDrawer, isDrawerOpen: false, guid: '' }\n }\n}\n"],"mappings":";AAmBA,IAAa,IAA0C;AAAA,EACrD,cAAc;AAAA,EACd,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AACX,GAca,IAAb,MAA6B;AAAA,EAC3B;AAAA,EAEA,eAAkC;AAAA,EAElC,YAAY,GAA0B;AACpC,SAAK,cAAc,GAEnB,EAAmB,IAAI;AAAA,EACzB;AAAA,EAOA,mBAAA,CAAoB,EAAE,MAAA,GAAM,SAAA,GAAS,SAAA,EAAA,MAAoC;AACvE,SAAK,eAAe;AAAA,MAAE,cAAc;AAAA,MAAM,SAAA;AAAA,MAAS,MAAA;AAAA,MAAM,SAAA;AAAA,IAAQ;AAAA,EACnE;AAAA,EAGA,gBAAA,CAAiB,GAAc,MAA2C;AACxE,SAAK,iBAAiB;AAAA,MAAE,MAAA;AAAA,MAAM,SAAA;AAAA,IAAQ,CAAC;AAAA,EACzC;AAAA,EAEA,oBAAA,MAA0B;AAIxB,SAAK,eAAe;AAAA,MAAE,GAAG,KAAK;AAAA,MAAc,cAAc;AAAA,MAAO,MAAM;AAAA,IAAG;AAAA,EAC5E;AACF"}
@@ -49,21 +49,20 @@ export interface MasterConfig {
49
49
  }
50
50
  export interface StyleConfig {
51
51
  background_color?: string;
52
- button_corner_radius?: number;
53
- card_corner_radius?: number;
54
- error_color?: string;
55
- font_name?: string;
56
- header_font_name?: string;
57
- info_color?: string;
58
- neutral_color?: string;
59
52
  paper_color?: string;
60
53
  primary_color?: string;
61
54
  secondary_color?: string;
62
55
  success_color?: string;
56
+ error_color?: string;
57
+ warning_color?: string;
58
+ info_color?: string;
59
+ neutral_color?: string;
60
+ corner_radius?: number;
61
+ font_name?: string;
62
+ header_font_name?: string;
63
63
  use_body_font_url?: boolean;
64
- use_glass?: boolean;
65
64
  use_header_font_url?: boolean;
66
- warning_color?: string;
65
+ use_glass?: boolean;
67
66
  }
68
67
  export interface DeepLinkParams {
69
68
  account_guids?: string[];
@@ -96,30 +96,30 @@ export interface ClientInsightProfile {
96
96
  is_recurring_transactions_manager_enabled: boolean;
97
97
  }
98
98
  export interface ClientStyleProfile {
99
- background_color?: string;
100
- body_font_name?: string;
101
- body_font_url?: string;
102
- button_corner_radius?: number;
103
- card_corner_radius?: number;
104
- error_color?: string;
105
- error_color_dark?: string;
106
- header_font_name?: string;
107
- header_font_url?: string;
108
- info_color?: string;
109
- info_color_dark?: string;
110
- mode?: 'dark' | 'light' | 'browser';
111
- neutral_color?: string;
112
- neutral_color_dark?: string;
113
- paper_color?: string;
114
99
  primary_color?: string;
115
- primary_color_dark?: string;
116
100
  primary_font_regular?: string;
117
101
  secondary_color?: string;
118
- secondary_color_dark?: string;
102
+ neutral_color?: string;
119
103
  success_color?: string;
104
+ error_color?: string;
105
+ warning_color?: string;
106
+ info_color?: string;
107
+ primary_color_dark?: string;
108
+ secondary_color_dark?: string;
109
+ neutral_color_dark?: string;
120
110
  success_color_dark?: string;
111
+ error_color_dark?: string;
112
+ warning_color_dark?: string;
113
+ info_color_dark?: string;
114
+ mode?: 'dark' | 'light' | 'browser';
121
115
  system_font?: string;
116
+ card_corner_radius?: number;
117
+ button_corner_radius?: number;
118
+ background_color?: string;
119
+ paper_color?: string;
120
+ body_font_name?: string;
121
+ body_font_url?: string;
122
+ header_font_name?: string;
123
+ header_font_url?: string;
122
124
  use_glass?: boolean;
123
- warning_color?: string;
124
- warning_color_dark?: string;
125
125
  }
@@ -1,27 +1,4 @@
1
- import { variants } from './layout';
2
- export { variants };
3
- interface CopyContent {
4
- header_content?: string;
5
- description?: string;
6
- body_content?: string;
7
- body_description?: string;
8
- available_text?: string;
9
- total_remaining_text?: string;
10
- increment_aria_label?: string;
11
- decrement_aria_label?: string;
12
- expenses_text?: string;
13
- available_balances_text?: string;
14
- average_monthly_spend_text?: string;
15
- your_available_balances_text?: string;
16
- }
17
- interface MakeTransferActionBlockProps {
18
- date?: string;
19
- variant: (typeof variants)[keyof typeof variants];
20
- svgDateContent?: string;
21
- availableBalances?: number;
22
- copy: CopyContent;
23
- averageMonthlySpend?: number;
24
- /** SAVE_AN_EXTRA_100: total remaining from the payload; falls back to available − expenses. */
25
- totalRemaining?: number;
26
- }
27
- export declare const MakeTransferActionBlock: ({ variant, svgDateContent, date, copy, availableBalances, averageMonthlySpend, totalRemaining, }: MakeTransferActionBlockProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { MakeTransferVariant, MakeTransferVariantProps } from './layout';
2
+ export declare const MakeTransferActionBlock: ({ variant, slotData, copy, }: MakeTransferVariantProps & {
3
+ variant: MakeTransferVariant;
4
+ }) => import("react/jsx-runtime").JSX.Element;