@mx-cartographer/experiences 9.7.18 → 9.7.20
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/stores/InsightsV2Store.d.ts +19 -5
- package/dist/core/stores/InsightsV2Store.es.js +12 -10
- package/dist/core/stores/InsightsV2Store.es.js.map +1 -1
- package/dist/insights/components/insights/SwitchDirectDeposit/AccountBox.d.ts +1 -1
- package/dist/insights/components/insights/SwitchDirectDeposit/AccountBox.es.js +3 -3
- package/dist/insights/components/insights/SwitchDirectDeposit/AccountBox.es.js.map +1 -1
- package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.d.ts +2 -0
- package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.es.js +17 -15
- package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.es.js.map +1 -1
- package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.d.ts +4 -2
- package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.es.js +11 -11
- package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/util.es.js +6 -3
- package/dist/insights-v2/actionBlocks/util.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [9.7.19] - 10-21-2026
|
|
2
|
+
|
|
3
|
+
- **ADDED** - `openActionDrawer` takes an optional `cta` (a `block` and `variant`) for the `inDescriptionCta` trigger. The drawer then runs that block and variant instead of the beat's own `in_description_cta`, so a host that opens a beat's action from other data (pulse, from the beat's micro envelope) does not have to rewrite the beat. It is typed to that trigger only, kept in `actionDrawer.cta` through close for the slide-out, and replaced by the next open. Documented in `docs/action-blocks/README.md` (WEC-2000)
|
|
4
|
+
|
|
1
5
|
## [9.7.18] - 10-21-2026
|
|
2
6
|
|
|
3
7
|
- **ADDED** - `inDescriptionCtaBehavior?: 'internal' | 'external'` (default `'external'`) on `InsightsMicroWidget`. With `'internal'`, tapping an Insights 2.0 card opens the `insights_payload.in_description_cta` block in place instead of calling `onCardClick`; legacy beats and V2 beats with no drawer block there keep the host redirect. Analytics still fire. Without a `GlobalDataProvider` around the widget, a tap keeps the host's `onCardClick` instead of throwing (WEC-1999)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InDescriptionCTA } from '../types/Insights';
|
|
1
2
|
import { GlobalStore } from './GlobalStore';
|
|
2
3
|
export type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar' | 'inDescriptionCta';
|
|
3
4
|
export interface ActionDrawerState {
|
|
@@ -19,13 +20,25 @@ export interface ActionDrawerState {
|
|
|
19
20
|
* envelope) — not on every `setActionContext` call.
|
|
20
21
|
*/
|
|
21
22
|
context: unknown;
|
|
23
|
+
/**
|
|
24
|
+
* Block and variant an `inDescriptionCta` drawer runs; without it the beat's own
|
|
25
|
+
* `in_description_cta` is used. Replaced on each open, kept through close like `trigger`.
|
|
26
|
+
*/
|
|
27
|
+
cta?: DrawerCta;
|
|
22
28
|
}
|
|
23
29
|
export declare const CLOSED_ACTION_DRAWER: ActionDrawerState;
|
|
24
|
-
|
|
30
|
+
/** The block and variant an opener picks for an `inDescriptionCta` drawer. */
|
|
31
|
+
export type DrawerCta = Pick<InDescriptionCTA, 'block' | 'variant'>;
|
|
32
|
+
type OpenActionDrawerArgs = {
|
|
25
33
|
guid: string;
|
|
26
|
-
trigger: ActionDrawerTrigger;
|
|
27
34
|
context?: unknown;
|
|
28
|
-
}
|
|
35
|
+
} & ({
|
|
36
|
+
trigger: 'inDescriptionCta';
|
|
37
|
+
cta?: DrawerCta;
|
|
38
|
+
} | {
|
|
39
|
+
trigger: Exclude<ActionDrawerTrigger, 'inDescriptionCta'>;
|
|
40
|
+
cta?: never;
|
|
41
|
+
});
|
|
29
42
|
/** Lifecycle of a beat's CTA action (see insights-v2/ctaActions), keyed by beat guid. */
|
|
30
43
|
export type CtaStatus = 'pending' | 'done' | 'error';
|
|
31
44
|
/**
|
|
@@ -69,9 +82,10 @@ export declare class InsightsV2Store {
|
|
|
69
82
|
/**
|
|
70
83
|
* Generic drawer opener — the only opener a new action block needs. Pass the
|
|
71
84
|
* beat guid, the CTA/source that triggered it, and (optionally) a block-specific
|
|
72
|
-
* context object the block reads back via useActionContext.
|
|
85
|
+
* context object the block reads back via useActionContext. `cta` overrides the CTA an
|
|
86
|
+
* `inDescriptionCta` drawer runs, for this session only.
|
|
73
87
|
*/
|
|
74
|
-
openActionDrawer: ({ guid, trigger, context }: OpenActionDrawerArgs) => void;
|
|
88
|
+
openActionDrawer: ({ guid, trigger, context, cta }: OpenActionDrawerArgs) => void;
|
|
75
89
|
/** Convenience opener for CTA drawers (no drilldown context). */
|
|
76
90
|
openCtaDrawer: (guid: string, trigger: "primaryCta" | "secondaryCta") => void;
|
|
77
91
|
closeActionDrawer: () => void;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { makeAutoObservable as
|
|
2
|
-
var
|
|
1
|
+
import { makeAutoObservable as o } from "mobx";
|
|
2
|
+
var i = {
|
|
3
3
|
isDrawerOpen: !1,
|
|
4
4
|
trigger: "primaryCta",
|
|
5
5
|
guid: "",
|
|
6
|
-
context: void 0
|
|
7
|
-
|
|
6
|
+
context: void 0,
|
|
7
|
+
cta: void 0
|
|
8
|
+
}, n = class {
|
|
8
9
|
globalStore;
|
|
9
|
-
actionDrawer =
|
|
10
|
+
actionDrawer = i;
|
|
10
11
|
ctaStatus = {};
|
|
11
12
|
beatContext = {};
|
|
12
13
|
constructor(t) {
|
|
13
|
-
this.globalStore = t,
|
|
14
|
+
this.globalStore = t, o(this);
|
|
14
15
|
}
|
|
15
16
|
setCtaStatus = (t, e) => {
|
|
16
17
|
this.ctaStatus = {
|
|
@@ -36,12 +37,13 @@ var o = {
|
|
|
36
37
|
}
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
|
-
openActionDrawer = ({ guid: t, trigger: e, context: a }) => {
|
|
40
|
+
openActionDrawer = ({ guid: t, trigger: e, context: a, cta: r }) => {
|
|
40
41
|
this.actionDrawer = {
|
|
41
42
|
isDrawerOpen: !0,
|
|
42
43
|
trigger: e,
|
|
43
44
|
guid: t,
|
|
44
|
-
context: a
|
|
45
|
+
context: a,
|
|
46
|
+
cta: r
|
|
45
47
|
};
|
|
46
48
|
};
|
|
47
49
|
openCtaDrawer = (t, e) => {
|
|
@@ -59,8 +61,8 @@ var o = {
|
|
|
59
61
|
};
|
|
60
62
|
};
|
|
61
63
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
i as CLOSED_ACTION_DRAWER,
|
|
65
|
+
n as InsightsV2Store
|
|
64
66
|
};
|
|
65
67
|
|
|
66
68
|
//# 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 { GlobalStore } from './GlobalStore'\n\n// `inDescriptionCta`: the link inside a card's description (`insights_payload.in_description_cta`).\nexport type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar' | 'inDescriptionCta'\n\nexport interface ActionDrawerState {\n isDrawerOpen: boolean\n trigger: ActionDrawerTrigger\n guid: string\n /**\n * Block-specific drilldown data for the current drawer SESSION, opaque to the\n * store. Each action block defines and reads its own shape (via\n * useActionContext<T>()). Chart drilldowns put `{ chartBarIndex, tabIndex }`\n * here; CTAs carry none.\n *\n * This is an accumulating bag, not a single owner's value: a nested drawer\n * (e.g. TransactionDetailsBlock opened from a row inside TransactionHistory\n * Block) adds its own key via `setActionContext` ON TOP of whatever the outer\n * drawer already put here, so the outer block's own context survives while the\n * nested block is open. It resets to a clean slate only when a NEW drawer\n * session starts (`openActionDrawer`/`openCtaDrawer`, which fully replace the\n * envelope) — not on every `setActionContext` call.\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\
|
|
1
|
+
{"version":3,"file":"InsightsV2Store.es.js","names":[],"sources":["../../../src/core/stores/InsightsV2Store.ts"],"sourcesContent":["import { makeAutoObservable } from 'mobx'\n\nimport type { InDescriptionCTA } from '../types/Insights'\n\nimport type { GlobalStore } from './GlobalStore'\n\n// `inDescriptionCta`: the link inside a card's description (`insights_payload.in_description_cta`).\nexport type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar' | 'inDescriptionCta'\n\nexport interface ActionDrawerState {\n isDrawerOpen: boolean\n trigger: ActionDrawerTrigger\n guid: string\n /**\n * Block-specific drilldown data for the current drawer SESSION, opaque to the\n * store. Each action block defines and reads its own shape (via\n * useActionContext<T>()). Chart drilldowns put `{ chartBarIndex, tabIndex }`\n * here; CTAs carry none.\n *\n * This is an accumulating bag, not a single owner's value: a nested drawer\n * (e.g. TransactionDetailsBlock opened from a row inside TransactionHistory\n * Block) adds its own key via `setActionContext` ON TOP of whatever the outer\n * drawer already put here, so the outer block's own context survives while the\n * nested block is open. It resets to a clean slate only when a NEW drawer\n * session starts (`openActionDrawer`/`openCtaDrawer`, which fully replace the\n * envelope) — not on every `setActionContext` call.\n */\n context: unknown\n /**\n * Block and variant an `inDescriptionCta` drawer runs; without it the beat's own\n * `in_description_cta` is used. Replaced on each open, kept through close like `trigger`.\n */\n cta?: DrawerCta\n}\n\nexport const CLOSED_ACTION_DRAWER: ActionDrawerState = {\n isDrawerOpen: false,\n trigger: 'primaryCta',\n guid: '',\n context: undefined,\n cta: undefined,\n}\n\n/** The block and variant an opener picks for an `inDescriptionCta` drawer. */\nexport type DrawerCta = Pick<InDescriptionCTA, 'block' | 'variant'>\n\n// Only the `inDescriptionCta` trigger accepts a `cta`.\ntype OpenActionDrawerArgs = {\n guid: string\n context?: unknown\n} & (\n | { trigger: 'inDescriptionCta'; cta?: DrawerCta }\n | { trigger: Exclude<ActionDrawerTrigger, 'inDescriptionCta'>; cta?: never }\n)\n\n/** Lifecycle of a beat's CTA action (see insights-v2/ctaActions), keyed by beat guid. */\nexport type CtaStatus = 'pending' | 'done' | 'error'\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 /**\n * CTA action status per beat guid. Keyed by guid (not block) so a block shared by many\n * insights never reflects another card's pending or error state.\n */\n ctaStatus: Record<string, CtaStatus> = {}\n\n /**\n * Per-beat scratch input collected on the card or in its blocks (e.g. the account a user\n * picked before pressing Save), keyed by beat guid. Unlike `actionDrawer.context`, which is\n * replaced whenever any drawer session starts, this survives other cards' drawers opening.\n * CTA steps read it via `disabledWhen` and their `params` callback (`beatContextOf`). Ships\n * ahead of its first block writer (Designate's account picker) on purpose: it is the layer's\n * only way to keep a pick alive across other cards' drawer sessions.\n */\n beatContext: Record<string, Record<string, unknown>> = {}\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n\n makeAutoObservable(this)\n }\n\n setCtaStatus = (guid: string, status: CtaStatus) => {\n this.ctaStatus = { ...this.ctaStatus, [guid]: status }\n }\n\n /** Merges `values` into the beat's scratch input. */\n setBeatContext = (guid: string, values: Record<string, unknown>) => {\n this.beatContext = { ...this.beatContext, [guid]: { ...this.beatContext[guid], ...values } }\n }\n\n /**\n * Merges keys into the current drawer session's context bag — it does NOT\n * replace it. A nested drawer (e.g. a row click inside TransactionHistoryBlock\n * opening TransactionDetailsBlock) calls this to layer its own key (e.g.\n * `transaction_guid`) on top of whatever context the outer drawer already set\n * (e.g. `chartBarIndex`), so the outer block keeps reading its own keys via\n * useActionContext while the nested block is open. The bag only returns to a\n * clean slate when a new drawer session starts via `openActionDrawer`/\n * `openCtaDrawer`, which fully replace the envelope.\n */\n setActionContext = (context: Record<string, unknown>) => {\n this.actionDrawer = {\n ...this.actionDrawer,\n context: {\n ...(this.actionDrawer.context as Record<string, unknown> | undefined),\n ...context,\n },\n }\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. `cta` overrides the CTA an\n * `inDescriptionCta` drawer runs, for this session only.\n */\n openActionDrawer = ({ guid, trigger, context, cta }: OpenActionDrawerArgs) => {\n this.actionDrawer = { isDrawerOpen: true, trigger, guid, context, cta }\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` and `cta` 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":";AAmCA,IAAa,IAA0C;AAAA,EACrD,cAAc;AAAA,EACd,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AACP,GAuBa,IAAb,MAA6B;AAAA,EAC3B;AAAA,EAEA,eAAkC;AAAA,EAMlC,YAAuC,CAAC;AAAA,EAUxC,cAAuD,CAAC;AAAA,EAExD,YAAY,GAA0B;AACpC,SAAK,cAAc,GAEnB,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,eAAA,CAAgB,GAAc,MAAsB;AAClD,SAAK,YAAY;AAAA,MAAE,GAAG,KAAK;AAAA,MAAY,CAAA,CAAA,GAAO;AAAA,IAAO;AAAA,EACvD;AAAA,EAGA,iBAAA,CAAkB,GAAc,MAAoC;AAClE,SAAK,cAAc;AAAA,MAAE,GAAG,KAAK;AAAA,MAAc,CAAA,CAAA,GAAO;AAAA,QAAE,GAAG,KAAK,YAAY,CAAA;AAAA,QAAO,GAAG;AAAA,MAAO;AAAA,IAAE;AAAA,EAC7F;AAAA,EAYA,mBAAA,CAAoB,MAAqC;AACvD,SAAK,eAAe;AAAA,MAClB,GAAG,KAAK;AAAA,MACR,SAAS;AAAA,QACP,GAAI,KAAK,aAAa;AAAA,QACtB,GAAG;AAAA,MACL;AAAA,IACF;AAAA,EACF;AAAA,EAQA,mBAAA,CAAoB,EAAE,MAAA,GAAM,SAAA,GAAS,SAAA,GAAS,KAAA,EAAA,MAAgC;AAC5E,SAAK,eAAe;AAAA,MAAE,cAAc;AAAA,MAAM,SAAA;AAAA,MAAS,MAAA;AAAA,MAAM,SAAA;AAAA,MAAS,KAAA;AAAA,IAAI;AAAA,EACxE;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"}
|
|
@@ -3,7 +3,7 @@ import o from "@mui/material/Stack";
|
|
|
3
3
|
import { InstitutionLogo as s, P as a } from "@mxenabled/mxui";
|
|
4
4
|
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
5
5
|
import c from "@mui/material/Box";
|
|
6
|
-
var h = ({
|
|
6
|
+
var h = ({ accountName: i, institutionGuid: n }) => /* @__PURE__ */ e(o, {
|
|
7
7
|
className: "mx-insights-sdd-account-Card",
|
|
8
8
|
sx: {
|
|
9
9
|
gap: 4,
|
|
@@ -20,14 +20,14 @@ var h = ({ accountGuid: i, accountName: n }) => /* @__PURE__ */ e(o, {
|
|
|
20
20
|
alt: "Financial Institution Logo",
|
|
21
21
|
"data-ui-test": "mx-insights-sudd-full-feed-body-logo",
|
|
22
22
|
height: 32,
|
|
23
|
-
institutionGuid:
|
|
23
|
+
institutionGuid: n || "",
|
|
24
24
|
width: 32
|
|
25
25
|
})
|
|
26
26
|
}), /* @__PURE__ */ t(a, {
|
|
27
27
|
className: "mx-insights-sdd-account-account-name",
|
|
28
28
|
sx: { textAlign: "center" },
|
|
29
29
|
variant: "tiny",
|
|
30
|
-
children:
|
|
30
|
+
children: i
|
|
31
31
|
})]
|
|
32
32
|
});
|
|
33
33
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountBox.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/AccountBox.tsx"],"sourcesContent":["import React from 'react'\n\nimport { InstitutionLogo, P } from '@mxenabled/mxui'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\ninterface AccountBoxProps {\n
|
|
1
|
+
{"version":3,"file":"AccountBox.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/AccountBox.tsx"],"sourcesContent":["import React from 'react'\n\nimport { InstitutionLogo, P } from '@mxenabled/mxui'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\ninterface AccountBoxProps {\n accountName: string\n // Must be an institution guid (INS-...). InstitutionLogo builds the logo URL from it,\n // so passing an account guid always falls back to the default bank icon.\n institutionGuid?: string\n}\n\nexport const AccountBox: React.FC<AccountBoxProps> = ({ accountName, institutionGuid }) => {\n return (\n <Stack\n className=\"mx-insights-sdd-account-Card\"\n sx={{\n gap: 4,\n width: 100,\n }}\n >\n <Box\n className=\"mx-insights-sdd-account-image-container\"\n sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}\n >\n <InstitutionLogo\n alt=\"Financial Institution Logo\"\n data-ui-test=\"mx-insights-sudd-full-feed-body-logo\"\n height={32}\n institutionGuid={institutionGuid || ''}\n width={32}\n />\n </Box>\n\n <P\n className=\"mx-insights-sdd-account-account-name\"\n sx={{ textAlign: 'center' }}\n variant=\"tiny\"\n >\n {accountName}\n </P>\n </Stack>\n )\n}\n"],"mappings":";;;;;AAcA,IAAa,IAAA,CAAyC,EAAE,aAAA,GAAa,iBAAA,EAAA,MAEjE,gBAAA,EAAC,GAAD;AAAA,EACE,WAAU;AAAA,EACV,IAAI;AAAA,IACF,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EALF,UAAA,CAOE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAU;AAAA,IACV,IAAI;AAAA,MAAE,SAAS;AAAA,MAAQ,gBAAgB;AAAA,MAAU,OAAO;AAAA,IAAO;AAAA,IAE/D,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,KAAI;AAAA,MACJ,gBAAa;AAAA,MACb,QAAQ;AAAA,MACR,iBAAiB,KAAmB;AAAA,MACpC,OAAO;AAAA,IACR,CAAA;AAAA,EACE,CAAA,GAEL,gBAAA,EAAC,GAAD;AAAA,IACE,WAAU;AAAA,IACV,IAAI,EAAE,WAAW,SAAS;AAAA,IAC1B,SAAQ;AAAA,IAEP,UAAA;AAAA,EACA,CAAA,CACE"}
|
|
@@ -2,9 +2,11 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { DepositBodyBaseProps } from '../../../types/DirectDeposit';
|
|
3
3
|
interface SwitchDirectDepositBodyProps extends DepositBodyBaseProps {
|
|
4
4
|
destinationAccountGuid: string;
|
|
5
|
+
destinationInstitutionGuid?: string;
|
|
5
6
|
externalAccountName: string;
|
|
6
7
|
heldAccountName: string;
|
|
7
8
|
sourceAccountGuid: string;
|
|
9
|
+
sourceInstitutionGuid?: string;
|
|
8
10
|
}
|
|
9
11
|
export declare const SwitchDirectDepositBody: React.FC<SwitchDirectDepositBodyProps>;
|
|
10
12
|
export {};
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { DirectDeposit as
|
|
1
|
+
import { DirectDeposit as g } from "../../shared/DirectDeposit/DirectDeposit.es.js";
|
|
2
2
|
import { SwitchDirectDepositMainContainer as w } from "./SwitchDirectDepositMainContainer.es.js";
|
|
3
3
|
import x from "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
var
|
|
6
|
-
account:
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
var B = ({ account: t, animation: o, destinationAccountGuid: e, destinationInstitutionGuid: n, externalAccountName: m, heldAccountName: p, headerString: D, isComplete: r, isMini: a, leftLowerText: c, leftUpperText: d, rightLowerText: s, rightUpperText: f, sourceAccountGuid: h, sourceInstitutionGuid: u }) => /* @__PURE__ */ i(x.Fragment, { children: r ? /* @__PURE__ */ i(g, {
|
|
6
|
+
account: t,
|
|
7
7
|
animation: o,
|
|
8
|
-
headerString:
|
|
9
|
-
isComplete:
|
|
10
|
-
isMini:
|
|
11
|
-
leftLowerText:
|
|
12
|
-
leftUpperText:
|
|
13
|
-
rightLowerText:
|
|
14
|
-
rightUpperText:
|
|
15
|
-
}) : /* @__PURE__ */
|
|
8
|
+
headerString: D,
|
|
9
|
+
isComplete: r,
|
|
10
|
+
isMini: a,
|
|
11
|
+
leftLowerText: c,
|
|
12
|
+
leftUpperText: d,
|
|
13
|
+
rightLowerText: s,
|
|
14
|
+
rightUpperText: f
|
|
15
|
+
}) : /* @__PURE__ */ i(w, {
|
|
16
16
|
destinationAccountGuid: e,
|
|
17
|
+
destinationInstitutionGuid: n || t?.guid,
|
|
17
18
|
externalAccountName: m,
|
|
18
|
-
heldAccountName:
|
|
19
|
-
sourceAccountGuid:
|
|
19
|
+
heldAccountName: p,
|
|
20
|
+
sourceAccountGuid: h,
|
|
21
|
+
sourceInstitutionGuid: u
|
|
20
22
|
}) });
|
|
21
23
|
export {
|
|
22
|
-
|
|
24
|
+
B as SwitchDirectDepositBody
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
//# sourceMappingURL=SwitchDirectDepositBody.es.js.map
|
package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchDirectDepositBody.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.tsx"],"sourcesContent":["import React from 'react'\n\nimport { DirectDeposit } from '../..'\nimport { DepositBodyBaseProps } from '../../../types/DirectDeposit'\n\nimport { SwitchDirectDepositMainContainer } from './SwitchDirectDepositMainContainer'\n\ninterface SwitchDirectDepositBodyProps extends DepositBodyBaseProps {\n destinationAccountGuid: string\n externalAccountName: string\n heldAccountName: string\n sourceAccountGuid: string\n}\n\nexport const SwitchDirectDepositBody: React.FC<SwitchDirectDepositBodyProps> = ({\n account,\n animation,\n destinationAccountGuid,\n externalAccountName,\n heldAccountName,\n headerString,\n isComplete,\n isMini,\n leftLowerText,\n leftUpperText,\n rightLowerText,\n rightUpperText,\n sourceAccountGuid,\n}) => {\n return (\n <React.Fragment>\n {isComplete ? (\n <DirectDeposit\n account={account}\n animation={animation}\n headerString={headerString}\n isComplete={isComplete}\n isMini={isMini}\n leftLowerText={leftLowerText}\n leftUpperText={leftUpperText}\n rightLowerText={rightLowerText}\n rightUpperText={rightUpperText}\n />\n ) : (\n <SwitchDirectDepositMainContainer\n destinationAccountGuid={destinationAccountGuid}\n externalAccountName={externalAccountName}\n heldAccountName={heldAccountName}\n sourceAccountGuid={sourceAccountGuid}\n />\n )}\n </React.Fragment>\n )\n}\n"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"SwitchDirectDepositBody.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.tsx"],"sourcesContent":["import React from 'react'\n\nimport { DirectDeposit } from '../..'\nimport { DepositBodyBaseProps } from '../../../types/DirectDeposit'\n\nimport { SwitchDirectDepositMainContainer } from './SwitchDirectDepositMainContainer'\n\ninterface SwitchDirectDepositBodyProps extends DepositBodyBaseProps {\n destinationAccountGuid: string\n // Institution guid of the held (destination) account. Defaults to `account.guid`,\n // which hosts already pass as the held account's institution guid.\n destinationInstitutionGuid?: string\n externalAccountName: string\n heldAccountName: string\n sourceAccountGuid: string\n // Institution guid of the external (source) account.\n sourceInstitutionGuid?: string\n}\n\nexport const SwitchDirectDepositBody: React.FC<SwitchDirectDepositBodyProps> = ({\n account,\n animation,\n destinationAccountGuid,\n destinationInstitutionGuid,\n externalAccountName,\n heldAccountName,\n headerString,\n isComplete,\n isMini,\n leftLowerText,\n leftUpperText,\n rightLowerText,\n rightUpperText,\n sourceAccountGuid,\n sourceInstitutionGuid,\n}) => {\n return (\n <React.Fragment>\n {isComplete ? (\n <DirectDeposit\n account={account}\n animation={animation}\n headerString={headerString}\n isComplete={isComplete}\n isMini={isMini}\n leftLowerText={leftLowerText}\n leftUpperText={leftUpperText}\n rightLowerText={rightLowerText}\n rightUpperText={rightUpperText}\n />\n ) : (\n <SwitchDirectDepositMainContainer\n destinationAccountGuid={destinationAccountGuid}\n destinationInstitutionGuid={destinationInstitutionGuid || account?.guid}\n externalAccountName={externalAccountName}\n heldAccountName={heldAccountName}\n sourceAccountGuid={sourceAccountGuid}\n sourceInstitutionGuid={sourceInstitutionGuid}\n />\n )}\n </React.Fragment>\n )\n}\n"],"mappings":";;;;AAmBA,IAAa,IAAA,CAAmE,EAC9E,SAAA,GACA,WAAA,GACA,wBAAA,GACA,4BAAA,GACA,qBAAA,GACA,iBAAA,GACA,cAAA,GACA,YAAA,GACA,QAAA,GACA,eAAA,GACA,eAAA,GACA,gBAAA,GACA,gBAAA,GACA,mBAAA,GACA,uBAAA,EAAA,MAGE,gBAAA,EAAC,EAAM,UAAP,EAAA,UACG,IACC,gBAAA,EAAC,GAAD;AAAA,EACW,SAAA;AAAA,EACE,WAAA;AAAA,EACG,cAAA;AAAA,EACF,YAAA;AAAA,EACJ,QAAA;AAAA,EACO,eAAA;AAAA,EACA,eAAA;AAAA,EACC,gBAAA;AAAA,EACA,gBAAA;AACjB,CAAA,IAED,gBAAA,EAAC,GAAD;AAAA,EAC0B,wBAAA;AAAA,EACxB,4BAA4B,KAA8B,GAAS;AAAA,EAC9C,qBAAA;AAAA,EACJ,iBAAA;AAAA,EACE,mBAAA;AAAA,EACI,uBAAA;AACxB,CAAA,EAEW,CAAA"}
|
package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
interface SwitchDirectDepositMainContainerProps {
|
|
3
|
-
destinationAccountGuid
|
|
3
|
+
destinationAccountGuid?: string;
|
|
4
|
+
destinationInstitutionGuid?: string;
|
|
4
5
|
externalAccountName: string;
|
|
5
6
|
heldAccountName: string;
|
|
6
|
-
sourceAccountGuid
|
|
7
|
+
sourceAccountGuid?: string;
|
|
8
|
+
sourceInstitutionGuid?: string;
|
|
7
9
|
}
|
|
8
10
|
export declare const SwitchDirectDepositMainContainer: React.FC<SwitchDirectDepositMainContainerProps>;
|
|
9
11
|
export {};
|
package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AccountBox as
|
|
1
|
+
import { AccountBox as i } from "./AccountBox.es.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import
|
|
3
|
+
import s from "@mui/material/Stack";
|
|
4
4
|
import { Icon as m } from "@mxenabled/mx-icons";
|
|
5
|
-
import { jsx as
|
|
6
|
-
var w = ({
|
|
5
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
var w = ({ destinationInstitutionGuid: o, externalAccountName: r, heldAccountName: n, sourceInstitutionGuid: a }) => /* @__PURE__ */ c(s, {
|
|
7
7
|
className: "mx-insights-sdd-main-container",
|
|
8
8
|
direction: "row",
|
|
9
9
|
sx: {
|
|
@@ -13,19 +13,19 @@ var w = ({ destinationAccountGuid: t, externalAccountName: i, heldAccountName: a
|
|
|
13
13
|
width: "100%"
|
|
14
14
|
},
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
/* @__PURE__ */ t(i, {
|
|
17
|
+
accountName: r,
|
|
18
|
+
institutionGuid: a
|
|
19
19
|
}),
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ t(m, {
|
|
21
21
|
className: "mx-insights-sdd-arrow-forward-icon",
|
|
22
22
|
name: "arrow_forward",
|
|
23
23
|
size: 24,
|
|
24
24
|
sx: { my: "auto" }
|
|
25
25
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
/* @__PURE__ */ t(i, {
|
|
27
|
+
accountName: n,
|
|
28
|
+
institutionGuid: o
|
|
29
29
|
})
|
|
30
30
|
]
|
|
31
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchDirectDepositMainContainer.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport Stack from '@mui/material/Stack'\n\nimport { AccountBox } from './AccountBox'\n\ninterface SwitchDirectDepositMainContainerProps {\n destinationAccountGuid
|
|
1
|
+
{"version":3,"file":"SwitchDirectDepositMainContainer.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport Stack from '@mui/material/Stack'\n\nimport { AccountBox } from './AccountBox'\n\ninterface SwitchDirectDepositMainContainerProps {\n destinationAccountGuid?: string\n destinationInstitutionGuid?: string\n externalAccountName: string\n heldAccountName: string\n sourceAccountGuid?: string\n sourceInstitutionGuid?: string\n}\n\nexport const SwitchDirectDepositMainContainer: React.FC<SwitchDirectDepositMainContainerProps> = ({\n destinationInstitutionGuid,\n externalAccountName,\n heldAccountName,\n sourceInstitutionGuid,\n}) => {\n return (\n <Stack\n className=\"mx-insights-sdd-main-container\"\n direction=\"row\"\n sx={{ gap: 8, justifyContent: 'center', py: 12, width: '100%' }}\n >\n <AccountBox accountName={externalAccountName} institutionGuid={sourceInstitutionGuid} />\n <Icon\n className=\"mx-insights-sdd-arrow-forward-icon\"\n name=\"arrow_forward\"\n size={24}\n sx={{ my: 'auto' }}\n />\n <AccountBox accountName={heldAccountName} institutionGuid={destinationInstitutionGuid} />\n </Stack>\n )\n}\n"],"mappings":";;;;;AAiBA,IAAa,IAAA,CAAqF,EAChG,4BAAA,GACA,qBAAA,GACA,iBAAA,GACA,uBAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EACE,WAAU;AAAA,EACV,WAAU;AAAA,EACV,IAAI;AAAA,IAAE,KAAK;AAAA,IAAG,gBAAgB;AAAA,IAAU,IAAI;AAAA,IAAI,OAAO;AAAA,EAAO;AAAA,EAHhE,UAAA;AAAA,IAKE,gBAAA,EAAC,GAAD;AAAA,MAAY,aAAa;AAAA,MAAqB,iBAAiB;AAAA,IAAwB,CAAA;AAAA,IACvF,gBAAA,EAAC,GAAD;AAAA,MACE,WAAU;AAAA,MACV,MAAK;AAAA,MACL,MAAM;AAAA,MACN,IAAI,EAAE,IAAI,OAAO;AAAA,IAClB,CAAA;AAAA,IACD,gBAAA,EAAC,GAAD;AAAA,MAAY,aAAa;AAAA,MAAiB,iBAAiB;AAAA,IAA6B,CAAA;AAAA,EACnF"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
var
|
|
1
|
+
var C = (t, e, r) => t.context?.block === e?.block ? e : r, n = (t, e, r, g) => t.trigger === "inDescriptionCta" ? t.cta ? {
|
|
2
|
+
label: "",
|
|
3
|
+
...t.cta
|
|
4
|
+
} : g : t.trigger === "secondaryCta" ? r ?? e : t.trigger === "primaryCta" ? e : C(t, e, r) ?? e;
|
|
2
5
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
6
|
+
C as getCtaForChartBarClick,
|
|
7
|
+
n as getDynamicCtaBasedOnTriggers
|
|
5
8
|
};
|
|
6
9
|
|
|
7
10
|
//# sourceMappingURL=util.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/util.ts"],"sourcesContent":["import type {\n ActionDrawerState,\n DrilldownPayload,\n InDescriptionCTA,\n PrimaryCTA,\n SecondaryCTA,\n} from '../../core'\n\n/**\n * A chart-bar drilldown's context carries which block it targets (see BarchartBlock /\n * DoubleBarChartBlock), since either CTA could in principle open the same drawer. Match that\n * against `primary_cta.block`; anything else is assumed to be the secondary CTA's block.\n */\nexport const getCtaForChartBarClick = (\n actionDrawer: ActionDrawerState,\n primary_cta: PrimaryCTA | undefined,\n secondary_cta: SecondaryCTA | undefined,\n): PrimaryCTA | SecondaryCTA | undefined => {\n const context = actionDrawer.context as DrilldownPayload | undefined\n const blockName = context?.block\n\n if (blockName === primary_cta?.block) {\n return primary_cta\n }\n return secondary_cta\n}\n\n/**\n * Resolves which CTA (primary/secondary/in-description) drives the currently open drawer's\n * title/variant, based on what triggered it. Falls back to `primary_cta` whenever resolution comes\n * up empty (e.g. a `secondaryCta` trigger with no configured secondary CTA), so callers never have\n * to null-check.\n */\nexport const getDynamicCtaBasedOnTriggers = (\n actionDrawer: ActionDrawerState,\n primary_cta: PrimaryCTA | undefined,\n secondary_cta: SecondaryCTA | undefined,\n in_description_cta?: InDescriptionCTA,\n): PrimaryCTA | SecondaryCTA | InDescriptionCTA | undefined => {\n // The
|
|
1
|
+
{"version":3,"file":"util.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/util.ts"],"sourcesContent":["import type {\n ActionDrawerState,\n DrilldownPayload,\n InDescriptionCTA,\n PrimaryCTA,\n SecondaryCTA,\n} from '../../core'\n\n/**\n * A chart-bar drilldown's context carries which block it targets (see BarchartBlock /\n * DoubleBarChartBlock), since either CTA could in principle open the same drawer. Match that\n * against `primary_cta.block`; anything else is assumed to be the secondary CTA's block.\n */\nexport const getCtaForChartBarClick = (\n actionDrawer: ActionDrawerState,\n primary_cta: PrimaryCTA | undefined,\n secondary_cta: SecondaryCTA | undefined,\n): PrimaryCTA | SecondaryCTA | undefined => {\n const context = actionDrawer.context as DrilldownPayload | undefined\n const blockName = context?.block\n\n if (blockName === primary_cta?.block) {\n return primary_cta\n }\n return secondary_cta\n}\n\n/**\n * Resolves which CTA (primary/secondary/in-description) drives the currently open drawer's\n * title/variant, based on what triggered it. Falls back to `primary_cta` whenever resolution comes\n * up empty (e.g. a `secondaryCta` trigger with no configured secondary CTA), so callers never have\n * to null-check.\n */\nexport const getDynamicCtaBasedOnTriggers = (\n actionDrawer: ActionDrawerState,\n primary_cta: PrimaryCTA | undefined,\n secondary_cta: SecondaryCTA | undefined,\n in_description_cta?: InDescriptionCTA,\n): PrimaryCTA | SecondaryCTA | InDescriptionCTA | undefined => {\n // The opener may supply the block and variant, else the beat's link names them. Nothing to fall\n // back to: only the link's own button fires this trigger.\n if (actionDrawer.trigger === 'inDescriptionCta') {\n return actionDrawer.cta ? { label: '', ...actionDrawer.cta } : in_description_cta\n }\n if (actionDrawer.trigger === 'secondaryCta') {\n return secondary_cta ?? primary_cta\n }\n if (actionDrawer.trigger === 'primaryCta') {\n return primary_cta\n }\n return getCtaForChartBarClick(actionDrawer, primary_cta, secondary_cta) ?? primary_cta\n}\n"],"mappings":"AAaA,IAAa,IAAA,CACX,GACA,GACA,MAEgB,EAAa,SACF,UAET,GAAa,QACtB,IAEF,GASI,IAAA,CACX,GACA,GACA,GACA,MAII,EAAa,YAAY,qBACpB,EAAa,MAAM;AAAA,EAAE,OAAO;AAAA,EAAI,GAAG,EAAa;AAAI,IAAI,IAE7D,EAAa,YAAY,iBACpB,KAAiB,IAEtB,EAAa,YAAY,eACpB,IAEF,EAAuB,GAAc,GAAa,CAAa,KAAK"}
|