@mx-cartographer/experiences 9.7.155 → 9.7.157
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 +14 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +6 -5
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js +19 -22
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +44 -49
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +37 -41
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BlockErrorMessage.d.ts +4 -0
- package/dist/insights-v2/actionBlocks/BlockErrorMessage.es.js +17 -0
- package/dist/insights-v2/actionBlocks/BlockErrorMessage.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +116 -120
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/ContactSupportActionBlock.es.js +14 -18
- package/dist/insights-v2/actionBlocks/ContactSupportActionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.d.ts +0 -6
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js +34 -26
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.d.ts +4 -4
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js +239 -220
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js +36 -32
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js +4 -8
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +26 -28
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/HelpBlock/HelpBlock.es.js +11 -14
- package/dist/insights-v2/actionBlocks/HelpBlock/HelpBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js +28 -30
- package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +53 -55
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +26 -31
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +38 -41
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js +11 -16
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +39 -42
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +76 -78
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditUtilizationBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"CreditUtilizationBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.tsx"],"sourcesContent":["import { useState } from 'react'\n\nimport { observer } from 'mobx-react-lite'\n\nimport { Drawer, useAccountStore, useGlobalCopyStore } from '../../../common'\nimport type { Account } from '../../../core'\nimport type { ActionBlockProps } from '../../mappings/blocks'\nimport { AccountDetailsBlock } from '../AccountDetailsBlock'\nimport { BlockErrorMessage } from '../BlockErrorMessage'\n\nimport CreditUtilizationContent, { type CreditUtilizationCard } from './CreditUtilizationContent'\nimport { readCardRows, readSummary, type CreditCardRow } from './layout'\n\nconst toCard = (row: CreditCardRow, account?: Account): CreditUtilizationCard => ({\n ...row,\n accountLoaded: account !== undefined,\n institutionGuid: account?.institution_guid ?? '',\n})\n\nexport const CreditUtilizationBlock = observer(function CreditUtilizationBlock({\n beat,\n}: ActionBlockProps) {\n const [tappedAccountGuid, setTappedAccountGuid] = useState<string | null>(null)\n const { accounts: accountsCopy, insights_feed: insightsFeedCopy } = useGlobalCopyStore()\n const { accounts } = useAccountStore()\n const copy = insightsFeedCopy?.credit_utilization\n\n if (!copy) {\n return <BlockErrorMessage />\n }\n\n const data = beat.insights_payload?.instance_slot_data\n const accountByGuid = new Map(accounts.map((account) => [account.guid, account]))\n const cards = readCardRows(data?.data_series).map((row) =>\n toCard(row, accountByGuid.get(row.guid)),\n )\n\n return (\n <>\n <CreditUtilizationContent\n accountDetailsLabel={accountsCopy?.account_details}\n cards={cards}\n copy={copy}\n onCardClick={({ guid }) => setTappedAccountGuid(guid)}\n summary={readSummary(data)}\n />\n <Drawer\n ariaLabelClose={accountsCopy?.close_account_details_aria}\n isOpen={tappedAccountGuid !== null}\n onClose={() => setTappedAccountGuid(null)}\n title={accountsCopy?.account_details}\n >\n {tappedAccountGuid && (\n <AccountDetailsBlock\n beat={{ ...beat, primary_account: undefined, primary_account_guid: tappedAccountGuid }}\n />\n )}\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;;AAaA,IAAM,IAAA,CAAU,GAAoB,OAA8C;AAAA,EAChF,GAAG;AAAA,EACH,eAAe,MAAY;AAAA,EAC3B,iBAAiB,GAAS,oBAAoB;AAChD,IAEa,IAAyB,EAAS,SAAgC,EAC7E,MAAA,EAAA,GACmB;AACnB,QAAM,CAAC,GAAmB,CAAA,IAAwB,EAAwB,IAAI,GACxE,EAAE,UAAU,GAAc,eAAe,EAAA,IAAqB,EAAmB,GACjF,EAAE,UAAA,EAAA,IAAa,EAAgB,GAC/B,IAAO,GAAkB;AAE/B,MAAI,CAAC,EACH,QAAO,gBAAA,EAAC,GAAD,CAAoB,CAAA;AAG7B,QAAM,IAAO,EAAK,kBAAkB,oBAC9B,IAAgB,IAAI,IAAI,EAAS,IAAA,CAAK,MAAY,CAAC,EAAQ,MAAM,CAAO,CAAC,CAAC,GAC1E,IAAQ,EAAa,GAAM,WAAW,EAAE,IAAA,CAAK,MACjD,EAAO,GAAK,EAAc,IAAI,EAAI,IAAI,CAAC,CACzC;AAEA,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,qBAAqB,GAAc;AAAA,IAC5B,OAAA;AAAA,IACD,MAAA;AAAA,IACN,aAAA,CAAc,EAAE,MAAA,EAAA,MAAW,EAAqB,CAAI;AAAA,IACpD,SAAS,EAAY,CAAI;AAAA,EAC1B,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,GAAc;AAAA,IAC9B,QAAQ,MAAsB;AAAA,IAC9B,SAAA,MAAe,EAAqB,IAAI;AAAA,IACxC,OAAO,GAAc;AAAA,IAEpB,UAAA,KACC,gBAAA,EAAC,GAAD,EACE,MAAM;AAAA,MAAE,GAAG;AAAA,MAAM,iBAAiB;AAAA,MAAW,sBAAsB;AAAA,IAAkB,EACtF,CAAA;AAAA,EAEG,CAAA,CACR,EAAA,CAAA;AAEN,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { CreditUtilizationCopy } from '../../../core/types/localization/InsightsFeedCopy';
|
|
2
2
|
import { CreditCardRow, CreditUtilizationSummary } from './layout';
|
|
3
3
|
export interface CreditUtilizationCard extends CreditCardRow {
|
|
4
|
-
|
|
4
|
+
accountLoaded: boolean;
|
|
5
5
|
institutionGuid: string;
|
|
6
6
|
}
|
|
7
7
|
export interface CreditUtilizationContentProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
descriptionHtml?: string;
|
|
10
8
|
summary?: CreditUtilizationSummary;
|
|
11
9
|
cards: CreditUtilizationCard[];
|
|
12
10
|
copy: CreditUtilizationCopy;
|
|
11
|
+
onCardClick?: (card: CreditUtilizationCard) => void;
|
|
12
|
+
accountDetailsLabel?: string;
|
|
13
13
|
}
|
|
14
14
|
/** Presentational body of the Credit Utilization drawer, minus the drawer header. */
|
|
15
|
-
declare const CreditUtilizationContent: ({ cards, copy,
|
|
15
|
+
declare const CreditUtilizationContent: ({ accountDetailsLabel, cards, copy, onCardClick, summary, }: CreditUtilizationContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export default CreditUtilizationContent;
|
|
@@ -1,53 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
p: 24
|
|
16
|
-
},
|
|
17
|
-
children: t
|
|
18
|
-
}), p = ({ children: t, mb: r = 16 }) => /* @__PURE__ */ e(l, {
|
|
1
|
+
import { sanitizeHtml as w } from "../../../core/utils/SanitizeHtml.es.js";
|
|
2
|
+
import { DEFAULT_INSTITUTION_LOGO_URL as T } from "../../../core/constants/InstitutionLogo.es.js";
|
|
3
|
+
import { CURRENCY_FORMAT as x, formatCurrency as g } from "../../../core/utils/NumberFormatting.es.js";
|
|
4
|
+
import { ELEVATION_SHADOW as R } from "../../components/shared/elevation.es.js";
|
|
5
|
+
import { TipSection as L } from "../../../insights/components/shared/ChartDrawerTemplate/TipSection.es.js";
|
|
6
|
+
import { DRAWER_TIP_ICON as S } from "../../components/drawerTip.es.js";
|
|
7
|
+
import { UTILIZATION_BANDS as h, getLegendPosition as $, getUtilizationBand as f } from "./layout.es.js";
|
|
8
|
+
import l from "@mui/material/Stack";
|
|
9
|
+
import { Icon as k, InstitutionLogo as z, Text as d } from "@mxenabled/mxui";
|
|
10
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
11
|
+
import { useTheme as v } from "@mui/material/styles";
|
|
12
|
+
import a from "@mui/material/Box";
|
|
13
|
+
import A from "@mui/material/ButtonBase";
|
|
14
|
+
var _ = (o) => o.vars?.overlays?.[1] ?? "none", c = 20, D = "30%", b = ({ children: o }) => /* @__PURE__ */ e(d, {
|
|
19
15
|
bold: !0,
|
|
20
16
|
component: "h3",
|
|
21
|
-
sx: { mb:
|
|
17
|
+
sx: { mb: 12 },
|
|
22
18
|
variant: "body1",
|
|
23
|
-
children:
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
19
|
+
children: o
|
|
20
|
+
}), O = ({ definition: o, term: i }) => /* @__PURE__ */ e(a, {
|
|
21
|
+
component: "li",
|
|
22
|
+
sx: {
|
|
23
|
+
backgroundImage: _,
|
|
24
|
+
bgcolor: "background.default",
|
|
25
|
+
borderRadius: "8px",
|
|
26
|
+
px: 8,
|
|
27
|
+
py: 6
|
|
28
|
+
},
|
|
29
|
+
children: /* @__PURE__ */ n(d, {
|
|
30
|
+
component: "p",
|
|
31
|
+
variant: "body2",
|
|
32
|
+
children: [i && /* @__PURE__ */ n("b", { children: [i, " "] }), o]
|
|
33
|
+
})
|
|
34
|
+
}), U = ({ copy: o }) => {
|
|
35
|
+
const i = o.ratio_definition && o.utilization_definition ? [{
|
|
36
|
+
definition: o.ratio_definition,
|
|
37
|
+
term: o.ratio_term
|
|
38
|
+
}, {
|
|
39
|
+
definition: o.utilization_definition,
|
|
40
|
+
term: o.utilization_term
|
|
41
|
+
}] : [{ definition: o.ratio_explanation }];
|
|
42
|
+
return /* @__PURE__ */ e(l, {
|
|
43
|
+
component: "ul",
|
|
44
|
+
role: "list",
|
|
45
|
+
sx: {
|
|
46
|
+
gap: 12,
|
|
47
|
+
listStyle: "none",
|
|
48
|
+
m: 0,
|
|
49
|
+
p: 0
|
|
50
|
+
},
|
|
51
|
+
children: i.map((t) => /* @__PURE__ */ e(O, { ...t }, t.definition))
|
|
41
52
|
});
|
|
42
|
-
},
|
|
43
|
-
const
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
/* @__PURE__ */ e(
|
|
50
|
-
"aria-label":
|
|
53
|
+
}, B = ({ copy: o, percentage: i }) => {
|
|
54
|
+
const t = v(), r = h.length - 1, m = i === void 0 ? void 0 : f(i);
|
|
55
|
+
return /* @__PURE__ */ n(a, {
|
|
56
|
+
sx: {
|
|
57
|
+
mt: 24,
|
|
58
|
+
position: "relative"
|
|
59
|
+
},
|
|
60
|
+
children: [m && i !== void 0 && /* @__PURE__ */ e(a, {
|
|
61
|
+
"aria-label": `${i}% ${o[m.band]}`,
|
|
62
|
+
role: "img",
|
|
63
|
+
sx: {
|
|
64
|
+
bgcolor: "background.paper",
|
|
65
|
+
border: "4px solid",
|
|
66
|
+
borderColor: m.color(t),
|
|
67
|
+
borderRadius: "50%",
|
|
68
|
+
height: c,
|
|
69
|
+
left: `clamp(0px, calc(${$(i)}% - ${c / 2}px), calc(100% - ${c}px))`,
|
|
70
|
+
position: "absolute",
|
|
71
|
+
top: -4,
|
|
72
|
+
width: c
|
|
73
|
+
}
|
|
74
|
+
}), /* @__PURE__ */ e(l, {
|
|
75
|
+
"aria-label": o.what_does_this_mean,
|
|
51
76
|
component: "ul",
|
|
52
77
|
role: "list",
|
|
53
78
|
sx: {
|
|
@@ -55,10 +80,9 @@ var h = (t) => C(t, w.cents), u = ({ children: t }) => /* @__PURE__ */ e(d, {
|
|
|
55
80
|
gap: 2,
|
|
56
81
|
listStyle: "none",
|
|
57
82
|
m: 0,
|
|
58
|
-
mb: 24,
|
|
59
83
|
p: 0
|
|
60
84
|
},
|
|
61
|
-
children:
|
|
85
|
+
children: h.map(({ band: s, color: u, range: I }, p) => /* @__PURE__ */ n(a, {
|
|
62
86
|
component: "li",
|
|
63
87
|
sx: {
|
|
64
88
|
flex: 1,
|
|
@@ -66,205 +90,198 @@ var h = (t) => C(t, w.cents), u = ({ children: t }) => /* @__PURE__ */ e(d, {
|
|
|
66
90
|
overflowWrap: "anywhere"
|
|
67
91
|
},
|
|
68
92
|
children: [
|
|
69
|
-
/* @__PURE__ */ e(
|
|
93
|
+
/* @__PURE__ */ e(a, {
|
|
70
94
|
"aria-hidden": !0,
|
|
71
95
|
sx: {
|
|
72
|
-
bgcolor:
|
|
73
|
-
borderRadius:
|
|
96
|
+
bgcolor: u(t),
|
|
97
|
+
borderRadius: p === 0 ? "8px 0 0 8px" : p === r ? "0 8px 8px 0" : void 0,
|
|
74
98
|
height: 12,
|
|
75
99
|
mb: 8
|
|
76
100
|
}
|
|
77
101
|
}),
|
|
78
|
-
/* @__PURE__ */ e(
|
|
102
|
+
/* @__PURE__ */ e(d, {
|
|
79
103
|
bold: !0,
|
|
80
104
|
component: "p",
|
|
81
105
|
variant: "caption",
|
|
82
|
-
children:
|
|
106
|
+
children: I
|
|
83
107
|
}),
|
|
84
|
-
/* @__PURE__ */ e(
|
|
108
|
+
/* @__PURE__ */ e(d, {
|
|
85
109
|
component: "p",
|
|
86
110
|
variant: "caption",
|
|
87
|
-
children:
|
|
111
|
+
children: o[s]
|
|
88
112
|
})
|
|
89
113
|
]
|
|
90
|
-
},
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
/* @__PURE__ */ e(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}, R = ({ card: t, copy: r }) => {
|
|
105
|
-
const n = x(), { limit: i, percentage: a } = t, c = i !== null && a !== null, s = c ? g(a).color(n) : n.palette.text.disabled;
|
|
106
|
-
return /* @__PURE__ */ o(m, {
|
|
107
|
-
component: "li",
|
|
108
|
-
sx: {
|
|
109
|
-
border: "1px solid",
|
|
110
|
-
borderColor: "divider",
|
|
111
|
-
borderRadius: "8px",
|
|
112
|
-
p: 16
|
|
113
|
-
},
|
|
114
|
-
children: [/* @__PURE__ */ o(d, {
|
|
114
|
+
}, s))
|
|
115
|
+
})]
|
|
116
|
+
});
|
|
117
|
+
}, E = ({ card: { label: o, percentage: i } }) => {
|
|
118
|
+
const t = v();
|
|
119
|
+
return i === null ? null : /* @__PURE__ */ n(a, {
|
|
120
|
+
sx: { mt: 16 },
|
|
121
|
+
children: [/* @__PURE__ */ e(a, {
|
|
122
|
+
"aria-label": o,
|
|
123
|
+
"aria-valuemax": 100,
|
|
124
|
+
"aria-valuemin": 0,
|
|
125
|
+
"aria-valuenow": i,
|
|
126
|
+
"aria-valuetext": `${i}%`,
|
|
127
|
+
role: "meter",
|
|
115
128
|
sx: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
129
|
+
bgcolor: "divider",
|
|
130
|
+
borderRadius: 999,
|
|
131
|
+
height: 8,
|
|
132
|
+
overflow: "hidden"
|
|
119
133
|
},
|
|
120
|
-
children:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
gap: 4,
|
|
129
|
-
minWidth: 0
|
|
130
|
-
},
|
|
131
|
-
children: [/* @__PURE__ */ e(l, {
|
|
132
|
-
bold: !0,
|
|
133
|
-
truncate: !0,
|
|
134
|
-
variant: "body2",
|
|
135
|
-
children: t.label
|
|
136
|
-
}), c ? /* @__PURE__ */ e(m, {
|
|
137
|
-
"aria-label": t.label,
|
|
138
|
-
"aria-valuemax": 100,
|
|
139
|
-
"aria-valuemin": 0,
|
|
140
|
-
"aria-valuenow": a,
|
|
141
|
-
"aria-valuetext": `${a}%`,
|
|
142
|
-
role: "meter",
|
|
143
|
-
sx: {
|
|
144
|
-
bgcolor: "neutral.light",
|
|
145
|
-
borderRadius: 999,
|
|
146
|
-
height: 8,
|
|
147
|
-
overflow: "hidden"
|
|
148
|
-
},
|
|
149
|
-
children: /* @__PURE__ */ e(m, { sx: {
|
|
150
|
-
bgcolor: s,
|
|
151
|
-
borderRadius: 999,
|
|
152
|
-
height: "100%",
|
|
153
|
-
width: `${a}%`
|
|
154
|
-
} })
|
|
155
|
-
}) : /* @__PURE__ */ o(d, {
|
|
156
|
-
sx: {
|
|
157
|
-
alignItems: "center",
|
|
158
|
-
flexDirection: "row",
|
|
159
|
-
gap: 4
|
|
160
|
-
},
|
|
161
|
-
children: [/* @__PURE__ */ e(D, {
|
|
162
|
-
name: "info",
|
|
163
|
-
size: 14,
|
|
164
|
-
sx: { color: "text.secondary" }
|
|
165
|
-
}), /* @__PURE__ */ e(l, {
|
|
166
|
-
color: "text.secondary",
|
|
167
|
-
variant: "caption",
|
|
168
|
-
children: r.credit_limit_not_shared
|
|
169
|
-
})]
|
|
170
|
-
})]
|
|
171
|
-
})]
|
|
172
|
-
}), /* @__PURE__ */ o(d, {
|
|
134
|
+
children: /* @__PURE__ */ e(a, { sx: {
|
|
135
|
+
bgcolor: f(i).color(t),
|
|
136
|
+
borderRadius: 999,
|
|
137
|
+
height: "100%",
|
|
138
|
+
width: `${i}%`
|
|
139
|
+
} })
|
|
140
|
+
}), /* @__PURE__ */ n(l, {
|
|
141
|
+
"aria-hidden": !0,
|
|
173
142
|
sx: {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
143
|
+
alignItems: "center",
|
|
144
|
+
ml: "30%",
|
|
145
|
+
transform: "translateX(-50%)",
|
|
146
|
+
width: "max-content"
|
|
177
147
|
},
|
|
178
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ e(a, { sx: {
|
|
149
|
+
bgcolor: "divider",
|
|
150
|
+
height: 6,
|
|
151
|
+
width: "1px"
|
|
152
|
+
} }), /* @__PURE__ */ e(d, {
|
|
153
|
+
variant: "caption",
|
|
154
|
+
children: D
|
|
155
|
+
})]
|
|
156
|
+
})]
|
|
157
|
+
});
|
|
158
|
+
}, C = (o, i) => [
|
|
159
|
+
o.label,
|
|
160
|
+
g(o.amount, x.cents),
|
|
161
|
+
o.percentage === null ? void 0 : `${o.percentage}%`,
|
|
162
|
+
i
|
|
163
|
+
].filter(Boolean).join(", "), H = ({ accountDetailsLabel: o, card: i, copy: t, onClick: r }) => /* @__PURE__ */ e(a, {
|
|
164
|
+
component: "li",
|
|
165
|
+
children: /* @__PURE__ */ n(a, {
|
|
166
|
+
...r && {
|
|
167
|
+
"aria-haspopup": "dialog",
|
|
168
|
+
"aria-label": C(i, o),
|
|
169
|
+
component: A,
|
|
170
|
+
onClick: r
|
|
171
|
+
},
|
|
172
|
+
sx: {
|
|
173
|
+
backgroundImage: _,
|
|
174
|
+
bgcolor: "background.paper",
|
|
175
|
+
borderRadius: "8px",
|
|
176
|
+
boxShadow: R[1],
|
|
177
|
+
display: "block",
|
|
178
|
+
p: 16,
|
|
179
|
+
textAlign: "left",
|
|
180
|
+
width: "100%",
|
|
181
|
+
...r && {
|
|
182
|
+
"&:hover": { bgcolor: "action.hover" },
|
|
183
|
+
"&.Mui-focusVisible": { bgcolor: "action.focus" }
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
children: [
|
|
187
|
+
/* @__PURE__ */ n(l, {
|
|
179
188
|
sx: {
|
|
180
|
-
alignItems: "
|
|
181
|
-
borderBottom: "1px solid",
|
|
182
|
-
borderColor: "divider",
|
|
189
|
+
alignItems: "flex-start",
|
|
183
190
|
flexDirection: "row",
|
|
184
|
-
|
|
185
|
-
pb: 10
|
|
191
|
+
gap: 12
|
|
186
192
|
},
|
|
187
|
-
children: [
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
},
|
|
209
|
-
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ e(z, {
|
|
195
|
+
alt: "",
|
|
196
|
+
institutionGuid: i.institutionGuid,
|
|
197
|
+
logoUrl: i.institutionGuid ? void 0 : T,
|
|
198
|
+
size: 40
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ n(l, {
|
|
201
|
+
sx: {
|
|
202
|
+
flexGrow: 1,
|
|
203
|
+
minWidth: 0
|
|
204
|
+
},
|
|
205
|
+
children: [/* @__PURE__ */ e(d, {
|
|
206
|
+
bold: !0,
|
|
207
|
+
truncate: !0,
|
|
208
|
+
variant: "body1",
|
|
209
|
+
children: i.label
|
|
210
|
+
}), /* @__PURE__ */ e(d, {
|
|
211
|
+
variant: "body2",
|
|
212
|
+
children: g(i.amount, x.cents)
|
|
213
|
+
})]
|
|
214
|
+
}),
|
|
215
|
+
i.percentage !== null && /* @__PURE__ */ n(d, {
|
|
210
216
|
bold: !0,
|
|
211
|
-
variant: "
|
|
212
|
-
children:
|
|
213
|
-
})
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
variant: "caption",
|
|
218
|
-
children: h(i)
|
|
219
|
-
})] })]
|
|
220
|
-
})]
|
|
221
|
-
}), c && /* @__PURE__ */ o(d, {
|
|
217
|
+
variant: "body1",
|
|
218
|
+
children: [i.percentage, "%"]
|
|
219
|
+
})
|
|
220
|
+
]
|
|
221
|
+
}),
|
|
222
|
+
i.percentage === null && /* @__PURE__ */ n(l, {
|
|
222
223
|
sx: {
|
|
224
|
+
alignItems: "center",
|
|
223
225
|
flexDirection: "row",
|
|
224
|
-
|
|
226
|
+
gap: 4,
|
|
227
|
+
mt: 16
|
|
225
228
|
},
|
|
226
|
-
children: [/* @__PURE__ */ e(
|
|
229
|
+
children: [/* @__PURE__ */ e(k, {
|
|
230
|
+
name: "info",
|
|
231
|
+
size: 14,
|
|
232
|
+
sx: { color: "text.secondary" }
|
|
233
|
+
}), /* @__PURE__ */ e(d, {
|
|
234
|
+
color: "text.secondary",
|
|
227
235
|
variant: "caption",
|
|
228
|
-
children:
|
|
229
|
-
}), /* @__PURE__ */ o(l, {
|
|
230
|
-
bold: !0,
|
|
231
|
-
variant: "caption",
|
|
232
|
-
children: [a, "%"]
|
|
236
|
+
children: t.credit_limit_not_shared
|
|
233
237
|
})]
|
|
234
|
-
})
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ e(E, { card: i })
|
|
240
|
+
]
|
|
241
|
+
})
|
|
242
|
+
}), N = (o) => {
|
|
243
|
+
const i = /* @__PURE__ */ new Map();
|
|
244
|
+
return o.map((t) => {
|
|
245
|
+
const r = (i.get(t.guid) ?? 0) + 1;
|
|
246
|
+
return i.set(t.guid, r), {
|
|
247
|
+
card: t,
|
|
248
|
+
key: r === 1 ? t.guid : `${t.guid}-${r}`
|
|
244
249
|
};
|
|
245
250
|
});
|
|
246
|
-
},
|
|
251
|
+
}, J = ({ accountDetailsLabel: o, cards: i, copy: t, onCardClick: r, summary: m }) => /* @__PURE__ */ n(l, {
|
|
247
252
|
sx: {
|
|
248
253
|
bgcolor: "background.default",
|
|
249
|
-
|
|
250
|
-
pb: 24
|
|
254
|
+
minHeight: "100%"
|
|
251
255
|
},
|
|
252
|
-
children: [
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
children: [/* @__PURE__ */ n(l, {
|
|
257
|
+
sx: {
|
|
258
|
+
bgcolor: "background.paper",
|
|
259
|
+
p: 24
|
|
260
|
+
},
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ e(b, { children: t.what_does_this_mean }),
|
|
263
|
+
/* @__PURE__ */ e(U, { copy: t }),
|
|
264
|
+
/* @__PURE__ */ e(B, {
|
|
265
|
+
copy: t,
|
|
266
|
+
percentage: m?.percentage
|
|
258
267
|
}),
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
dangerouslySetInnerHTML: { __html:
|
|
262
|
-
sx: {
|
|
263
|
-
|
|
268
|
+
/* @__PURE__ */ e(L, {
|
|
269
|
+
icon: S,
|
|
270
|
+
message: /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: w(t.tip || t.recommendation) } }),
|
|
271
|
+
sx: {
|
|
272
|
+
mb: 0,
|
|
273
|
+
mt: 24,
|
|
274
|
+
mx: 0
|
|
275
|
+
}
|
|
264
276
|
})
|
|
265
|
-
]
|
|
266
|
-
|
|
267
|
-
|
|
277
|
+
]
|
|
278
|
+
}), i.length > 0 && /* @__PURE__ */ n(l, {
|
|
279
|
+
sx: {
|
|
280
|
+
borderTop: "1px solid",
|
|
281
|
+
borderTopColor: "divider",
|
|
282
|
+
p: 24
|
|
283
|
+
},
|
|
284
|
+
children: [/* @__PURE__ */ e(b, { children: t.your_cards || t.per_card_header }), /* @__PURE__ */ e(l, {
|
|
268
285
|
component: "ul",
|
|
269
286
|
role: "list",
|
|
270
287
|
sx: {
|
|
@@ -273,15 +290,17 @@ var h = (t) => C(t, w.cents), u = ({ children: t }) => /* @__PURE__ */ e(d, {
|
|
|
273
290
|
m: 0,
|
|
274
291
|
p: 0
|
|
275
292
|
},
|
|
276
|
-
children:
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
293
|
+
children: N(i).map(({ card: s, key: u }) => /* @__PURE__ */ e(H, {
|
|
294
|
+
accountDetailsLabel: o,
|
|
295
|
+
card: s,
|
|
296
|
+
copy: t,
|
|
297
|
+
onClick: r && s.accountLoaded ? () => r(s) : void 0
|
|
298
|
+
}, u))
|
|
299
|
+
})]
|
|
300
|
+
})]
|
|
282
301
|
});
|
|
283
302
|
export {
|
|
284
|
-
|
|
303
|
+
J as default
|
|
285
304
|
};
|
|
286
305
|
|
|
287
306
|
//# sourceMappingURL=CreditUtilizationContent.es.js.map
|