@mx-cartographer/experiences 9.7.197 → 9.7.199-alpha-moratorium
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 +11 -1
- package/dist/core/types/Insights.d.ts +1 -1
- package/dist/core/types/Insights.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +6 -0
- package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandard.es.js +4 -4
- package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.es.js +4 -4
- package/dist/insights/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.es.js +4 -4
- package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.es.js +8 -8
- package/dist/insights/components/shared/Charts/EmptyBarChart.es.js +4 -4
- package/dist/insights/components/shared/ZeroState/LinedCardZeroState.es.js +4 -4
- package/dist/insights/index.es.js +84 -84
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js +17 -17
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.d.ts +1 -5
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +37 -36
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.d.ts +9 -11
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js +12 -6
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +1 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +216 -185
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.d.ts +3 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js +12 -11
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.d.ts +2 -2
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js +13 -13
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +10 -4
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +78 -71
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.d.ts +2 -4
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js +78 -82
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +30 -24
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.d.ts +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js +46 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/index.d.ts +3 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.d.ts +10 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js +17 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +25 -25
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.d.ts +0 -2
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js +17 -21
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +46 -63
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +3 -3
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +44 -53
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js +30 -31
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +54 -53
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +5 -3
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +11 -9
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +28 -27
- package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +1 -0
- package/dist/insights-v2/components/AccountHeroCard.d.ts +3 -1
- package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
- package/dist/insights-v2/components/CompactDirectDepositCard.d.ts +26 -0
- package/dist/insights-v2/components/CompactDirectDepositCard.es.js +73 -0
- package/dist/insights-v2/components/CompactDirectDepositCard.es.js.map +1 -0
- package/dist/insights-v2/components/DirectDepositCard.d.ts +6 -1
- package/dist/insights-v2/components/DirectDepositCard.es.js +22 -20
- package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -1
- package/dist/insights-v2/components/LogoFromGuid.d.ts +1 -1
- package/dist/insights-v2/components/LogoFromGuid.es.js.map +1 -1
- package/dist/insights-v2/components/MerchantHighlightCard.es.js +4 -4
- package/dist/insights-v2/components/TransactionListCard.d.ts +3 -1
- package/dist/insights-v2/components/TransactionListCard.es.js +25 -25
- package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
- package/dist/insights-v2/components/TransferLogoCard.es.js +1 -0
- package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
- package/dist/insights-v2/index.es.js +120 -116
- package/dist/insights-v2/mappings/blocks.es.js +118 -116
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +53 -53
- package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
import { CELEBRATION_GRADIENT as
|
|
2
|
-
var
|
|
1
|
+
import { CELEBRATION_GRADIENT as r, DIRECT_DEPOSIT_COMPLETE_GRADIENT as n, ERROR_WASH_GRADIENT as e, FEES_WASH_GRADIENT as i, WARM_LIME_ACCENT_GRADIENT as c } from "../../../components/celebrationGradients.es.js";
|
|
2
|
+
var o = { background: e }, a = {
|
|
3
|
+
isConfetti: !0,
|
|
4
|
+
gradient: r,
|
|
5
|
+
graphic: "savings",
|
|
6
|
+
amountVariant: "h2",
|
|
7
|
+
rowSx: {
|
|
8
|
+
gap: 16,
|
|
9
|
+
p: 16
|
|
10
|
+
},
|
|
11
|
+
secondarySource: "label",
|
|
12
|
+
secondaryPosition: "above",
|
|
13
|
+
secondaryVariant: "body2",
|
|
14
|
+
secondaryColor: "text.primary"
|
|
15
|
+
}, d = (t) => ({
|
|
3
16
|
overdraft_warning: {
|
|
4
|
-
background:
|
|
17
|
+
background: t.palette.warning.light,
|
|
5
18
|
sub_logo: "error"
|
|
6
19
|
},
|
|
7
|
-
low_balance_alert:
|
|
20
|
+
low_balance_alert: o,
|
|
8
21
|
low_balance: {
|
|
9
|
-
...
|
|
22
|
+
...o,
|
|
10
23
|
badge: "error"
|
|
11
24
|
},
|
|
12
25
|
status_off_track: {
|
|
@@ -14,16 +27,16 @@ var r = { background: a }, s = (e) => ({
|
|
|
14
27
|
logo_bGcolor: "error.main",
|
|
15
28
|
logo_border_radius: "4px",
|
|
16
29
|
logo_icon_size: 24,
|
|
17
|
-
background:
|
|
30
|
+
background: e
|
|
18
31
|
},
|
|
19
32
|
charges_summary: {
|
|
20
33
|
category_tint: 0.25,
|
|
21
34
|
category_border_width: 1.5,
|
|
22
|
-
background:
|
|
35
|
+
background: i
|
|
23
36
|
},
|
|
24
37
|
deposit_received: {
|
|
25
38
|
isConfetti: !0,
|
|
26
|
-
gradient:
|
|
39
|
+
gradient: n,
|
|
27
40
|
graphic: "logo",
|
|
28
41
|
amountVariant: "h2",
|
|
29
42
|
amountKeepsVariantWeight: !0,
|
|
@@ -42,7 +55,7 @@ var r = { background: a }, s = (e) => ({
|
|
|
42
55
|
},
|
|
43
56
|
status_on_track: {
|
|
44
57
|
isConfetti: !0,
|
|
45
|
-
gradient:
|
|
58
|
+
gradient: c,
|
|
46
59
|
graphic: "logo",
|
|
47
60
|
amountVariant: "h2",
|
|
48
61
|
amountKeepsVariantWeight: !0,
|
|
@@ -57,7 +70,7 @@ var r = { background: a }, s = (e) => ({
|
|
|
57
70
|
},
|
|
58
71
|
payoff_celebration: {
|
|
59
72
|
isConfetti: !0,
|
|
60
|
-
gradient:
|
|
73
|
+
gradient: r,
|
|
61
74
|
graphic: "paidOffCard",
|
|
62
75
|
amountVariant: "h2",
|
|
63
76
|
rowSx: {
|
|
@@ -70,24 +83,17 @@ var r = { background: a }, s = (e) => ({
|
|
|
70
83
|
secondaryVariant: "caption",
|
|
71
84
|
secondaryColor: "text.secondary"
|
|
72
85
|
},
|
|
73
|
-
savings_deposit:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
gap: 16,
|
|
80
|
-
p: 16
|
|
81
|
-
},
|
|
82
|
-
secondarySource: "label",
|
|
83
|
-
secondaryPosition: "above",
|
|
84
|
-
secondaryVariant: "body2",
|
|
85
|
-
secondaryColor: "text.primary"
|
|
86
|
+
savings_deposit: a,
|
|
87
|
+
savings_deposit_compact: {
|
|
88
|
+
...a,
|
|
89
|
+
secondaryPosition: "below",
|
|
90
|
+
secondaryVariant: "caption",
|
|
91
|
+
secondaryColor: "text.secondary"
|
|
86
92
|
},
|
|
87
93
|
default: {}
|
|
88
94
|
});
|
|
89
95
|
export {
|
|
90
|
-
|
|
96
|
+
d as getLayoutConfig
|
|
91
97
|
};
|
|
92
98
|
|
|
93
99
|
//# sourceMappingURL=layout.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n ERROR_WASH_GRADIENT,\n FEES_WASH_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\nexport interface BlockLayoutConfig {\n background?: string\n /** Opacity of the category colour behind a `CAT-` tile, with a category-colour border; none = mxui's tile. */\n category_tint?: number\n /** Width in px of that tinted tile's category-colour border. Defaults to 1. */\n category_border_width?: number\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */\n logo_border_radius?: string\n /** Glyph size in px for an `ICO-` logo: on the confetti tile (default 24) and on the standard\n * icon tile (default `TILE_ICON_SIZE`). */\n logo_icon_size?: number\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Keep the variant's own weight (h2 is 700) instead of the confetti tile's semi bold. */\n amountKeepsVariantWeight?: boolean\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Raise the strip and body together with elevation/1. */\n cardShadow?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n /** Truncate the secondary line to one line with an ellipsis. */\n secondaryOneLine?: boolean\n}\n\n/** Glyph size in px on the standard icon tile (IconComponent). */\nexport const TILE_ICON_SIZE = 30\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background: ERROR_WASH_GRADIENT,\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n // Figma 9936:39145: the money icon's tile has 4px corners.\n logo_border_radius: '4px',\n // Figma draws the money glyph at 24px in both status tiles (9936:39156).\n logo_icon_size: 24,\n background: ERROR_WASH_GRADIENT,\n },\n // Monthly Credit Card Interest Summary's fees tile (ditto account_block `charges_summary`); its category\n // glyph rides in `icon`.\n charges_summary: {\n category_tint: 0.25,\n // Figma 1365:301242 <Categories>: a 1.5px category-colour border.\n category_border_width: 1.5,\n background: FEES_WASH_GRADIENT,\n },\n // Unified Deposit and its standalone deposit templates; Figma draws every state alike.\n deposit_received: {\n isConfetti: true,\n gradient: DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n amountKeepsVariantWeight: true,\n amountPrefix: '+',\n categoryStrip: true,\n cardShadow: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n secondaryOneLine: true,\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n amountKeepsVariantWeight: true,\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 16, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit:
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n ERROR_WASH_GRADIENT,\n FEES_WASH_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\nexport interface BlockLayoutConfig {\n background?: string\n /** Opacity of the category colour behind a `CAT-` tile, with a category-colour border; none = mxui's tile. */\n category_tint?: number\n /** Width in px of that tinted tile's category-colour border. Defaults to 1. */\n category_border_width?: number\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */\n logo_border_radius?: string\n /** Glyph size in px for an `ICO-` logo: on the confetti tile (default 24) and on the standard\n * icon tile (default `TILE_ICON_SIZE`). */\n logo_icon_size?: number\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Keep the variant's own weight (h2 is 700) instead of the confetti tile's semi bold. */\n amountKeepsVariantWeight?: boolean\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Raise the strip and body together with elevation/1. */\n cardShadow?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n /** Truncate the secondary line to one line with an ellipsis. */\n secondaryOneLine?: boolean\n}\n\n/** Glyph size in px on the standard icon tile (IconComponent). */\nexport const TILE_ICON_SIZE = 30\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background: ERROR_WASH_GRADIENT,\n}\n\nconst SAVINGS_DEPOSIT_TILE: BlockLayoutConfig = {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'savings',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'above',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n // Figma 9936:39145: the money icon's tile has 4px corners.\n logo_border_radius: '4px',\n // Figma draws the money glyph at 24px in both status tiles (9936:39156).\n logo_icon_size: 24,\n background: ERROR_WASH_GRADIENT,\n },\n // Monthly Credit Card Interest Summary's fees tile (ditto account_block `charges_summary`); its category\n // glyph rides in `icon`.\n charges_summary: {\n category_tint: 0.25,\n // Figma 1365:301242 <Categories>: a 1.5px category-colour border.\n category_border_width: 1.5,\n background: FEES_WASH_GRADIENT,\n },\n // Unified Deposit and its standalone deposit templates; Figma draws every state alike.\n deposit_received: {\n isConfetti: true,\n gradient: DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n amountKeepsVariantWeight: true,\n amountPrefix: '+',\n categoryStrip: true,\n cardShadow: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n secondaryOneLine: true,\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n amountKeepsVariantWeight: true,\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 16, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit: SAVINGS_DEPOSIT_TILE,\n // Mini, Figma 1243:58653.\n savings_deposit_compact: {\n ...SAVINGS_DEPOSIT_TILE,\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n // Neutral fallback for an unknown/unmatched variant: renders the plain standard card (no\n // confetti, no special background). `resolveVariantConfig` warns before falling back here.\n default: {},\n }\n}\n"],"mappings":";AA+DA,IAAM,IAAsC,EAC1C,YAAY,EACd,GAEM,IAA0C;AAAA,EAC9C,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,SAAS;AAAA,EACT,eAAe;AAAA,EACf,OAAO;AAAA,IAAE,KAAK;AAAA,IAAI,GAAG;AAAA,EAAG;AAAA,EACxB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,gBAAgB;AAClB,GAEa,IAAA,CAAmB,OACvB;AAAA,EACL,mBAAmB;AAAA,IACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,IAClC,UAAU;AAAA,EACZ;AAAA,EACA,mBAAmB;AAAA,EAEnB,aAAa;AAAA,IAAE,GAAG;AAAA,IAAkB,OAAO;AAAA,EAAQ;AAAA,EAGnD,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,cAAc;AAAA,IAEd,oBAAoB;AAAA,IAEpB,gBAAgB;AAAA,IAChB,YAAY;AAAA,EACd;AAAA,EAGA,iBAAiB;AAAA,IACf,eAAe;AAAA,IAEf,uBAAuB;AAAA,IACvB,YAAY;AAAA,EACd;AAAA,EAEA,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,0BAA0B;AAAA,IAC1B,cAAc;AAAA,IACd,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EACpB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,0BAA0B;AAAA,IAC1B,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,oBAAoB;AAAA,IAClB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IACjC,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,EAEjB,yBAAyB;AAAA,IACvB,GAAG;AAAA,IACH,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EAGA,SAAS,CAAC;AACZ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InsightsPayload } from '../../../../core';
|
|
2
|
+
interface CompactDirectDepositBlockProps {
|
|
3
|
+
payload: InsightsPayload;
|
|
4
|
+
}
|
|
5
|
+
/** `compact_direct_deposit_block`: the mini-widget account tile; the variant picks its colors. */
|
|
6
|
+
declare const CompactDirectDepositBlock: ({ payload }: CompactDirectDepositBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default CompactDirectDepositBlock;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { buildDynamicCopy as c } from "../../../../core/utils/Localization.es.js";
|
|
2
|
+
import { GlobalDataContext as l } from "../../../../common/context/GlobalDataProvider.es.js";
|
|
3
|
+
import { slot as p } from "../../../../core/types/Insights.es.js";
|
|
4
|
+
import { resolveVariantConfig as u } from "../../resolveVariantConfig.es.js";
|
|
5
|
+
import { asLogoRef as f, asText as g, slotOrFlat as d } from "../../slotReaders.es.js";
|
|
6
|
+
import y from "../../../components/LogoFromGuid.es.js";
|
|
7
|
+
import D from "../../../components/CompactDirectDepositCard.es.js";
|
|
8
|
+
import { compactDirectDepositVariant as _, getLayoutConfig as x } from "./layout.es.js";
|
|
9
|
+
import { useContext as C } from "react";
|
|
10
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
11
|
+
import { useTheme as v } from "@mui/material/styles";
|
|
12
|
+
import L from "@mui/material/Box";
|
|
13
|
+
var n = (t, i) => g(d(t, i)), h = (t, i) => {
|
|
14
|
+
const o = f(p(t.data, "logo")), a = n(t, "institution_guid"), r = o?.alt ?? n(t, "institution_name"), e = o ?? (a ? {
|
|
15
|
+
guid: a,
|
|
16
|
+
alt: r ?? a
|
|
17
|
+
} : void 0);
|
|
18
|
+
return !e || !r ? e : {
|
|
19
|
+
...e,
|
|
20
|
+
alt: i ? c(i, r) : r
|
|
21
|
+
};
|
|
22
|
+
}, M = ({ payload: t }) => {
|
|
23
|
+
const i = v(), { instance_slot: o } = t, a = C(l)?.globalStore.copyStore.copy.insights_feed?.general?.institution_Logo, r = h(o, a), e = n(o, "status_text"), s = u(x(i), o.variant, _.Primary, "CompactDirectDepositBlock");
|
|
24
|
+
return /* @__PURE__ */ m(D, {
|
|
25
|
+
...s,
|
|
26
|
+
logo: r?.guid ? /* @__PURE__ */ m(y, {
|
|
27
|
+
logo: r,
|
|
28
|
+
size: 32
|
|
29
|
+
}) : null,
|
|
30
|
+
name: n(o, "account_name"),
|
|
31
|
+
statusLabel: e ? /* @__PURE__ */ m(L, {
|
|
32
|
+
component: "span",
|
|
33
|
+
dangerouslySetInnerHTML: { __html: e },
|
|
34
|
+
sx: { "& .bold-copy": {
|
|
35
|
+
fontFamily: "inherit",
|
|
36
|
+
fontWeight: "fontWeightBold"
|
|
37
|
+
} }
|
|
38
|
+
}) : void 0,
|
|
39
|
+
subtitle: n(o, "account_type")
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
M as default
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=CompactDirectDepositBlock.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompactDirectDepositBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.tsx"],"sourcesContent":["import { useContext } from 'react'\n\nimport Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { GlobalDataContext } from '../../../../common/context/GlobalDataProvider'\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport CompactDirectDepositCard from '../../../components/CompactDirectDepositCard'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef, asText, slotOrFlat, type FlatSlotKey } from '../../slotReaders'\n\nimport { compactDirectDepositVariant, getLayoutConfig } from './layout'\n\ninterface CompactDirectDepositBlockProps {\n payload: InsightsPayload\n}\n\ntype InstanceSlot = InsightsPayload['instance_slot']\n\nconst readFact = (instanceSlot: InstanceSlot, name: FlatSlotKey): string | undefined =>\n asText(slotOrFlat(instanceSlot, name))\n\n/** The slot's logo, else one built from the guid; the alt is worded as legacy (\"{institution} Institution Logo\"). */\nconst resolveLogo = (instanceSlot: InstanceSlot, altCopy?: string): LogoRef | undefined => {\n const dataLogo = asLogoRef(slot(instanceSlot.data, 'logo'))\n const guid = readFact(instanceSlot, 'institution_guid')\n const name = dataLogo?.alt ?? readFact(instanceSlot, 'institution_name')\n\n const logo = dataLogo ?? (guid ? { guid, alt: name ?? guid } : undefined)\n if (!logo || !name) return logo\n\n return { ...logo, alt: altCopy ? (buildDynamicCopy(altCopy, name) as string) : name }\n}\n\n/** `compact_direct_deposit_block`: the mini-widget account tile; the variant picks its colors. */\nconst CompactDirectDepositBlock = ({ payload }: CompactDirectDepositBlockProps) => {\n const theme = useTheme()\n const { instance_slot } = payload\n // Optional: the micro widget renders this block without a GlobalDataProvider.\n const altCopy =\n useContext(GlobalDataContext)?.globalStore.copyStore.copy.insights_feed?.general\n ?.institution_Logo\n const logo = resolveLogo(instance_slot, altCopy)\n const statusText = readFact(instance_slot, 'status_text')\n const layout = resolveVariantConfig(\n getLayoutConfig(theme),\n instance_slot.variant,\n compactDirectDepositVariant.Primary,\n 'CompactDirectDepositBlock',\n )\n\n return (\n <CompactDirectDepositCard\n {...layout}\n logo={logo?.guid ? <LogoFromGuid logo={logo} size={32} /> : null}\n name={readFact(instance_slot, 'account_name')}\n statusLabel={\n statusText ? (\n // Server-rendered mrs_content copy (bold-copy span around a formatted rate), not user\n // input; painted as BudgetBlock paints sub_text.\n <Box\n component=\"span\"\n dangerouslySetInnerHTML={{ __html: statusText }}\n sx={{ '& .bold-copy': { fontFamily: 'inherit', fontWeight: 'fontWeightBold' } }}\n />\n ) : undefined\n }\n subtitle={readFact(instance_slot, 'account_type')}\n />\n )\n}\n\nexport default CompactDirectDepositBlock\n"],"mappings":";;;;;;;;;;;;AAsBA,IAAM,IAAA,CAAY,GAA4B,MAC5C,EAAO,EAAW,GAAc,CAAI,CAAC,GAGjC,IAAA,CAAe,GAA4B,MAA0C;AACzF,QAAM,IAAW,EAAU,EAAK,EAAa,MAAM,MAAM,CAAC,GACpD,IAAO,EAAS,GAAc,kBAAkB,GAChD,IAAO,GAAU,OAAO,EAAS,GAAc,kBAAkB,GAEjE,IAAO,MAAa,IAAO;AAAA,IAAE,MAAA;AAAA,IAAM,KAAK,KAAQ;AAAA,EAAK,IAAI;AAC/D,SAAI,CAAC,KAAQ,CAAC,IAAa,IAEpB;AAAA,IAAE,GAAG;AAAA,IAAM,KAAK,IAAW,EAAiB,GAAS,CAAI,IAAe;AAAA,EAAK;AACtF,GAGM,IAAA,CAA6B,EAAE,SAAA,EAAA,MAA8C;AACjF,QAAM,IAAQ,EAAS,GACjB,EAAE,eAAA,EAAA,IAAkB,GAEpB,IACJ,EAAW,CAAiB,GAAG,YAAY,UAAU,KAAK,eAAe,SACrE,kBACA,IAAO,EAAY,GAAe,CAAO,GACzC,IAAa,EAAS,GAAe,aAAa,GAClD,IAAS,EACb,EAAgB,CAAK,GACrB,EAAc,SACd,EAA4B,SAC5B,2BACF;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,MAAM,GAAM,OAAO,gBAAA,EAAC,GAAD;AAAA,MAAoB,MAAA;AAAA,MAAM,MAAM;AAAA,IAAK,CAAA,IAAI;AAAA,IAC5D,MAAM,EAAS,GAAe,cAAc;AAAA,IAC5C,aACE,IAGE,gBAAA,EAAC,GAAD;AAAA,MACE,WAAU;AAAA,MACV,yBAAyB,EAAE,QAAQ,EAAW;AAAA,MAC9C,IAAI,EAAE,gBAAgB;AAAA,QAAE,YAAY;AAAA,QAAW,YAAY;AAAA,MAAiB,EAAE;AAAA,IAC/E,CAAA,IACC;AAAA,IAEN,UAAU,EAAS,GAAe,cAAc;AAAA,EACjD,CAAA;AAEL"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Theme } from '@mui/material/styles';
|
|
2
|
+
import { DirectDepositCardStyleProps } from '../../../components/DirectDepositCard';
|
|
3
|
+
export declare const compactDirectDepositVariant: {
|
|
4
|
+
readonly Primary: "compact_primary";
|
|
5
|
+
readonly Success: "compact_success";
|
|
6
|
+
};
|
|
7
|
+
export type CompactDirectDepositVariant = (typeof compactDirectDepositVariant)[keyof typeof compactDirectDepositVariant];
|
|
8
|
+
export type CompactLayoutStyleProps = Omit<DirectDepositCardStyleProps, 'showConfetti'>;
|
|
9
|
+
/** The mini tile's blue (primary) and green (success) looks, the same as the full tile's. */
|
|
10
|
+
export declare const getLayoutConfig: (theme: Theme) => Record<CompactDirectDepositVariant, CompactLayoutStyleProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { detailedAccountVariant as a, getLayoutConfig as o } from "../DetailedAccountBlock/layout.es.js";
|
|
2
|
+
var c = {
|
|
3
|
+
Primary: "compact_primary",
|
|
4
|
+
Success: "compact_success"
|
|
5
|
+
}, i = (r) => {
|
|
6
|
+
const t = o(r);
|
|
7
|
+
return {
|
|
8
|
+
[c.Primary]: t[a.Primary],
|
|
9
|
+
[c.Success]: t[a.Success]
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
c as compactDirectDepositVariant,
|
|
14
|
+
i as getLayoutConfig
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=layout.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport type { DirectDepositCardStyleProps } from '../../../components/DirectDepositCard'\nimport {\n detailedAccountVariant,\n getLayoutConfig as getFullTileLayoutConfig,\n} from '../DetailedAccountBlock/layout'\n\nexport const compactDirectDepositVariant = {\n Primary: 'compact_primary',\n Success: 'compact_success',\n} as const\n\nexport type CompactDirectDepositVariant =\n (typeof compactDirectDepositVariant)[keyof typeof compactDirectDepositVariant]\n\nexport type CompactLayoutStyleProps = Omit<DirectDepositCardStyleProps, 'showConfetti'>\n\n/** The mini tile's blue (primary) and green (success) looks, the same as the full tile's. */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<CompactDirectDepositVariant, CompactLayoutStyleProps> => {\n const fullTile = getFullTileLayoutConfig(theme)\n\n return {\n [compactDirectDepositVariant.Primary]: fullTile[detailedAccountVariant.Primary],\n [compactDirectDepositVariant.Success]: fullTile[detailedAccountVariant.Success],\n }\n}\n"],"mappings":";AAQA,IAAa,IAA8B;AAAA,EACzC,SAAS;AAAA,EACT,SAAS;AACX,GAQa,IAAA,CACX,MACiE;AACjE,QAAM,IAAW,EAAwB,CAAK;AAE9C,SAAO;AAAA,IACJ,CAAA,EAA4B,OAAA,GAAU,EAAS,EAAuB,OAAA;AAAA,IACtE,CAAA,EAA4B,OAAA,GAAU,EAAS,EAAuB,OAAA;AAAA,EACzE;AACF"}
|
package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { buildDynamicCopy as m } from "../../../../core/utils/Localization.es.js";
|
|
2
|
-
import { GlobalDataContext as
|
|
3
|
-
import { slot as
|
|
4
|
-
import { resolveVariantConfig as
|
|
2
|
+
import { GlobalDataContext as u } from "../../../../common/context/GlobalDataProvider.es.js";
|
|
3
|
+
import { slot as c } from "../../../../core/types/Insights.es.js";
|
|
4
|
+
import { resolveVariantConfig as d } from "../../resolveVariantConfig.es.js";
|
|
5
5
|
import { asLogoRef as g, asText as f, slotOrFlat as p } from "../../slotReaders.es.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { detailedAccountVariant as
|
|
9
|
-
import { useContext as
|
|
6
|
+
import _ from "../../../components/LogoFromGuid.es.js";
|
|
7
|
+
import v from "../../../components/DirectDepositCard.es.js";
|
|
8
|
+
import { detailedAccountVariant as y, getLayoutConfig as L } from "./layout.es.js";
|
|
9
|
+
import { useContext as x } from "react";
|
|
10
10
|
import { jsx as s } from "react/jsx-runtime";
|
|
11
|
-
import { useTheme as
|
|
12
|
-
var n = (
|
|
13
|
-
const
|
|
14
|
-
guid:
|
|
15
|
-
alt:
|
|
11
|
+
import { useTheme as C } from "@mui/material/styles";
|
|
12
|
+
var n = (o, r) => f(p(o, r)), D = (o, r) => {
|
|
13
|
+
const t = g(c(o.data, "logo")), i = n(o, "institution_guid"), e = t?.alt ?? n(o, "institution_name"), a = t ?? (i ? {
|
|
14
|
+
guid: i,
|
|
15
|
+
alt: e ?? i
|
|
16
16
|
} : void 0);
|
|
17
|
-
return !
|
|
18
|
-
...
|
|
19
|
-
alt:
|
|
17
|
+
return !a || !e ? a : {
|
|
18
|
+
...a,
|
|
19
|
+
alt: r ? m(r, e) : e
|
|
20
20
|
};
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */ s(
|
|
24
|
-
...
|
|
25
|
-
logo:
|
|
26
|
-
logo:
|
|
21
|
+
}, H = ({ payload: o }) => {
|
|
22
|
+
const r = C(), { instance_slot: t } = o, i = x(u)?.globalStore.copyStore.copy.insights_feed?.general?.institution_Logo, e = D(t, i), a = n(t, "status_text"), l = d(L(r), t.variant, y.Neutral, "DetailedAccountBlock");
|
|
23
|
+
return /* @__PURE__ */ s(v, {
|
|
24
|
+
...l,
|
|
25
|
+
logo: e?.guid ? /* @__PURE__ */ s(_, {
|
|
26
|
+
logo: e,
|
|
27
27
|
size: 48
|
|
28
28
|
}) : null,
|
|
29
|
-
name: n(
|
|
30
|
-
statusLabel:
|
|
31
|
-
subtitle: n(
|
|
29
|
+
name: n(t, "account_name"),
|
|
30
|
+
statusLabel: a ? /* @__PURE__ */ s("div", { dangerouslySetInnerHTML: { __html: a } }) : void 0,
|
|
31
|
+
subtitle: n(t, "account_type")
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
H as default
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
//# sourceMappingURL=DetailedAccountBlock.es.js.map
|
package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailedAccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.tsx"],"sourcesContent":["import { useContext } from 'react'\n\nimport { useTheme } from '@mui/material/styles'\n\nimport { GlobalDataContext } from '../../../../common/context/GlobalDataProvider'\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport DirectDepositCard from '../../../components/DirectDepositCard'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef, asText, slotOrFlat, type FlatSlotKey } from '../../slotReaders'\n\nimport { detailedAccountVariant, getLayoutConfig } from './layout'\n\ninterface DetailedAccountBlockProps {\n payload: InsightsPayload\n}\n\ntype InstanceSlot = InsightsPayload['instance_slot']\n\nconst readFact = (instanceSlot: InstanceSlot, name: FlatSlotKey): string | undefined =>\n asText(slotOrFlat(instanceSlot, name))\n\n/** The slot's logo, else one built from the guid; the alt is worded as legacy (\"{institution} Institution Logo\"). */\nconst resolveLogo = (instanceSlot: InstanceSlot, altCopy?: string): LogoRef | undefined => {\n const dataLogo = asLogoRef(slot(instanceSlot.data, 'logo'))\n const guid = readFact(instanceSlot, 'institution_guid')\n const name = dataLogo?.alt ?? readFact(instanceSlot, 'institution_name')\n\n const logo = dataLogo ?? (guid ? { guid, alt: name ?? guid } : undefined)\n if (!logo || !name) return logo\n\n return { ...logo, alt: altCopy ? (buildDynamicCopy(altCopy, name) as string) : name }\n}\n\nconst DetailedAccountBlock = ({ payload }: DetailedAccountBlockProps) => {\n const theme = useTheme()\n const { instance_slot } = payload\n // Optional: the micro widget renders this block without a GlobalDataProvider.\n const altCopy =\n useContext(GlobalDataContext)?.globalStore.copyStore.copy.insights_feed?.general\n ?.institution_Logo\n const logo = resolveLogo(instance_slot, altCopy)\n const layout = resolveVariantConfig(\n getLayoutConfig(theme),\n instance_slot.variant,\n detailedAccountVariant.Neutral,\n 'DetailedAccountBlock',\n )\n\n return (\n <DirectDepositCard\n {...layout}\n logo={logo?.guid ? <LogoFromGuid logo={logo} size={48} /> : null}\n name={readFact(instance_slot, 'account_name')}\n statusLabel={
|
|
1
|
+
{"version":3,"file":"DetailedAccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.tsx"],"sourcesContent":["import { useContext } from 'react'\n\n// import Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { GlobalDataContext } from '../../../../common/context/GlobalDataProvider'\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport DirectDepositCard from '../../../components/DirectDepositCard'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef, asText, slotOrFlat, type FlatSlotKey } from '../../slotReaders'\n\nimport { detailedAccountVariant, getLayoutConfig } from './layout'\n\ninterface DetailedAccountBlockProps {\n payload: InsightsPayload\n}\n\ntype InstanceSlot = InsightsPayload['instance_slot']\n\nconst readFact = (instanceSlot: InstanceSlot, name: FlatSlotKey): string | undefined =>\n asText(slotOrFlat(instanceSlot, name))\n\n/** The slot's logo, else one built from the guid; the alt is worded as legacy (\"{institution} Institution Logo\"). */\nconst resolveLogo = (instanceSlot: InstanceSlot, altCopy?: string): LogoRef | undefined => {\n const dataLogo = asLogoRef(slot(instanceSlot.data, 'logo'))\n const guid = readFact(instanceSlot, 'institution_guid')\n const name = dataLogo?.alt ?? readFact(instanceSlot, 'institution_name')\n\n const logo = dataLogo ?? (guid ? { guid, alt: name ?? guid } : undefined)\n if (!logo || !name) return logo\n\n return { ...logo, alt: altCopy ? (buildDynamicCopy(altCopy, name) as string) : name }\n}\n\nconst DetailedAccountBlock = ({ payload }: DetailedAccountBlockProps) => {\n const theme = useTheme()\n const { instance_slot } = payload\n // Optional: the micro widget renders this block without a GlobalDataProvider.\n const altCopy =\n useContext(GlobalDataContext)?.globalStore.copyStore.copy.insights_feed?.general\n ?.institution_Logo\n const logo = resolveLogo(instance_slot, altCopy)\n const statusText = readFact(instance_slot, 'status_text')\n const layout = resolveVariantConfig(\n getLayoutConfig(theme),\n instance_slot.variant,\n detailedAccountVariant.Neutral,\n 'DetailedAccountBlock',\n )\n\n return (\n <DirectDepositCard\n {...layout}\n logo={logo?.guid ? <LogoFromGuid logo={logo} size={48} /> : null}\n name={readFact(instance_slot, 'account_name')}\n statusLabel={\n statusText ? (\n // Server-rendered mrs_content copy (bold-copy span around a formatted rate), not user\n // input; painted as BudgetBlock paints sub_text.\n // <Box\n // component=\"span\"\n // dangerouslySetInnerHTML={{ __html: statusText }}\n // sx={{ '& .bold-copy': { fontFamily: 'inherit', fontWeight: 'fontWeightBold' } }}\n // />\n <div dangerouslySetInnerHTML={{ __html: statusText }} />\n ) : undefined\n }\n subtitle={readFact(instance_slot, 'account_type')}\n />\n )\n}\n\nexport default DetailedAccountBlock\n"],"mappings":";;;;;;;;;;;AAsBA,IAAM,IAAA,CAAY,GAA4B,MAC5C,EAAO,EAAW,GAAc,CAAI,CAAC,GAGjC,IAAA,CAAe,GAA4B,MAA0C;AACzF,QAAM,IAAW,EAAU,EAAK,EAAa,MAAM,MAAM,CAAC,GACpD,IAAO,EAAS,GAAc,kBAAkB,GAChD,IAAO,GAAU,OAAO,EAAS,GAAc,kBAAkB,GAEjE,IAAO,MAAa,IAAO;AAAA,IAAE,MAAA;AAAA,IAAM,KAAK,KAAQ;AAAA,EAAK,IAAI;AAC/D,SAAI,CAAC,KAAQ,CAAC,IAAa,IAEpB;AAAA,IAAE,GAAG;AAAA,IAAM,KAAK,IAAW,EAAiB,GAAS,CAAI,IAAe;AAAA,EAAK;AACtF,GAEM,IAAA,CAAwB,EAAE,SAAA,EAAA,MAAyC;AACvE,QAAM,IAAQ,EAAS,GACjB,EAAE,eAAA,EAAA,IAAkB,GAEpB,IACJ,EAAW,CAAiB,GAAG,YAAY,UAAU,KAAK,eAAe,SACrE,kBACA,IAAO,EAAY,GAAe,CAAO,GACzC,IAAa,EAAS,GAAe,aAAa,GAClD,IAAS,EACb,EAAgB,CAAK,GACrB,EAAc,SACd,EAAuB,SACvB,sBACF;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,MAAM,GAAM,OAAO,gBAAA,EAAC,GAAD;AAAA,MAAoB,MAAA;AAAA,MAAM,MAAM;AAAA,IAAK,CAAA,IAAI;AAAA,IAC5D,MAAM,EAAS,GAAe,cAAc;AAAA,IAC5C,aACE,IAQE,gBAAA,EAAC,OAAD,EAAK,yBAAyB,EAAE,QAAQ,EAAW,EAAI,CAAA,IACrD;AAAA,IAEN,UAAU,EAAS,GAAe,cAAc;AAAA,EACjD,CAAA;AAEL"}
|
|
@@ -10,8 +10,6 @@ export type DetailedAccountVariant = (typeof detailedAccountVariant)[keyof typeo
|
|
|
10
10
|
export declare const directDepositVariant: {
|
|
11
11
|
readonly SetUpDirectDeposit: "set_up_direct_deposit";
|
|
12
12
|
readonly DirectDepositComplete: "direct_deposit_complete";
|
|
13
|
-
readonly MissingInterestRate: "missing_interest_rate";
|
|
14
|
-
readonly InterestRateAdded: "interest_rate_added";
|
|
15
13
|
};
|
|
16
14
|
export type DirectDepositVariant = (typeof directDepositVariant)[keyof typeof directDepositVariant];
|
|
17
15
|
export declare const isDetailedAccountVariant: (variant?: string | null) => variant is DetailedAccountVariant | DirectDepositVariant;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DIRECT_DEPOSIT_COMPLETE_GRADIENT as
|
|
1
|
+
import { DIRECT_DEPOSIT_COMPLETE_GRADIENT as s, PRIMARY_TILE_GRADIENTS as p, SUCCESS_TILE_GRADIENTS as d } from "../../../components/celebrationGradients.es.js";
|
|
2
2
|
var t = {
|
|
3
3
|
Neutral: "detailed_neutral",
|
|
4
4
|
Primary: "detailed_primary",
|
|
@@ -6,9 +6,7 @@ var t = {
|
|
|
6
6
|
Celebration: "detailed_celebration"
|
|
7
7
|
}, a = {
|
|
8
8
|
SetUpDirectDeposit: "set_up_direct_deposit",
|
|
9
|
-
DirectDepositComplete: "direct_deposit_complete"
|
|
10
|
-
MissingInterestRate: "missing_interest_rate",
|
|
11
|
-
InterestRateAdded: "interest_rate_added"
|
|
9
|
+
DirectDepositComplete: "direct_deposit_complete"
|
|
12
10
|
}, b = /* @__PURE__ */ new Set([...Object.values(t), ...Object.values(a)]), _ = (e) => e != null && b.has(e), u = (e) => {
|
|
13
11
|
const r = e === "dark" ? "grey.800" : "grey.100";
|
|
14
12
|
return {
|
|
@@ -16,35 +14,35 @@ var t = {
|
|
|
16
14
|
borderColor: r,
|
|
17
15
|
labelColor: "text.primary"
|
|
18
16
|
};
|
|
19
|
-
},
|
|
17
|
+
}, m = {
|
|
20
18
|
bgcolor: "primary.lighter",
|
|
21
19
|
borderColor: "primary.lighter",
|
|
22
20
|
labelColor: "text.primary"
|
|
23
|
-
},
|
|
21
|
+
}, c = {
|
|
24
22
|
bgcolor: "success.main",
|
|
25
23
|
borderColor: "success.main",
|
|
26
24
|
labelColor: "success.contrastText"
|
|
27
|
-
},
|
|
25
|
+
}, C = (e) => {
|
|
28
26
|
const r = e.palette.mode, o = {
|
|
29
27
|
bgcolor: "primary.lighter",
|
|
30
28
|
nameVariant: "body2",
|
|
31
29
|
pill: u(r)
|
|
32
30
|
}, i = {
|
|
33
|
-
backgroundImage:
|
|
31
|
+
backgroundImage: p[r],
|
|
34
32
|
bgcolor: "background.paper",
|
|
35
33
|
nameVariant: "body1",
|
|
36
|
-
pill:
|
|
37
|
-
},
|
|
38
|
-
backgroundImage:
|
|
34
|
+
pill: m
|
|
35
|
+
}, n = {
|
|
36
|
+
backgroundImage: d[r],
|
|
39
37
|
bgcolor: "background.paper",
|
|
40
38
|
nameVariant: "body1",
|
|
41
|
-
pill:
|
|
42
|
-
},
|
|
43
|
-
backgroundImage:
|
|
39
|
+
pill: c
|
|
40
|
+
}, l = {
|
|
41
|
+
backgroundImage: s,
|
|
44
42
|
bgcolor: "background.paper",
|
|
45
43
|
nameVariant: "body2",
|
|
46
44
|
pill: {
|
|
47
|
-
...
|
|
45
|
+
...c,
|
|
48
46
|
icon: "check_circle"
|
|
49
47
|
},
|
|
50
48
|
showConfetti: !0
|
|
@@ -52,18 +50,16 @@ var t = {
|
|
|
52
50
|
return {
|
|
53
51
|
[t.Neutral]: o,
|
|
54
52
|
[t.Primary]: i,
|
|
55
|
-
[t.Success]:
|
|
56
|
-
[t.Celebration]:
|
|
53
|
+
[t.Success]: n,
|
|
54
|
+
[t.Celebration]: l,
|
|
57
55
|
[a.SetUpDirectDeposit]: o,
|
|
58
|
-
[a.
|
|
59
|
-
[a.InterestRateAdded]: l,
|
|
60
|
-
[a.DirectDepositComplete]: c
|
|
56
|
+
[a.DirectDepositComplete]: l
|
|
61
57
|
};
|
|
62
58
|
};
|
|
63
59
|
export {
|
|
64
60
|
t as detailedAccountVariant,
|
|
65
61
|
a as directDepositVariant,
|
|
66
|
-
|
|
62
|
+
C as getLayoutConfig,
|
|
67
63
|
_ as isDetailedAccountVariant
|
|
68
64
|
};
|
|
69
65
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport {\n DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n PRIMARY_TILE_GRADIENTS,\n SUCCESS_TILE_GRADIENTS,\n} from '../../../components/celebrationGradients'\nimport type {\n DirectDepositCardStyleProps,\n DirectDepositPillConfig,\n} from '../../../components/DirectDepositCard'\n\nexport const detailedAccountVariant = {\n Neutral: 'detailed_neutral',\n Primary: 'detailed_primary',\n Success: 'detailed_success',\n Celebration: 'detailed_celebration',\n} as const\n\nexport type DetailedAccountVariant =\n (typeof detailedAccountVariant)[keyof typeof detailedAccountVariant]\n\nexport const directDepositVariant = {\n SetUpDirectDeposit: 'set_up_direct_deposit',\n DirectDepositComplete: 'direct_deposit_complete',\n
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport {\n DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n PRIMARY_TILE_GRADIENTS,\n SUCCESS_TILE_GRADIENTS,\n} from '../../../components/celebrationGradients'\nimport type {\n DirectDepositCardStyleProps,\n DirectDepositPillConfig,\n} from '../../../components/DirectDepositCard'\n\nexport const detailedAccountVariant = {\n Neutral: 'detailed_neutral',\n Primary: 'detailed_primary',\n Success: 'detailed_success',\n Celebration: 'detailed_celebration',\n} as const\n\nexport type DetailedAccountVariant =\n (typeof detailedAccountVariant)[keyof typeof detailedAccountVariant]\n\nexport const directDepositVariant = {\n SetUpDirectDeposit: 'set_up_direct_deposit',\n DirectDepositComplete: 'direct_deposit_complete',\n} as const\n\nexport type DirectDepositVariant = (typeof directDepositVariant)[keyof typeof directDepositVariant]\n\nconst VARIANTS = new Set<string>([\n ...Object.values(detailedAccountVariant),\n ...Object.values(directDepositVariant),\n])\n\nexport const isDetailedAccountVariant = (\n variant?: string | null,\n): variant is DetailedAccountVariant | DirectDepositVariant =>\n variant != null && VARIANTS.has(variant)\n\n// Grey tokens don't change with the mode, so pick the one `text.primary` reads on.\nconst neutralPill = (mode: Theme['palette']['mode']): DirectDepositPillConfig => {\n const bgcolor = mode === 'dark' ? 'grey.800' : 'grey.100'\n\n return { bgcolor, borderColor: bgcolor, labelColor: 'text.primary' }\n}\n\nconst PRIMARY_TINT_PILL: DirectDepositPillConfig = {\n bgcolor: 'primary.lighter',\n borderColor: 'primary.lighter',\n labelColor: 'text.primary',\n}\n\nconst SUCCESS_PILL: DirectDepositPillConfig = {\n bgcolor: 'success.main',\n borderColor: 'success.main',\n labelColor: 'success.contrastText',\n}\n\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<DetailedAccountVariant | DirectDepositVariant, DirectDepositCardStyleProps> => {\n const mode = theme.palette.mode\n const neutral: DirectDepositCardStyleProps = {\n bgcolor: 'primary.lighter',\n nameVariant: 'body2',\n pill: neutralPill(mode),\n }\n const primary: DirectDepositCardStyleProps = {\n backgroundImage: PRIMARY_TILE_GRADIENTS[mode],\n bgcolor: 'background.paper',\n nameVariant: 'body1',\n pill: PRIMARY_TINT_PILL,\n }\n const success: DirectDepositCardStyleProps = {\n backgroundImage: SUCCESS_TILE_GRADIENTS[mode],\n bgcolor: 'background.paper',\n nameVariant: 'body1',\n pill: SUCCESS_PILL,\n }\n const celebration: DirectDepositCardStyleProps = {\n backgroundImage: DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n bgcolor: 'background.paper',\n nameVariant: 'body2',\n pill: { ...SUCCESS_PILL, icon: 'check_circle' },\n showConfetti: true,\n }\n\n return {\n [detailedAccountVariant.Neutral]: neutral,\n [detailedAccountVariant.Primary]: primary,\n [detailedAccountVariant.Success]: success,\n [detailedAccountVariant.Celebration]: celebration,\n [directDepositVariant.SetUpDirectDeposit]: neutral,\n [directDepositVariant.DirectDepositComplete]: celebration,\n }\n}\n"],"mappings":";AAYA,IAAa,IAAyB;AAAA,EACpC,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,aAAa;AACf,GAKa,IAAuB;AAAA,EAClC,oBAAoB;AAAA,EACpB,uBAAuB;AACzB,GAIM,IAAW,oBAAI,IAAY,CAC/B,GAAG,OAAO,OAAO,CAAsB,GACvC,GAAG,OAAO,OAAO,CAAoB,CACvC,CAAC,GAEY,IAAA,CACX,MAEA,KAAW,QAAQ,EAAS,IAAI,CAAO,GAGnC,IAAA,CAAe,MAA4D;AAC/E,QAAM,IAAU,MAAS,SAAS,aAAa;AAE/C,SAAO;AAAA,IAAE,SAAA;AAAA,IAAS,aAAa;AAAA,IAAS,YAAY;AAAA,EAAe;AACrE,GAEM,IAA6C;AAAA,EACjD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAEM,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAEa,IAAA,CACX,MACuF;AACvF,QAAM,IAAO,EAAM,QAAQ,MACrB,IAAuC;AAAA,IAC3C,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM,EAAY,CAAI;AAAA,EACxB,GACM,IAAuC;AAAA,IAC3C,iBAAiB,EAAuB,CAAA;AAAA,IACxC,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM;AAAA,EACR,GACM,IAAuC;AAAA,IAC3C,iBAAiB,EAAuB,CAAA;AAAA,IACxC,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM;AAAA,EACR,GACM,IAA2C;AAAA,IAC/C,iBAAiB;AAAA,IACjB,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM;AAAA,MAAE,GAAG;AAAA,MAAc,MAAM;AAAA,IAAe;AAAA,IAC9C,cAAc;AAAA,EAChB;AAEA,SAAO;AAAA,IACJ,CAAA,EAAuB,OAAA,GAAU;AAAA,IACjC,CAAA,EAAuB,OAAA,GAAU;AAAA,IACjC,CAAA,EAAuB,OAAA,GAAU;AAAA,IACjC,CAAA,EAAuB,WAAA,GAAc;AAAA,IACrC,CAAA,EAAqB,kBAAA,GAAqB;AAAA,IAC1C,CAAA,EAAqB,qBAAA,GAAwB;AAAA,EAChD;AACF"}
|
|
@@ -1,40 +1,35 @@
|
|
|
1
|
-
import { slot as
|
|
2
|
-
import { CURRENCY_FORMAT as
|
|
3
|
-
import
|
|
4
|
-
import { resolveVariantConfig as
|
|
5
|
-
import { asLogoRef as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { Icon as O } from "@mxenabled/mx-icons";
|
|
1
|
+
import { slot as i } from "../../../../core/types/Insights.es.js";
|
|
2
|
+
import { CURRENCY_FORMAT as x, formatCurrency as L } from "../../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import S from "../../../components/StatusPill.es.js";
|
|
4
|
+
import { resolveVariantConfig as y } from "../../resolveVariantConfig.es.js";
|
|
5
|
+
import { asLogoRef as O, asNumber as z, asText as n, slotOrFlat as c } from "../../slotReaders.es.js";
|
|
6
|
+
import v, { isLogoGuid as A } from "../../../components/LogoFromGuid.es.js";
|
|
7
|
+
import B from "../../../components/MerchantHighlightCard.es.js";
|
|
8
|
+
import M from "../../../components/P2PLogoStack.es.js";
|
|
9
|
+
import { MERCHANT_LAYOUT as P, merchantBlockVariant as R } from "./layout.es.js";
|
|
10
|
+
import V from "@mui/material/Stack";
|
|
11
|
+
import { Icon as b } from "@mxenabled/mx-icons";
|
|
13
12
|
import { jsx as e } from "react/jsx-runtime";
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
], j = (a) => a === 2 || a === 3 || a === 4, H = 32, u = (a) => {
|
|
19
|
-
const r = P(a);
|
|
20
|
-
return r?.guid && B(r.guid) ? r : void 0;
|
|
21
|
-
}, U = (a) => {
|
|
13
|
+
var p = 64, w = 6, T = 32, d = (a) => {
|
|
14
|
+
const r = O(a);
|
|
15
|
+
return r?.guid && A(r.guid) ? r : void 0;
|
|
16
|
+
}, E = (a) => {
|
|
22
17
|
if (!Array.isArray(a)) return [];
|
|
23
18
|
const r = /* @__PURE__ */ new Map();
|
|
24
|
-
for (const t of a.map(
|
|
19
|
+
for (const t of a.map(d)) t?.guid && !r.has(t.guid) && r.set(t.guid, t);
|
|
25
20
|
return [...r.values()];
|
|
26
|
-
},
|
|
21
|
+
}, _ = /* @__PURE__ */ e(b, {
|
|
27
22
|
"aria-hidden": !0,
|
|
28
23
|
"data-icon": "storefront",
|
|
29
24
|
name: "storefront",
|
|
30
|
-
size:
|
|
25
|
+
size: T,
|
|
31
26
|
sx: { color: "text.secondary" }
|
|
32
|
-
}),
|
|
27
|
+
}), G = (a, r) => a.length ? a.map((t) => /* @__PURE__ */ e(v, {
|
|
33
28
|
logo: t,
|
|
34
29
|
size: r
|
|
35
|
-
}, t.guid)) : [
|
|
36
|
-
const { instance_slot: r } = a, { data: t } = r, o =
|
|
37
|
-
icon: /* @__PURE__ */ e(
|
|
30
|
+
}, t.guid)) : [_], Q = ({ payload: a }) => {
|
|
31
|
+
const { instance_slot: r } = a, { data: t } = r, o = y(P, r.variant, R.SingleStandard, "MerchantBlock"), g = n(c(r, "status_text")), u = o.status && g ? /* @__PURE__ */ e(S, {
|
|
32
|
+
icon: /* @__PURE__ */ e(b, {
|
|
38
33
|
"aria-hidden": !0,
|
|
39
34
|
"data-icon": "check_circle",
|
|
40
35
|
fill: !0,
|
|
@@ -42,76 +37,64 @@ var k = 64, b = 6, I = 72, K = 3, F = 10, Z = [
|
|
|
42
37
|
size: 16,
|
|
43
38
|
sx: { color: "success.700" }
|
|
44
39
|
}),
|
|
45
|
-
label:
|
|
40
|
+
label: g,
|
|
46
41
|
sx: o.kind === "single" ? void 0 : {
|
|
47
42
|
alignSelf: "stretch",
|
|
48
43
|
justifyContent: "center"
|
|
49
44
|
}
|
|
50
45
|
}) : void 0;
|
|
51
46
|
if (o.kind !== "single") {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
const d = c.slice(0, K), S = j(d.length) && o.cascade?.offsets?.[d.length] || Z;
|
|
55
|
-
return /* @__PURE__ */ e(M, {
|
|
56
|
-
background: o.background,
|
|
57
|
-
fullBleed: !0,
|
|
58
|
-
logos: _(d, I),
|
|
59
|
-
overlap: o.cascade?.overlap ?? b,
|
|
60
|
-
rankOffsets: S.map((x) => F + x),
|
|
61
|
-
ranked: !0
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
const p = o.logo?.size ?? k;
|
|
65
|
-
return /* @__PURE__ */ e(G, {
|
|
47
|
+
const C = E(i(t, "logos")), h = o.logo?.size ?? p;
|
|
48
|
+
return /* @__PURE__ */ e(V, {
|
|
66
49
|
sx: {
|
|
67
50
|
background: o.background,
|
|
68
51
|
bgcolor: o.background ? void 0 : o.bgcolor,
|
|
69
52
|
p: 16,
|
|
70
53
|
width: "100%"
|
|
71
54
|
},
|
|
72
|
-
children: /* @__PURE__ */ e(
|
|
55
|
+
children: /* @__PURE__ */ e(M, {
|
|
73
56
|
borderColor: o.logo?.borderColor ?? null,
|
|
74
|
-
logos:
|
|
57
|
+
logos: G(C, h),
|
|
75
58
|
offsets: o.cascade?.offsets,
|
|
76
|
-
overlap: o.cascade?.overlap ??
|
|
59
|
+
overlap: o.cascade?.overlap ?? w,
|
|
77
60
|
shadow: "elevation",
|
|
78
|
-
size:
|
|
79
|
-
status:
|
|
61
|
+
size: h,
|
|
62
|
+
status: u
|
|
80
63
|
})
|
|
81
64
|
});
|
|
82
65
|
}
|
|
83
|
-
const
|
|
84
|
-
if (!
|
|
85
|
-
const
|
|
86
|
-
alt:
|
|
66
|
+
const l = n(i(t, "primary_text")) || n(c(r, "merchant_name"));
|
|
67
|
+
if (!l) return null;
|
|
68
|
+
const s = z(c(r, "amount")), k = n(i(t, "header_text")) || n(i(t, "date")), m = d(i(t, "logo")) ?? d({
|
|
69
|
+
alt: l,
|
|
87
70
|
fallback_guid: r.category_guid,
|
|
88
71
|
guid: r.merchant_guid
|
|
89
|
-
}),
|
|
90
|
-
return /* @__PURE__ */ e(
|
|
91
|
-
amount:
|
|
72
|
+
}), f = o.logo?.size ?? p;
|
|
73
|
+
return /* @__PURE__ */ e(B, {
|
|
74
|
+
amount: s !== void 0 && s !== 0 ? L(s, x.cents) : void 0,
|
|
92
75
|
amountPill: o.amountPill,
|
|
93
76
|
amountVariant: o.amountVariant,
|
|
94
77
|
background: o.background,
|
|
95
78
|
bgcolor: o.bgcolor,
|
|
96
79
|
borderColor: o.borderColor,
|
|
97
|
-
eyebrow: o.hideDate ? void 0 :
|
|
80
|
+
eyebrow: o.hideDate ? void 0 : k,
|
|
98
81
|
fullBleed: o.fullBleed,
|
|
99
82
|
gap: o.gap,
|
|
100
|
-
logo:
|
|
101
|
-
logo:
|
|
102
|
-
size:
|
|
103
|
-
}) :
|
|
83
|
+
logo: m ? /* @__PURE__ */ e(v, {
|
|
84
|
+
logo: m,
|
|
85
|
+
size: f
|
|
86
|
+
}) : _,
|
|
104
87
|
logoBorderColor: o.logo?.borderColor,
|
|
105
88
|
logoRadius: o.logo?.radius,
|
|
106
89
|
logoShadow: o.logo?.shadow,
|
|
107
|
-
logoSize:
|
|
108
|
-
name:
|
|
90
|
+
logoSize: f,
|
|
91
|
+
name: l,
|
|
109
92
|
nameVariant: o.nameVariant,
|
|
110
|
-
trailing:
|
|
93
|
+
trailing: u
|
|
111
94
|
});
|
|
112
95
|
};
|
|
113
96
|
export {
|
|
114
|
-
|
|
97
|
+
Q as default
|
|
115
98
|
};
|
|
116
99
|
|
|
117
100
|
//# sourceMappingURL=MerchantBlock.es.js.map
|